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

LXD Container fails to perform some VM actions with openvswitch NIC #3058

Closed
7 tasks
JPaulMora opened this issue Mar 11, 2019 · 1 comment
Closed
7 tasks

Comments

@JPaulMora
Copy link

Description
Open Nebula seems to try adding NIC to bridge before it's created (LXD). Problem is only present when rebooting an already made container.

To Reproduce

  • Create OpenVswitch bridge, mine looks like this:
bridge "ovsbr0"
        Port "one-11-0"
            Interface "one-11-0"
        Port "one-13-0"
            Interface "one-13-0"
        Port "eno1"
            Interface "eno1"
        Port "ovsbr0"
            Interface "ovsbr0"
                type: internal
        Port "one-10-0"
            Interface "one-10-0"
    ovs_version: "2.5.5"
  • Create LXD container with attached NIC
  • Container will boot just fine
  • Reboot will fail with error:
Generating deployment file: /var/lib/one/vms/20/deployment.2
Mon Mar 11 10:45:17 2019 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context.
Mon Mar 11 10:45:18 2019 [Z0][VMM][I]: Command execution fail: /var/tmp/one/vnm/ovswitch/pre PFZ...T4=
Mon Mar 11 10:45:18 2019 [Z0][VMM][I]: ovs-ofctl: ovsbr0: couldn't find port `one-20-0'
Mon Mar 11 10:45:18 2019 [Z0][VMM][E]: pre: Command "sudo ovs-ofctl del-flows ovsbr0 in_port=" failed.
Mon Mar 11 10:45:18 2019 [Z0][VMM][E]: pre: ovs-ofctl: 0/0: port value out of range for in_port
Mon Mar 11 10:45:18 2019 [Z0][VMM][E]: ovs-ofctl: 0/0: port value out of range for in_port
Mon Mar 11 10:45:18 2019 [Z0][VMM][E]: 
Mon Mar 11 10:45:18 2019 [Z0][VMM][I]: ExitCode: 1
Mon Mar 11 10:45:18 2019 [Z0][VMM][I]: Failed to execute network driver operation: pre.
Mon Mar 11 10:45:18 2019 [Z0][VMM][E]: Error deploying virtual machine: ovswitch: ovs-ofctl: 0/0: port value out of range for in_port
Mon Mar 11 10:45:18 2019 [Z0][VM][I]: New state is POWEROFF

Expected behavior
Re-creation/initialization of one-xx interface prior to attaching it to bridge so that boot is successful.

Details

  • Affected Component: LXD VMs
  • Hypervisor: LXD
# lxc version
Client version: 3.0.3
Server version: 3.0.3

Additional context
I've also had problems where ON would try to attach existing one-xx interface to bridge while it is already part of bridge. Error could be omitted but results in failed boot instead. I can create a separate issue for this if needed.

Progress Status

  • Branch created
  • Code committed to development branch
  • Testing - QA
  • Documentation
  • Release notes - resolved issues, compatibility, known issues
  • Code committed to upstream release/hotfix branches
  • Documentation committed to upstream release/hotfix branches
@dann1
Copy link
Contributor

dann1 commented Mar 19, 2019

LXD doesn't handle the port deletion from the bridge as libvirt does on its own during shutdown and nic hotplug actions, resulting in a switch:

root@ubuntu1804-61620:~# ovs-vsctl show
ea4ff08d-29a1-4420-9f8c-12609b6763a4
    Bridge "ovsbr1"
        Port "one-11-0"
            Interface "one-11-0"
                error: "could not open network device one-11-0 (No such device)"
        Port "ovsbr1"
            Interface "ovsbr1"
                type: internal
        Port "one-10-0"
            tag: 4
            Interface "one-10-0"
    ovs_version: "2.9.2"

where one-11-0 port is the result of either of those actions. LXD does handle the port-creation on the bridge and fails when it already exists.

The drivers need to be updated in both actions

dann1 added a commit to dann1/one that referenced this issue Mar 19, 2019
dann1 added a commit to dann1/one that referenced this issue Mar 19, 2019
dann1 added a commit to dann1/one that referenced this issue Mar 19, 2019
dann1 added a commit to dann1/one that referenced this issue Mar 19, 2019
@dann1 dann1 changed the title LXD Container fails reboot if NIC is attached LXD Container fails reboot if openvswitch NIC is attached Mar 20, 2019
@dann1 dann1 changed the title LXD Container fails reboot if openvswitch NIC is attached LXD Container fails to perform some VM actions with openvswitch NIC Mar 20, 2019
dann1 added a commit to dann1/one that referenced this issue Mar 22, 2019
rsmontero pushed a commit that referenced this issue Mar 25, 2019
@dann1 dann1 closed this as completed Mar 25, 2019
rsmontero pushed a commit that referenced this issue Mar 26, 2019
dann1 added a commit to dann1/docs that referenced this issue Sep 21, 2021
rsmontero pushed a commit to OpenNebula/docs that referenced this issue Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants