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

=== shardy is now known as shardy_lunch
=== shardy_lunch is now known as shardy
smoserharlowja, thank you.12:48
smoserharlowja, you can see things for proposed merge into cloud-init's git trunk this way...12:49
smoser all the cloud-init repos that launchpad knows about (~user/cloud-init) are viewable at  https://code.launchpad.net/cloud-init12:50
smoser lp:cloud-init (aka ~cloud-init-dev/cloud-init) git repo is at https://code.launchpad.net/~cloud-init-dev/cloud-init/+git/cloud-init12:51
smosera list of all cloud-init-dev's cloud-init branches can be seen here12:51
smoser https://code.launchpad.net/~cloud-init-dev/cloud-init/12:51
smoserthe 'master' branch https://code.launchpad.net/~cloud-init-dev/cloud-init/+git/cloud-init/+ref/master12:51
smoserand that has 'Branch merges' "7 branches proposed for merging into this one"12:51
smoserwhich points https://code.launchpad.net/~cloud-init-dev/cloud-init/+git/cloud-init/+ref/master/+activereviews12:52
smoserall of that is navigatable but sometimes non-obvious12:52
smosers/sometimes/12:52
=== contrapumpkin is now known as copumpkin
=== rangerpbzzzz is now known as rangerpb
smoserlarsks, around ?13:59
larsksSort of :) Phone meeting. I saw your changes; hope to look at that this afternoon.13:59
smoserlarsks, alternatively if you can tell me how to test that i did not break your work with bdrpm i'd just merge14:01
=== rangerpb is now known as rangerpbzzzz
smoserlarsks, ok. so i think i'm going to just pull my changes.16:23
smoserbrpm works for me as via:16:23
smoser http://paste.ubuntu.com/21909186/16:23
larskssmoser: okay.  totally going to look at things this afternoon; yesterday was just busy :)16:23
smoserlarsks, i understand not geting aroudn to things.16:23
larsksBut if it works for you that is probably the best test.16:23
smoseryou have been a big help. thank you.16:23
smosersee that paste there, i built successfully with rpmbuild16:24
smoseryour repo needs to get tags ro 'git describe' doesnt work16:24
smoserand i thikn your repo needs new repo basically (since i re-imported)16:24
smoserend result though, trunk should bddeb and brpm shortly16:24
larsksI think the existing code is post-your-re-import.  But yeah, may be missing tags.16:25
smoseryeah, just missing tags then.16:27
smoserthat makes more sense.16:27
smoserrharper, powersj harlowja ^ above paste points to building cloud-init in an centos7 lxc.16:29
smoserthere are some less-than-ideals there (i had to copy the list of rpms to install rather than using something in trunk to generate it) and i the script assumes it has to branch a remote repo, but generally did work.16:30
rharpersmoser: what's with the ssh stuff in the build env?17:22
rharperit's a builder script?17:24
harlowjawhats up17:24
harlowjai like building things :-P17:25
harlowjanow just need to see if lxc is on our build slaves, lol17:25
harlowjalarsks is it prefered to use lxc, or use the mock thing i  was reading about17:25
harlowjahttps://fedoraproject.org/wiki/Mock17:25
larsksmock is generally what people use for building packages in pristine environments.17:25
harlowjais that like glacial sprint pristine?17:26
harlowja*glacial spring17:26
harlowjaor like my local pond pristine17:26
harlowjalol17:26
larsksOh, maybe, you had me confused for a minute.17:26
harlowjathe above is just messing around17:26
harlowjalol17:26
harlowja(well the mock question isn't)17:27
harlowjabut the spring part is17:27
larsksI had figured that out, but thanks :)17:28
* rharper enjoys the artic air during his sprints17:29
=== rangerpbzzzz is now known as rangerpb
harlowjalol17:29
larsksharlowja: incidentally, you'll note that brpm now has a --srpm option which will *just* build a source rpm, which you can then hand off to mock.17:31
harlowjacool17:32
harlowjagotta get my jenkins build scripts up to date to try some of this17:32
* harlowja has been recently messing with http://docs.openstack.org/infra/jenkins-job-builder/ 17:32
harlowjaand getting the CI guy onboard with using that17:33
rangerpbsmoser, hey around? i was talking with larsks about the problem with entry_points, bloating /usr/bin/, and fully qualified path names to executables .. he had a nice idea where instead of using entry_point, the scripts call python -m instead17:33
rangerpbit is a good compromise, the only  downside is the python version is not figured out like it is with entry_point17:34
smoserrangerpb, right. and that is fine.17:35
smoserexcept...17:35
smoserwhich python do you call ?17:35
smoserpython2 or python317:36
rangerpbwell exactly .. thats the point I was bringing up17:36
smosermaybe its easier to come up with that.17:36
rangerpbi was thinking so ... but this is new territory for me as well17:36
rangerpbi did see python version is determined in the make file17:37
rangerpbhey harlowja are you aware of a way that setup.py could be used to replace a variable in a file prior to install ?18:05
harlowjanope :-/18:05
rangerpbhow about running a command which in turn could do that?18:06
rangerpblarsks, smoser http://bazaar.launchpad.net/~bbaude/cloud-init/azure_dhcp/revision/1253  <-- how much does that make you throwup in your mouth?19:07
larsksrangerpb: yuuuuuuck.  So, for the record: I think that templating the hook scripts seems unnecessary.  I think we should trust the Python installer to put scripts where they will be in $PATH, and then just call them with an unqualified name.  If someone *really* wants to override things by mucking about with $PATH, more power to them!19:09
smoserthat dhclient hooks is *such* a crap interface19:09
larsksI mean, we trust it to put cloud-init in the right place...19:09
rangerpbsmoser, i dont follow..19:10
smoserlarsks, thats not it though..19:10
smoserthe template is needed to get the right python binary19:10
smosereither python2 or python319:10
smoseras it is now.19:10
larsksIt's not, in fact; this was all rangerpb trying to work around a prior requirement :)19:10
larsksI think we should just replace the call to '$PYTHON ...' in the hook scripts with 'cloudinit-dhclient-hook', no full path, and it all becomes much easier.19:11
smoserso, yes. anoterh alternative is to put a easyinstall program into /usr/bin/19:11
rangerpbthere we are couple of pieces to it. the right version, the right binary, the right install path19:11
larsksWhich is exactly where console_scripts entrypoints get placed.19:11
smoserexcept then you have a crappy program that is not a user executable in /usr/bin/19:11
smoserthats what i didn't like.19:11
larsksI guess.  It seems like a lot of effort to work around it.19:12
smoseri'm polluting /usr/bin/ and destroying tab completion for cloud-init with some sillyness.19:12
larsksYou have the cloudinit-dhclient-hook script bail out with an error message if called without the appropriate environment.19:12
larskss/have/could have/19:12
smoserthe right place for 'cloud-inti-dhclient-hooks' is /usr/lib/cloud-init/19:13
smoserwhich isn't going to be in a PATH (and for good reason)19:13
larsksThe alternative -- which is my preference -- is to leave installation of the hook scripts up to the package.  I know we've talked about this before, but I don't generally expect my setup.py to be setting up init scripts etc. for me.19:13
larsksThe right place for the hook helper is probably distribution dependent.19:13
smosersure.19:13
smoserbut not in $PATH19:13
larsks(which is why I think it's a packaging issue)19:13
smoserand that is reasonable.19:14
smoserbut then later on i break you, because your dealing with that now has to deal with a change we made upstream.19:14
smoserwe're trying to make setup.py do the right thing.19:14
smoseri think the link there is pretty good.19:15
larsksI understand your goal, but I think that trying to turn setup.py into a multi-distribution system configuration tool is the wrong place to put our effort.19:15
rangerpbwait ... smoser did you think what I did was somewhat ok ?19:15
smosernot really a system configuration tool. just an install tool.19:15
smoseri know its a pain.19:16
larsksWell, setting up init/systemd/etc...I think of that more as system config.19:16
smoseri dont know what other things do here.19:16
smoseri generally agree, but cloud-init kind of has more involved init/systemd than other things.19:17
larsksA lot of things just install the executables via setup.py, and leave service configuration up to the packager (e.g., I think all the openstack services do that, for example).19:17
smoserits trying to be part of the os19:17
smoseri'm willing to accept that maybe this is over-doing things.19:17
larsksEh, ultimately you're the driver :)19:18
smoseri think the link there is actually pretty good though19:18
rangerpbi think it is the closest to accomplishing what you wanting without total insanity19:18
rangerpbjust like ... partial insanity19:18
smosersome nit picks i have , but largely good.19:19
rangerpbcomment away19:19
smoserthat dhclient hooks interface is complete crap19:19
larsksSo, what if we unlitaterally install the script into /usr/lib/..., and just call that explicitly from the hook scripts, which then don't require templating...19:19
larsks...and packagers can patch setup.py if they want the script in a different place?19:19
smoseryou could actually unintentionally and unknowingly break some other program's hook because you are setting PYTHON_BINARY19:19
smoserwhat crap that is.19:19
larsksHence this ^^^ proposal :)19:20
rangerpblarsks, but installing into a static location doesnt fix which python version should be used19:20
smoserbut you just added a level of indirction19:20
larsksArgh, right, I keep forgetting that silly detail.19:21
smoseryou have to template the /usr/lib/ thing19:21
smoseryeah.19:21
larsksHow about:19:21
larskssetup.py installs it in /usr/bin, and the package moves it? :)19:21
larsksNah.19:21
smoserthis is also sovled by piggy-backing on the cloud-init in /usr/bin/19:21
larsksNever mind.19:21
larsksOh, that's an even better idea.19:21
larsksJust making it a subcommand, you mean?19:21
rangerpbi dont follow that19:21
larsksLike 'cloud-init dhclient-hook'?19:21
smoseryeah.19:21
rangerpbwait !!!!!!!!!1 i suggested that before19:21
larsksWell hell, that fixes everything.19:22
larsksrangerpb: pics or it didn't happen :)19:22
smoserthe only thing i didnt' lke there is that the main has a bunch of imports and stuff that the dhclient doesnt19:22
smosermaking it much slower.19:22
rangerpboh it happened :)19:22
smoserlarsks, rangerpb i really appreciate boht of your inputs19:22
rangerpbsmoser, so are you saying youll take the perf hit to make it a subcommand ?19:23
larsksI think that seems cleanest, honestly.19:23
rangerpbyeah but I gotta hear the man say it19:23
smoser:)19:23
larsksOh sure, I'm just opining.19:23
smoserwell, it would be slower19:23
larsksOpinionating.19:23
smoserthats what i'm saying.19:23
rangerpbso i can take ap icure ...19:23
smoserand slowness is a pita.19:23
larsksI guess.  We'll already have run cloud-init once at that point, so hopefully most of the disk accesses are already cached.19:24
rangerpbcloud-init runs *after* dhclient does it not?19:24
larsksWell, point being, we run it twice in either case.19:24
larsksYou could run some short tests to quantify the performance difference.19:24
rangerpbsmoser, we could conditionally import stuff based on what cloud-init is doing19:25
larsksAHHHH  STOP ADDING LOGIC! :)19:28
larsksSeriously, that would be premature optimization unless you first demonstrate the magnitude of the performance hit.19:29
rangerpbim a people pleaser19:31
smoseractually, yeah.19:32
smoserthe crap that i have for the stages and paths makes it bad.19:32
smoserlarsks, here is time info20:03
smoserhttp://paste.ubuntu.com/21937409/20:03
rangerpband your conclusion is ?20:04
smoserrangerpb, ok. i'm fine with a sub-command of cloud-init20:05
larsks\o/20:05
rangerpband a subcommand would be something like 'init' already is right>20:05
rangerpb?20:05
smoserhttp://paste.ubuntu.com/21937756/20:05
smoserright.20:05
rangerpbok, ill get cracking on that ... any advise on how you would see that being done?20:06
smoserit is very real.20:06
rangerpbwould you detect if the subcommand was given and jump from there asap ?20:06
smoseryeah, just register the subcommand with the args as the other ones are.20:07
larsksrangerpb: see the 'main' method in cloudinit/cmd/main.py20:07
smoserthe performance difference is ~ .03 seconds between the 220:07
rangerpblarsks, yeah i was poking around in there to see as well20:07
harlowjaso when can we merge https://code.launchpad.net/~larsks/cloud-init/+git/cloud-init/+merge/301310 :-P21:14
harlowjalarsks is that ready?21:14
harlowjakilling my package building CI job without that ;)21:33
=== rangerpb is now known as rangerpbzzzz
larsksharlowja: *I* think it's ready, if you and smoser are happy with it...23:13
mgagneso I tested latest cloud-init 0.7.7~bzr1256-0ubuntu1~16.04.1 and it fails with a known bug we identified a couple of weeks ago where the bond link name attribute is expected by cloud-init but configdrive in OpenStack doesn't provide it since it's not part of the spec.23:24
mgagnethis fix didn't make it afaik: http://paste.ubuntu.com/20492837/23:28
mgagnein fact, I think this bug hasn't been fixed yet: https://bugs.launchpad.net/cloud-init/+bug/160574923:32
harlowjamgagne cool, something to wrok on23:53
harlowjaonce i get this git crap building, ha23:53
mgagne:P23:53
harlowjaor others can, now that we have git!23:53
harlowjaha23:53
mgagne(wink wink)23:53
* harlowja winks back at u23:53
harlowjalol23:53
harlowjaha23:53
harlowjadid u say u wanted to do that if we moved to git?23:54
harlowjaor was that someone else, ha23:54
mgagnewell, would make it less painful23:54
mgagneI know smoser worked on fixing those issues AFAIK23:54
mgagnein fact, this paste fixes the bond link name issue but also reproduces the issue where bond_links aren't physical nic but reference to link ids23:55
mgagneanyway23:55
mgagnewill schedule some time to work on it tomorrow23:55

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