GNS3 / gns3-gui

GNS3 Graphical Network Simulator
http://www.gns3.com
GNU General Public License v3.0
2.19k stars 439 forks source link

[Linux/2.1.0] Dragging any qemu node into any project fails: Invalid JSON: Additional properties are not allowed #2376

Closed jean-christophe-manciot closed 6 years ago

jean-christophe-manciot commented 6 years ago

Ubuntu 17.10 GNS3 2.1.0

Dragging any qemu node into the topology area with the mouse leads to an error: dragging gns3 nodes

Error while creating node: Bad request http://127.0.0.1:9000/v2/compute/projects/01656cac-024d-4b99-9a9a-a057ce029ad6/qemu/nodes {
    "message": "Invalid JSON: Additional properties are not allowed ('default_symbol', 'hover_symbol' were unexpected) in schema: {\"$schema\": \"http://json-schema.org/draft-04/schema#\", \"description\": \"Request validation to create a new QEMU VM instance\", \"type\": \"object\", \"properties\": {\"node_id\": {\"description\": \"Node UUID\", \"oneOf\": [{\"type\": \"string\", \"minLength\": 36, \"maxLength\": 36, \"pattern\": \"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$\"}, {\"type\": \"integer\"}]}, \"name\": {\"description\": \"QEMU VM instance name\", \"type\": \"string\", \"minLength\": 1}, \"usage\": {\"description\": \"How to use the qemu VM\", \"type\": \"string\"}, \"linked_clone\": {\"description\": \"Whether the VM is a linked clone or not\", \"type\": \"boolean\"}, \"qemu_path\": {\"description\": \"Path to QEMU\", \"type\": [\"string\", \"null\"], \"minLength\": 1}, \"platform\": {\"description\": \"Platform to emulate\", \"enum\": [\"aarch64\", \"alpha\", \"arm\", \"cris\", \"i386\", \"lm32\", \"m68k\", \"microblaze\", \"microblazeel\", \"mips\", \"mips64\", \"mips64el\", \"mipsel\", \"moxie\", \"or32\", \"ppc\", \"ppc64\", \"ppcemb\", \"s390x\", \"sh4\", \"sh4eb\", \"sparc\", \"sparc64\", \"tricore\", \"unicore32\", \"x86_64\", \"xtensa\", \"xtensaeb\", \"null\"]}, \"console\": {\"description\": \"Console TCP port\", \"minimum\": 1, \"maximum\": 65535, \"type\": [\"integer\", \"null\"]}, \"console_type\": {\"description\": \"Console type\", \"enum\": [\"telnet\", \"vnc\", \"spice\"]}, \"hda_disk_image\": {\"description\": \"QEMU hda disk image path\", \"type\": \"string\"}, \"hda_disk_interface\": {\"description\": \"QEMU hda interface\", \"type\": \"string\"}, \"hda_disk_image_md5sum\": {\"description\": \"QEMU hda disk image checksum\", \"type\": [\"string\", \"null\"]}, \"hdb_disk_image\": {\"description\": \"QEMU hdb disk image path\", \"type\": \"string\"}, \"hdb_disk_interface\": {\"description\": \"QEMU hdb interface\", \"type\": \"string\"}, \"hdb_disk_image_md5sum\": {\"description\": \"QEMU hdb disk image checksum\", \"type\": [\"string\", \"null\"]}, \"hdc_disk_image\": {\"description\": \"QEMU hdc disk image path\", \"type\": \"string\"}, \"hdc_disk_interface\": {\"description\": \"QEMU hdc interface\", \"type\": \"string\"}, \"hdc_disk_image_md5sum\": {\"description\": \"QEMU hdc disk image checksum\", \"type\": [\"string\", \"null\"]}, \"hdd_disk_image\": {\"description\": \"QEMU hdd disk image path\", \"type\": \"string\"}, \"hdd_disk_interface\": {\"description\": \"QEMU hdd interface\", \"type\": \"string\"}, \"hdd_disk_image_md5sum\": {\"description\": \"QEMU hdd disk image checksum\", \"type\": [\"string\", \"null\"]}, \"cdrom_image\": {\"description\": \"QEMU cdrom image path\", \"type\": \"string\"}, \"cdrom_image_md5sum\": {\"description\": \"QEMU cdrom image checksum\", \"type\": [\"string\", \"null\"]}, \"bios_image\": {\"description\": \"QEMU bios image path\", \"type\": \"string\"}, \"bios_image_md5sum\": {\"description\": \"QEMU bios image checksum\", \"type\": [\"string\", \"null\"]}, \"boot_priority\": {\"description\": \"QEMU boot priority\", \"enum\": [\"c\", \"d\", \"n\", \"cn\", \"cd\"]}, \"ram\": {\"description\": \"Amount of RAM in MB\", \"type\": [\"integer\", \"null\"]}, \"cpus\": {\"description\": \"Number of vCPUs\", \"type\": [\"integer\", \"null\"], \"minimum\": 1, \"maximum\": 255}, \"adapters\": {\"description\": \"Number of adapters\", \"type\": [\"integer\", \"null\"], \"minimum\": 0, \"maximum\": 275}, \"adapter_type\": {\"description\": \"QEMU adapter type\", \"type\": [\"string\", \"null\"], \"minLength\": 1}, \"mac_address\": {\"description\": \"QEMU MAC address\", \"type\": [\"string\", \"null\"], \"minLength\": 1, \"pattern\": \"^([0-9a-fA-F]{2}[:]){5}([0-9a-fA-F]{2})$\"}, \"initrd\": {\"description\": \"QEMU initrd path\", \"type\": \"string\"}, \"initrd_md5sum\": {\"description\": \"QEMU initrd path\", \"type\": [\"string\", \"null\"]}, \"kernel_image\": {\"description\": \"QEMU kernel image path\", \"type\": \"string\"}, \"kernel_image_md5sum\": {\"description\": \"QEMU kernel image checksum\", \"type\": [\"string\", \"null\"]}, \"kernel_command_line\": {\"description\": \"QEMU kernel command line\", \"type\": [\"string\", \"null\"]}, \"legacy_networking\": {\"description\": \"Use QEMU legagy networking commands (-net syntax)\", \"type\": [\"boolean\", \"null\"]}, \"acpi_shutdown\": {\"description\": \"ACPI shutdown support\", \"type\": [\"boolean\", \"null\"]}, \"cpu_throttling\": {\"description\": \"Percentage of CPU allowed for QEMU\", \"minimum\": 0, \"maximum\": 800, \"type\": [\"integer\", \"null\"]}, \"process_priority\": {\"description\": \"Process priority for QEMU\", \"enum\": [\"realtime\", \"very high\", \"high\", \"normal\", \"low\", \"very low\", \"null\"]}, \"options\": {\"description\": \"Additional QEMU options\", \"type\": [\"string\", \"null\"]}}, \"additionalProperties\": false, \"required\": [\"name\"]}",
    "method": "POST",
    "path": "/v2/compute/projects/{project_id}/qemu/nodes",
    "request": {
        "acpi_shutdown": false,
        "adapter_type": "virtio-net-pci",
        "adapters": 10,
        "boot_priority": "c",
        "console_type": "telnet",
        "cpu_throttling": 0,
        "cpus": 1,
        "default_symbol": ":/symbols/ids.normal.svg",
        "hda_disk_image": "/media/actionmystique/SAMSUNG5-Virtual/Images/GNS3/QEMU/ASAv-9.8.2.qcow2",
        "hda_disk_interface": "virtio",
        "hdb_disk_interface": "ide",
        "hdc_disk_interface": "ide",
        "hdd_disk_interface": "ide",
        "hover_symbol": ":/symbols/ids.selected.svg",
        "legacy_networking": false,
        "linked_clone": true,
        "mac_address": "00:00:00:09:07:01",
        "name": "ASAv-1",
        "node_id": "7f08822d-8a83-4bb8-a4e1-1d2801cfd12d",
        "options": "-nographic -enable-kvm -cpu host -net user,vlan=0,net=192.168.0.0/24,hostfwd=tcp::1401-:22",
        "process_priority": "normal",
        "qemu_path": "/usr/bin/qemu-system-x86_64",
        "ram": 2048
    },
    "status": 400
}
jean-christophe-manciot commented 6 years ago

Still there in v2.1.1 as expected.

grossmj commented 6 years ago

Do you have this issue if you delete and re-create the node template?

jean-christophe-manciot commented 6 years ago

The issue is gone if I delete and re-create the node template (with gn3-gui/server 2.1.2)

grossmj commented 6 years ago

What version have you upgraded from to get to 2.1.x?

jean-christophe-manciot commented 6 years ago

2.0.3 -> 2.1.0 -> 2.1.1...

grossmj commented 6 years ago

Fixed by https://github.com/GNS3/gns3-server/commit/ab6fe6da1db2b99c2a97d98e6ca80469b8b1b198