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

conf: merge network namespace move & rename on shutdown #1269

Merged
merged 1 commit into from Nov 2, 2016

Conversation

Blub
Copy link
Member

@Blub Blub commented Nov 2, 2016

On shutdown we move physical network interfaces back to the
host namespace and rename them afterwards as well as in the
later lxc_network_delete() step. However, if the device had
a name which already exists in the host namespace then the
moving fails and so do the subsequent rename attempts. When
the namespace ceases to exist the devices finally end up
in the host namespace named 'dev' by the kernel.

In order to avoid this, we do the moving and renaming in a
single step (lxc_netdev_move_by_*()'s move & rename happen
in a single netlink transaction).

Signed-off-by: Wolfgang Bumiller w.bumiller@proxmox.com

On shutdown we move physical network interfaces back to the
host namespace and rename them afterwards as well as in the
later lxc_network_delete() step. However, if the device had
a name which already exists in the host namespace then the
moving fails and so do the subsequent rename attempts. When
the namespace ceases to exist the devices finally end up
in the host namespace named 'dev<ID>' by the kernel.

In order to avoid this, we do the moving and renaming in a
single step (lxc_netdev_move_by_*()'s move & rename happen
in a single netlink transaction).

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
@lxc-jenkins
Copy link

This pull request didn't trigger Jenkins as its author isn't in the whitelist.

An organization member must perform one of the following:

  • To have this branch tested by Jenkins, use the "ok to test" command.
  • To have a one time test done, use the "test this please" command.

Those commands are simple Github comments of the format: "jenkins: COMMAND"

@brauner
Copy link
Member

brauner commented Nov 2, 2016

jenkins: test this please

@brauner
Copy link
Member

brauner commented Nov 2, 2016

Ok, tested it. Seems to work fine. :) However, I need to file a bug. Restoring wireless device names is currently not working.

@brauner brauner merged commit 0fa988d into lxc:master Nov 2, 2016
@Blub Blub deleted the phynet-rename-2 branch November 3, 2016 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants