/srv/irclogs.ubuntu.com/2018/02/01/#cloud-init.txt

mcb30blackboxsw: https://slexy.org/view/s21hGF2TPF - it's just a single NIC dual-stack setup with stateful DHCPv610:54
=== shardy is now known as shardy_mtg
=== shardy_mtg is now known as shardy
kholkinaHi all! Can someone explain why do we check it in this line and then in line 182? https://github.com/cloud-init/cloud-init/blob/master/cloudinit/ssh_util.py#L17813:45
kholkinalooks like in line 182 'k' should be checked13:46
smoserkholkina: reading.14:12
smoserkholkina: you would appear to be correct. i'd seem you could expose that pretty easily exposed in a unit test14:22
smoserwell, it doesnt test your issue14:35
smoser but http://paste.ubuntu.com/26500979/14:35
smoseradds a test of that. and i guess to expose your bug, we just need to make the 'new_entry' invalid.14:36
smoserhttp://paste.ubuntu.com/26500992/14:38
smoserand there is a unit test showing your issue, kholkina14:38
blackboxswmcb30: thanks!17:07
* blackboxsw sets up vpn * vmware on my desktop18:54
blackboxswoops18:54
mgerdtssmoser - I think I've tracked down my problem to being a form of PEBKAC.  That being said, there's a reasonable case for protecting against this failure mode (as well as the case where the metadata server goes to lunch in middle of a request) that doesn't involve a ton of code.  I'd like to get your opinion on this.21:24
mgerdtshttps://bugs.launchpad.net/cloud-init/+bug/174660521:24
ubot5Ubuntu bug 1746605 in cloud-init "stack trace when sdc:* not defined" [Undecided,New]21:24
smosermgerdts: login prompt21:27
smoserright ?21:27
smoserlogin is running on that console and writing as cloud-init is21:27
mgerdtsno, a mdata-get command running at the same time as cloud-init21:27
mgerdtsrm /usr/sbin/mdata-get; reboot; problem fixed!21:28
mgerdtssince pretty much anything can connect to the port and mess up the conversation, a retry or two may be useful.21:29
mgerdtsThat would also provide some resilience in case the metadata server in the host is bounced while cloud-init is in the middle of a transaction.21:29
* mgerdts wishing we had a transport that was aware of multiple sessions21:30
rharpermgerdts: you mention a race with other mdata-get users ... what else would be running in parallel with cloud-init that early ?  does mdata-get write a lock file somewhere that cloud-init could check for?  does mdata-get or the scripts themselves do any retry?  that may still result in some sort of  storm of clobbering each other then requiring some sort of back-off (or both sides failing)21:50
mgerdtsWe could follow the advice at tldp.org for locking serial ports in mdata-{get,put,...} and cloud-init.  That would be a good thing.  It doesn't prevent some other random.process from opening the serial port and producing or consuming data.21:52
mgerdtsOptions 2 + 3 would be the most robust.21:52
rharpercloud-init's use of the serial port is pretty limited , just early boot;  it's somewhat surprising that any other user of the serial is active at that time21:54
mgerdtsRight now I'm trying track down what else on the system is using the metadata port.21:56
rharperI do think your suggestion (2 +3) is a reasonable approach though;  but maybe pushing the parallel usage issue somewhere else, only to come back once those users add their retry and locking21:57
rharperthere are various serial multiplexors; conserver and the like;  maybe something infront of the raw serial device can help serialize access21:59
smosermgerdts: yeah.. we can add retry.21:59
smoserand we can add advisory locking too, and put a change in mdata-get to do the same.21:59
mgerdtsI don't think that trying to add a multiplexer is the solution, as there's no session information attached to each byte that goes across the connection.  For now, the best solution seems to be a lock along with a retry.22:02
mgerdtsThere's been some discussion of supporting vsockets.  If we get that in place, it would be great to transition the SmartOS metadata service over to that.22:02
rharper+1 on vsockets22:09
smosermgerdts: well we use a socket in the container solution22:14
smoserright ?22:15
mgerdtsyep22:15
mgerdtsWe just don't have a way to pass a socket all the way into a VM yet.22:15
smoserright.22:15
mgerdtshttps://github.com/joyent/mdata-client/issues/1122:19

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