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

paulmeyhttps://code.launchpad.net/~paul-meyer/cloud-init/+git/cloud-init/+merge/32353200:35
paulmeyfound and fixed a bug...00:35
paulmeybug # 168771200:36
blackboxswthx for that paulmey. I'm end of day now. but I'll get you a thorough review on this tomorrow if it isn't reviewed before then.00:52
=== smatzek_ is now known as smatzek
=== rangerpbzzzz is now known as rangerpb
blackboxswforgot to mention powersj  I found an existing project registered over in opensuse build service https://build.opensuse.org/package/show/Cloud:Tools/cloud-init15:23
blackboxswfor when we start looking at trying to auto-gen RPMs15:23
powersjah yes I did see this the other day. Looks like someone setup cloud-init builds for suse15:23
blackboxswnot sure how we'd coordinate w/ that (or avoid stepping on toes). But yeah it looked like it was about ~2 months old15:24
powersj+18 patches15:24
blackboxswyeah lots of patch love15:24
blackboxswsome of those I checked against our master and saw fixes already landed15:24
smoserblackboxsw, powersj i signed up for fedora account yesterday (actually had one already, as i'm cool like that)15:41
smosersigned up for copr15:41
smoseri think copr is right for centos/fedora/rhel rpms15:41
smoserand then suse build for suse15:41
smoserthoughts?15:41
blackboxswsmoser: yeah that sounds good to me. I signed up for one end of last week as I'm not cool like that15:44
blackboxswit's doable.15:44
blackboxswboth looked viable15:45
blackboxswand copr is probably best in class for RHEL centos anyway (though it didn't seem to have a *ton* of projects registered if I recall)15:45
blackboxswsmoser, I've setup a digital ocean account and am spinning up a couple test instances to validate failed behavior of https://bugs.launchpad.net/cloud-init/+bug/1676908.   Will wrap up these SRU templates today I hope15:47
ubot5`Ubuntu bug 1676908 in cloud-init (Ubuntu Zesty) "DigitalOcean network improvements" [Medium,Confirmed]15:47
smoserblackboxsw, i can just bother utlemming and ask him for help on that15:48
smoserand i'm perfectly fine to have him veriy15:48
smoserthis is quite reasonable. he opened bug, he mostly did work, his company benefit..15:48
blackboxswsmoser: +1 on bothering BHoward :)15:48
* smoser pings utlemming15:49
utlemmingsmoser: here....I thought I was hanging out, but was disconnected :)15:51
smoserutlemming, thanks15:52
smoserblackboxsw, bother utlemming15:52
blackboxswhi ben, time to bother you about https://bugs.launchpad.net/cloud-init/+bug/167690815:53
ubot5`Ubuntu bug 1676908 in cloud-init (Ubuntu Zesty) "DigitalOcean network improvements" [Medium,Confirmed]15:53
utlemmingyup15:53
blackboxswI was going to try setting up a test config droplet in DO that'd reproduce the problem you fixed with your branch15:53
smoserutlemming, we'd like for you to do the sru template and verify fix15:53
smoseras your knowledge of digital ocean surpasses even blackboxsw's (who signed up more than 8 hours ago)15:54
blackboxswbut wanted to get some guidance on a general test config/setup that'd expose this original proble15:54
utlemmingI'd be happy too...15:54
utlemmingsmoser: any chance that https://code.launchpad.net/~utlemming/cloud-init/+git/cloud-init-1/+merge/323273 could be included?15:54
utlemmingthat is the root cause on another bug....let me fetch that for you15:55
utlemmingsmoser: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/168153115:57
ubot5`Ubuntu bug 1681531 in cloud-init (Ubuntu) "networking.service fails on ifup if networking configured via cloud-init" [Undecided,Incomplete]15:57
blackboxswyep, I've created my first droplet and it looks like your initial changes from #1676908 are already present http://paste.ubuntu.com/24505957/16:02
blackboxswso DO pulls from xenial-updates16:03
blackboxswwow spelling auto-correction by irccloud. hmm don't think I like that16:03
blackboxswDO droplets pull from xenial-updates and I see part of ben's changes already present.16:04
utlemmingblackboxsw: we're using the official images, but that is a dpkg-divert because...welp, broken16:07
smoserblackboxsw, of course they pull from -updates16:10
smoserah.16:10
smoserhm..16:10
blackboxswAMheh.16:14
* blackboxsw steps out for an early lunch16:30
ragechinrharper: Do you have that documentation PR from yesterday handy? I seem to have lost it.16:41
rharperi do16:41
rharperhttps://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/32139716:42
rharperragechin: feel free to nudge smoser to land it; then it will get published on cloud-init's read-the-docs16:42
ragechinTHanks.16:42
smoserutlemming, why wouldn't you fix your metadata on digital ocean?17:05
smoseressentially  https://code.launchpad.net/~utlemming/cloud-init/+git/cloud-init-1/+merge/323273 looks like the MD is provding a gateway that you're saying doesnt work.17:05
utlemmingsmoser: checking, on that17:25
utlemmingbut I would still like to ignore the second nics17:25
utlemmingfor the purpouses of a gateway17:25
smoser:)17:26
smoserutlemming, do you agree that the information provided to cloud-init is kind of broken ?17:40
smoserwhy would you have gateways on two nics?17:41
ragechinDHCP assigned addresses on both NICs17:41
ragechinsee: AWS17:41
utlemmingsmoer: yup, I'm getting the history on that now17:42
ragechinhey smoser, any chance you can push this along please?17:42
ragechinhttps://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/32139717:42
paulmeyblackboxsw, smoser, I updated https://code.launchpad.net/~paul-meyer/cloud-init/+git/cloud-init/+merge/32353217:59
utlemmingsmoser: so yeah, its wrong, but we're going to have use a different version of the json in order to fix that18:00
paulmeycleaned up tests, more specific assertions and added warnings for unused options18:00
smoserpaulmey, thanks.18:00
smoserutlemming, ok, can you open a bug and provide info, then we comment in the MP on what we're doing18:00
smoserbecause otherwise i'm going to wonder WTH IS GOING ON in 6 months when i look at that again.18:01
smoserrharper, on https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/32139718:01
smoserhmm.18:02
blackboxswpaulmey: looking now, thanks18:02
smoseri'll just make some commits and sugest them, rharper18:03
rharpersmoser: ok, more since the last time18:03
rharperI pulled your PR and fixed what you suggested18:03
smoseryeah. just some stuff i thin is confusing. its ard to type18:04
rharpersure18:05
utlemmingsmoser: updated the commit message to refence the bug, and updated https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/168153118:07
ubot5`Ubuntu bug 1681531 in cloud-init (Ubuntu) "DigitalOcean DS defines mutliple gateways via meta-data" [Undecided,Incomplete]18:07
blackboxswutlemming: are you generating an SRU template for https://bugs.launchpad.net/cloud-init/+bug/1676908  too ?18:18
ubot5`Ubuntu bug 1676908 in cloud-init (Ubuntu Zesty) "DigitalOcean network improvements" [Medium,Confirmed]18:18
blackboxswsmoser: I'm not really sure what the intent of extra_opts is in fs_setup. I see no docs about it in https://cloudinit.readthedocs.io/en/latest/topics/examples.html#disk-setup and the behavior of the code seems to lead me to think any functionality could have been handled by setting fs_setup: cmd: to include everything someone wants to do.18:38
utlemmingblackboxsw: fwiw, with out my other patch requested, the SRU will fail.18:38
utlemmingblackboxsw: both have been SRU'ified18:40
utlemmingalthough I seem to have been kicked out of all my LP groups, so I can't even nominate the bugs18:41
blackboxswexcellent utlemming18:41
blackboxswor should I saw darkmuggle18:41
blackboxswsay*18:42
utlemmingeither :)18:42
smoserrharper, http://paste.ubuntu.com/24506946/19:06
smosersee HELPME comments ...19:06
rharperok19:06
smoserrharper, does that stuff make sense ?19:23
smoser(the patch there)19:23
smoserutlemming, thanks.19:23
smoserpaulmey, htanks19:23
rharpersmoser: yes;  extra docs for helping folks19:23
rharperworking them now19:24
blackboxswpaulmey: minor comments added to your proposal. thanks19:39
paulmeyblackboxsw: implemented all your suggestions. Thanks for reviewing!20:02
blackboxswnp paulmey20:03
rharpersmoser: merged and re-pushed to branch;20:10
anticwi have vm images i want to use on openstack, ec2 and locally ... when using them locally there is nothing for cloud-init to talk to (which is fine)20:28
anticwhowever, i can't seem to make cloud-init time-out promptly or reliably20:28
anticwseeing a datasource and seting timeouts, etc i still see it retrying for 120s (default which i thought i changed)20:29
rharperanticw: you may want to use the NoCloud datasource locally instead of modifying the timeouts;20:43
rharperanticw: if you want to debug the timeout, getting /var/log/cloud-init.log along with the cloud-config you seeded in the image will help us debug20:45
=== rangerpb is now known as rangerpbzzzz
anticwrharper: how does cloud-init know to use NoCloud on boot?20:56
rharperfileysstem label20:56
rharperhttp://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html20:56
rharpercidata is the volume label20:56
anticwcloud-drive?20:57
rharperyeah20:57
anticwbut i 100% don't want that20:57
anticwwhy can't it just give up mucking about after 5s or so?20:57
rharperor, if you want to embed it directly in the image, you write files to /var/lib/cloud/seed/nocloud/{user-data,meta-data}20:57
anticwin ec2 it will easily get a response before then20:57
anticwno, i want the same images in all 3 envs20:57
anticwthe exact same bits20:57
rharperbut if you're not on ec2, the cloud-config won't apply20:58
anticwbut then it delays usable boot times for 120s or more20:58
anticwVMs locally boot in about 2s or so20:58
anticwwith it ... well, it's 125s+20:58
anticw(boot meaning to the point i can login)20:59
rharperright, if you use NoCloud or ConfigDrive, with the same user-data, then cloud-init will find those and run them;20:59
anticwand if it can't find them ... can i not have it timeout?20:59
rharperif you supply the same user data to an ec2 instance, it will find the ec2 metadata service and consume the same user-data and run the same paths w.r.t cloud-config20:59
anticwi mean, i could also have an init process that looks to see if it's still there after 10s and shoots it20:59
anticwi must be missing something simple sorry21:00
rharpercloud-init is attempting to find a source of data;  if you don't provide one, it currently assumes you *might* be on an ec2 instance;  historically it;s had a long timeout for various reasons;21:01
rharperI'm suggesting that you keep the same image, but provide the user-data via a config drive, so cloud-init can find it when you boot locally21:01
anticwand if i don't want config drive but would rather a timeout?21:02
rharperthat will provide the same results w.r.t applying user-data (ie, set this password, import this key, etc)  as it would if you booted the image in ec221:02
rharperthe default timeout is long, as you know; changing that requires modifying the image21:02
rharperembedding some cloud-config in /etc/cloud/cloud.cfg.d/  for the EC2 datasource21:02
rharperthere's a max_wait: value; I'd need to read the code a bit more to write up the details21:03
rharpereven if your time out, no user-data will be applied21:03
rharperanticw: do you want the image to not run cloud-init locally ?21:03
anticwi tried setting a max_wait without success; googling i find others struggling with this too21:03
anticwrharper: locally i do NOT want cloud-init right21:03
rharperif so, you can pass a kernel parameter to disable cloud-init altogether21:04
anticwbut kernel parms come from the boot loader ...21:04
rharperyes, I see your concern here21:04
anticwif i can't reduce the 120s via config i can just hack the code i guess21:04
rharperwell, I'll file a bug on ec2 timeout docs;  there isn't much there21:05
anticwi could probably put a metadata server at 169.254.169.254 if there was a suitable reply that meant 'go away' but i'm not sure there is21:05
anticwrharper: there are docs/examples there but i can't get them working, likely it's me21:05
rharperanticw: in trunk cloud-init, the ds-identify feature will not run cloud-init unless it detects a local datasource; but on ec2 it woudl detect it's ec2 and enable itself21:06
rharperthis is on it;s way back to previous releases (in zesty, yakkety, and eventually xenial)21:06
anticwthis is ub1604 current upstream so likely not in that21:06
rharpernot yet21:06
rharperyou can modify it to use the strict policy now, if you like though21:06
anticwi could pattch and make a new pkg21:07
rharperyou only need a new config file21:07
anticwpatch even21:07
anticwoh?21:07
rharper% cat etc/cloud/ds-identify.cfg21:08
rharperpolicy: search,found=first,maybe=all,notfound=disabled21:08
rharperci.datasource.ec2.strict_id=true21:08
rharperfor 1604 with cloud-init version: 0.7.9-90-g61eb03fe-0ubuntu1~16.04.121:08
rharperwhich is in xenial-updates21:08
rharperthat policy file will force cloud-init to ensure it finds a datasource or it won't run21:08
rharperthis means for a local boot, without config drive, it will skip cloud-init running altogether21:09
rharperbut the same image with config drive, or booted in ec2, will run21:09
rharperdoes that get you what you need?21:09
anticwi think it might, waiting for it to time-out to test21:10
rharperyou might be interested in mount-image-callback tool which let's you mount and modify the image without booting it21:12
rharperin the cloud-image-utils21:12
anticwi can modify images just fine21:18
anticwthe goal though is to have a base images that is *not* modified21:18
anticwi've had to mount the zvol more than a couple of times locally to unfark stupid things i did21:19
rharperhehe21:25
anticwrharper: i created ds-identify.cfg as you showed above but it cloud-init still runs21:29
anticwlet me check i didn't goof21:29
rharperare you running the cloud-init version I pasted above ?21:30
anticwoh, i see ... i actually assumed i was but didn't check, sorry21:31
anticwthat's a git version id in there so not release tag, my guess is not21:31
rharperok, if you apt update && apt install cloud-init, it'll upgrade to the newer version which has ds-identify available for use21:32
anticwit's in the apt-repo very recently?21:32
rharperfor a few weeks or more21:33
anticwi do have it21:33
rharperok, then we can look at /run/cloud-init/ds-identify.log21:34
rharperthe default behavior without the ds-identify.cfg is to always run (as it has in the past); the policy file should direct it to not run unless it detects a local datasource (or a some other cloud identifier, for say ec2)21:35
anticwhttps://pastebin.com/5xdMeUE1 && https://pastebin.com/S5HMyVTW21:36
anticwmaybe for ec221:36
anticw"1 datasources returned maybe: Ec2"21:37
rharperack, looking21:39
rharperanticw: do you have any Ec2 cloud-config in any of the /etc/cloud/* subtree ?21:46
anticwno21:47
rharperhrm, I have a plain 1604 image with that same policy loaded, but it doesn't return maybe for ec2 ... trying to figure out why yours is...21:47
anticwi did alter cloud.cfg to try and get things going and also to take out the apt modules, because with those in place source.list gets wrecked21:48
anticwi can [re]test with the stock cloud.cfg likely21:49
rharperthat wouldn't affect it21:49
rharperif you're on your instance now;, you can remove /run/cloud-init/.ds-identify.result and then  sh -x /usr/lib/cloud-init/ds-identify &> ds.log;  that'll re-run ds-identify with execution tracing, and I can see how it got a maybe21:50
anticw--force?21:52
anticwotherwise cached21:52
rharperI think the dot file is the cache test21:52
rharperbut you can also pass --force, won't hurt21:52
anticwso this time i got: 2 datasources returned maybe: OVF Ec221:53
anticwpastebin ds.log for you?21:53
rharperplease21:53
rharper=/21:53
rharperI think maybe OVF is expected ...   and I've been down this path before;  /me triple checks the contents of ds-identify.cfg21:53
anticwhttps://pastebin.com/Uz7hPdjZ21:54
rharperyou need either the --force or rm /run/cloud-init/.ds-identify.result21:55
rharperthe paste was from that cached run21:55
anticwoh sorry, i did it 2x and forgot to remove it the second time21:58
anticwrharper: https://pastebin.com/8jTnqpXX22:03
rharperk22:03
blackboxswsmoser: last SRU bug template for softlayer. For testing, shall I  make-configdrive-dir, but remove the dated directory from the lxd  leaving only the latest directory. Then I could run ds-identify and make sure it still finds the content?22:22
blackboxswthe bug I meant to reference: https://bugs.launchpad.net/cloud-init/+bug/167363722:22
ubot5`Ubuntu bug 1673637 in cloud-init "cloud-init - Hosts in softlayer receiving warning" [High,Confirmed]22:22

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