/srv/irclogs.ubuntu.com/2014/10/17/#cloud-init.txt

=== harlowja is now known as harlowja_away
ancoron_zHello everyone. I have a small question about errors during cloud-init execution15:09
ancoron_zis it possible to have them reported using OpenStack events or messages?15:10
smoserancoron_z, you could have somethign to that.15:20
smoserrecent cloud-init writes /run/cloud-init files15:20
smoserthat you could read and pass back/post somewhere.15:21
smoserbut there isn't a place to report back to in openstack15:21
ancoron_zsmoser: I was digging through the code a bit and found the notion of a "PublishErrorsHandler" and a fallback to some OSLO-related handler: https://github.com/stackforge/cloudbase-init/blob/master/cloudbaseinit/openstack/common/log.py#L50315:23
ancoron_zI just didn't find any documentation what this actually means or is supposed to do15:23
JayFThat's not cloud-init.15:27
JayFThat's something else.15:27
ancoron_zAh, sorry. Yes, I see.15:31
JayFNo problem, just letting you know you're probably in the wrong place.15:32
JayFThat's also a pretty new project as well, I'm curious how much of cloud-init's functionality they've dup'd already15:32
ancoron_zYes, I'm trying my first steps with it currently.15:33
JayFIf you're interested in cloud-init, it's hosted in launchpad, and has packages for most distributions15:34
ancoron_zyes, I found it already - looking at trunk branch currently15:34
JayFAnd generally either cloud-init or nova-agent is used by most folks to configure cloud instances on boot for Openstack.15:34
JayFI think cloudbase-init is just trying to generally add competition to that space; I know nothing other than the openstack-dev email about it.15:35
ancoron_zMy first use case is support for Windows - for whatever cloud use-case (??? I wouldn't have one...)15:35
alexpilottiJayF: cloudbase-init is not trying to add competition15:37
alexpilottiJayF: we simply started the project to support Windows in OpenStack and other clouds15:37
JayFalexpilotti: aha, awesome :)15:37
alexpilottiJayF: and we’d happy to merge with cloud-init under the proper conditions15:37
JayFalexpilotti: in that case, I'm sure one day I'll be using your stuff too, haha15:37
alexpilottiheh15:37
JayFalexpilotti: I work on Openstack Ironic w/Rackspace. We use cloud-init extensively for our stuff (which is all linux-images atm)15:38
alexpilottiJayF: nice, I know that the HP folks are working on Ironinc on the Windows side (using cloudbase-init)15:38
alexpilottiJayF: we also started to work with Ironic, it’s (ahem ironically) the only major bare metal deployment prject we didn’t contribute to15:39
JayFSpiffy, like I said, knowing it's focused on windows means I'll likely end up chatting and working with you as well at one point :)15:39
alexpilottiJayF: as we ported Ubuntu MaaS and Crowbar to Hyper-V/Windows15:39
JayFAh, I don't know things about Crowbar15:39
JayFI mean, we wrote a dpeloy driver for ironic, we're pretty embedded into that, haha15:40
alexpilottiJayF: SUSE is using it, we did the port with them more than 1 year ago15:40
JayFnice15:40
alexpilottibut considering that Crowbar as a project is getting nowhere15:41
alexpilottithe remaining alternatives are Ironic and MaaS15:41
alexpilottiwe just finished the latter, so uit’d be time to start helping out on Ironic as well :-)15:41
JayFI mean, I have trouble finding affection for MaaS15:41
alexpilottic’mon is a nice tool15:41
JayFsince it's very limited scope and was basically developed to integrate with Openstack ... and all that dev work went into something Canonical specific instead of Ironic :(15:42
alexpilottiwell, competition helps IMO15:42
alexpilottianyway, we’d like to do some more work for WIndows on Ironic15:43
JayFWell right now I'd think your likely best bet is the agent driver that we've written15:43
JayFsince it's the only one that support whole disk imagers15:43
JayF*images15:43
alexpilottik15:43
JayFI mean, pretty much it just puts a glance image onto a disk15:44
alexpilottiis it on stackforge?15:44
JayFit's in ironic proper15:44
JayFjust the agent deploy driver15:44
alexpilotticool15:44
JayF(the other one is called pxe and utilizes iscsi, but atm doesn't support anything but pxe booting forever)15:44
alexpilottithat should make things transparent, like curtin for MaaS15:44
JayFif you had an image that would run windows on your hardware15:44
JayFI'd imagine Ironic would and could deploy it today15:45
JayFusing the agent driver15:45
alexpilottionce the image boots and cloud-init  /cloudbase-init or whatever else starts15:45
alexpilottiyou just offer standard Nova metadata via HTTP?15:45
JayFIf your cloud is setup to expose a metadata service15:46
JayFIronic is like a hypervisor in the ecosystem15:46
JayFNova-compute has a driver which talks to the Ironic-API to provision nodes15:46
alexpilotticool, I was expecting that15:46
JayFnot much differently than it would, say, talk to a xenapi15:46
alexpilottiyep, I’m aware of the driver15:46
alexpilottithe only thing I didn’t check yet, if there are changes in the metadata model15:47
JayFI mean, not at all15:47
JayFwe're using a downstream patch at Rackspace to support ConfigDrive15:47
alexpilottiperfect15:47
JayFbut that's actively being upstreamed15:47
JayFand we're open about what/how we run even if it's not in Ironic proper yet15:47
alexpilottianother dummy question, what lights out options does ironic support?15:48
JayFfeel free to idle in #openstack-ironic and ask questions :)15:48
alexpilottiI mean IPMI, ATM, etc15:48
JayFalexpilotti: lights out?15:48
JayFalexpilotti: ah15:48
JayFalexpilotti: we call those currently "Management" or "Power" drivers15:48
JayFthere's two for IPMI (one shells to ipmitool; this is what we run, one uses a native ipmi python library)15:48
JayFone for iLO that supports doing the deploy via virtual media instead of pxe (as well as just talking BMC to the iLO)15:49
JayFone for DRAC, one for iBoot, one for SNMP-driven PDUs15:49
JayFthat's what I can think of off the top of my head15:49
JayFoh yeah, the AMD seamicro boxes too, they have a management driver15:49
alexpilottiah ok, so no ATM?15:49
JayFATM?15:49
alexpilottithe one that comes with Intel vPro15:50
JayFI don't know? Apparently not, then?15:50
alexpilottiAMT, sorry15:50
JayFYeah, I haven't heard of it15:50
JayFbut like I said, we use agent_ipmitool driver15:50
=== zz_gondoi is now known as gondoi
JayFso that's what I know the most about :)15:50
alexpilottihttp://en.wikipedia.org/wiki/Intel_Active_Management_Technology15:50
alexpilottilet me switch to the ironic channel :-)15:51
ancoron_zIsn't AMT related to WS-MAN?15:51
ancoron_zOh yes, found it again: https://software.intel.com/en-us/articles/ws-management-and-intel-active-management-technology-a-primer15:54
ancoron_zsometimes, it would really be nice if all would colaborate on a standard...15:55
=== gondoi is now known as zz_gondoi
=== zz_gondoi is now known as gondoi
=== harlowja_away is now known as harlowja
=== gondoi is now known as zz_gondoi
smoserhey harlowja 18:46
smosertell me how youou'd do this.18:46
harlowjasmoser sup18:47
smoseri need to edit a file in /etc/18:47
smoseras the nova user18:47
smoserand lock it while editing is taking place18:47
smoserand that file owned by root18:47
smoserone idea is a util program that does that. and put that program in /etc/nova/rootwrap.d/18:47
smoserbut i want to know how the master would do it.18:48
harlowjalol18:48
harlowjalock it from whom?18:48
smoseradvisory locking18:49
smoseras in it can only ever exist in a correct state, and when i'm editing it, then 2 processes editing it need to not collide.18:49
smoserhm.18:49
smoserthats assuming (i was) that nova compute is multi-threded18:49
smoserbut now i think i'm wrong on that.18:50
harlowjanah, u are right, it is18:50
smoserso maybe i dont need the locking per say.18:50
harlowjaits eventlet multi-threaded, which for all reasoning is 'multi-threaded'18:50
harlowjaso i think u need to make a rootwrap.d program (to get around the nova user problem)18:51
harlowjaand then have that program use https://github.com/openstack/oslo-incubator/blob/master/openstack/common/lockutils.py#L55 18:51
harlowja(or similar)18:51
harlowjato avoid collisions18:51
smoseryeah. i didn't know of os.common.lockutils18:51
smoserwas just oging to use python lockfile (which is probaly what that uses)18:51
smoserhm..18:51
harlowjanot really 18:51
harlowjapython lockfile sorta not so good18:51
harlowja^ is better18:52
smosernice.18:52
harlowja'Since the lock is always held on a file18:52
harlowjadescriptor rather than outside of the process, the lock gets dropped18:52
harlowjaautomatically if the process crashes, even if __exit__ is not executed.'18:52
harlowjapython lockfile (this is being taken over by openstack btw) is getting better18:52
harlowja*see https://review.openstack.org/#/c/122253/ 18:52
harlowjafor that takeover18:52
harlowjawhich is still failing jenkins, arg18:53
smoserok. 18:53
harlowjaso there u go18:53
harlowja:-P18:53
smoseri'm pretty sure i could trick some program already in rootwrap.d to do what i wanted.18:53
harlowjalikely18:54
smoserhopefully later today i'll forget that i opened /etc/nova/rootwrap.d/18:54
harlowjahahahahha18:54
harlowjai avoid looking there18:54
harlowja*scary*18:54
smoserkill_shellinaboxd: KillFilter, root, /usr/local/bin/shellinaboxd, -15, -TERM18:54
harlowja:-/18:54
smoserthat one sounds good. :)18:54
smoserbut 'dd', 'cp', all sorts of stuff that can do arbitrary things.18:55
harlowjayup18:55
harlowjathats why i avoid looking there18:55
harlowjai don't want to cry18:55
* harlowja still wishes the openstack community would just make sudo better18:56
harlowjabut that never seemed to happen18:56
harlowjaor do something else, lol18:56
smoserwell, sudo or not. if you have arbitrary code execution of nova user. you ahve root.18:57
harlowjasure18:57
smoserso in a sense, you can just make it easier and run as root :)18:58
harlowja:)18:58
smoserso is there some way to do this wrapper thing other than like above ?18:59
harlowjarun as root?18:59
harlowjalol18:59
harlowjathen just do it in nova code (with a lock there)18:59
smoserno. i meant, is the 'kill_shellinaboxd' the type of thing.19:00
harlowjawrite to tempfile, run as root to copy it (do this in a locked block)19:00
smoseri just add a command to my program and then have to deal with knowing the path to my program19:00
smoserthats the pita part of it.19:00
harlowjawrite from nova -> tempfile, use rootwrap + cp, lol19:00
smoseryeah, but rootwrap wont get me atomic updates.19:01
smoserer.. cp wouldnt .19:01
smoseranyway, thanks for your help.19:01
harlowjahow so, wrap the code in nova that is doing this in a lock19:01
harlowjawith lock:19:01
harlowja   get tempfile19:02
harlowja  do stuff19:02
harlowja    call cp with rootwrap19:02
smoserright. but that wouldnt be atomic.19:02
smoseri need os.rename19:02
harlowjaisn't mv the same (use mv instead of copy?)19:03
JayFsmoser: you should consider nova compute as multithreaded19:09
JayFsmoser: because many clustered hypervisors (like Ironic/VMWare) can have multiple nova computes19:09
JayFsmoser: even though it sounds like you have to do that anyway19:09
harlowjawell anything, even using eventlet is still conceptually multi-threaded19:09
harlowjaeventlet doesn't take that part away, it just hides it a little19:10
harlowjaeventlet == temptress imho 19:12
harlowjatempts u into a pit that u can't get back out of19:12
harlowjadurn systemd, lol19:35
harlowjahttps://code.launchpad.net/~harlowja/cloud-init/fixed-rhel7-test/+merge/23876619:35
harlowjaguess i'm the first one to run tests no rhel7, lol 19:40
harlowja*on rhel719:53
JayFI mean, I don't know about running tests19:59
JayFwe sure as hell use cloud-init on centos7 though19:59
harlowjaya, before building an rpm i have a little piece of bash script that runs the tests and such (then applies a few internal patches)22:29
harlowjaand just got asked to build a custom one for rhel7 (instead of using the epel one)22:32
harlowjaJayF how are u building cloud-init (using the epel one)? wondering cause using the buildin way of using tools/brpm  required some tweaks for rhel722:47
harlowja*for rhel7722:47
gholmsharlowja: What if you just copypaste Fedora's spec file?23:14
harlowjanearly, i fixed it all up enough to get this to work23:14
harlowjausing some parts of the fedora one23:14
harlowjahttps://code.launchpad.net/~harlowja/cloud-init/rpm-spec-fixups and others i'll push up23:14
harlowjahttps://code.launchpad.net/~harlowja/cloud-init/fixed-rhel723:14
harlowjagholms check those out, trying to make it work in the easiest manner23:19
JayFharlowja: you can reproduce our build using  https://github.com/racker/cloud-init-docker-build23:27
harlowjagit clone https://github.com/jayofdoom/cloud-init-fedora-pkg23:27
harlowja:-/23:27
harlowjaquestionable, lol23:27
JayFhaha23:27
JayFthose are all moved to /racker/23:27
JayFso sorry if the pointers are outta date a little23:28
harlowjahehe23:28
harlowjaideally u should be able to checkout cloudinit; run make rpm23:28
JayFbut all our builds come from that docker stuff23:28
JayFWell we absolutely can't because we have our downstream patch still23:28
harlowjaor if u have patches run packages/brpm -p $patch1 -p $patch223:28
JayFbut I agree with the general gist of what you say23:28
JayFI just like using docker buiilders like that because you can build on any machine that has docker23:28
JayFyou're welcome to use that, fork it, etc23:28
JayFI'm going to go back to not looking at a computer screen and hoping it nukes the headache23:29
harlowjathx, although cloud-init building of rpms should work (instead of not) :-P23:29
JayFgl and if you have specific questions not sure I can answer them because all my knowledge is in those scripts and I recovered the space in my brain :P23:29
harlowjanp23:29
JayFbut feel free to ask anyway :P23:29
harlowjai have a similar script, although it doesn't use docker, trying to rid myself of any patches (which are similar to the ones there in that repo)23:30
harlowja https://code.launchpad.net/~harlowja/cloud-init/rpm-spec-fixups ...23:30
JayFyeah I'm not 100% sure I didn't initially make those cloud-init-{distro}-pkg repos, only have maintained them23:30
JayFbut I'd suspect they all started from a shipped upstream rpm and then we made changes23:30
JayFbut yeah, good luck and the work is appreciated :)23:31
* JayF &23:31
harlowjahttp://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/files/head:/packages/ :-P23:31
harlowjau should use that, ha23:31

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