[02:58] <tmartins> Hey guys, listen, when I enable "virtio-scsi, in my OpenStack environment, it speeds up a lot my storage! However, it breaks cloud-init! Both SWAP and Ephemeral are failing. Maybe that's because the devices changed from /dev/vdX to /dev/sdX ?
[02:58] <tmartins> How to make cloud-init work with virtio-scsi?
[03:21] <tmartins> I mean, by default, without tricks via "user_data"...
[14:20] <smoser> tmartins, need more information on what is failing
[14:20] <smoser> file a bug? collect the info requested there.
[14:44] <tmartins> Right, I'll fill a bug report with the logs!   =)
[15:09] <smoser> tmartins, please just give me apointer here.
[15:09] <smoser> (also)
[15:40] <tmartins> Sure!
[16:10] <powersj> rharper: \o/ xkvm is awesome
[16:10] <rharper> powersj: thank smoser  too
[16:11] <powersj> smoser: thanks for suggesting this as well
[16:12] <powersj> rharper: thoughts on how to include it with cloud-init?
[16:12] <smoser> i think copy to tools/
[16:12] <rharper> put it in tools
[16:12] <powersj> k
[16:18] <smoser> powersj, http://paste.ubuntu.com/25126584/
[16:18] <smoser> that is what i recall having done for mount image callback.
[16:19] <smoser> that partuclarly lets me run mount-image-callback lxd: with sudo without a password
[16:21] <powersj> smoser: what is the "lxd:" part do? My ignorance of mount-image-callback is showing...
[16:21] <smoser> lxd: means lxd do the same sorts of things to a container that you'd do to an image
[16:21] <smoser> so i can
[16:22] <smoser> $ lxc init ubuntu-daily:xenial xsmtest
[16:22] <smoser> $ sudo mount-image-callback xsmtest mchroot
[16:22] <smoser> er...
[16:22] <smoser> $ sudo mount-image-callback lxd:xsmtest mchroot
[16:25] <powersj> ok so for my use-case I need to specify a similar command string for the Cmnd_Alias in sudoers
[16:32] <smoser> maybe something like
[16:32] <smoser>  http://paste.ubuntu.com/25126653/
[16:32] <smoser> and remember that files in /etc/sudoers.d have to be 440 (or more restricive) or they're ignored.
[16:33] <powersj> ok
[16:33] <powersj> thanks
[16:33] <smoser> basically that is going to protect you from accidental mis-use
[16:33] <powersj> yeah
[16:33] <smoser> as if you wanted to exploit it, you could just put any file in /citest-images/
[16:34] <smoser> and 'mchroot' is just the equivalent (available in newer 'mount-image-callback') of
[16:34] <smoser>  chroot _MOUNTPOINT_
[16:42] <rharper> smoser: I just push a rebase of curtin-centos on master
[16:42] <smoser> ok
[16:58] <smoser> packages are pita
[17:26] <smoser> rharper, just noticed... i tried fedora25 lxd instance.
[17:27] <smoser> our copr repo builds python2 there
[17:27] <smoser> and there is no python2 in their install.. ie, we should be python3 there.
[17:37] <rharper> yeah, we've not been testing the fedora path =(
[17:38] <rharper> I suspect we'll have more "fun" with systemd-units under fedora as well
[17:41] <powersj> smoser: thanks for the sudoers file. no more typing password all day long
[17:41] <powersj> smoser: did you have any suggestions on http://paste.ubuntu.com/25126921/
[17:47] <smoser> wow
[17:47] <smoser> so .. the rpm version available in fedora25 for cloud-init from the daily is
[17:47] <smoser>  0.7.9+211.gd1e8eb7-1.fc25
[17:47] <smoser> that .fc25 i think is what handles something i'd wonderd about.
[17:48] <smoser> if you have build-time logic then you'd get 2 different binary rpms for centos6 and centos7
[17:48] <smoser> (and i think we do)
[17:49] <smoser> whats interesting there is that means (i *think*) that a upgrade from centos6 to centos7 will get 100% new packages.
[17:49] <smoser> oh.. or only stuff that got re-built. maybe they can binary copy also
[17:49] <smoser> i geuss that ends up being the same as ubuntu
[17:49] <smoser> yeah
[18:35] <smoser> rharper, around ?
[18:43] <blackboxsw> rharper: smoser powersj: so createing a tmpdir and running a copy of dhclient from there on both ubuntu and centos results in success. No apparmor/SELinux conifinement constraints hit us on either ubuntu or centos 6. Checking cent7 on aws now
[18:44] <blackboxsw> cent6 images in aws have selinux enforcing (as opposed to our lxc environments when don't)
[18:44] <blackboxsw> *which don't
[18:49] <smoser> you'd hope they do :)
[18:49] <smoser> lxc is not enforcing just because it doesn't play well with the container
[18:55] <blackboxsw> ok rebasing this branch against master and fixing up unit tests.
[18:56] <blackboxsw> smoser: actually I'll wait to rebase until you land this one https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/327534
[18:57] <blackboxsw> since those unit test changes will have merge conflicts w/ my branch
[18:57] <blackboxsw> this month will be interesting to see what my aws bill is
[18:58] <smoser> blackboxsw, you're welcome to grab that to trunk yourself
[18:58] <smoser> if it makes it easier for you
[18:59] <smoser> assertFalse might be valid in python2.6.
[19:00] <blackboxsw> it's easy enough as you are adding unit tests. yeah just wanted to closeout on my minor review comments there. please do land it with whatever review comments you accept. it'll make my branch easier(smaller) when I put mine up.
[19:00] <blackboxsw> smoser ^
[19:09] <rharper> smoser: back
[19:19] <smoser> rharper, https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/327739
[19:21] <smoser> rharper, ^ you can see your commit (that i cherry-picked) and then some cleanups of mine.
[19:22] <rharper> yes
[19:22] <rharper> one question, we can already rely on 'prefix' even if we get the odd 'netmask: ffffffffffffffffffff' ?
[19:22] <rharper> smoser: ^
[19:23] <rharper> that's my one question in dropping the 'netmask' in subnet part and only using prefix
[19:23] <smoser> have to test. where would we get that ?
[19:23] <smoser> commit d00da2d5b0d45
[19:23] <smoser> says
[19:23] <rharper> I think I saw that in the json network from rackspace
[19:23] <smoser>       * prefix will always include an integer value that is the
[19:23] <smoser>         network_prefix for the address.
[19:23] <smoser>       * netmask will be present only if the address is ipv4, and its
[19:23] <smoser>         value will always correlate to the 'prefix'.
[19:25] <rharper> in curtin, network_alias, network_mtu, and vlan_network_ipv6 all use v6 with netmask set to ff*
[19:25] <rharper> so you can net-convert those and make sure it doesn't blow up
[19:25]  * rharper tries out the change locally
[19:26] <smoser> i think it should
[19:26] <smoser> because we do
[19:26] <smoser> in _normalize_net_keys
[19:26] <smoser> we use  mask_to_net_prefix
[19:26] <smoser> although 'ffffffffffffff' that is just wrong
[19:26] <smoser> no : ?
[19:27] <rharper> it's /64
[19:27] <rharper> and it's a thing
[19:27] <smoser> without a : ?
[19:27] <rharper> oh, no
[19:27] <rharper> sorry
[19:27] <rharper> i was just being lazy
[19:27] <smoser> then it should be fine.
[19:30] <smoser> rharper,
[19:30] <smoser> $ python3 -c 'import sys; from cloudinit.net.network_state import mask_to_net_prefix; print(mask_to_net_prefix(sys.argv[1]))' "ffff:ffff:ffff:ffff::"
[19:30] <smoser> 64
[19:36] <rharper> smoser: looks good
[19:39] <smoser> rharper, IPV6ADDR=2001:DB8::10/64
[19:39] <smoser> that is ok ?
[19:39] <smoser> it seems that it must work for SECONDARIES
[19:39] <rharper> AFAIK, yes
[19:39] <rharper> it's passed to iproute2 (/sbin/ip)
[19:39] <rharper> which takes prefix in v6 format
[19:40] <smoser> k
[19:40] <smoser> rharper, so. .. on your templatifying of the systmed unit files...
[19:41] <smoser> none of those *should* be necessary
[19:41] <rharper> go on
[19:41] <rharper> those changes were taken from the upstream cloud-init in el today
[19:41] <smoser> After and Before don't do anything
[19:41] <smoser> oh.
[19:41] <smoser> right
[19:42] <smoser> larsks, just wanted to take them out
[19:42] <rharper> there is something else besides ordering
[19:42] <rharper> I think 'network' versus 'networking'
[19:42] <rharper> is at lease one change
[19:42] <rharper> there is no 'networking' service in el
[19:42] <rharper> only 'network'
[19:42] <smoser> but I can put 'After the-third-sunday-of-the-new-millenium.service'
[19:42] <smoser> and it doesnt do anything unless that service will be run
[19:43] <smoser> same is true of networking.service and network.service
[19:43] <smoser> the one that is present will get run Before and others ignored
[19:43] <rharper> you're suggestion thens is to include all of the names it might be
[19:43] <smoser> thats what we have right now
[19:44] <rharper> well, no
[19:44] <rharper> because trunk doesn't work under el7
[19:44] <rharper> it might be the default deps then
[19:44] <rharper> but I know for sure, the unit file in trunk doesn't run networking early enough for vmtest to pass
[19:45] <rharper> so I pulled in the changes from downstream el cloud-init
[19:45] <rharper> I'm fine with tweaking it
[19:45] <rharper> but I do know for sure it won't work as it is
[19:45] <smoser> and then you are
[19:45] <smoser> dropping
[19:45] <smoser>  DefaultDependencies=no
[19:45] <rharper> yes
[19:45] <rharper> for el
[19:45] <larsks> I am too distracted to follow right now, but note that the defaultdeps stuff was causing us all sorts of issues. Yeah.
[19:45] <smoser> on centos
[19:45] <smoser> did you ahve a reason for that ?
[19:46] <smoser> we almost certainly need that in order to accomplish some of the things that -local does
[19:46] <larsks> smoser: we kept hitting dependency loops without dropping that.
[19:46] <rharper> I dropped it due to el having the change, they're network service and other things like dbus  are ordered differently
[19:46] <rharper> larsks: ack, I saw that as well
[19:46] <rharper> we'd have to drive in dbus early changes which aren't present
[19:46] <larsks> and not just on core stuff: cloud-init got into a fight with os-collect-config, also, which only crops up on openstack deployments.
[19:47] <rharper> that said, I;ve not tested el7 on GCE which does DNS resolution early
[19:47] <rharper> but they likely don't have both a libnss and systemd-resolved combo like we did on Xenial
[19:48] <smoser> we're ultimately going to need it.
[19:48] <smoser> other wise you run really late
[19:50] <rharper> well, we're not running late now
[19:51] <smoser> you're running after all local mounts are done
[19:51] <smoser> which is too late to accomplish some things like re-formatting an ephemeral disk
[19:51] <rharper> we know that DefaultDeps in el are after local mounts?
[19:51] <rharper> or is that ubuntu systemd
[19:51] <smoser> yes
[19:52] <smoser>  Service units, unless they set DefaultDependencies=no, automatically get a dependency on sysinit.target
[19:53] <smoser> i'm fine to deal with it later.
[19:54] <rharper> bleh
[19:54]  * rharper feels unit rage 
[19:55] <smoser> rharper, in that commit you also mixed in redhat.spec file changes
[19:55] <smoser> which i'm kind of confused on
[19:56] <rharper> it was needed due to how unit files were copied
[19:56] <smoser> a.) you have a comment that indicates .service files are installed by setup but .target are not
[19:56] <smoser> but i dont see how that is possible
[19:56] <smoser> b.) i dont understand how it could have worked before.
[19:57] <rharper> it copied systemd/*
[19:57] <rharper> we have template files in there now
[19:57] <rharper> so only copy in the *rendered* unit files
[19:57] <smoser> setup.py installs the .target and the rendered .service files
[19:57] <rharper> we have .target and .service files;  the spec file copied *everything*, and setup.py also copied in some
[19:58] <smoser> for install
[19:58] <rharper> it does now
[19:58] <smoser> "now" ?
[19:58] <rharper> I added render_systemd_unit
[19:58] <rharper> to setup.py
[19:58] <smoser> right.
[19:58] <smoser> but it does that for both .service and .target
[19:58] <smoser> but your comment in the spec file acts as if it does that only for .service
[19:59] <rharper> we only pass in the files that are templated
[19:59] <rharper> all .service files are templated
[19:59] <rharper> but the .target files still need to be installed
[19:59] <rharper> so we manually copy this in
[19:59] <rharper> those in
[19:59] <smoser> they get installed the same way that .service files do
[19:59] <smoser> in your branch
[19:59] <smoser> the setup.py install
[19:59] <smoser> will install them
[19:59] <rharper> how?
[19:59] <rharper> where in the setup.py does it specify .target files ?
[20:00] <rharper> oh, maybe  it does work
[20:00] <rharper> we pass back non template files as-is;
[20:01] <smoser> right
[20:01] <rharper> I suspect one changes was made after the spec change
[20:01] <smoser> why '$' ?
[20:01] <smoser> err.. \$
[20:01] <rharper> pre jinja
[20:01] <rharper> there's a commit later that should ahve been squashed
[20:01] <rharper> which drops the \$
[20:02] <rharper> I wrote these before we switched to jinja in the specfile
[20:06] <smoser> rharper, so i think the only change we need to spec file then
[20:06] <smoser> is to drop the 'cp -p systemd/*' line
[20:06] <rharper> yes
[20:06] <rharper> that looks right
[20:06] <rharper> and I'll drop the \$ commit in the series since you will skip that here
[20:07] <smoser> https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/327739 is merged
[20:07] <smoser> i have to go afk.
[20:09] <smoser> rharper, so on top of yours
[20:09] <smoser> i had http://paste.ubuntu.com/25127837/
[20:10] <smoser> can you see if that works ? that'd be my next MP.  your 'Templatize systemd service files'
[20:10] <smoser> plus http://paste.ubuntu.com/25127837/
[20:16] <smoser> checking that now with centos7. centos6 didn't have any of the systemd files and i worried
[20:16] <rharper> k
[20:16] <smoser> but i guess that is by design
[20:17] <rharper> right, no systemd in el6
[20:17] <rharper> upstart files only
[20:21] <smoser> rharper, https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/327743
[20:22] <rharper> is that supposed to be both the sysconfig prefix change *and* the template change ?
[20:22] <rharper> the diff on the MP looks like it has two commits
[20:23] <smoser> it does
[20:23] <smoser> yours, then my cleanup
[20:23] <smoser> my cleanup dropped all the $ changes from the .spec.in
[20:24] <rharper> mine shows 3 commits
[20:24] <smoser> and removed the mkdir and copying of .target
[20:24] <smoser> reload
[20:24] <rharper> k
[20:24] <rharper> huh
[20:24] <smoser> i'd not pushed trunk
[20:24] <rharper> what's up with the delay ?
[20:24] <rharper> ah
[20:24] <rharper> o
[20:24] <rharper> hrm , two commits, diff still wrong
[20:24] <smoser> launchpad doesnt render the moves well
[20:24] <smoser> renames
[20:24] <smoser> :-(
[20:24] <rharper> bah
[20:25] <rharper> I'll look at the commit
[20:25] <smoser> yeah, and please write a commit message too
[20:25] <smoser> if you ACK that then i'll pull when i get back
[20:25] <rharper> ok
[20:25] <smoser> and we'll be in like 3/12 :)
[20:25] <rharper> 3/11 (we get to drop one)
[20:48] <tmartins> smoser, here is the bug report! https://bugs.launchpad.net/cloud-init/+bug/1705346
[21:55] <smoser> rharper, next one ..
[21:55] <smoser>  Fix sysconfig rendering of virtual interfaces with network configurations
[21:55] <smoser> needs unit tests
[21:55]  * rharper accepts this 
[21:55] <rharper> I believe they're added near the end
[21:55] <rharper> 095f7585b57d35e9de68ee99c77a500ad644c293
[21:57] <rharper> smoser: what would you like?  I can see about adding a separate singular test ; try to avoid conflicting with the one coming at the end
[21:58] <smoser> hm..
[21:59] <smoser> well, as a standaone commit we shoudl be able to get some unit test that shows the changes.
[21:59] <rharper> k
[21:59] <rharper> I'll do that
[22:04] <smoser> rharper, in 97a25a75143a
[22:04] <smoser> use is is_ipv6_addr
[22:04] <smoser> and a test would be good.
[22:05] <smoser> i can work on getting some of those together too
[22:05] <rharper> ok, I'm doing the virtual interface one now
[22:05] <rharper> if you want to tackle 97a
[22:06] <rharper> so far, no regression, I've rebuilt the curtin-centos cloud-init package and re-ran the curtin branch (with your passthrough reviews applied) and all tests still passing
[22:06] <rharper> will repeat tonight with a rebase from trunk
[22:25] <rharper> smoser: do you want a paste with the unittest for 095 ?
[22:27] <rharper> http://paste.ubuntu.com/25128675/
[22:27] <rharper> that should do; and won't collide with the test in the last commit
[22:27] <rharper> I'm going to step out for a bit, will check back later
[23:24] <tmartins> smoser, I've updated the bug report with the config drive!   ;-)