/srv/irclogs.ubuntu.com/2016/03/02/#cloud-init.txt

rharpersmoser: would you expect trunk cloud-init to run inside trusty as-is ?00:07
smoserrharper,  yeah, i'd think so00:47
smoserdont remember though.00:47
rharpersmoser: ok, it doesn't; that does make injecting a deb of cloud-init into the various target releases somewhat problematic;01:22
smoseroh. trusty needs python201:23
smoserright ?01:23
smoseris that it.01:23
smosertry01:24
smoser./packages/bddeb --python2 -v -S01:24
smoseri'm trying that01:24
rharperah, that makes sense01:25
smoserwell, it does install01:28
rharperph01:29
rharperit installs01:29
smoserbut needs python-jinja2 and python-oauthlib the second of which might not be necessary01:29
smoseras i think it tries one and then the other01:29
smoserand jinja2 also01:29
rharperit errors out running01:29
smoserwe can probably make it build wihtout those deps01:29
rharper/bin/sh: 1: exec: cloud-init: not found^M01:29
rharperI'm injecting the deb; dpkg --install; apt-get -f install ; that picks up package deps01:29
smoserseems to work for me01:30
smoser(with --python2)01:30
rharperright01:30
smoseri have to run01:30
rharperand built inside trusty sbuild01:30
rharperok01:30
smoserright.01:30
rharperKeeping session: trusty-amd64-0c52d381-b0b8-48af-a299-5ed976f72b2101:35
rharperE: cloud-init_0.7.7~bzr1163-1.dsc: amd64 not in arch list or does not match any arch wildcards: all -- skipping01:35
* rharper sbuilds harder01:37
Odd_Blokesmoser: So I now have a few different things that are pending merges in to trunk; I've been holding off on that because of overheard conversations about switching to git, but that hasn't happened yet (AFAIK).09:51
Odd_Blokesmoser: Is trunk still frozen for the move, or can we continue using it?09:51
smoserOdd_Bloke, i can't right now be delayed by moving to git.13:49
smoseri'd like to be on git. and i'd welcome you or someone setting up a git branch that synced trunk13:50
smoseron launchpad i think.13:50
Odd_Blokesmoser: I'd like that too, but also don't have the time.13:50
Odd_Blokesmoser: So can we safely merge things in to lp:cloud-init for the time being?13:50
smoseryes13:50
Odd_BlokeOK, cool.13:50
smoserand i'm ok for you to do that.13:51
smoserdo the merges yourself, that is, and push.13:51
Odd_Blokesmoser: Ack, thanks.13:51
smosersome things:13:51
Odd_Blokesmoser: Also, I'm going to have a patch for UUID endianness for trusty soonish.13:51
Odd_Bloke(Luckily, it doesn't affect wily onwards. \o/)13:51
smoser a.) tox must work13:51
smoser b.) do not add dependencies13:52
smoser c.) commit message in 'git style' format13:52
smoser    short description, blank line, longer description13:52
smoser d.) update ChangeLog with roughly short description, and please give people credit there13:52
smoser e.) when a bug is fixed, please --fixes lp:XXXXX on the commit13:53
smoserOdd_Bloke, so its cloud-init's job to flip endieanness of a uuid ?13:53
Odd_Blokesmoser: The problem is that the kernel with the bug is in the wild.13:53
smoseri think basically we just have to test both possible endianness13:53
Odd_Bloke    if current_instance_uuid == reported_instance_uuid:13:54
Odd_Bloke        # The endianness of the instance UUID has not changed13:54
Odd_Bloke        return reported_instance_uuid13:54
Odd_BlokeNAILED IT13:54
Odd_Bloke    if current_instance_uuid == reported_instance_uuid:13:54
Odd_Bloke        # The endianness of the instance UUID has not changed13:54
Odd_Bloke        return reported_instance_uuid13:54
Odd_BlokeOh FFS.13:54
Odd_BlokeHow do clipboards in X even work?13:54
Odd_Blokesmoser: http://paste.ubuntu.com/15266719/ is what I have currently.13:54
Odd_BlokeUntested as yet.13:55
smoserif current_instance_id in (big_endian(value), little_endian(value)):13:55
smoser good13:55
smosercan you put such a function in util ?13:56
smoseri'm expecting that very soon i'll be having the same thing on openstack13:56
Odd_Blokesmoser: So ATM it only affects Azure on trusty and maybe precise (I haven't checked there yet, focussed on getting trusty fixed first).13:57
smoserhttp://paste.ubuntu.com/15266739/13:57
Odd_Blokesmoser: So this was all going to be in an Ubuntu patch.13:57
smoserinterestingly. azure uses system-uuid13:58
smoseropenstack uses product-uuid13:58
smoserwould both be vulnerable? or is product-uuid safe due to its different location?13:59
Odd_Blokesmoser: Where does OpenStack use product-uuid?14:00
smosersee thatpaste.14:00
smoserand then followed paste is http://paste.ubuntu.com/15259269/14:00
Odd_Blokesmoser: I think the OpenStack data source uses the metadata API to get the instance ID.14:01
Odd_Blokesmoser: It may be that that's also presented via DMI, but I don't think it's used.14:02
Odd_Bloke(And so it should be fine)14:02
Odd_BlokeAnyway, lunch is ready, I'll BBIAB.14:03
smoserOdd_Bloke, read the message :)14:04
smoseri'm looking to change that. or at  least to not re-hit the MD (which might be there) if the dmi data says that i am the same insatnce i was last time.14:04
Odd_Blokesmoser: Oh, I didn't understand it was a proposed change. :)14:17
Odd_Blokesmoser: Oh, hmph, we remove the /var/lib/cloud/instance link before we determine instance ID.15:14
smoser Odd_Bloke see /var/lib/cloud/data/previous-instance-id15:15
smoserand honestly, your check here should really run before we remove that link15:16
smoserbecause what you're doing is fairly definitive15:16
smoserand we only remove that link so that we go searching again, which we wouldnt need to do.15:16
smosermake sense ?15:16
Odd_Blokesmoser: Not quite, no.  Looking at bin/cloud-init, the bits under '# Stage 4' don't do anything but clean things up if we aren't running with --local...15:20
Odd_Bloke(Perhaps I don't understand enough about when we run cloud-init at boot, and how)15:20
smoserright. you are adding somethign that is smarter than that.15:20
smoserso basically first thign that happens is cloud-init --local runs.15:21
smoserand it removes /var/lib/cloud/instance/15:21
smoserif it had 'manual_cache_clean' then it would nto remove that link15:21
smoserand it would not go looking for a datasource again15:21
smoserit'd just re-use the cached data.15:21
smoserwhich is what you want it to do.15:21
smoserso15:22
smoser if manual_cache_clean:15:22
smoser    do not remove15:22
smoser else:15:22
smoser   if my_quick_check_for_instance_id() == the_previous_instance_id:15:22
smoser   do not remove15:22
smoser else15:22
smoser    remove link15:22
Odd_BlokeBut my quick check for instance ID is Azure-specific, other things might will need to hit metadata APIs etc.15:23
Odd_BlokeAnd we haven't yet determined a data source at this point.15:24
Odd_BlokeI'm not saying that we shouldn't do that, I just don't think I can do it in the scope of a fix for a critical bug (that only affects old versions of cloud-init). :)15:25
smoser2 othe rthings that allow me to support you making such a possibly invasive change15:28
smosera.) /var/lib/cloud/data/previous-datasource is there. meaning you could look and noly consider this if the previous datasource was azure15:28
smoser  i dont think this is necessarily required, though, given15:28
smoserb.) its a UUID ! this thing should never be seen *anywhere* randomly twice15:29
smoserthe failure path i guess is if you are a new instance on hardware, where that value is actually the node's uuid.15:29
smoserand you happen to have ran on this system when someone captured a new image.15:30
Odd_Blokesmoser: Or if the cloud sets the same value for all instances.15:30
smoser and it happened to hit the same instance id that your "proper" check found ?15:30
smoserif a cloud has all their instance ids with the same instance-id, then yes. we are foobarred.15:31
smoseri think we can strongly suggest people not do that.15:31
Odd_Bloke:D15:31
rharpersmoser: I think the lxd check isn't quite right;  IIUC, if one does not specify a lxd: dict in cloud-config, then it shouldn't attempt to install lxd;  we do a lxd_cfg = cfg.get('lxd'); which if yaml doesn't include a lxd section returns None;  the next check if not lxd_cfg and isinstance(lxd_cfg, dict);  is True and False for lxd_cfg of NoneType;  this means we fall through and attempt to install lxd;19:11
smoseryou're probably right.19:13
rharperadding a not isistance(, dict) I think achieves what is wanted; assuming that if someone adds just lxd section (empty dict); that will install lxd ..19:13
rharpercool, with a fix in that logic;  I don't get lxd attempting to install in trusty (and thus breaking since it needs to be installed via backports);  I;ll file a bug, and send you a MR19:37
rharperthere's also another lurking error in one of the error paths; pyflakes cloudinit/config/cc_lxd.py will show it19:37
rharpersmoser: I packaged a python3 version of cloud-init built inside a xenial sbuild;  it installs to /usr/lib/python3.5/dist-packages ;  the python3 interpreter on vivid doesn't know to look there;  contrast with curtin, which uses /usr/lib/python3/dist-packages which works for any python3.x IIUC;  shoudl we do the same when packaging cloud-init ?  or do we need to build a new cloud-init deb for each release?  that does mak20:12
rharpere testing changes to cloud-init across all release a longer process since it requries N rebuilds20:12
smoserhm... the packaging doesn't use /usr/lib/python3.5 at all. right ?20:13
smoserit dh_python that does that.20:14
rharperoh20:14
rharperhrm, maybe the tools/build-deb in curtin does something different20:14
rharperI built the curtin package on my xenial host, so I don't think an sbuild of curtin would change the python path20:15
rharperbuild curtin inside xenial sbuild; that is20:15
smoserwell i'm certain that i have never typed that path20:15
rharperI agree20:15
rharpernow to look at the difference20:15
smosertools/build-deb does with dh_python too (curtin)20:15
rharpermaybe newer debhelper ?20:17
rharper7 vs 9 ?20:17
smoserwell thats just declaring the minimum20:18
smoserit uses what isthere.20:18
smoserrharper, i know what it is.20:46
smosersee in curtin/trunk/debian/rules20:46
smoserwe build for python in $(PY3VERS)20:47
smoserit has somethignto do with that.20:51
rharpersmoser: yeah, I was looking at the rules in curtin which specifies 2 and 3; looking to see if I can build with those changes20:58
suro-patzhello folks!22:44
suro-patzcloud-init 0.7.x on rhel7 is failing to execute due to dependency on urllib22:45
suro-patzam I missing some requirement?22:45
suro-patzhttps://github.com/openstack/cloud-init/blame/0.7.x/cloudinit/util.py#L4922:46
suro-patzharlowja_at_home: ^^22:49
harlowja_at_homesuro-patz, sup23:15
harlowja_at_homeis six installed?23:16
harlowja_at_homeor a new enough six?23:16
harlowja_at_homesuro-patz, i'd check the version of six23:16
harlowja_at_homecauseit works for me23:16
suro-patzharlowja_at_home: yes, that's where the issue was23:27
suro-patzthe rhel7 image i was using had six-1.3 :(23:27
harlowja_at_homeya, sounds old23:28
harlowja_at_hometo old23:28
suro-patzDo you think it makes sense to put a lower bound in cloud-init requirements23:28
suro-patzharlowja_at_home: ^^ ?23:28
harlowja_at_homenope23:28
harlowja_at_homeoh23:29
harlowja_at_homeyes i mean23:29
suro-patzok, I will go ahead and submit a request23:29
harlowja_at_homesuro-patz,  https://github.com/openstack/cloud-init/blob/master/requirements.txt#L823:29
suro-patzthis days is it on github/gerrit or ol bazar stuff?23:29
harlowja_at_homeoh nm, the 0.7.x branch not have that23:30
suro-patzoh cool23:30
harlowja_at_homesmoser, where 0.7.x stuff happening now-adays23:30
harlowja_at_home:-P23:30
suro-patzyes, 0.7.x does not have23:30
harlowja_at_homei think smoser thought launchpad for 0.7.x and git for 2.0 stuff23:30
harlowja_at_homehe'll know best23:30
suro-patzokie dokie23:31
suro-patzharlowja_at_home: thanks !23:31
harlowja_at_homenp23:31
rharpersmoser: I was unsuccessful in teaching cloud-init to do both python2 and 3 ; without more study at least.  Currently I'm just using the python2 version of the build any place that doesn't have python3.5 (which I belive is only xenial)23:33

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