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

network: Fix type and respect name when rendering vlan in sysconfig. #541

Merged
merged 3 commits into from Sep 15, 2020

Conversation

otubo
Copy link
Contributor

@otubo otubo commented Aug 24, 2020

Prior to this change, vlans were rendered in sysconfig with
'TYPE=Ethernet', and incorrectly renders the PHYSDEV based on
the name of the vlan device rather than the 'link' provided
in the network config.

The change here fixes:

  • rendering of TYPE=Ethernet for a vlan
  • adds a warning if the configured device name is not supported
    per the RHEL 7 docs "11.5. Naming Scheme for VLAN Interfaces"

Forward-ported to cloud-init-20.2: Minimal changes on the order of
things on cloudinit/net/sysconfig.py.

LP: #1788915
LP: #1826608
rhbz: #1861871

Signed-off-by: Scott Moser smoser@brickies.net
Signed-off-by: Eduardo Otubo otubo@redhat.com

@otubo
Copy link
Contributor Author

otubo commented Aug 24, 2020

Mark this as WIP as I need to check all those failures.

Copy link
Collaborator

@igalic igalic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙋🏻‍♀️

cloudinit/net/sysconfig.py Show resolved Hide resolved
@smoser
Copy link
Collaborator

smoser commented Aug 24, 2020

Just for reference, originally inspired from https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/366602 .

Copy link
Collaborator

@OddBloke OddBloke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks good, Eduardo, thanks for the submission! I have one major naming concern inline, one smaller log message concern, and a nit; all inline.

cloudinit/net/sysconfig.py Outdated Show resolved Hide resolved
cloudinit/net/sysconfig.py Outdated Show resolved Hide resolved
cloudinit/net/sysconfig.py Show resolved Hide resolved
smoser and others added 3 commits September 15, 2020 17:22
Prior to this change, vlans were rendered in sysconfig with
'TYPE=Ethernet', and incorrectly renders the PHYSDEV based on
the name of the vlan device rather than the 'link' provided
in the network config.

The change here fixes:
 * rendering of TYPE=Ethernet for a vlan
 * adds a warning if the configured device name is not supported
   per the RHEL 7 docs "11.5. Naming Scheme for VLAN Interfaces"

Forward-ported to cloud-init-20.2: Minimal changes on the order of
things on cloudinit/net/sysconfig.py.

LP: #1788915
LP: #1826608
rhbz: #1861871

Signed-off-by: Scott Moser <smoser@brickies.net>
Signed-off-by: Eduardo Otubo <otubo@redhat.com>
Copy link
Collaborator

@OddBloke OddBloke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@OddBloke OddBloke merged commit 8439b19 into canonical:master Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants