/srv/irclogs.ubuntu.com/2018/08/14/#cloud-init.txt

plujonI'm not sure if this is a cloud-init question... I have an Ubuntu 16.04.5 Digital Ocean droplet.  Yesterday I ran `apt-get update && apt-get dist-upgrade`, and after rebooting, found my ssh server keys had changed.  Further digging reveals that cloud-init generated new ssh keys for my server.  Why would it do that?13:44
smoserplujon: if it thoguht you were on a new instance it would do that.14:09
smoserit should not do that unless you captured a snapshot and created a new instance from that.14:09
smoserif you could post /var/log/cloud-init.log that'd be nice.14:09
smoserand if you can file a bug and attach 'cloud-init collect-logs' that would have more info for us.14:10
smoseryou can run 'ubuntu-bug' and follow prompts14:10
smoserplujon: thank you for asking.14:10
plujonsmoser: The /var/log/cloud-init.log is rather big!  I wonder if this is the relevant piece:14:20
plujonhttp://ix.io/1ka214:20
plujonThat's a pair of warnings from journalctl.14:20
plujonAnd from cloud-init.log, the key regeneration: http://ix.io/1ka814:24
plujonI'm hesitant to file a bug because it might be something Digital Ocean does intentionally, for some inexplicable reason.14:25
smoserplujon: are you not wanting to paste things?14:33
smoserpastebinit /var/log/cloud-init.log will do it for you14:33
smoserwrt if it is intended or not... i would suspect it is not.14:34
smoserjust showing that it *did* regenerate keys (i believed you the first time) isn't really helpful. the full is needed to see why.14:35
smoserif you're afraid of personal data being exposed, and you feel morme comfortable sharing with me privately that is fine too.14:36
plujonsmoser: http://paste.ubuntu.com/p/X3CpJqhj6m/14:59
smoserplujon: thanks. i'll take a looka fter this call.. 15 minutes or so15:05
brtknrIs the command for running tests simply "tox"15:11
brtknrERROR: FAIL could not package project - v = InvocationError('/usr/bin/python2 /opt/bharat/cloud-init/setup.py sdist --formats=zip --dist-dir /opt/bharat/cloud-init/.tox/dist (see /opt/bharat/cloud-init/.tox/log/tox-0.log)', 1)15:12
brtknrI get this when i try to run tox15:12
brtknrERROR: invocation failed (exit code 1), logfile: /opt/bharat/cloud-init/.tox/log/tox-0.log15:12
brtknrERROR: actionid: tox15:12
brtknrmsg: packaging15:12
brtknrcmdargs: ['/usr/bin/python2', local('/opt/bharat/cloud-init/setup.py'), 'sdist', '--formats=zip', '--dist-dir', local('/opt/bharat/cloud-init/.tox/dist')]15:12
brtknrTraceback (most recent call last):15:12
brtknr  File "setup.py", line 272, in <module>15:12
brtknr    version=get_version(),15:12
brtknr  File "setup.py", line 83, in get_version15:12
brtknr    (ver, _e) = tiny_p(cmd)15:13
brtknr  File "setup.py", line 48, in tiny_p15:13
brtknr    (cmd, ret, out, err))15:13
brtknrRuntimeError: Failed running ['/usr/bin/python2', 'tools/read-version'] [rc=1] (, git describe version (17.2-187-gf6249277) differs from cloudinit.version (18.3)15:13
brtknr)15:13
brtknrERROR: FAIL could not package project - v = InvocationError('/usr/bin/python2 /opt/bharat/cloud-init/setup.py sdist --formats=zip --dist-dir /opt/bharat/cloud-init/.tox/dist (see /opt/bharat/cloud-init/.tox/log/tox-0.log)', 1)15:13
brtknrOkay it worked after changing version inside cloudinit/version.py from 18.3 to 17.215:17
blackboxswbrtknr: what distro?15:17
brtknrcentos15:18
blackboxsw7 or 6?15:18
blackboxswI have an image here, will double check tip vs an older version15:18
brtknr 7.5.180415:18
blackboxswthx will check15:19
smoserplujon: thanks. there is a bunch of bugs represented there... :-(15:24
plujonsmoser: Heh, you are welcome!15:25
smoserthis was a 14.04 upgraded ?15:25
plujonsmoser: Hmm.  Good question.  Let me see...15:26
plujonThe machine was initiated on 2016-11-07.  I think it was 16.04.15:28
smoserplujon: you're probably right. i didnt realise/remember that 16.04 started with such an old version15:29
smoserbut you are correct. GA was 0 .7.715:29
smoser https://launchpad.net/ubuntu/+source/cloud-init15:29
blackboxswhrm smoser one issue with hoisting EphemeralDCHP up into get_data is that _poll_imds (called by crawl_metadata) needs access to the dhcplease lease as well as retrying the EphemeralDHCP context manager  on urlerror.17:19
blackboxswI'll try thinking about how to consolidate both callsites17:20
smoserhm.17:34
* blackboxsw doesn't believe we need the EphemeralDCHP within a try/except UrlError... loop for Azure._poll_imds. I'll try pulling it up into get_data and just passing the lease info into _poll_imds(lease)18:53
blackboxswhmm but passing the lease into crawl_metadata poses a problem because that call signature needs to be common across all DataSources :/19:23
blackboxswI guess I could persist an instance variable DSAzure.dhcp_lease19:23
blackboxswthis feels dirty/brokne19:24
blackboxswthis feels dirty/broken19:24
smoserhm..19:24
blackboxswthe whole point of EphemeralDHCPv4 is quickly setting up network for a short period of time and tearing it down afterward, hence the context manager, but this doesn't quite align w/ poll_imds which wants to repeatedly attempt to hit dhclient to get new addressess across a polling loop exception boundary.19:40
rharperblackboxsw: can we subclass into a PollingEphemeralDHCP ?19:41
blackboxswit kinda feels like poll_imds should be our greater context....19:41
blackboxswrharper: yeah I kinda feel like that rework needs to happen, PollingEphemeralDHCP., like the name,19:42
blackboxswthen we'd have one single context which would result in a properly configured network when we clear that 'gate'19:42
blackboxswok that feels a bit like rework/tech-debt that'd involve a bit more eyes (like azure folks too) to weigh in19:43
blackboxswbecause I need access to a configured test/dev platform which blocks on imds polling19:44
blackboxswto validate behavior19:44
rharperheh19:48
rharperyeah19:48
shanersmoser: really appreciate the review, will work on making the necessary fixes20:12
smosershaner: great. please feel free to ping. and also if i'm delinquent feel free to ping.20:27
shanersmoser: ack, will do20:28
smoserrharper: what is the 'manual' word for netplan20:32
rharperRequried for somethin g20:32
smoser:-(20:33
smoserrequired for boot != please do not bring up automatically20:33
rharperoh, critical connection20:33
cyphermoxno20:33
rharperyou said mainly which means 'ignore me'20:33
cyphermoxthere's no such thing as "manual".20:34

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