/srv/irclogs.ubuntu.com/2018/03/20/#cloud-init.txt

redcavalierHi, several months ago I reported https://bugs.launchpad.net/cloud-init/+bug/1722992 . Since then, we've been running an outdated version of cloud-init. Are there plans to fix this soon?02:09
ubot5`Ubuntu bug 1722992 in cloud-init "On the latest centos 7 release, we are unable to resize our instances filesystems" [Medium,Confirmed]02:10
=== r-daneel_ is now known as r-daneel
=== shardy is now known as shardy_afk
=== shardy_afk is now known as shardy
Odd_Blokesmoser: blackboxsw: Is https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1757176 a known issue?15:09
ubot5`Ubuntu bug 1757176 in cloud-init (Ubuntu) "TypeError: get_hostname() got an unexpected keyword argument 'metadata_only' on GCE bionic boot" [Undecided,New]15:09
blackboxswwow Odd_Bloke I'll look at that. thanks. That feels like version mismatch (as we just grew the metadata_only arg)... but will glance after this meeting I'm in.15:10
Odd_Blokeblackboxsw: Thanks!15:11
blackboxswOdd_Bloke: have access to cloud-init collect-logs  on the CLI there? it'll dump a *log.tar in the cwd15:11
Odd_Blokeblackboxsw: I can't get in to the machine, unfortunately.15:12
blackboxswno prob. will see if I can reproduce the prob15:12
Odd_BlokeSSH host keys weren't created, so I can't SSH in.15:12
blackboxswOdd_Bloke: confirmed and I can fix that today15:14
Odd_BlokeThanks!15:14
blackboxswI see what happened15:14
Odd_Blokeblackboxsw: Should we expect it to only happen on GCE?15:14
blackboxswworking it right now Odd_Bloke . I'm checking other datasources now15:15
blackboxswOdd_Bloke: CloudSigma AliYun, OpenNebula looks like too15:17
blackboxswbut fallout is contained to those15:17
Odd_BlokeAck, thanks.15:18
blackboxsweasy fix, should be up, reviewed and posted to bionic today15:18
blackboxswsmoser: rharper here's the fix the the bug above http://paste.ubuntu.com/p/RVC6FQbwTB/15:39
blackboxswI'm trying to decide how much unit testing we should have to cover it15:40
smosersurprised pylint didnt scream on that.15:41
smoserwell, mayb e not15:41
blackboxswto exercise this, I could have a suite of tests that initializes each fake datasource only to run the base class get_hostname method passing metadata_only to make sure it is accepted... but that seems overkill.15:41
smoserdifferent signatures on subclasses.15:41
smoseryeah. i agree.15:41
smoseri dont know.15:42
smoserii dont want to say "no unit tests are OK".15:42
blackboxswyeah smoser I was suprised about the different named param especiialy in b/cloudinit/sources/DataSourceAliYun.py case which renames resolve_ip to _resolve_ip15:42
smoserbut agree on the pain.15:42
smoserwell, that is probably fallout *from* pylint15:42
blackboxswI feel like I should fix aliyin param name too so it matches base class15:42
smoserit complains if you dont use a varibable somteims15:43
smoseri think its fine to change the aliyun param  name15:43
blackboxswmaybe I add a unit test per datasource I've changed to make sure get_hostname accepts the proper param names as defined in base class?15:44
blackboxswat least then the subclass tests that it's implementation provides the same 'api' as the base class15:45
blackboxsws/it's/its/15:45
blackboxswthough if parent class implementation moves on, these unit tests would still incorrectly succeed15:46
blackboxswI've got an idea.15:46
=== pickle is now known as dhill_
=== pickle is now known as dhill_
smoserblackboxsw: did we have a general soltuion for json.dumps({dictionary that miht have some binary keys })16:01
blackboxswhrm, we have process_base64_metadata in cloudinit.sources.__init__16:03
blackboxswand json_dumps uses json_serialize_default  in cloudinit.util16:03
blackboxswwhich prefixes base64 content with ci-b6416:04
smosernice. thanks16:04
smoserblackboxsw: http://paste.ubuntu.com/p/8Hxy67h5X2/17:35
blackboxswsmoser: interesting, will fix now.17:36
blackboxswsmoser: care if I land that branch in the process of fixing review-mps?17:37
smoserblackboxsw: fine wit em17:38
blackboxswmy regex was bad17:38
blackboxswdidn't allow for digits in the lp_user17:39
blackboxswstrangely we hand't hit that type of user until now17:39
blackboxswok tox is running against it prior to merge. should land in a couple mins17:41
blackboxswreview-mps pushed17:43
blackboxswOpenNebula should land shortly17:43
blackboxsw...done17:45
blackboxswsmoser: rharper for review and landing today to unblock GCE bionic18:25
blackboxswhttps://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/34175718:25
rharperlooking18:26
blackboxswthanks18:26
rharperinspect, nifty18:27
smoserblackboxsw: fyi, c-i says go away18:29
smoseri suspect due to 'inspect' :)18:29
smoserno. py2718:30
* blackboxsw is testing on py2.6 now too and no go on that unit test approach18:32
blackboxswhrm18:32
blackboxswahh gotit smoser rharper 30 seconds18:34
blackboxswmy last change with lints busted it18:34
blackboxswwill push a fix18:35
blackboxswsmoser: rharper fd165e92b0e22245d41e7f55a5f89de4b6b522a6 pushed18:38
blackboxswjust tested on py2.618:38
rharperk18:38
blackboxswas well18:38
blackboxswgiving a GCE deployment of it to confirm sucees18:39
blackboxswgiving a GCE deployment of it to confirm sucess18:39
blackboxswvalidated on GCE by upgrading xenial to my branch and cloud-init clean --logs --reboot19:00
* blackboxsw validates failure case on GCE now using cloud-init-tip without get_hostname fix19:00
blackboxswsure enough, here's the failure on GCE without my changeset https://pastebin.ubuntu.com/p/NpMNDVMhz6/19:01
blackboxswok gotta run. I still need to sort that lint error on my branch looks like19:03
blackboxswback in 3019:03
blackboxswback19:44
dojordan@blackboxsw, any update on the UrlError handling discussion?19:49
blackboxswdojordan: saw your changes at least to readurl yesterday. hadn't gotten through a followup discussion on URLError handling.20:00
blackboxswlet's see if we can hash it out here.20:00
blackboxswso URLError can be raised by readurl in two cases:20:00
Odd_BlokeCan someone remind me what the new cloud-init SRU process/cadence is?20:00
blackboxsw 1. IMDS service is currently unavailable (during service upgrade or something) This would raise an URLError with the string "[Errno 111] Connection refused"20:01
blackboxsw2. No network is configured on the instance with the e.cause string containing '[Errno 101] Network is unreachable'20:02
blackboxswright now cloudinit's URLError doesn't surface errno on the exception raised20:02
blackboxswshould it handle that programmatically when raising an URLError?   I'm not certain we really need to do that or Azure should really care a much about Errno 10120:03
blackboxswOdd_Bloke: cadence is at will currently when we've decided there is enough content to warrant an SRU. Generally I'd like to keep it minimally at quarterly (or at least when shortly we cut a cloud-init upstream release).  The higher frequency the better20:04
dojordanhmm, where does timeout fit into the picture20:05
dojordanbecause in reality that is what is used in the happy path20:05
dpb1blackboxsw: let's just simpmlify that... "after we release"?20:05
blackboxswOdd_Bloke: for the short term, Since we have a cut of cloud-init v.18.2 next week, I'd like to start an SRU of that to xenial within a week after the release.20:05
Odd_Blokeblackboxsw: "the release" == the 18.2 release, or bionic?20:06
blackboxsw+1 dpb1 ... /me is rambling a bit too much on that. so, post 18.2 cut next week, we'll kick off an SRU20:06
Odd_BlokeOK, cool; I'm interested in https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1752391 ending up in xenial, and it sounds like we're on the path to that being true pretty soon.20:07
ubot5`Ubuntu bug 1752391 in cloud-init "cloud-init does not recognize initramfs provided network config in all cases" [Medium,Fix committed]20:07
blackboxswOdd_Bloke: SRU to xenial after cloud-init 18.2 is cut next week. I'd estimate 2 weeks until SRU publish20:07
Odd_BlokeAck, thanks. :)20:08
blackboxswdojordan: I think the timeout you provide to readurl  is on the intial readurl request cap for when it raises a TimeoutException, it's passed into requests directly20:10
blackboxswso readurl will sit 1 second in your use case before raising that timeout exception20:11
blackboxswif IMDS is not functional for some reason20:11
dojordanand then does timeout exception get wrapped in a urlerror? (sorry its been a little while since i wrote this code)20:11
dojordanI believe it does20:12
blackboxswin testing, that's what it looks like happened. on my end. I setup a SimpleHTTPService  and killed it20:12
dojordanI don't think cloud init needs to do too much special casing here - but maybe im wrong20:13
dojordanwe tried to communicate, and didn't get a response20:13
dojordanvs got a response we don't like (5xx)20:14
blackboxswright only difference in the first case was that you are re-EphemeralDHCPv4'ing when you don't really need to.20:15
blackboxswbut I think that's probably an unlikely corner case20:15
dojordanexcept with a timeout exception we do need to re dhcp20:15
dojordanwhich was the first case20:16
blackboxswahh right, much concern about nothing then20:16
dojordanbut i agree, if we got a 101 we wouldn't necessarily need to re dhcp but it does'20:17
dojordant really harm anything  IMO20:17
blackboxswdojordan: yeah and generally I can't imagine what case would actually get you down the path of Errno 101, because that means you got a temporary dhcp lease and something managed to get there at the moment and ifdown your interface20:18
blackboxsw.... not going to happen.20:18
dojordanright, since systemd-networkd is not up yet20:20
blackboxswok I'm good with this approach. will mark approved after I get one test run on EC220:24
blackboxswthanks for your patience20:24
dojordansounds good, thanks!20:31
blackboxswsmoser: rharper finally sorted my CI woes https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/34175721:00
rharperdojordan: in other threads about using netlink, there is some mention of reducing as much downtime as possible; if we can avoid DHCP'ing when we don't need to; that will keep the waiting overhead to a min, no ?21:07
smoserblackboxsw: rharper https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/34177421:08
smoseri have to run now. blackboxsw  i can come back in in ~ 4 hours and upload anything that you've got landed.21:08
blackboxsw+1 smoser thanks will have something up21:09
smoserjust approved your branch there.21:09
blackboxswjust approved your Hetzner enable branch too smoser  https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/34167921:10
blackboxswsmoser: Odd_Bloke put up https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/341778 for bionic GCE fix22:43
blackboxswthat's to publish our fix which is in tip22:43
blackboxswif it lands tonight it should be in bionic cloudimages tomorrow morn22:43

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