canonical / cloud-init

Official upstream for the cloud-init: cloud instance initialization
https://cloud-init.io/
Other
2.97k stars 880 forks source link

sysconfig route object reference removed class attribute #2878

Closed ubuntu-server-builder closed 1 year ago

ubuntu-server-builder commented 1 year ago

This bug was originally filed in Launchpad as LP: #1687485

Launchpad details
affected_projects = ['cloud-init (Ubuntu)', 'cloud-init (Ubuntu Xenial)', 'cloud-init (Ubuntu Yakkety)', 'cloud-init (Ubuntu Zesty)']
assignee = chad.smith
assignee_name = Chad Smith
date_closed = 2017-09-23T02:32:01.378295+00:00
date_created = 2017-05-01T22:07:17.678123+00:00
date_fix_committed = 2017-05-15T22:21:00.251795+00:00
date_fix_released = 2017-09-23T02:32:01.378295+00:00
id = 1687485
importance = medium
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1687485
milestone = None
owner = raharper
owner_name = Ryan Harper
private = False
status = fix_released
submitter = raharper
submitter_name = Ryan Harper
tags = ['bite-sized', 'verification-done-xenial', 'verification-done-yakkety', 'verification-done-zesty']
duplicates = []

Launchpad user Ryan Harper(raharper) wrote on 2017-05-01T22:07:17.678123+00:00

=== Begin SRU Template === [Impact] This code path is not applicable to Ubuntu. The bug resolved properly detecting and raising ValueErrors if multiple default gateways were defined in ipv4 or or ipv6 addresses for sysconfig (Redhat/centos) format.

[Test Case] Launch an instance on lxd, make sure it has network.

[Regression Potential] Changes to network rendering could have negatively affected Ubuntu the test above is valid to check that that didn't go horribly wrong.

[Other Info] Upstream commit: https://git.launchpad.net/cloud-init/commit/?id=dd03bb411c9a6f10854a3bbc3223b204c3d4d174

=== End SRU Template ===

ubuntu-server-builder commented 1 year ago

Launchpad user Brian Murray(brian-murray) wrote on 2017-06-13T18:06:19.906232+00:00

Hello Ryan, or anyone else affected,

Accepted cloud-init into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.9-153-g16a7302f-0ubuntu1~17.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

ubuntu-server-builder commented 1 year ago

Launchpad user Brian Murray(brian-murray) wrote on 2017-06-13T18:54:17.649164+00:00

Hello Ryan, or anyone else affected,

Accepted cloud-init into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.9-153-g16a7302f-0ubuntu1~16.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

ubuntu-server-builder commented 1 year ago

Launchpad user Brian Murray(brian-murray) wrote on 2017-06-13T19:07:48.292390+00:00

Hello Ryan, or anyone else affected,

Accepted cloud-init into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.9-153-g16a7302f-0ubuntu1~16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

ubuntu-server-builder commented 1 year ago

Launchpad user Chad Smith(chad.smith) wrote on 2017-06-16T17:43:28.627627+00:00

No problems with networking experienced when starting up xenial yakkety or zesty cloud-init proposed containers.

Also validated the expected raised ValueError due to duplicate macs with the following script:

cat >duplicate_gw_data.json <<EOF { "links": [ {"ethernet_mac_address": "aa:ab:ac:ad:ae:00", "id": "tap1a", "type": "phy", "vif_id": "1a81968a"} ], "networks": [ {"id": "network0", "ip_address": "172.19.1.34", "link": "tap1a", "netmask": "255.255.255.0", "network_id": "dacd568d", "type": "ipv4", "routes": [ {"gateway": "172.19.3.254", "netmask": "0.0.0.0", "network": "0.0.0.0"}, {"gateway": "172.19.3.200", "netmask": "0.0.0.0", "network": "0.0.0.0"}]} ], "services": [{"address": "172.19.0.12", "type": "dns"}] } EOF

for release in xenial yakkety zesty; do echo $release ----------------; lxc file push duplicate_gw_data.json test-$release/root/duplicate_gw_data.json; lxc file push net-convert.py test-$release/root/net-convert.py; lxc exec test-$release -- ./net-convert.py --network-data=duplicate_gw_data.json --kind=network_data.json --output-kind=sysconfig -m eth1,aa:ab:ac:ad:ae:00 --directory=./out.d; lxc exec test-$release -- dpkg-query --show cloud-init; done;

--------OUTPUT with expected ValueErrors------ xenial ----------------

Internal State !!python/object:cloudinit.net.network_state.NetworkState _network_state: dns: nameservers:

Traceback (most recent call last): File "./net-convert.py", line 82, in main() File "./net-convert.py", line 78, in main r.render_network_state(network_state=ns, target=args.directory) File "/usr/lib/python3/dist-packages/cloudinit/net/sysconfig.py", line 501, in render_network_state network_state).items(): File "/usr/lib/python3/dist-packages/cloudinit/net/sysconfig.py", line 479, in _render_sysconfig cls._render_physical_interfaces(network_state, iface_contents) File "/usr/lib/python3/dist-packages/cloudinit/net/sysconfig.py", line 407, in _render_physical_interfaces cls._render_subnet_routes(iface_cfg, route_cfg, iface_subnets) File "/usr/lib/python3/dist-packages/cloudinit/net/sysconfig.py", line 352, in _render_subnet_routes % (iface_cfg.name)) ValueError: Duplicate declaration of default route found for interface 'eth1' cloud-init 0.7.9-153-g16a7302f-0ubuntu1~16.04.1 yakkety ----------------

Internal State !!python/object:cloudinit.net.network_state.NetworkState _network_state: dns: nameservers:

Traceback (most recent call last): File "./net-convert.py", line 82, in main() File "./net-convert.py", line 78, in main r.render_network_state(network_state=ns, target=args.directory) File "/usr/lib/python3/dist-packages/cloudinit/net/sysconfig.py", line 501, in render_network_state network_state).items(): File "/usr/lib/python3/dist-packages/cloudinit/net/sysconfig.py", line 479, in _render_sysconfig cls._render_physical_interfaces(network_state, iface_contents) File "/usr/lib/python3/dist-packages/cloudinit/net/sysconfig.py", line 407, in _render_physical_interfaces cls._render_subnet_routes(iface_cfg, route_cfg, iface_subnets) File "/usr/lib/python3/dist-packages/cloudinit/net/sysconfig.py", line 352, in _render_subnet_routes % (iface_cfg.name)) ValueError: Duplicate declaration of default route found for interface 'eth1' cloud-init 0.7.9-153-g16a7302f-0ubuntu1~16.10.1 zesty ----------------

Internal State !!python/object:cloudinit.net.network_state.NetworkState _network_state: dns: nameservers:

Traceback (most recent call last): File "./net-convert.py", line 82, in main() File "./net-convert.py", line 78, in main r.render_network_state(network_state=ns, target=args.directory) File "/usr/lib/python3/dist-packages/cloudinit/net/sysconfig.py", line 501, in render_network_state network_state).items(): File "/usr/lib/python3/dist-packages/cloudinit/net/sysconfig.py", line 479, in _render_sysconfig cls._render_physical_interfaces(network_state, iface_contents) File "/usr/lib/python3/dist-packages/cloudinit/net/sysconfig.py", line 407, in _render_physical_interfaces cls._render_subnet_routes(iface_cfg, route_cfg, iface_subnets) File "/usr/lib/python3/dist-packages/cloudinit/net/sysconfig.py", line 352, in _render_subnet_routes % (iface_cfg.name)) ValueError: Duplicate declaration of default route found for interface 'eth1' cloud-init 0.7.9-153-g16a7302f-0ubuntu1~17.04.1

for release in xenial yakkety zesty; do echo $release ----------------; lxc file push duplicate_gw_data.json test-xenial/root/duplicate_gw_data.json; lxc exec test-$release -- ./net-convert.py --network-data=duplicate_gw_data.json --kind=network_data.json --output-kind=sysconfig -m eth1,aa:ab:ac:ad:ae:00 --directory=./out.d; lxc file exec test-$release -- dpkg-query --show cloud-init; done;

ubuntu-server-builder commented 1 year ago

Launchpad user Launchpad Janitor(janitor) wrote on 2017-06-27T15:51:34.880334+00:00

This bug was fixed in the package cloud-init - 0.7.9-153-g16a7302f-0ubuntu1~17.04.1


cloud-init (0.7.9-153-g16a7302f-0ubuntu1~17.04.1) zesty-proposed; urgency=medium

ubuntu-server-builder commented 1 year ago

Launchpad user Steve Langasek(vorlon) wrote on 2017-06-27T15:52:26.353801+00:00

The verification of the Stable Release Update for cloud-init has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

ubuntu-server-builder commented 1 year ago

Launchpad user Launchpad Janitor(janitor) wrote on 2017-06-27T15:54:02.062609+00:00

This bug was fixed in the package cloud-init - 0.7.9-153-g16a7302f-0ubuntu1~16.10.1


cloud-init (0.7.9-153-g16a7302f-0ubuntu1~16.10.1) yakkety-proposed; urgency=medium

ubuntu-server-builder commented 1 year ago

Launchpad user Launchpad Janitor(janitor) wrote on 2017-06-27T15:54:45.867129+00:00

This bug was fixed in the package cloud-init - 0.7.9-153-g16a7302f-0ubuntu1~16.04.1


cloud-init (0.7.9-153-g16a7302f-0ubuntu1~16.04.1) xenial-proposed; urgency=medium

ubuntu-server-builder commented 1 year ago

Launchpad user Scott Moser(smoser) wrote on 2017-09-23T02:32:03.669624+00:00

This bug is believed to be fixed in cloud-init in 17.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.