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

tmartinsHey 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
tmartinsHow to make cloud-init work with virtio-scsi?02:58
tmartinsI mean, by default, without tricks via "user_data"...03:21
=== shardy is now known as shardy_afk
=== shardy_afk is now known as shardy
smosertmartins, need more information on what is failing14:20
smoserfile a bug? collect the info requested there.14:20
tmartinsRight, I'll fill a bug report with the logs!   =)14:44
smosertmartins, please just give me apointer here.15:09
smoser(also)15:09
tmartinsSure!15:40
powersjrharper: \o/ xkvm is awesome16:10
rharperpowersj: thank smoser  too16:10
powersjsmoser: thanks for suggesting this as well16:11
powersjrharper: thoughts on how to include it with cloud-init?16:12
smoseri think copy to tools/16:12
rharperput it in tools16:12
powersjk16:12
smoserpowersj, http://paste.ubuntu.com/25126584/16:18
smoserthat is what i recall having done for mount image callback.16:18
smoserthat partuclarly lets me run mount-image-callback lxd: with sudo without a password16:19
powersjsmoser: what is the "lxd:" part do? My ignorance of mount-image-callback is showing...16:21
smoserlxd: means lxd do the same sorts of things to a container that you'd do to an image16:21
smoserso i can16:21
smoser$ lxc init ubuntu-daily:xenial xsmtest16:22
smoser$ sudo mount-image-callback xsmtest mchroot16:22
smoserer...16:22
smoser$ sudo mount-image-callback lxd:xsmtest mchroot16:22
powersjok so for my use-case I need to specify a similar command string for the Cmnd_Alias in sudoers16:25
smosermaybe something like16:32
smoser http://paste.ubuntu.com/25126653/16:32
smoserand remember that files in /etc/sudoers.d have to be 440 (or more restricive) or they're ignored.16:32
powersjok16:33
powersjthanks16:33
smoserbasically that is going to protect you from accidental mis-use16:33
powersjyeah16:33
smoseras if you wanted to exploit it, you could just put any file in /citest-images/16:33
smoserand 'mchroot' is just the equivalent (available in newer 'mount-image-callback') of16:34
smoser chroot _MOUNTPOINT_16:34
rharpersmoser: I just push a rebase of curtin-centos on master16:42
smoserok16:42
smoserpackages are pita16:58
smoserrharper, just noticed... i tried fedora25 lxd instance.17:26
smoserour copr repo builds python2 there17:27
smoserand there is no python2 in their install.. ie, we should be python3 there.17:27
rharperyeah, we've not been testing the fedora path =(17:37
rharperI suspect we'll have more "fun" with systemd-units under fedora as well17:38
powersjsmoser: thanks for the sudoers file. no more typing password all day long17:41
powersjsmoser: did you have any suggestions on http://paste.ubuntu.com/25126921/17:41
smoserwow17:47
smoserso .. the rpm version available in fedora25 for cloud-init from the daily is17:47
smoser 0.7.9+211.gd1e8eb7-1.fc2517:47
smoserthat .fc25 i think is what handles something i'd wonderd about.17:47
smoserif you have build-time logic then you'd get 2 different binary rpms for centos6 and centos717:48
smoser(and i think we do)17:48
smoserwhats interesting there is that means (i *think*) that a upgrade from centos6 to centos7 will get 100% new packages.17:49
smoseroh.. or only stuff that got re-built. maybe they can binary copy also17:49
smoseri geuss that ends up being the same as ubuntu17:49
smoseryeah17:49
smoserrharper, around ?18:35
blackboxswrharper: 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 now18:43
blackboxswcent6 images in aws have selinux enforcing (as opposed to our lxc environments when don't)18:44
blackboxsw*which don't18:44
smoseryou'd hope they do :)18:49
smoserlxc is not enforcing just because it doesn't play well with the container18:49
blackboxswok rebasing this branch against master and fixing up unit tests.18:55
blackboxswsmoser: actually I'll wait to rebase until you land this one https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32753418:56
blackboxswsince those unit test changes will have merge conflicts w/ my branch18:57
blackboxswthis month will be interesting to see what my aws bill is18:57
smoserblackboxsw, you're welcome to grab that to trunk yourself18:58
smoserif it makes it easier for you18:58
smoserassertFalse might be valid in python2.6.18:59
blackboxswit'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
blackboxswsmoser ^19:00
rharpersmoser: back19:09
smoserrharper, https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32773919:19
smoserrharper, ^ you can see your commit (that i cherry-picked) and then some cleanups of mine.19:21
rharperyes19:22
rharperone question, we can already rely on 'prefix' even if we get the odd 'netmask: ffffffffffffffffffff' ?19:22
rharpersmoser: ^19:22
rharperthat's my one question in dropping the 'netmask' in subnet part and only using prefix19:23
smoserhave to test. where would we get that ?19:23
smosercommit d00da2d5b0d4519:23
smosersays19:23
rharperI think I saw that in the json network from rackspace19:23
smoser      * prefix will always include an integer value that is the19:23
smoser        network_prefix for the address.19:23
smoser      * netmask will be present only if the address is ipv4, and its19:23
smoser        value will always correlate to the 'prefix'.19:23
rharperin curtin, network_alias, network_mtu, and vlan_network_ipv6 all use v6 with netmask set to ff*19:25
rharperso you can net-convert those and make sure it doesn't blow up19:25
* rharper tries out the change locally19:25
smoseri think it should19:26
smoserbecause we do19:26
smoserin _normalize_net_keys19:26
smoserwe use  mask_to_net_prefix19:26
smoseralthough 'ffffffffffffff' that is just wrong19:26
smoserno : ?19:26
rharperit's /6419:27
rharperand it's a thing19:27
smoserwithout a : ?19:27
rharperoh, no19:27
rharpersorry19:27
rharperi was just being lazy19:27
smoserthen it should be fine.19:27
smoserrharper,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
smoser6419:30
rharpersmoser: looks good19:36
smoserrharper, IPV6ADDR=2001:DB8::10/6419:39
smoserthat is ok ?19:39
smoserit seems that it must work for SECONDARIES19:39
rharperAFAIK, yes19:39
rharperit's passed to iproute2 (/sbin/ip)19:39
rharperwhich takes prefix in v6 format19:39
smoserk19:40
smoserrharper, so. .. on your templatifying of the systmed unit files...19:40
smosernone of those *should* be necessary19:41
rharpergo on19:41
rharperthose changes were taken from the upstream cloud-init in el today19:41
smoserAfter and Before don't do anything19:41
smoseroh.19:41
smoserright19:41
smoserlarsks, just wanted to take them out19:42
rharperthere is something else besides ordering19:42
rharperI think 'network' versus 'networking'19:42
rharperis at lease one change19:42
rharperthere is no 'networking' service in el19:42
rharperonly 'network'19:42
smoserbut I can put 'After the-third-sunday-of-the-new-millenium.service'19:42
smoserand it doesnt do anything unless that service will be run19:42
smosersame is true of networking.service and network.service19:43
smoserthe one that is present will get run Before and others ignored19:43
rharperyou're suggestion thens is to include all of the names it might be19:43
smoserthats what we have right now19:43
rharperwell, no19:44
rharperbecause trunk doesn't work under el719:44
rharperit might be the default deps then19:44
rharperbut I know for sure, the unit file in trunk doesn't run networking early enough for vmtest to pass19:44
rharperso I pulled in the changes from downstream el cloud-init19:45
rharperI'm fine with tweaking it19:45
rharperbut I do know for sure it won't work as it is19:45
smoserand then you are19:45
smoserdropping19:45
smoser DefaultDependencies=no19:45
rharperyes19:45
rharperfor el19:45
larsksI am too distracted to follow right now, but note that the defaultdeps stuff was causing us all sorts of issues. Yeah.19:45
smoseron centos19:45
smoserdid you ahve a reason for that ?19:45
smoserwe almost certainly need that in order to accomplish some of the things that -local does19:46
larskssmoser: we kept hitting dependency loops without dropping that.19:46
rharperI dropped it due to el having the change, they're network service and other things like dbus  are ordered differently19:46
rharperlarsks: ack, I saw that as well19:46
rharperwe'd have to drive in dbus early changes which aren't present19:46
larsksand not just on core stuff: cloud-init got into a fight with os-collect-config, also, which only crops up on openstack deployments.19:46
rharperthat said, I;ve not tested el7 on GCE which does DNS resolution early19:47
rharperbut they likely don't have both a libnss and systemd-resolved combo like we did on Xenial19:47
smoserwe're ultimately going to need it.19:48
smoserother wise you run really late19:48
rharperwell, we're not running late now19:50
smoseryou're running after all local mounts are done19:51
smoserwhich is too late to accomplish some things like re-formatting an ephemeral disk19:51
rharperwe know that DefaultDeps in el are after local mounts?19:51
rharperor is that ubuntu systemd19:51
smoseryes19:51
smoser Service units, unless they set DefaultDependencies=no, automatically get a dependency on sysinit.target19:52
smoseri'm fine to deal with it later.19:53
rharperbleh19:54
* rharper feels unit rage 19:54
smoserrharper, in that commit you also mixed in redhat.spec file changes19:55
smoserwhich i'm kind of confused on19:55
rharperit was needed due to how unit files were copied19:56
smosera.) you have a comment that indicates .service files are installed by setup but .target are not19:56
smoserbut i dont see how that is possible19:56
smoserb.) i dont understand how it could have worked before.19:56
rharperit copied systemd/*19:57
rharperwe have template files in there now19:57
rharperso only copy in the *rendered* unit files19:57
smosersetup.py installs the .target and the rendered .service files19:57
rharperwe have .target and .service files;  the spec file copied *everything*, and setup.py also copied in some19:57
smoserfor install19:58
rharperit does now19:58
smoser"now" ?19:58
rharperI added render_systemd_unit19:58
rharperto setup.py19:58
smoserright.19:58
smoserbut it does that for both .service and .target19:58
smoserbut your comment in the spec file acts as if it does that only for .service19:58
rharperwe only pass in the files that are templated19:59
rharperall .service files are templated19:59
rharperbut the .target files still need to be installed19:59
rharperso we manually copy this in19:59
rharperthose in19:59
smoserthey get installed the same way that .service files do19:59
smoserin your branch19:59
smoserthe setup.py install19:59
smoserwill install them19:59
rharperhow?19:59
rharperwhere in the setup.py does it specify .target files ?19:59
rharperoh, maybe  it does work20:00
rharperwe pass back non template files as-is;20:00
smoserright20:01
rharperI suspect one changes was made after the spec change20:01
smoserwhy '$' ?20:01
smosererr.. \$20:01
rharperpre jinja20:01
rharperthere's a commit later that should ahve been squashed20:01
rharperwhich drops the \$20:01
rharperI wrote these before we switched to jinja in the specfile20:02
smoserrharper, so i think the only change we need to spec file then20:06
smoseris to drop the 'cp -p systemd/*' line20:06
rharperyes20:06
rharperthat looks right20:06
rharperand I'll drop the \$ commit in the series since you will skip that here20:06
smoserhttps://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/327739 is merged20:07
smoseri have to go afk.20:07
smoserrharper, so on top of yours20:09
smoseri had http://paste.ubuntu.com/25127837/20:09
smosercan you see if that works ? that'd be my next MP.  your 'Templatize systemd service files'20:10
smoserplus http://paste.ubuntu.com/25127837/20:10
smoserchecking that now with centos7. centos6 didn't have any of the systemd files and i worried20:16
rharperk20:16
smoserbut i guess that is by design20:16
rharperright, no systemd in el620:17
rharperupstart files only20:17
smoserrharper, https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32774320:21
rharperis that supposed to be both the sysconfig prefix change *and* the template change ?20:22
rharperthe diff on the MP looks like it has two commits20:22
smoserit does20:23
smoseryours, then my cleanup20:23
smosermy cleanup dropped all the $ changes from the .spec.in20:23
rharpermine shows 3 commits20:24
smoserand removed the mkdir and copying of .target20:24
smoserreload20:24
rharperk20:24
rharperhuh20:24
smoseri'd not pushed trunk20:24
rharperwhat's up with the delay ?20:24
rharperah20:24
rharpero20:24
rharperhrm , two commits, diff still wrong20:24
smoserlaunchpad doesnt render the moves well20:24
smoserrenames20:24
smoser:-(20:24
rharperbah20:24
rharperI'll look at the commit20:25
smoseryeah, and please write a commit message too20:25
smoserif you ACK that then i'll pull when i get back20:25
rharperok20:25
smoserand we'll be in like 3/12 :)20:25
rharper3/11 (we get to drop one)20:25
tmartinssmoser, here is the bug report! https://bugs.launchpad.net/cloud-init/+bug/170534620:48
ubot5Ubuntu bug 1705346 in cloud-init "Cloud-Init fails to deal with SWAP and Ephemeral if virtio-scsi is enabled" [Undecided,New]20:48
smoserrharper, next one ..21:55
smoser Fix sysconfig rendering of virtual interfaces with network configurations21:55
smoserneeds unit tests21:55
* rharper accepts this 21:55
rharperI believe they're added near the end21:55
rharper095f7585b57d35e9de68ee99c77a500ad644c29321:55
rharpersmoser: what would you like?  I can see about adding a separate singular test ; try to avoid conflicting with the one coming at the end21:57
smoserhm..21:58
smoserwell, as a standaone commit we shoudl be able to get some unit test that shows the changes.21:59
rharperk21:59
rharperI'll do that21:59
smoserrharper, in 97a25a75143a22:04
smoseruse is is_ipv6_addr22:04
smoserand a test would be good.22:04
smoseri can work on getting some of those together too22:05
rharperok, I'm doing the virtual interface one now22:05
rharperif you want to tackle 97a22:05
rharperso 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 passing22:06
rharperwill repeat tonight with a rebase from trunk22:06
rharpersmoser: do you want a paste with the unittest for 095 ?22:25
rharperhttp://paste.ubuntu.com/25128675/22:27
rharperthat should do; and won't collide with the test in the last commit22:27
rharperI'm going to step out for a bit, will check back later22:27
tmartinssmoser, I've updated the bug report with the config drive!   ;-)23:24

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