-
Notifications
You must be signed in to change notification settings - Fork 880
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
tools/net-convert: fix argument order for render_network_state #2870
Comments
Launchpad user Scott Moser(smoser) wrote on 2017-05-17T16:25:50.252819+00:00 this attachment can be run from trunk and shows the stack trace. Launchpad attachments: bug-show.sh: shows the stacktrace |
Launchpad user Brian Murray(brian-murray) wrote on 2017-06-13T18:05:39.488373+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! |
Launchpad user Brian Murray(brian-murray) wrote on 2017-06-13T18:53:54.830093+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! |
Launchpad user Brian Murray(brian-murray) wrote on 2017-06-13T19:07:27.053216+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! |
Launchpad user Chad Smith(chad.smith) wrote on 2017-06-13T21:53:43.631669+00:00 Validated xenial yakkety and zesty: root@test-xenial: network: auto eth1 root@test-yakkety: network: auto eth1 root@test-yakkety: root@test-zesty: network: auto eth1 |
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
-- Scott Moser smoser@ubuntu.com Fri, 26 May 2017 16:14:09 -0400 |
Launchpad user Steve Langasek(vorlon) wrote on 2017-06-27T15:52:20.543954+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. |
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
-- Scott Moser smoser@ubuntu.com Fri, 26 May 2017 16:08:21 -0400 |
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
-- Scott Moser smoser@ubuntu.com Fri, 26 May 2017 15:58:48 -0400 |
Launchpad user Scott Moser(smoser) wrote on 2017-09-23T02:31:42.213462+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. |
This bug was originally filed in Launchpad as LP: #1685944
Launchpad details
Launchpad user Ryan Harper(raharper) wrote on 2017-04-24T21:44:16.837132+00:00
=== Begin SRU Template ===
[Impact]
Rendering of netplan content was broken due to an incorrect
function signature in net/netplan.py:render_network_state.
The end result was that rendering of netplan configuration was
broken in actual usage. Note, though that no official Ubuntu images
use this path at the current time. Ubuntu image all use ifupdown.
[Test Case]
The basic idea below is:
a.) launch an instance with proposed version of cloud-init.
b.) inside instance, run the test case. That would stack trace
as seen in the bug on prior versions of cloud-init.
c.) show the output.
launch an instance.
$ release=xenial
$ ref=$release-proposed
$ lxc-proposed-snapshot --proposed --publish $release $ref
$ lxc launch $ref $name
$ lxc exec $name
% cat > render-test.py <<"EOF"
#!/usr/bin/python3
import sys
from cloudinit.net import netplan, eni, network_state
out_d = "./out.d" if len(sys.argv) < 2 else sys.argv[1]
cfg = {'version': 1,
'config': [{'name': 'eth1', 'type': 'physical',
'subnets': [{'type': 'dhcp'}]}]}
Render eni and netplan to show that they both work.
ns = network_state.parse_net_config_data(cfg)
for renderer in netplan.Renderer(), eni.Renderer():
print("Rendering %s" % renderer)
renderer.render_network_state(ns, out_d)
EOF
$ python3 render-test.py out.d
Rendering <cloudinit.net.netplan.Renderer object at 0x7fd197c48208>
Rendering <cloudinit.net.eni.Renderer object at 0x7fd197c48278>
$ ( cd out.d && for f in $(find . -type f); do echo == $f ==; cat $f; done )
== ./etc/network/interfaces ==
auto lo
iface lo inet loopback
auto eth1
iface eth1 inet dhcp
== ./etc/netplan/50-cloud-init.yaml ==
network:
version: 2
ethernets:
eth1:
dhcp4: true
== ./etc/udev/rules.d/70-persistent-net.rules ==
$ dpkg-query --show cloud-init
[Regression Potential]
This specific change has basically zero regression potential as it
was in netplan specific path that was only previously excercised
with test cases.
[Other Info]
Upstream commit at
https://git.launchpad.net/cloud-init/commit/?id=a6572d9415e59
lxc-proposed-snapshot is
https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/tree/bin/lxc-proposed-snapshot
It publishes an image to lxd with proposed enabled and cloud-init upgraded.
=== End SRU Template ===
% cat simple-v2.yaml
network:
version: 2
# comment above ethernets
ethernets:
ens0:
dhcp4: true
match:
macaddress: 00:11:22:33:44:55
set-name: ens0
switchports:
# all cards on second PCI bus; unconfigured by themselves, will be added
# to br0 below
match:
name: enp2*
mtu: 1280
% PYTHONPATH=
pwd
./tools/net-convert.py --network-data simple-v2.yaml--kind yaml
--output-kind netplan
--directory ./target
Traceback (most recent call last):
File "./tools/net-convert.py", line 82, in
main()
File "./tools/net-convert.py", line 78, in main
r.render_network_state(ns, target=args.directory)
TypeError: render_network_state() got multiple values for argument 'target'
This is broken on master.
The text was updated successfully, but these errors were encountered: