Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webui missing custom network adapter option for node #1339

Open
spikefishjohn opened this issue Jun 23, 2022 · 3 comments · May be fixed by #1404
Open

Webui missing custom network adapter option for node #1339

spikefishjohn opened this issue Jun 23, 2022 · 3 comments · May be fixed by #1404
Milestone

Comments

@spikefishjohn
Copy link

image

I don't see a way to do this via the webui.

Screen shot is from a deployed QEMU node in this case.

@grossmj grossmj added this to the 3.0 milestone Jun 26, 2022
@grossmj
Copy link
Member

grossmj commented Sep 29, 2022

Qemu

Custom adapters seems to be almost implemented for Qemu templates/nodes however the Web-Ui seems to not send the correct custom adapters list:

Screenshot from 2022-09-29 16-16-31

Error {"message":"HTTP error 422 received from compute 'vps1 (controller)' for request POST /projects/0f354949-996d-46e7-ac13-9c615ca48acd/qemu/nodes: {\"detail\":[{\"loc\":[\"body\",\"custom_adapters\",0,\"port_name\"],\"msg\":\"field required\",\"type\":\"value_error.missing\"},{\"loc\":[\"body\",\"custom_adapters\",1,\"port_name\"],\"msg\":\"field required\",\"type\":\"value_error.missing\"},{\"loc\":[\"body\",\"custom_adapters\",2,\"port_name\"],\"msg\":\"field required\",\"type\":\"value_error.missing\"},{\"loc\":[\"body\",\"custom_adapters\",3,\"port_name\"],\"msg\":\"field required\",\"type\":\"value_error.missing\"},{\"loc\":[\"body\",\"custom_adapters\",4,\"port_name\"],\"msg\":\"field required\",\"type\":\"value_error.missing\"},{\"loc\":[\"body\",\"custom_adapters\",5,\"port_name\"],\"msg\":\"field required\",\"type\":\"value_error.missing\"},{\"loc\":[\"body\",\"custom_adapters\",6,\"port_name\"],\"msg\":\"field required\",\"type\":\"value_error.missing\"},{\"loc\":[\"body\",\"custom_adapters\",7,\"port_name\"],\"msg\":\"field required\",\"type\":\"value_error.missing\"}]}"} 

The custom_adapters entry is an array, for example:

  "custom_adapters": [
    {
      "adapter_number": 0,
      "port_name": "Ethernet 0",
      "adapter_type": "e1000",
      "mac_address": "10:0A:8D:7F:cf:5d"
    },
    {
      "adapter_number": 1,
      "port_name": "Ethernet 1",
      "adapter_type": "e1000",
      "mac_address": "10:0A:8D:7F:cf:5e"
    }
  ]

Also, the possibility to configure custom MAC addresses is not available:

Screenshot from 2022-09-29 16-34-50

Docker

Custom adapters for Docker templates and nodes is not implemented in the web-ui, here is what we have in the desktop interface:

Screenshot from 2022-09-29 16-40-15

Screenshot from 2022-09-29 16-40-41

For Docker, we can only configure port names, for example:

  "custom_adapters": [
    {
      "adapter_number": 0,
      "port_name": "Ethernet 0"
    },
    {
      "adapter_number": 1,
      "port_name": "Ethernet 1"
    }
  ]

VMware and VirtualBox

Custom adapters seems to be almost implemented for VirtualBox and VMware templates/nodes however seems to be the same error as with Qemu + the adapter types are not filled out.

Screenshot from 2022-09-29 16-49-23

Screenshot from 2022-09-29 16-49-10

Screenshot from 2022-09-29 16-44-39

Screenshot from 2022-09-29 16-44-50

For VirtualBox/VMware, we can only configure port names and adapter types, for example:

  "custom_adapters": [
    {
      "adapter_number": 0,
      "port_name": "Ethernet 0",
      "adapter_type": "e1000"
    },
    {
      "adapter_number": 1,
      "port_name": "Ethernet 1",
      "adapter_type": "e1000"
    }
  ]

rajnikantsolarwinds added a commit that referenced this issue Oct 17, 2022
@grossmj grossmj linked a pull request Oct 19, 2022 that will close this issue
@grossmj grossmj linked a pull request Oct 19, 2022 that will close this issue
@grossmj
Copy link
Member

grossmj commented Nov 2, 2022

Let's focus on Qemu templates first. Here is the data we receive from the server for the FRR template using the /v3/templates API endpoint.

  {
    "template_id": "59c55a13-5556-4fe2-9d8a-161c66f7576d",
    "name": "FRR",
    "version": "7.3.1",
    "category": "router",
    "default_name_format": "{name}-{0}",
    "symbol": ":/symbols/classic/router.svg",
    "builtin": false,
    "template_type": "qemu",
    "compute_id": "local",
    "usage": "Credentials: root / root\nIf you exit from the router CLI, you can get back by typing 'vtysh' to the console.",
    "created_at": "2022-04-08T04:53:16",
    "updated_at": "2022-04-08T04:53:16",
    "kernel_image": "",
    "options": "",
    "platform": "i386",
    "port_name_format": "eth{0}",
    "cpus": 1,
    "first_port_name": "test-0",
    "cpu_throttling": 0,
    "bios_image": "",
    "maxcpus": 1,
    "hdd_disk_image": "",
    "hdd_disk_interface": "none",
    "initrd": "",
    "create_config_disk": false,
    "console_type": "telnet",
    "hda_disk_interface": "ide",
    "mac_address": "",
    "on_close": "power_off",
    "process_priority": "normal",
    "hdb_disk_interface": "none",
    "hda_disk_image": "frr-7.3.1.qcow2",
    "ram": 256,
    "aux_type": "none",
    "hdb_disk_image": "",
    "cdrom_image": "",
    "boot_priority": "c",
    "linked_clone": true,
    "hdc_disk_interface": "none",
    "qemu_path": "qemu-system-x86_64",
    "hdc_disk_image": "",
    "replicate_network_connection_state": true,
    "port_segment_size": 0,
    "console_auto_start": false,
    "kernel_command_line": "",
    "custom_adapters": [
      {
        "adapter_number": 0,
        "port_name": "eth{0}",
        "adapter_type": "e1000",
        "mac_address": null
      },
      {
        "adapter_number": 1,
        "port_name": "eth{1}",
        "adapter_type": "e1000",
        "mac_address": null
      },
      {
        "adapter_number": 2,
        "port_name": "eth{2}",
        "adapter_type": "e1000",
        "mac_address": null
      },
      {
        "adapter_number": 3,
        "port_name": "eth{3}",
        "adapter_type": "e1000",
        "mac_address": null
      },
      {
        "adapter_number": 4,
        "port_name": "eth{4}",
        "adapter_type": "e1000",
        "mac_address": null
      },
      {
        "adapter_number": 5,
        "port_name": "eth{5}",
        "adapter_type": "e1000",
        "mac_address": null
      },
      {
        "adapter_number": 6,
        "port_name": "eth{6}",
        "adapter_type": "e1000",
        "mac_address": null
      },
      {
        "adapter_number": 7,
        "port_name": "eth{7}",
        "adapter_type": "e1000",
        "mac_address": null
      }
    ],
    "adapter_type": "rtl8139",
    "adapters": 8
  },

Now we have to use the content of custom_adapters to fill the custom adapters section in the template preferences:

Screenshot from 2022-11-03 00-25-23

  • The port_name column should use eth{0} etc. not Ethernet 0 etc.
  • The adapter_type should work similarly with the type defined in the network section, meaning for instance selecting "e1000" in the desktop interface for a custom adapter will show "Intel Ethernet Gigabit (e1000)" in the web-ui. The reverse should work too, selecting another type should show the same type in the desktop interface.

Screenshot from 2022-11-03 00-32-21

@grossmj
Copy link
Member

grossmj commented Nov 3, 2022

Next is Docker, it is not possible to configure custom network adapters for Docker templates in the web-ui:

Screenshot from 2022-11-04 00-13-04

Also, there is an issue in the web-ui when configuring custom adpaters for a Docker node:

Screenshot from 2022-11-04 00-08-41

Screenshot from 2022-11-04 00-08-58

![ScreensScreenshot from 2022-11-04 00-10-32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants