/srv/irclogs.ubuntu.com/2017/07/05/#cloud-init.txt

=== shardy is now known as shtab
=== shtab is now known as shardy
vojaHi, I'm using KVM and I'd like to boot a Ubuntu Xenial cloud image and pass a static IPv4 / IPv6 dual stack configuration via NoCloud datastore. I'm using the network configuration v1 format, because I'd like to be able to boot CentOS later, too. I added a second subnet with type: static6, but it seems that the resulting generated entry is somehow invalid. The IPv6 network is not configured correct. Is there any example for09:04
vojadual stack configuration?09:04
Wulfvoja: if not correct, what is it?09:07
Wulfvoja: post your configuration and the result09:07
vojahttps://www.irccloud.com/pastebin/KfepW47y/09:10
vojaI hope you can open that link09:10
vojaMy IRC client made this because it seem to be too long09:11
vojaOMG09:12
vojaPerhaps I should try to discard the second interface and make a second subnet entry09:12
vojaI'm currently not sure why I used the interface alias09:13
Wulfvoja: your irc client automatically turns large pastes into a link? nice feature :-)09:14
Wulfvoja: do *not* use the interface:0 syntax09:15
Wulfvoja: that would be a good /etc/network/interfaces: https://pastebin.com/9cfdg9Z209:16
vojahttps://www.irccloud.com/pastebin/hpzOFUQ2/09:16
vojaThis result in09:17
vojahttps://www.irccloud.com/pastebin/UAI0e7IR/09:17
Wulfvoja: looks better. does it work?09:19
vojaNo :-(09:20
vojaThe 2a01::XX is not up09:20
Wulfvoja: if you use ifup/ifdown manually, does it work?09:21
vojasudo ifup ens309:23
vojasudo: unable to resolve host cloudimg: Connection refused09:23
Wulfthat's a sudo problem09:24
vojaAnd: /etc/network/interfaces.d/50-cloud-init.cfg:17: unknown or no method and no inherits keyword specified09:24
Wulfvoja: and what's in there?09:24
vojaWhen I change the line 17 "iface ens3 inet6 static6" in /etc/network/interfaces.d/50-cloud-init.cfg to "iface ens3 inet6 static"09:25
vojasudo ifup ens309:25
vojasudo: unable to resolve host cloudimg: Connection refused09:26
vojaWaiting for DAD... Done09:26
vojaThe IPv6 is up then09:26
Wulfoh, "static6" is of course rubbish09:26
vojaI assume the static6 should be replaced by static in /etc/network/interfaces.d/50-cloud-init.cfg09:26
vojaShould I try static instead? AFAIR I got this from the docs09:27
Wulfvoja: https://pastebin.com/9cfdg9Z209:27
Wulfvoja: I don't know how to teach that to cloud-init though09:27
vojaYes, that's what it should look like09:28
vojaI'm trying again with static instead of static609:28
vojaA this leads to an unusable VM09:30
voja[   13.669155] cloud-init[FAILED] Failed to start Initial cloud-init job (pre-networking).09:30
vojaSee 'systemctl status cloud-init-local.service' for details.[396]: Cloud-init v. 0.7.9 running 'init-local' at Wed, 05 Jul 2017 09:29:30 +0000. Up 12.91 seconds.09:30
vojaThis breaks even the generation of the login user, so it's hard to get to the systemctl to view a log...09:31
vojaCould this be a bug in cloud-init that it renders static6 instead of static to /etc/network/interfaces ?09:32
Wulfvoja: possible09:32
vojaWould you recommend opening a ticket, or do you have any other idea what I could try?09:33
Wulfvoja: read the source, find the bug?09:43
vojaYes... So Python it is09:44
Wulfyep :)09:44
Wulfpython 3 even09:44
vojaI wanted to learn Python since a few weeks, but I got stuck with the question Python 2 or 309:46
Wulf3.09:47
voja50-cloud-init.cfg is referenced in cloudinit/distros/debian.py:09:48
vojaNETWORK_CONF_FN = "/etc/network/interfaces.d/50-cloud-init.cfg"09:48
vojaWhen I grep for NETWORK_CONF_FN there is no other result09:48
vojaThat is confusing, because this filename needs to used somewhere09:49
vojaThe only caveat with 3 was probably that Ansible sometimes requires v209:49
vojaOkay, I did not see the second ocurence of /etc/network/interfaces.d/50-cloud-init.cfg09:56
vojaOkay, I think I found the bug10:04
vojacloudinit/net/eni.py line 12710:05
voja"iface {fullname} {inet} {mode}"10:05
vojaNeed to figure out how mode is set10:05
vojaokay, the bug may then be located in another line ;-)10:06
vojaokay, the _render_iface doesn't fix the mode10:20
vojaThis method does the inet/inet6 mapping, but does not write static instead of static610:20
vojaThat causes the syntax erro10:21
vojar10:21
vojaI need to find a proper way to inject the fix to the cloud image, then I can test my solution10:26
=== shardy is now known as shardy_lunch
vojaMy patch is working :-)11:18
vojaI'll create a launchpad.net account later and submit a bug report + patch suggestion11:26
=== shardy_lunch is now known as shardy
powersjrharper: blackboxsw: this is why the copr build is failing: https://github.com/lxc/lxd/issues/349918:40
rharperurg18:40
rharperwe can workaround by taring18:41
rharpertar -cpf package.tar *.src.rpm ; and lxc file pull18:41
rharperor lxc exec container -- cat cloud-init-*.src.rpm > cloud-init.src.rpm18:42
rharperetc18:42
rharpernaughty bug though18:42
rharperpowersj: building an updated cloud-init for my curtin work, the i386 cent6 build failed, something under cloud_tests;  https://copr-be.cloud.fedoraproject.org/results/%40cloud-init/cloud-init-curtin/epel-6-i386/00576191-cloud-init/build.log.gz19:35
powersjrharper: this is tot?19:37
rharperno19:37
rharpera branch of mine19:38
powersjah19:38
rharperbut I've not touched any thing under cloud_tests19:38
powersjok got me scared for a min, as nightly tests are reporting passed19:38
rharperbut I've merged from trunk today19:38
rharpernightly tests building srpms under cent6 ?19:38
powersjyes19:38
* rharper goes looking for trunk el6 i386 builds19:38
powersjalthough we don't do i386 builds...19:39
rharperall mine failed19:39
powersjto be more specific I am referring to these results: https://jenkins.ubuntu.com/server/job/cloud-init-ci-nightly/19:39
rharperso not just i38619:39
rharpermaybe I have dirtry tree when src rpm building19:39
powersjthat is tot, and the last test is it runs the tests and builds the srpm under centos 6 and 719:39
rharperoh, it has the same error but something else must of failed19:40
rharper/usr/bin/python -O /tmp/tmpVVbF54.py19:40
rharperSyntaxError: ('invalid syntax', ('/usr/lib/python2.6/site-packages/tests/cloud_tests/config.py', 60, 19, '                for k, v in override.items() if isinstance(v, dict)})\n'))19:40
powersjrharper: aren't the "File not found" errors fatal?19:43
rharperyes19:43
rharperif you say it should be packaged, and it's not; that's an error19:43
rharperpowersj: found it,   in my branch I've got a patch that touches the specfile and the switch to jinja template got broken so, still had \$RPM_BUILD_ROOT instead of $RPM_BUILD_ROOT20:22
powersjrharper: ah! :) good to know20:23

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!