[09:04] <voja> Hi, 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 for
[09:04] <voja> dual stack configuration?
[09:07] <Wulf> voja: if not correct, what is it?
[09:07] <Wulf> voja: post your configuration and the result
[09:10] <voja> https://www.irccloud.com/pastebin/KfepW47y/
[09:10] <voja> I hope you can open that link
[09:11] <voja> My IRC client made this because it seem to be too long
[09:12] <voja> OMG
[09:12] <voja> Perhaps I should try to discard the second interface and make a second subnet entry
[09:13] <voja> I'm currently not sure why I used the interface alias
[09:14] <Wulf> voja: your irc client automatically turns large pastes into a link? nice feature :-)
[09:15] <Wulf> voja: do *not* use the interface:0 syntax
[09:16] <Wulf> voja: that would be a good /etc/network/interfaces: https://pastebin.com/9cfdg9Z2
[09:16] <voja> https://www.irccloud.com/pastebin/hpzOFUQ2/
[09:17] <voja> This result in
[09:17] <voja> https://www.irccloud.com/pastebin/UAI0e7IR/
[09:19] <Wulf> voja: looks better. does it work?
[09:20] <voja> No :-(
[09:20] <voja> The 2a01::XX is not up
[09:21] <Wulf> voja: if you use ifup/ifdown manually, does it work?
[09:23] <voja> sudo ifup ens3
[09:23] <voja> sudo: unable to resolve host cloudimg: Connection refused
[09:24] <Wulf> that's a sudo problem
[09:24] <voja> And: /etc/network/interfaces.d/50-cloud-init.cfg:17: unknown or no method and no inherits keyword specified
[09:24] <Wulf> voja: and what's in there?
[09:25] <voja> When 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] <voja> sudo ifup ens3
[09:26] <voja> sudo: unable to resolve host cloudimg: Connection refused
[09:26] <voja> Waiting for DAD... Done
[09:26] <voja> The IPv6 is up then
[09:26] <Wulf> oh, "static6" is of course rubbish
[09:26] <voja> I assume the static6 should be replaced by static in /etc/network/interfaces.d/50-cloud-init.cfg
[09:27] <voja> Should I try static instead? AFAIR I got this from the docs
[09:27] <Wulf> voja: https://pastebin.com/9cfdg9Z2
[09:27] <Wulf> voja: I don't know how to teach that to cloud-init though
[09:28] <voja> Yes, that's what it should look like
[09:28] <voja> I'm trying again with static instead of static6
[09:30] <voja> A this leads to an unusable VM
[09:30] <voja> [   13.669155] cloud-init[FAILED] Failed to start Initial cloud-init job (pre-networking).
[09:30] <voja> See '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:31] <voja> This breaks even the generation of the login user, so it's hard to get to the systemctl to view a log...
[09:32] <voja> Could this be a bug in cloud-init that it renders static6 instead of static to /etc/network/interfaces ?
[09:32] <Wulf> voja: possible
[09:33] <voja> Would you recommend opening a ticket, or do you have any other idea what I could try?
[09:43] <Wulf> voja: read the source, find the bug?
[09:44] <voja> Yes... So Python it is
[09:44] <Wulf> yep :)
[09:44] <Wulf> python 3 even
[09:46] <voja> I wanted to learn Python since a few weeks, but I got stuck with the question Python 2 or 3
[09:47] <Wulf> 3.
[09:48] <voja> 50-cloud-init.cfg is referenced in cloudinit/distros/debian.py:
[09:48] <voja> NETWORK_CONF_FN = "/etc/network/interfaces.d/50-cloud-init.cfg"
[09:48] <voja> When I grep for NETWORK_CONF_FN there is no other result
[09:49] <voja> That is confusing, because this filename needs to used somewhere
[09:49] <voja> The only caveat with 3 was probably that Ansible sometimes requires v2
[09:56] <voja> Okay, I did not see the second ocurence of /etc/network/interfaces.d/50-cloud-init.cfg
[10:04] <voja> Okay, I think I found the bug
[10:05] <voja> cloudinit/net/eni.py line 127
[10:05] <voja> "iface {fullname} {inet} {mode}"
[10:05] <voja> Need to figure out how mode is set
[10:06] <voja> okay, the bug may then be located in another line ;-)
[10:20] <voja> okay, the _render_iface doesn't fix the mode
[10:20] <voja> This method does the inet/inet6 mapping, but does not write static instead of static6
[10:21] <voja> That causes the syntax erro
[10:21] <voja> r
[10:26] <voja> I need to find a proper way to inject the fix to the cloud image, then I can test my solution
[11:18] <voja> My patch is working :-)
[11:26] <voja> I'll create a launchpad.net account later and submit a bug report + patch suggestion
[18:40] <powersj> rharper: blackboxsw: this is why the copr build is failing: https://github.com/lxc/lxd/issues/3499
[18:40] <rharper> urg
[18:41] <rharper> we can workaround by taring
[18:41] <rharper> tar -cpf package.tar *.src.rpm ; and lxc file pull
[18:42] <rharper> or lxc exec container -- cat cloud-init-*.src.rpm > cloud-init.src.rpm
[18:42] <rharper> etc
[18:42] <rharper> naughty bug though
[19:35] <rharper> powersj: 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.gz
[19:37] <powersj> rharper: this is tot?
[19:37] <rharper> no
[19:38] <rharper> a branch of mine
[19:38] <powersj> ah
[19:38] <rharper> but I've not touched any thing under cloud_tests
[19:38] <powersj> ok got me scared for a min, as nightly tests are reporting passed
[19:38] <rharper> but I've merged from trunk today
[19:38] <rharper> nightly tests building srpms under cent6 ?
[19:38] <powersj> yes
[19:38]  * rharper goes looking for trunk el6 i386 builds
[19:39] <powersj> although we don't do i386 builds...
[19:39] <rharper> all mine failed
[19:39] <powersj> to be more specific I am referring to these results: https://jenkins.ubuntu.com/server/job/cloud-init-ci-nightly/
[19:39] <rharper> so not just i386
[19:39] <rharper> maybe I have dirtry tree when src rpm building
[19:39] <powersj> that is tot, and the last test is it runs the tests and builds the srpm under centos 6 and 7
[19:40] <rharper> oh, it has the same error but something else must of failed
[19:40] <rharper> /usr/bin/python -O /tmp/tmpVVbF54.py
[19:40] <rharper> SyntaxError: ('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:43] <powersj> rharper: aren't the "File not found" errors fatal?
[19:43] <rharper> yes
[19:43] <rharper> if you say it should be packaged, and it's not; that's an error
[20:22] <rharper> powersj: 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_ROOT
[20:23] <powersj> rharper: ah! :) good to know