#ubuntu-ensemble 2011-06-20
<kim0> Morning fellas
<niemeyer> Good mornings!
<hazmat_> niemeyer: g'morning
<niemeyer> A bit late today.. broke my glasses over the weekend, and had to run to try getting new ones before the trip :-(
<hazmat_> niemeyer: i pushed an old branch of txzk into review, i realized i needed it for some of the connection level error handling in the subsequent session branch
<niemeyer> hazmat_: Sounds good.. will do another pass in the queue today
<hazmat_> niemeyer: that sucks, i finally broke down and got a new pair (my last pair was being held together by electrical tape..)
<niemeyer> hazmat_: Ouch :)
<niemeyer> hazmat_: I'm tempted to get an extra pair
<niemeyer> hazmat_: Btw, there were several things pending there on Friday in the review queue.  Would be good to have a pass there if you find a moment.
<hazmat_> niemeyer: sure
<_mup_> txzookeeper/session-event-handling r46 committed by kapil.foss@gmail.com
<_mup_> - merge swap-sync-errors-to-failures
<_mup_> - allow for connection error handler to return a deferred, whose result will be chained
<_mup_>   to the api deferred.
<_mup_> txzookeeper/session-event-handling r47 committed by kapil.foss@gmail.com
<_mup_> Improve connection error handler to api call result chaining.
<niemeyer> hazmat_: session-event-handling mentions a pre-requisite branch which doesn't seem to be in review
<hazmat_> niemeyer: it is in review in txzookeeper
<hazmat_> niemeyer: its not visible in the ensemble kanban
<hazmat_> niemeyer: the mp for session-event-handling has a link
<niemeyer> hazmat_: Should it be to enable others to more easily pick it up as well?
<hazmat_> niemeyer: i can add a cross linked bug for it, if that's helpful
<niemeyer> hazmat_: Either that or we can harass someone directly to look at it :-)
<hazmat_> niemeyer: i was going for the later ;-)
<niemeyer> hazmat_: Sounds good too
<hazmat_> off to see a man about a new car, bbiab
<niemeyer> I'll have lunch now too..
<niemeyer> Will go through the branches after it
<niemeyer> biab
<SpamapS> niemeyer: so, re the man page.. I think you're right. While I was writing the man page manually, I kept thinking this should probably be in the online help, and just auto-generated into the man page.
<SpamapS> niemeyer: I'll take a look at doing just that.
<niemeyer> SpamapS: Ah, manually generated would work wonderfully too!
<niemeyer> SpamapS: Erm
<niemeyer> SpamapS: Ah, automatically generated would work wonderfully too!
 * niemeyer takes his pills
<niemeyer> "
<niemeyer> AWS CloudFormation enables system administrators 
<niemeyer> and developers to create repeatable AWS 
<niemeyer> infrastructure deployments (Stacks) using 
<niemeyer> customizable architecture templates."
<niemeyer> Sounds like we picked the right term for the concept.. (stacks) :-)
<SpamapS> yeah
<SpamapS> is there a draft spec for that yet?
<niemeyer> SpamapS: No, just evolving over conversations for now
<_mup_> ensemble/debug-log-relation-settings-changes r266 committed by jim.baker@canonical.com
<_mup_> Doc strings, better total ordering on YAMLState item changes when logged
<m_3> the cloudformation example templates use amazon
<m_3> 's distribution
<SpamapS> m_3: indeed, cloudformation is pretty much built around amazon's distro
<m_3> SpamapS: the events seem to be the template's responsibility... http://paste.ubuntu.com/629916/
<SpamapS> m_3: yeah, another hacky thing just like running chef from one cookbook on another host.
<_mup_> ensemble/debug-log-relation-settings-changes r267 committed by jim.baker@canonical.com
<_mup_> Verify representation of change items
<negronjl> SpamapS:  https://bugs.launchpad.net/principia/+bug/799837 ( tomcat / no clustering )
<_mup_> Bug #799837: new-formula ( tomcat6 ) <new-formula> <Principia Ensemble:New> < https://launchpad.net/bugs/799837 >
<negronjl> SpamapS:  I have to do some other work for now but, will work on tomcat clustering when I get a chance.
<SpamapS> negronjl: ok.. yeah I have some other stuff that has been neglected.. will take a look later today.
<negronjl> SpamapS:  I know you're just neglecting me. :)
<_mup_> ensemble/debug-log-relation-settings-changes r268 committed by jim.baker@canonical.com
<_mup_> Test flush directly to ensure it returns the change items
<_mup_> ensemble/debug-log-relation-settings-changes r269 committed by jim.baker@canonical.com
<_mup_> PEP8, fix misspelling
<niemeyer> Anyone up for a quick review on this: https://code.launchpad.net/~kim0/ensemble/updating-faq/+merge/64679?
<jimbaker`> niemeyer, taking a look
<kim0> what's the purpose of tagging new formulas with "new-formula" ?
<kim0> that's probably the only way today to locate formulas in foreign branches ?
<SpamapS> kim0: so you can find them for review.
<niemeyer> kim0: I don't think we've agreed to that convention
<niemeyer> kim0: At least I didn't see it being mentioned
<SpamapS> Its how I'm reviewing new formulas in principia. :)
<SpamapS> its just a bug tag
<niemeyer> SpamapS: It's nice to present convention suggestions in general
<niemeyer> SpamapS: Otherwise you'll be the only one using it :)
<SpamapS> niemeyer: I did, in my Principia wiki page
<niemeyer> SpamapS: Heh
<SpamapS> https://ensemble.ubuntu.com/Principia mentions it and did from the very first revision I think.
<SpamapS> https://bugs.launchpad.net/principia/+bugs?field.tag=new-formula
<SpamapS> Quite a list. :)
<niemeyer> That's nice!
<niemeyer> I heard Launchpad may get support for listing branches through the API as soon as next week
<niemeyer> Which means we'll be able to evolve the remote repo support pretty soon
<SpamapS> Sweet.. the mr solution I have now *sucks*. :)
<jimbaker`> kim0, niemeyer - approved the FAQ branch
<niemeyer> jimbaker`: Nothing will beat "deploy lp:~spamaps/formula" I guess :-)
<niemeyer> Oops
<niemeyer> SpamapS: Nothing will beat "deploy lp:~spamaps/formula" I guess :-)
<SpamapS> niemeyer: and even better will just be the ability to not pull down all of the formulas in order to have a chance at automatic dependency resolution.
<niemeyer> SpamapS: Ah, definitely
<niemeyer> SpamapS: This will be the next step
<SpamapS> or even stepping back further, forget the dependencies, just a 'ensemble search tomcat' and have it show you the available formulas.. very useful.
<niemeyer> jimbaker`: Thanks.  Can you please please merge it then?
<niemeyer> Erm
<niemeyer> s/please please/please/ :)
<jimbaker`> kim0, also according to wikipedia (can we really say that? someone else at least...), it should apparently "at run time" (http://en.wikipedia.org/wiki/Run_time)
<niemeyer> SpamapS: Ah, that'll be awesome indeed
<jimbaker`> niemeyer, good to know it's not so urgent ;)
<niemeyer> SpamapS: Or "info tomcat"
<niemeyer> jimbaker`: Hehe :)
<niemeyer> jimbaker`: Brain hiccup
<jimbaker`> niemeyer, ok, i will make the fixes we both recommended
<niemeyer> jimbaker`: I think he already handled my review
<niemeyer> kim0: Right?
<jimbaker`> niemeyer, kim0 applied the changes you requested
 * kim0 reading .. catching up
<jimbaker`> niemeyer, i can take care of the minor fixes i suggested
<niemeyer> jimbaker`: Sweet, thanks
<jimbaker`> or kim0, since you're here, maybe easier process from a branch history perspective if you just do it :)
<kim0> jimbaker`: okie, applying your comments .. thanks for the review :)
<kim0> jimbaker`: hmm, is there a smart way to reference your merge proposal comments, in my commit message?
<jimbaker`> kim0, i'm not aware of being able to link this in at the commit level
<jimbaker`> kim0, but our usual practice is to always reply to each comment, if only with an "ack"
<kim0> jimbaker`: updates pushed .. can I do the merge?
<jimbaker`> kim0, i personally find that if i do that, the chance that i inadvertently let a review comment slide w/o action goes way down
<jimbaker`> kim0, hey, if you are able to do so, i will certainly let you merge :), but otherwise i can readily do it
 * kim0 takes a shot
<kim0> merged
#ubuntu-ensemble 2011-06-21
<SpamapS> wow.. sitting here thinking I might be able to hack out some kind of LXC provider. Everything is twisted around twisted. :-P
<m_3> SpamapS: you can test out an LXC ensemble entirely within a KVM vm.. <grin>
<m_3> SpamapS: ssounds fun man
<SpamapS> m_3: just trying to wrap my head around how to make "deferred" objects for commands that will run locally is kind of weird. I wish it was more straightforward. :p
 * SpamapS prefers threads and locking to event based and non-blocking. :p
<hazmat> SpamapS, coroutines ftw
<SpamapS> hazmat: indeed :)
<hazmat> event based isn't the problem per se.. callback oriented programming is not fun
<SpamapS> It can be.. gearman makes it pretty simple.. but thats because you say "when told to do X, run function Y".. same with libevent ..
<hazmat> SpamapS, what are you looking into?
<SpamapS> twisted seems to take it 2 or 3 steps further. :-P
<hazmat> SpamapS, yeah... ruby 1.9 fibers with libevent are nice
<SpamapS> hazmat: I'm tired of whining about having LXC .. i want to JFDI
<hazmat> SpamapS, awesome! ;-) how's it going so far?
<SpamapS> hazmat: mostly just renaming stuff.. the spots that reference txaws .. I need an equivilent for lxc basically
<m_3> SpamapS: libvirt in-between or not?
<hazmat> SpamapS, yeah.. the dummy provider is probably your best starting point
<SpamapS> I'd love to use libvirt but at this point I'm not really very well versed in working with virsh or libvirt.. whereas I know all the steps involved for direct LXC containers.
<SpamapS> hazmat: I hadn't thought of that.. I'll take another stab later tonight w/ the dummy provider.. the EC2 one has so much .. ec2-ness.. ;)
<SpamapS> Some things that EC2 wraps in an API call we'll have to emulate.. like generating Ids and allocating storage.. but thats not really all that difficult given that the target is just the local machine.
<hazmat> SpamapS, ic some benefits of libvirt on the desktop.. but mainly that its already got the networking work setup.
<SpamapS> hazmat: lxc has the networking stuff done too
<SpamapS> there are basically 3 steps.. pick bridged or not.. lxc-create to create your container image.. lxc-start to boot it.
<hazmat> SpamapS, it still requires some manual setup of dnsmasq vs. libvirt
<SpamapS> hazmat: if you've setup libvirt once, it "just works" magically. :)
<SpamapS> its kind of cheating..
<hazmat> SpamapS, anyways.. libvirt definitely has a lot more moving parts, if you want to go straight lxc, that rocks as well
<SpamapS> hazmat: so I guess lxc doesn't have it directly worked out.. but 'Depends: libvirt-bin' is kind of all you need.
<SpamapS> hazmat: would love to do it w/ libvirt .. gains a lot of ability to have kvm and qemu
<SpamapS> anyway, I'll keep pounding on it. :-P
<hazmat> SpamapS, indeed.. that would be nice with orchestra
<hazmat> SpamapS, cool.. if you got any questions i'll be around
<m_3> SpamapS: libvirt would rock... either way would be great though!
<SpamapS> hazmat: sweet. :)
<SpamapS> Yeah I'm just kind of tired of waiting on the 1s latency for every command (even w/ open-tunnel) chatting with Amazon.
<SpamapS> and not spending $1.25/formula change to run all my tests would be good too. :)
 * SpamapS disappears
<hazmat__>  SpamapS out of curiosity outside of the current dir for hooks, are there any other things you think need working on in the formula dev cycle? leader election perhaps? or..?
<kim0> morning everyone
<hazmat__> g
<kim0> hazmat__: hmm .. I cannot connect to a bootstrap node .. getting â ERROR Can't yet connect to started machine: Invalid SSH key
<kim0> was this part of the code changed recently ?
<hazmat__> kim0: no its the same
<hazmat__> kim0: its possible cloud-init hasn
<kim0> hazmat__: yeah .. I viewed the key ssh inserts and it's not mine
<hazmat__> dropped the ssh key yet
<kim0> any idea where that key comes from
<hazmat__> kim0: odd.. its sniffed from your home directory ~/.ssh else its pulled from an explicit path or content specified in environments.yaml
<kim0> hmm
<SpamapS> so, have we all seen this yet? http://www.livestream.com/oreillyconfs/video?clipId=pla_ae0330db-596b-4b7d-ad28-ccd6ec230b7d&utm_source=lslibrary&utm_medium=ui-thumb
<SpamapS> It appears to me that cast isn't really all that similar to ensemble in its design, and limits its focus to "deployment" instead of "service orchestration"
<SpamapS> still, we need to start giving these exact kind of lightning talks
<m_3> SpamapS: agree
<hazmat__> SpamapS: interesting, haven't seen it yet, thanks for the pointer
<SpamapS> one slide.. they want it to be a 'zookeeper-lite'
<kim0> is zk-lite the so called noah .. 
<SpamapS> So, I'm thinking of importing all of the non-ubuntu formulas into principia, but separating them out using a file in principia-tools.. one for "contrib" and one for "principia" .. contrib being formulas that make use of software not in the formula and/or ubuntu itself.
<SpamapS> Anybody have thoughts? (I'll send this to the ML too)
<kim0> +1 for raising visibility .. yesternight I was contemplating formulizing bigcouch .. and was discouraged since it wasn't packaged either duh
<m_3> +1 shows examples of how formulas will be actually used in the wild
<kim0> Yes
<SpamapS> kim0: well.. there are .. I dunno.. 1000 things already in the archive that you could write formulas for...
<SpamapS> Its intriguing that people are submitting more formulas for stuff not in Ubuntu than stuff in Ubuntu.
<m_3> SpamapS: some of that's laziness too... less constrained... less debconf
<sidnei> was about to say that
<m_3> path of least resistance
<SpamapS> The constraints are there to protect users though.
<m_3> it's important we put out as many as we can off the packages... to show how
<m_3> and, most importantly, for them to clone / cut-paste
<SpamapS> And truthfully.. packaging makes it easier to write a formula. :)
<m_3> SpamapS: so contrib's critical, but we should always prefer packages when possible
<m_3> SpamapS: harder maintainer's job
<SpamapS> Well I'm not so sure what we prefer will matter all that much..
<m_3> SpamapS: ha
<m_3> SpamapS: yes
<SpamapS> This is a non issue for Ubuntu.. they don't offer anything that can't be in the archive.
<m_3> SpamapS: easy to find (search) examples that can be forked
<SpamapS> But this is sort of like the flash installer..
<SpamapS> Its a formula tha downloads what you want.
<SpamapS> I wonder.. maybe we should make it a policy that if you download the software from somewhere else, you must be able to cryptographically verify it.
<m_3> SpamapS: oooh, hotbutton analogy
<SpamapS> Like, we'll be signing formulas.. so drop the accepted key in there, and gpg --verify the tarball.
<m_3> wow, that's pretty limiting
<m_3> as a user, I'd wanna pull from my repo... crypto be damned
<SpamapS> I'm talking only about principia
<SpamapS> as a user, write a formula that rm -rf's /
<SpamapS> I don't care
<m_3> SpamapS: oh, right... sorry
<SpamapS> But for distributing to others..
<SpamapS> I'm suggesting that we should hav a social contract, like Debian and Ubuntu, that tells users what they can expect from the default ensemble formula namespaces.
<m_3> SpamapS: is it too much of a hassle to implement later?
<m_3> SpamapS: i.e., anything goes for now while we're getting the word out?
<SpamapS> Anything goes, until somebody's database winds up in a russian hacker's hands. ;)
<m_3> SpamapS: although trust/integrity is important... don't have an answer
<m_3> SpamapS: right
<SpamapS> This isn't that hard.
<SpamapS> Its not like we're asking everybody to have two signatures from our keyring.
<m_3> SpamapS: worth trying... see what it does to constraints in contrib
<SpamapS> Just verify the tarball.
<SpamapS> Honestly if its not verifiable.. then its not suitable for common distribution.
<SpamapS> We can make some tools for making it easy too.
<_mup_> ensemble/expose-ec2-provider r260 committed by jim.baker@canonical.com
<_mup_> Initial commit
<SpamapS> Of course.. I tend to call those tools.. dpkg and debhelper.. ;)
<m_3> SpamapS: yup
<m_3> SpamapS: there are plans for an open formula exchange?
<SpamapS> m_3: yes, it should end up working just like PPA's
<_mup_> txzookeeper/session-event-handling r48 committed by kapil.foss@gmail.com
<_mup_> add a test for expired session events, address some review comments [1-3]
<kim0> niemeyer: SpamapS hazmat jimbaker .. I'm starting to push Ensemble outside our usual circle of readers, by getting the word out through guest articles on other high traffic sites. Infoq.com have sent me a preliminary approval, so I'm starting with them. Here is the very crude article I have today (stealing great content from SpamapS :) http://j.mp/lVUEuZ .. It's crude at the moment (just done writing it) .. but your feedback (direct edits or comment
<kim0> Also it might be a good idea to add a section about Ensemble's software architecture ... if any of the devs is interested in adding that part
<kim0> v0ld3m0rt: hi there
<v0ld3m0rt> hi..
<kim0> v0ld3m0rt: first time to land in #ubuntu-ensemble ? 
<v0ld3m0rt> yep
<kim0> Then you're up for the official welcome 
 * kim0 prepares a Royal ceremony :)
<v0ld3m0rt> thank u...
<v0ld3m0rt> lolz..
<kim0> hehe
<v0ld3m0rt> i wud be starting on ensemble..
<kim0> v0ld3m0rt: how did you find out about ensemble
<kim0> great news!
<v0ld3m0rt> i have been a inquisitive developer..
<v0ld3m0rt> i like to explore mailing lists and forums..
<kim0> good find!
<v0ld3m0rt> so thats where i heard abt ensemble..
<kim0> v0ld3m0rt: so have you already played with it .. read the docs ..etc yet ?
<v0ld3m0rt> i hv just started.
<kim0> v0ld3m0rt: check out https://ensemble.ubuntu.com/docs/ then :)
<v0ld3m0rt> oh..thankyou..
<v0ld3m0rt> i was looking for that..
<v0ld3m0rt> though i started with code..
<v0ld3m0rt> just to get feel of it..
<kim0> yeah
<kim0> v0ld3m0rt: feel free to grab me anytime to help with anything .. enjoy hacking
<v0ld3m0rt> yeah sure....thank u very much....
<v0ld3m0rt> u guys are really friendly..
<v0ld3m0rt> :)
<kim0> hehe :)
<SpamapS> hazmat: so, this special AMI that we're using .. I need to duplicate that for the LXC thing I'm working on
<SpamapS> hazmat: any tips on where to find the bits that do that?
<SpamapS> hazmat: also, since the copyright MP doesn't change any code.. can you just merge it, or do you want to wait for a 2nd +1 ?
<SpamapS> hazmat: err, the txzookeeper merge I mean
<SpamapS> ahh.. bin/ensemble-make-image
 * SpamapS wonders if he can just run that
<SpamapS> dur.. no
<m_3> SpamapS: ubuntu-vm-builder and then copy dpkg selections over from the AMI?
<m_3> SpamapS: AMI's gonna have all the /etc/init/cloud-init metadata deps anyways
<SpamapS> lxc has a simpler shell script based template that I'm using.. 
<SpamapS> just finishing the cloud-init bits.
<hazmat> SpamapS, i'll just merge it
<hazmat> SpamapS, the bits are in a couple of pieces for the install. the ec2 providers launch setups a cloud config that will effectively recreate it (on a vanilla image)
<hazmat> SpamapS, common packages defined in ensemble/providers/common.py which gets formatted by ensemble/providers/ec2/utils format_cloud_ini ... the actual commands run to setup the agents are passed to format_cloud_ini by ensemble/providers/ec2/launch.py and differ depending on if its a bootstrap node vs. service unit node.
<hazmat> SpamapS, the bin/ensemble-make-image script is used to create the images with the packages preinstalled
<hazmat> the images haven't been updated yet to default to the ppa
<SpamapS> hazmat: So what I'm doing is setting an environment variable 'ENSEMBLE_LXC_PROVIDER_CONFIG' which is a script the lxc template will run to configure the agent startup, since I"m not entirely sure how to make cloud-init read a local file.
<SpamapS> Since everything else seems to be the same, I'm doing all of that in the initial "bootstrap" phase which is basically like making an AMI. :)
<hazmat> SpamapS, SpamapS, http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/doc/examples/seed/README
<hazmat> SpamapS, smoser pointed that out to me a few weeks ago
<hazmat> as docs on using the on disk data for cloud-init
<SpamapS> Yeah
<SpamapS> So the format_cloud_ini call is in the wrong place
<SpamapS> should be in common
<SpamapS> s/call/definition
<hazmat> SpamapS, agreed
<SpamapS> Oh man, I hate when I try to work on Ensemble and end up working on Ensmeble
<SpamapS>    if [ -n "$ENSMEBLE_LXC_PROVIDER_CONFIG" ] ; then
<SpamapS>         $ENSMEBLE_LXC_PROVIDER_CONFIG $rootfs
<SpamapS> consistent mispellur
<m_3> SpamapS: my fingers kept doing ensemple for the longest time
<SpamapS> hazmat: seems like a lot of the stuff in ec2 should be common
<hazmat> SpamapS, you mean from ec2.utils or other stuff?
<SpamapS> hazmat: there's really nothing EC2 about ec2.get_machine_variables 
<SpamapS> hazmat: except the curl to get the instance-id .. but.. hrm.
<SpamapS> maybe not
<hazmat> SpamapS, yeah.. that does look pretty generically useful
<hazmat> get machine options has some ec2 specifics, but the variables are meant for cloud init formatting
<SpamapS> hazmat: the curl to get the instance-id seems a bit of a hack .. we should be able to just pass that in.
<hazmat> SpamapS, user-data is passed in the api that returns the instance id
<SpamapS> Ok, I'm going to go try having a sip of 5 hour energy and see if I can actually think this through. :-P
 * SpamapS suddenly feels he has lost most cognitive function
 * hazmat recommends coffee
<hazmat> "It is by caffeine alone I set my mind in motion. It is by the beans of Java that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning. It is by caffeine alone I set my mind in motion."
<m_3> hazmat: nice
<hazmat> classic dune derivation
<_mup_> ensemble/expose-ec2-provider r261 committed by jim.baker@canonical.com
<_mup_> Fix open_port/close_port spike
<SpamapS> hazmat: there's a *ton* of useful generic code in ec2/launch.py
 * SpamapS 's been refactoring on En-Sem-Ble... alll the live long daaaay
<SpamapS> most of it just copies right into common.py without modification... just nice little generic routines for setting up a machine to run the agents and such
<hazmat> SpamapS, nice
<SpamapS> Could not find the main class: org.apache.zookeeper.server.quorum.QuorumPeerMain. Program will exit.
<SpamapS> Hrm.. how do I run the test suite?
<ajmitch> SpamapS: how are you going at getting this into debian?
<SpamapS> ajmitch: Not much traction thus far.
<ajmitch> is the hold up sponsorship or getting it ready?
<SpamapS> ajmitch: sponsorship, but truthfully, I think i need to re-submit txzookeeper with the license clarified.
 * ajmitch can probably help out with some sponsorship at least
<SpamapS> ajmitch: given the ubuntu-specific nature of ensemble today.. its not 100% critical it go into Debian. It currently hard-codes an AMI that is Ubuntu.. so it can't even drive a Debian EC2 node.
<SpamapS> ajmitch: much appreciated! :)
<ajmitch> being less ubuntu-specific in the future would be nice :)
<SpamapS> But I figure getting ensemble, the client, onto as many platforms as possible, is a good idea. :)
<SpamapS> ajmitch: thats up to the community. We're.. kind of focused on that platform. :)
 * SpamapS points to the channel name.. and domain name.. and funding party..
<ajmitch> I can't imagine why :P
<SpamapS> ajmitch: honestly it should be easily doable. Especially if other platforms adopt cloud-init.
<SpamapS> Scary as it sounds, ensemble should be pretty easily portable to the Amazon AMI's
<ajmitch> I'm still a bit fuzzy on the details of how the bits fit together
<SpamapS> ajmitch: We need more pictures
<ajmitch> such as whether it relies on ec2/similar cloud platforms
<SpamapS> Right now, the only "provider" is EC2
<SpamapS> which actually means Eucalyptus and OpenStack should work
<SpamapS> I'm working on a local-only LXC provider so I can develop while disconnected and not sit waiting for Amazon constantly. :)
<ajmitch> my 'development environment' at work is simply using virtualbox on a desktop with plenty of RAM :)
<SpamapS> This is the typical engineer idea.. "I can't possibly wait 1 second for every command.. so I'll spend 40 hours writing a solution."
<SpamapS> ajmitch: Yeah, LXC should alleviate some of that RAM requirement.. shared VFS cache.. shared heap.
<ajmitch> I'd probably need to grab that backported kernel to do so, running on lucid
<SpamapS> chroot + network isolation basically
<SpamapS> Yeah, you would. :P
<SpamapS> But I hear that it works quite well.
<ajmitch> a bit worrying to see that zookeeper will be orphaned in debian
<SpamapS> Thats a tempest in a teapot.
<ajmitch> probably
<SpamapS> We'll be taking on maintenance of it if nobody else wants it more.
 * ajmitch always thinks of zookeepr, which is rather different :)
<SpamapS> James Page, one of our guys who has been active w/ the debian java team, has drafted an email and we should be on our way to taking it on soon. Plus I'm actively seeking DD status.
#ubuntu-ensemble 2011-06-22
<ajmitch> excellent
<SpamapS> hazmat: any ideas on running the test suite? seems like I'm missing something
<hazmat> SpamapS, you need to define a ZOOKEEPER_HOME env variable pointing a zookeeper installation.. i think most of the dev team are using trunk builds of zk.. should work with both.. just running ./test will run all the tests you give the path to an individual test file or a dotted python name
<SpamapS> hazmat: the zookeeper part seems broken
<SpamapS> cannot use the system jars
<hazmat> actually its for ZOOKEEPER_PATH
<hazmat> SpamapS, yeah.. i was looking at that and wondering
<SpamapS> $ jar -tvf /usr/share/java/zookeeper-3.3.3.jar |grep QuorumPeerMain 5371 Wed May 25 20:42:58 PDT 2011 org/apache/zookeeper/server/quorum/QuorumPeerMain.class
<hazmat> i pulled that code into txzookeeper for the cluster tests
<SpamapS> The class is in there..
<SpamapS> but java can't find it. Which is weird.
 * SpamapS *hates* how java starts anything
<hazmat> SpamapS, you can override it to point to an existing zk installation i believe, but it will reset any state in that zk
<SpamapS> hazmat: I want to enable the tests in the package build eventually
<SpamapS> so .. no ;)
<hazmat> SpamapS, you can spec zookeeperd as a test dependency, and then just set the env variable to point to it when running the tests, the package setups the server
<hazmat> hmm.. nevermind.. that only works for txzookeeper
<hazmat> --+
<SpamapS> No I like spinning one up
<SpamapS> I want to know why it won't work. :-/
<hazmat> SpamapS, its constructing the cli args for java in ensemble/tests/common.py against what you'll find in the zookeeper front end shell script
<SpamapS> Yeah I'm running the java command manually from some debug I added to that.. and its not working
<SpamapS> Honestly, its not working with the zookeeperd package either
<hazmat> SpamapS, is there something already running in the bg ( a previous zk server perhaps)?
<hazmat> SpamapS, there should be some verbose logs from it
<SpamapS> no, but that wouldn't cause a NoClassDefFoundError
<hazmat> ah.. right
<hazmat> hmm
<SpamapS> java.io.FileNotFoundException: /var/lib/zookeeper/version-2/snapshot.0 (Permission denied)
<SpamapS> thats the system level version failing.. hmm
<SpamapS> looks like that is a misleading message
<SpamapS> the problem seems to be that it can't find log4j
<SpamapS> which you find w/ your trunk build because its probably in the build/lib/*.jar glob
<SpamapS> hazmat: good call on the caffeine.. triple americano has me cranking
<SpamapS> hazmat: I think I'll have the test harness look for /etc/zookeeper/conf/environment if ZOOKEEPER_PATH is unset
<SpamapS> If that exists, CLASSPATH is set perfectly, no need to glob
<hazmat> SpamapS, sounds good.. the test harness will generate the config, its really just fixing up  where it picks up the libs i think
<hazmat> if ZOOKEEPER_PATH is undefined
<SpamapS> hazmat: yeah, all I need is CLASSPATH .. the rest is spot on
<SpamapS> hazmat: woot!
 * SpamapS files a bug and MP
<_mup_> Bug #800462 was filed: Test suite cannot run with system installed Zookeeper <Ensemble:In Progress by clint-fewbar> < https://launchpad.net/bugs/800462 >
<SpamapS>     test_too_many_arguments_provided ...                                 [FAIL]
<SpamapS> does that one fail for everyone right now?
<SpamapS> ahh thats because I didn't have my AWS creds set
<hazmat> SpamapS, the tests shouldn't need your ec2 creds set
<SpamapS> hazmat: http://paste.ubuntu.com/630596/
<hazmat> SpamapS, ic.. its a bug.. they should be setting up their creds in their test config
<SpamapS> hazmat: I think those are new tests
<hazmat> SpamapS, yeah... it looks like the ec2 cred issue only effects one test
<SpamapS> agreed, is there a standard test access key that EC2 provides?
<hazmat> SpamapS, no
<hazmat> SpamapS, if you apply this diff that problem is fixed https://pastebin.canonical.com/48844/
<SpamapS> oh, nice
<SpamapS> Well I'm not testing those areas..
<SpamapS> I just wanted to see the entire suite pass
<hazmat> SpamapS, if you don't mind giving a +1 on that i'll commit it to trunk its pretty trivial
 * SpamapS re-runs w/ the diff
<SpamapS> hazmat: so far so good
<SpamapS> wow.. the tests take quite a while to finish
<SpamapS> hazmat: new fail
<SpamapS> http://paste.ubuntu.com/630601/
<hazmat> jimbaker, any thoughts on that traceback?
<hazmat> SpamapS, i don't see those failures in trunk
<hazmat> SpamapS, is it possible they where introduced on the branch? if you want to push it i can look at the diff
<SpamapS> hazmat: https://code.launchpad.net/~clint-fewbar/ensemble/test-using-system-zookeeper/+merge/65428
<SpamapS> hazmat: does not have your diff
<SpamapS> hazmat: feels like there can be some common abstract classes for all providers to extend.. 
<jimbaker> hazmat, re traceback - i have seen something similar before where the argparse was changed with 2.7. regardless, it's not a forgiving test with respect to any changes
<hazmat>   
<kim0> morning 
<SpamapS> kim0: howdy...
 * SpamapS should be going to sleep
<kim0> oh yeah :)
<SpamapS> kim0: hopefully by this time tomorrow we'll have an LXC machine provider.. :)
<kim0> Woohoo YES 
 * kim0 smells goodness
<SpamapS> I have it starting/stopping lxc containers.. just need to figure out cloud-init
 * SpamapS passes out
<kim0> hahah
<kim0> thank you man .. this is awesome
<kim0> wasn't there some cloud-init option
<kim0> to point it at the url to get the metadata from
<kim0> SpamapS: check out https://help.ubuntu.com/community/UEC/Images/KVMKernelOptions .. this part   ds=nocloud-net;s=http://tinyurl.com/sm-
<kim0> if that's actually the problematic part :) 
<_mup_> Bug #800580 was filed: generating status as svg results in error <Ensemble:New> < https://launchpad.net/bugs/800580 >
<daker> yo i have a problem
<daker> i am writing a formula for phpbb3
<daker> the install file have an apt-get install phpbb3
<daker> and while it installing phpbb3 needs some passwords to be entered
<daker> some like this http://min.us/mvnIO1O#1f and this http://min.us/mvnE3V9#1f
<daker> so the forumla will never finished and its status will be always null
<ajmitch> daker: debconf questions can be presseded, I don't know what policy there would be on that for formulas though
<kim0> daker: checkout the debconf variables of phpbb3 from http://forum.soft32.com/linux/Bug-583197-Setting-phpbb3-PL1-ftopict514576.html
<kim0> like phpbb3/admin-pass-ask
<kim0> daker: you can actually use this way to silence it .. example for mysql â http://www.rndguy.ca/2010/02/24/fully-automated-ubuntu-server-setups-using-preseed/
<daker> kim0, ok
<hazmat> daker, preseed is probably the best option
<daker> hazmat, thanks
<SpamapS> kim0: thanks for the tip, reading now
<kim0> cool
<SpamapS> and good morning
<kim0> hehe :)
<hazmat> jimbaker, i was looking over your last branch in review, it wasn't clear that gustavo's patch was applied/pushed.. could you clarify? i just want to make sure i'm reviewing the latest and greatest.
<SpamapS> there seem to be some bugs in the ensemble.lib.schema validator.. when something is missing a required element, or has something wrong.. it gives a completely unrelated error
<koolhead11> hi all 
<SpamapS> like "found lxc, was expecting ec2" when the problem is that my lxc section doesn't have an admin-secret
<koolhead11> do i have to do some more changes in my.cnf apart from changing bind-address = 0.0.0.0 to allow remote connections?  
<hazmat> SpamapS, hmmm.. is the error on the provider type? and has that been updated with lxc as a valid string?
<SpamapS> hazmat: yes.. I'll put together a simple test case.
<koolhead11> ERROR 1130 (HY000): Host '192.168.1.3' is not allowed to connect to this MySQL server
<SpamapS> koolhead11: the users that are added by the example and principia mysql formulas should take care of that, as they allow connection from any IP
<SpamapS> koolhead11: have you related the two services yet?
<koolhead11> SpamapS, am trying to create same on my 2 VM before initiating the same on EC2, in order to write hooks correctly
<SpamapS> koolhead11: I'm not sure what you mean by that, but, just use EC2. It doesn't work in plain VM's (yet)
<koolhead11> SpamapS, i mean i am writing the procedure for same and testing on local VM. Once am confident with the deployment i will sync it up with the EC2 as a formula. :)
<SpamapS> koolhead11: well then the problem is that on the mysql server, you haven't created a user, which the db-relation-joined hook should be doing.
<koolhead11> SpamapS, yes fixed it GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'passwd' WITH GRANT OPTION;
<koolhead11> i had to do this as well apart from changing bind-address option :)
<koolhead11> SpamapS, yes it was issue with server. it worked. thanks. :D
<SpamapS> koolhead11: why aren't you just *using ensemble* to do this?
<SpamapS> koolhead11: the whole point is that you don't have to care about what mysql does.. its handled by the already written mysql formula.
<koolhead11> SpamapS, yes. as of now i have not reached at the stage to put my formula on ensemble. i am writing initial hooks and testing it. once its done i will use mysql formula to do that
<SpamapS> koolhead11: ok. I think you'll find its easier to just test your formula by putting it in ensemble.
<SpamapS> koolhead11: hopefully when I have the LXC container done you won't even have to pay Amazon for the pleasure. :)
<koolhead11> SpamapS, ooh awesome!! :d
<SpamapS> This LXC stuff is pretty cool
<SpamapS> Like having a VM that boots in 1s.
<SpamapS> hallyn: ^5
<hallyn> SpamapS: hang onto your hats, i've got the stuff lifeless wanted coded, and dlezcano will review lxc-clone today, things are only getting better
<SpamapS> hallyn: actually i'd be interested in discussing libvirt and the lxc templating stuff with you if you have some time.
<SpamapS> hallyn: I find the lxc tools to be very straightforward.. so I'm leaning toward avoiding libvirt for now...
<SpamapS> heh.. I'm leaning toward leaning away from something :)
<SpamapS> hallyn: anyway, the templates.. it would be useful if I could pass in some optional data to them.. like environment variables. But they seem to have their environment stripped.
<hallyn> SpamapS: I'm working on the templates right now
<SpamapS> hallyn: ahh, making them arch-configurable ?
<hallyn> I've got it supporting arch, release, and an option to bind-mount in your $home
<hallyn> yeah
<hallyn> what else would you like?
<SpamapS> hallyn: pre-seeds. :)
<hallyn> ah, yes.  i was wanting something like that
<hallyn> you want just a list of packages to install?
<hazmat> lxc-attach would be very helpful, if we run the unit agents outside the container, so they execute hooks in the container namespace
<SpamapS> and an optional preseed file to set debconf selections.
<hallyn> hazmat: yeah, that just needs the kernel bits to land in upstream kernel finally
<SpamapS> hazmat: that sounds like madness. ;)
<SpamapS> just let the thing work like a server!
<hallyn> hazmat: TBH i'm not that big a fan (security nightmare), but...
<hallyn> SpamapS: can you put up an email or wiki page showing some example usages?
<hallyn> SpamapS: i '-packages=x,y,z' i can picture, not sure about debconfs
<SpamapS> hallyn: Right now I'm struggling to configure cloud-init for instance.
<hazmat> hmm. interesting, for us it would be a minor security boon with separation of user provided code vs. the ensemble framework code.
<hazmat> its minor at this point, having lxc working, would be all kinds of awesome by itself
<hallyn> hazmat: i don't udnerstand what you mean.  what woudl lxc-attach give you that sshing into the container doesn't?
<hallyn> lxc-attach is useful if your container is broken, but...
<hazmat> hallyn, ensemble is based on the execution of user provided hooks in response to events, at the moment we just fork them from the agent that receives the events, we could ssh into the container to do so, but its easier manipulating the forked environment without
<SpamapS> chopped at 'environment without'
<hallyn> hazmat: you could also get funky and use expect over the container's console :-)  but that's even more work than ssh
<SpamapS> hazmat: don't the agents just run things in response to ZK events?
<hallyn> hazmat: you can also just run an agent in the container which talks over a unix sock to one on the host, and have the agent in container do the fork+maniuplate
<hazmat> SpamapS, re work like server, for the lxc provider, that probably makes the most sense, (ie a machine agent and unit agent per container).. for the multi unit servers, there is some room for better separation
<hallyn> but anyway, i'm in no way blocking lxc-attach, so on with the task at hand :)
<hazmat> hallyn, indeed, that's also viable, lots of different options, lxc-attach just looked like the right hammer from my casual observation
<hazmat> SpamapS, yup that's pretty much all they do at the moment, respond to state change events
<jimbaker> hazmat, sounds good about applying the patch
<jimbaker> anything else you need for the review?
<jimbaker> it may make more sense for me to get its prereq branch in trunk first
<hazmat> jimbaker, nope, that's it, i've already done a review on the prereq
<jimbaker> hazmat, indeed, that's why it can go into trunk ;)
<hazmat> jimbaker, i think there where a few un-addressed review comments on it, that should get looked at, but else sounds good
<jimbaker> hazmat, it was unclear to me what the ordering should be in these things
<hazmat> jimbaker, how so?
<jimbaker> hazmat, as in, do we fix post review #1 so that it can also be seen in review #2
<hazmat> jimbaker, if its approved, it should go in.. and if its got a pre-req, it should wait for the pre-req to get merged.
<jimbaker> hazmat, so that's the ordering i'm talking about with the new review process, not about any changes to our established merge process
<jimbaker> hazmat, so given that you want the patch applied, seems like it would work better if i had done that first vs keeping it fixed for your review
<hazmat> jimbaker, lp will interleave commits with r1 and r2.. in this case the comments will have some significant change on the code.. and general rule of thumb is to incorporate feedback and push latest, but its not required for the second review imo unless addressing the first entails significant change to the proposal under review
<jimbaker> hazmat, indeed there were no significant changes here
<jimbaker> hazmat, just minor fixes or it would not been approved
<hazmat> jimbaker, i disagree, the tests are the same, but i think in this case i think it is significant impl change from what's extant, so it would be nice to review the whole.. the diff covers is 20% of the whole.
<jimbaker> hazmat, ok
<hazmat> jimbaker, thanks
<kim0> re bash completion .. I am wondering why no one has written a generic completer where we'd write a spec in xml or yaml, and have it work from there .. instead of writing all the logic like â http://bazaar.launchpad.net/~bcsaller/ensemble/bash-completion/view/head:/etc/bash_completion.d/ensemble
<bcsaller> you'd generate it from the arg parser
<bcsaller> but that was more work, argparse isn't very introspectable
<_mup_> ensemble/expose-watch-exposed-flag r250 committed by jim.baker@canonical.com
<_mup_> Addressed review comments
<kim0> bcsaller: even after generating it .. there's no generic consumer to use it right
<kim0> any way .. I wish to get bash completion soonish :)
<kim0> great work on that branch
<kim0> SpamapS: whenever you need someone to test your LXC magic .. ping me :)
<hazmat> bcsaller, it is introspectable i think, but does require mucking with private variables
 * kim0 afk
<bcsaller> the data isn't intended to be used that way and its not easy, yes its there though
<jimbaker> yeah, argparse definitely needs some updating. this is the curse of getting included in the standard library
<bcsaller> there should be a generic argparse -> bash_completion.d function
<m_3> SpamapS: +1 LXC tester
<jimbaker> bcsaller, but it should also extend argparse on the metadata for parameters such that appropriate hooks are available, so we can get completion on things like wordpress/0
<_mup_> ensemble/expose-provision-service-hierarchy r299 committed by jim.baker@canonical.com
<_mup_> Simplified the state tracking watches using Gustavo's patch
<jimbaker> hazmat, ^^^
<jimbaker> so it's been pushed up
<_mup_> ensemble/trunk r260 committed by jim.baker@canonical.com
<_mup_> merged expose-watch-exposed-flag [r=niemeyer,hazmat][f=788825]
<_mup_> Updates ServiceState.watch_exposed_flag such that the watch only
<_mup_> returns after processing current state; it is permanent; the client
<_mup_> connection is guarded; and it is stateful and reliable.
<SpamapS> I should have something to test soon .. so far it doesn't run my cloud-init stuff yet, but I'm getting close
<SpamapS> hallyn: so one other thing that would be useful for the templating is a way to easily specify arbitrary file placement. Kind of like a .install file in a package.
<SpamapS> hallyn: otherwise I have to use sudo to copy files in... I'd much rather be able to say you just need sudo for lxc-*
<hallyn> SpamapS: live-build has a concept of chroot-includes/, maybe we can do something like that
<hallyn> hm, maverick containers no worky
<SpamapS> hallyn: yeah that would actually solve most of my preseed desires too. :)
<SpamapS> since then I can just dump cloud-init data in
 * hazmat lunches bbiab
<SpamapS> m_3: About the NFS formula..
<SpamapS> m_3: I've been thinking a lot about shared filesystems
<SpamapS> m_3: I'm thinking we can make it generic enough where formulas can just 'requires:' on an interface of 'shared-filesystem' .. and the provider will tell them how to mount it.
 * bcsaller heads off to the structure conference 
<hallyn> yay, it all works.  ship it
<m_3> SpamapS: re: NSF agree
<m_3> SpamapS: was trying to decide on long-format relation name or short distributed-shared-filesystem-relation-changed is a mouthful
<m_3> SpamapS: dsf for (g)luster et al
<m_3> SpamapS: maybe just nfs-relation-changed for NFS
<m_3> dang.. dyslexic today... s/nsf/nfs/g
<SpamapS> haha
<SpamapS> nfs is fine for the relation name.. and gluster for gluster..
<SpamapS> ensemble add-relation mediawiki:shared-filesystem nfs-server-1:nfs   makes a lot of sense to me
<m_3> SpamapS: yup
<m_3> SpamapS: had actually thought they needed to be symmetric
<m_3> SpamapS: i.e., mediawiki:shared-filesystem nfs-server-1:shared-filesystem
<m_3> SpamapS: but good to know
<SpamapS> m_3: no the idea is for them to describe what part of the service you're relating to
<_mup_> ensemble/hooks-with-formula-dir r260 committed by kapil.thangavelu@canonical.com
<_mup_> invoker execute hooks in the formula directory
<SpamapS> gluster actually has an NFS capability.. you could conceivably have a relation called 'nfs' for it and a 'gluster' relation for it.. both with the same interface..
<m_3> SpamapS: understand
<hazmat> SpamapS, atm they do need to be symmetric
<SpamapS> hazmat: the relation names, not the interfaces.
<hazmat> SpamapS, ah.. indeed, quite true
<hazmat> SpamapS, actually its the opposite the interfaces need symmetry.. the names are local to the formula
<SpamapS> hazmat: which is exactly what I was saying. :)
 * hazmat is feeling a little slow this afternoon ;-)
<hazmat> maybe some more that of coffee
<SpamapS> hazmat: triple americano. :)
<m_3> yum
<SpamapS> with cinammon for extra fat burning. :)
<SpamapS> and maybe some ginseng so I can learn how to spel
<m_3> somebody's been reading the 4hr body
<SpamapS> m_3: 8 weeks of slow carb has me 15 lbs. lighter and 10 inches less around
<m_3> SpamapS: damn... dude!  10in is a monstrous change
<SpamapS> m_3: well I was pregnant w/ a food baby. ;)
<m_3> SpamapS: I was at 20lbs down but stalled with moving and job changes over the past couple of weeks
<SpamapS> m_3: its 6 inches from around the belly, and 4 around the hips.. dropped from 34 to 32 in jeans
<m_3> SpamapS: awesome
<SpamapS> and XL -> L in shirts
<m_3> size changes are all great until you run out of clothes
<m_3> but that's the good direction :)
<SpamapS> m_3: the XL's still fit, but look like hand-me-downs from my big brother
<_mup_> ensemble/hooks-with-formula-dir r261 committed by kapil.thangavelu@canonical.com
<_mup_> adjust invoker construction by the lifecycle, hooks are now executed in the unit directory.
<SpamapS> so it looks like we should be able to use the official UEC images rather than the lxc OS templates
<SpamapS> hallyn: so.. I think I'll create a template which simply pulls the images, rather than uses debootstrap..
<hallyn> SpamapS: ok
<hallyn> SpamapS: also consider lxc-clone -s, which takes about 1 second
<SpamapS> hallyn: the benefit there is, the cloud images will be identical to an LXC container.
<SpamapS> hallyn: I don't have that command ;)
<hazmat> hallyn, with btrfs, could we take a snapshot of the root fs, and use as a base for the container
<hazmat> just wondering if we could avoid a debootstrap given that we may already have an effective base image
<hazmat> argh.. mocking is fragile
<SpamapS> hazmat: schroot already does a lot of stuff like that with LVM and/or btrfs .. most anything schroot can do, lxc can do. :)
<SpamapS> My new challenge with this LXC provider is actually getting reachable hostnames..
<SpamapS> dnsmasq has them..
<SpamapS> but how do I get ensemble to use dnsmasq w/o changing resolv.conf.. :-P
<hallyn> hazmat: you can do that with lvm.  i was going to do btrfs support in lxc-clone, but btrfs (just a month or two ago) was too shoddy
<hallyn> as in, complete fs corruption in one snapshot
<SpamapS> hallyn: ugh.. still?
<hallyn> SpamapS: i was shocked
<_mup_> txzookeeper/session-event-handling r49 committed by kapil.foss@gmail.com
<_mup_> replace some mock'd error behavior tests with real equivalents where possible, yank the one that wasn't (sync w/ error)
<_mup_> txzookeeper/session-event-handling r50 committed by kapil.foss@gmail.com
<_mup_> client usage while disconnected, will return a failed deferred instead of raising an exception
<ajmitch> SpamapS: is the debian packaging in lp:txzookeeper trunk the one that you plan to upload?
<SpamapS> ajmitch: no
<SpamapS> ajmitch: its in the DPMT svn repository at the moment
<ajmitch> ah ok
<_mup_> ensemble/debug-log-relation-settings-changes r270 committed by jim.baker@canonical.com
<_mup_> Invoker now only logs about a flush on the changes from a YAMLState flush when there are actual changes
<_mup_> ensemble/debug-log-relation-settings-changes r271 committed by jim.baker@canonical.com
<_mup_> Use slice idiom for returning changes from YAMLState
<SpamapS> hazmat: hah, I just discovered where the ensemble AMI shortens the deploy... ;)
<SpamapS> cd /usr/lib/ensemble/ensemble && sudo /usr/bin/bzr up
<SpamapS> *doh*
<_mup_> ensemble/debug-log-relation-settings-changes r272 committed by jim.baker@canonical.com
<_mup_> Removed unused names/imports from touched files
<SpamapS> hazmat: you know what would be cool? if providers could define the set of commands to make an AMI/image/etc.
<SpamapS> hazmat: I see what you mean by having to install all the non-base packages every time..
<SpamapS> will have to get serge to show me lxc-clone next week
<SpamapS> hazmat: ugh, more stuff that is in EC2 that seems it should be shared...
<hazmat> SpamapS, re provider set of commands. do you mean like a provider.create_image() api? ..
<hazmat> SpamapS, which part re shared?
<SpamapS> hazmat: 99% of the zookeeper code embedded in ec2
<hazmat> ah..
<SpamapS> Half of this effort has been moving things into common. :-P
<hazmat> SpamapS, if yeah.. all the cloud-init formatting should be shareable, and like 99% of the variable input to that
<SpamapS> hazmat: I'm done w/ cloud-init .. at this point I'm failing because I can't connect to ZK .. ;)
<SpamapS> 2011-06-22 22:49:14,652:1265(0x7f3fe78dc700):ZOO_ERROR@handle_socket_error_msg@1579: Socket [127.0.0.1:2181] zk retcode=-4, errno=111(Connection refused): server refused to accept the client
<SpamapS> Haven't touched that from dummy yet
<SpamapS> hazmat: its really.. really hard to follow what actually happens in the ec2 provider. :-P
#ubuntu-ensemble 2011-06-23
<_mup_> ensemble/debug-log-relation-settings-changes r273 committed by jim.baker@canonical.com
<_mup_> Change items of strings should be cutoff in logging if they exceed some arbitrary, but reasonable limit (for now, that is 100)
<SpamapS> heh.. JFDI has turn into "JFDTFAOP" .. Just F'ing Do This, Forget All Other Priorities
<hazmat> SpamapS, can you paste the cloud-init data
<SpamapS> hazmat: at this point I've got it connecting to ZK
<hazmat> SpamapS, are you able to ssh into the bootstrap contaienr?
<hazmat> SpamapS, awesome
<SpamapS> but there's nothing in ZK
<SpamapS> ensemble.state.errors.MachineStateNotFound: Machine 0 was not found
<hazmat> SpamapS, right.. there's an initialize zk command that runs before the agent is started
<SpamapS> OH! that got dropped somehow
<hazmat> SpamapS, its at the bottom of ec2/launch.py.. if you paste your cloud-init config it should be easy to spot
<SpamapS> For me now its in common.get_bootstrap_machine_variables ..
<hazmat> SpamapS, try running this if your can ssh into the bootstrap container.. /usr/local/bin/ensemble-admin initialize --instance-id=$(curl http://169.254.169.254/1.0/meta-data/instance-id) --admin-identity=abc
<hazmat> when you say nothing is in zk? are you using the shell to have a look ie. /usr/share/zookeeper/bin/zkCli.sh 
<SpamapS> hazmat: ok, the logic I had put in was overwriting those commands
<SpamapS> hazmat: the curl won't work of course.. :)
<hazmat> SpamapS, cool, if you got zk up and running and clients connecting to it, that should be hopefully most of it. 
<SpamapS> hazmat: for the moment, I'm using the ZK running on my box letting them connect to it
<hazmat> SpamapS, right on.. that's still pretty good progress
<hazmat> exciting even
<SpamapS> Another twistd server is running, PID 1100
<SpamapS> hrm
<SpamapS> oh.. now my logic fix reverted my earlier hack
 * dannf waves
<SpamapS> hazmat: way I see it, this should be very easy to morph into libvirt for somebody who understands libvirt better
<hazmat> SpamapS, indeed, with the first non-ec2 provider impl, the next should go much easier.
<SpamapS> hazmat: this still has more hacks than Wenesday night open mic at the improv..
<hazmat> SpamapS, no worries, they can be cleaned up
<hazmat> Its still likely the top feature requested imo, and having something in-dev/demoable on that is awesome
<SpamapS> hazmat: how does ensemble-admin know what ZK to talk to? In the example it doesn't have ENSEMBLE_ZOOKEEPER set
<hazmat> SpamapS, it knows its running on the same host as the zk, so it uses localhost
<hazmat> and the default port...
<SpamapS> ...
<SpamapS> hence my problem ;)
 * SpamapS abandons the "keep it simple" approach and installs zookeeperd
<hazmat> SpamapS, it should take a cli arg..
 * hazmat checks
<SpamapS> no its adding logic not making it simpler
<SpamapS> this is better. ;)
<hazmat> SpamapS, you can set an environment variable for it
<hazmat> ZOOKEEPER_ADDRESS
<hazmat> it will use that in preference to the default localhost:2181 address
<SpamapS> thats ok, I'm trying very hard to change as little as possible..
<SpamapS> as my head wraps around the existing hacks, I let them back in and revert changes to try and fix them the wrong way. ;)
<hazmat> SpamapS, some change and refactoring is ok in my book.
<hazmat> we can make the default ec2 command work that way as well
<SpamapS> Yeah there's plenty of that thus far
<SpamapS> UGGGH zookeeperd installs another 25 packages
<hazmat> SpamapS, indeed. that's pretty much why we have an AMI at all
<SpamapS> [zk: localhost:2181(CONNECTED) 2] ls /
<SpamapS> [services, formulas, relations, zookeeper, initialized, topology, machines, units]
<hazmat> SpamapS, WOOT!
<SpamapS> still nothing tho
<hazmat> SpamapS, any agents connected? (ps aux | grep ensemble)
<SpamapS> hazmat: there's a machine-00000000000
<SpamapS> hazmat: the admin command ran after the agents started tho
<hazmat> SpamapS, yeah.. that's representing the bootstrap machine (the one with zk), its go a machine agent, but we don't ever reuse it for service unit assignment
<hazmat> SpamapS, more important is the provisioning agent.. it actually waits till the user tries to deploy a service, and the provider credentials are provided lazily to it (upon deploy).. its that way mainly so we can avoid passing credentials via user-data
<hazmat> SpamapS, i'd check to see if its running, tail its log, and then try to deploy a service and see what happens
 * hazmat is looking forward to hear about structure 2011
<hazmat> looks like their streaming live
<SpamapS> hazmat: so far 'ensemble status' shows empty
<SpamapS> hazmat: I think eventually we can take the AMI thing to a level where each service gets snapshotted whenever you upgrade or deploy.. so add unit is just popping up a snapshot
<SpamapS> hazmat: was thinking the other day that if formulas could call 'ensemble-snapshot-service-unit' or something that would be cool
<SpamapS> clint@clint-MacBookPro:~/src/ensemble/lxc-container$ ZOOKEEPER_ADDRESS=192.168.122.68:2181 PYTHONPATH=`pwd` bin/ensemble status -e lxc
<SpamapS> 2011-06-22 17:20:20,867 ERROR Machine provider information missing: machine 0
<SpamapS> machines: 0: {instance-id: ensemble-0}
<SpamapS> services: {}
<SpamapS> 2011-06-22 17:20:20,869 INFO 'status' command finished successfully
<SpamapS> clint@clint-MacBookPro:~/src/ensemble/lxc-container$ 
<SpamapS> OOOHHHH SNAP
<hazmat> SpamapS, cool!, that  missing info thing, is just implementing the get_machine api of the provider
<SpamapS> I'm having a weird issue..
<SpamapS> its happening even w/ trunk..
<SpamapS> http://paste.ubuntu.com/631028/
<hazmat> hmmm.. that looks like a speling typo on repository
<hazmat> SpamapS, ^
<SpamapS> lol
<SpamapS> ensemble.environment.errors.EnvironmentsConfigError: Environments configuration error: environments.lxc.type: expected 'ec2', got 'lxc'
<SpamapS> Heh..
<SpamapS> I need to put *my* version of ensemble on there.. duh
<jimbaker> it would be nice to have that doublechecking occur!
<hazmat> SpamapS, doh.. yeah.. ensemble-branch in environments
<SpamapS> hazmat: I didn't implement that yet. :-P
<hazmat> SpamapS, ah.. write the switch out is part of cloud-init
<jimbaker> so there are two problems ;)
<SpamapS> hazmat: have to branch it before I can switch it. ;)
<jimbaker> anyway, it will be nice to get bug 719517 in place
<_mup_> Bug #719517: Ensemble should store the code version in each zookeeper <Ensemble:New> < https://launchpad.net/bugs/719517 >
<SpamapS> crap.. I need to use a mirror.. they just released a firefox update and archive.ubuntu.com is slammed
<_mup_> Bug #800988 was filed: refactor ec2 provider to extract common functionality for other providers <Ensemble:New> < https://launchpad.net/bugs/800988 >
<koolhead11> hi all
<koolhead11> can i assign a bug to myself after reporting it
<koolhead11> i want to work on few formulas and i want to assign it to myself
<koolhead11> ooh yes i can. :)
<SpamapS> koolhead11: have you finished any formulas yet?
<koolhead11> SpamapS, am working on gallery2
<SpamapS> koolhead11: what happened to phpmyadmin
<SpamapS> ?
<koolhead11> SpamapS, i will try it once i have some confidence in writing simple formulas
<koolhead11> SpamapS, please suggest me if am doing wrong :(
<SpamapS> I just wanted to give you some feedback. :)
<SpamapS> koolhead11: often times its harder to finish one thing than start 10 ;)
<koolhead11> SpamapS, hmm. 
<SpamapS> hazmat: So, I think I'm officially in over my head now. lp:~clint-fewbar/ensemble/lxc-container has things the way I think I want them..
<SpamapS> hazmat: I'm running the provisioning agent locally. This is because we want to run the lxc-* commands locally, not on the container.
<SpamapS> hazmat: it seems to work. Where I'm stuck is in debugging what goes wrong on the provisioning agent (because stdout/stderr are directed to /dev/null) and how to serialize/unserialize the machine info from zookeeper
<SpamapS> hazmat: I would have thought a lot of that would be generic to all providers, so its really confusing that I might have to do it all myself in the lxc provider.
<SpamapS> anyway I'm sure everybody else is asleep
<SpamapS> jimbaker: ^^
<SpamapS> bcsaller: ^^
<SpamapS> would love all of your thoughts
<SpamapS> tho I feel we'll probably be more productive in Dublin. :)
<SpamapS> Also for those interested.. the template I used is in debian/lxc-natty-uec .. you'll need to copy that to /usr/lib/lxc/templates
<hallyn> SpamapS: is the latest version at that lp: url you gave me ysterday?
 * hallyn goes to clone
<hallyn> sbux wifi == majorly laggy
<hazmat> SpamapS, branch looks great, we should probably refactor it to two branches (the ec2 provider commons extraction) regarding the provisioning agent, the logs are sent to /var/log/ensemble.. the issue might just be that directory is missing on the host machine
<_mup_> ensemble/expose-ec2-provider r270 committed by jim.baker@canonical.com
<_mup_> Merged trunk
<SpamapS> hazmat: nope, the logs are sent to ~/.ensemble/var/log/ensemble .. and its created
<SpamapS> hazmat: the stdin/stdout is /dev/null, so any commands run get that as their stdin/stdout as well
<SpamapS> hazmat: agreed that the refactoring into common is a separate change
<SpamapS> hazmat: I'm not really doing this as carefully as one might hope.. I am making it work first. ;)
<SpamapS> kim0: hey! you can change the package on principia bugs?!
<kim0> hmm?
<SpamapS> https://bugs.launchpad.net/principia/+source/mysql
<SpamapS> that didn't used to be possible
<kim0> SpamapS: yeah I noticed the new functionality .. so you already did it for this bug right ? (it says mysql (Principia Ensemble))
<SpamapS> Francis did
<SpamapS> maybe he was testing. :)
<kim0> hehe :) cool then
<SpamapS> kim0: and I just realized, I read who did the change wrong, as you.. since you were the last commenter before me or francis
<kim0> yeah np
<kim0> SpamapS: still in mortal kombat with LXC ? :)
<SpamapS> kim0: we agreed to meditate in our corners for a few hours.. but I think LXC is sharpening its sword again..
<kim0> haha :)
 * kim0 hands a lightsaber
<SpamapS> excellent, this will allow me to chop off its hands
<jimbaker> has anyone else seen this error with formulas being retrieved? - http://paste.ubuntu.com/631275/
<jimbaker> i've tried removing my data bucket etc
<jimbaker> (and at first thought it was a problem in a branch i'm working on)
<hazmat> jimbaker, odd, no i haven't seen that one
<SpamapS> ok back in the saddle..
<SpamapS> added logging to the lxc commands..
<jimbaker> hazmat, i will dig it into further
<SpamapS> so.. I don't have to use twisted, do I? like, I can just let my shutdown or launch commands block until they finish, right?
<SpamapS> I get that its way cooler if I don't.. ;)
<hazmat> SpamapS, yes you can block in the cli
<hazmat> we don't really do full shutdown via the provisioning agent yet.. the cli does it, for the ec2 provider via an amazon api is already async, so its not something that cleanly translates to other providers that might be sync. blocking in the cli seems like a best path forward for lxc atm
<SpamapS> Another funny thing is because I'm not ripping down the zookeeper host every time I have to manually clear it out between bootstrap/shutdown
<SpamapS> probably worth it to just move that back to the bootstrap node, as for some reason it seems to insist on spawning a machine 0 anyway :p
<SpamapS> I need to think of a good strategy for getting the hostnames and/or IP's available to the local CLI
<hazmat> SpamapS, hmm...  we could reset zk on initialization for now
<SpamapS> more progress.. I'm now failing because I don't have shared storage for formulas.. which is.. encouraging. :-D
 * SpamapS considers a bind mount
<hazmat> SpamapS, a bind mount would work, the only thing doing write to the storage is the admin cli
<hazmat> the dummy provider file storage should work  for it
<SpamapS> hazmat: the difficulty is figuring out the path to use :P
<SpamapS> hallyn: need your opinion.. would you use a bind mount inside the containers for shared storage, or setup an HTTP server which they can use to fetch data?
<hallyn> bind mount
<hallyn> just like with -b option in my template
<SpamapS> hallyn: the bind mount seems simpler.. but I can see it leaving a lot of cruft behind
<hallyn> which bind mounts in your $home
<hallyn> i'd definately do bind mount
<SpamapS> hallyn: cool, I'm just going to manage the mount myself.. but maybe in the future the template can do it
<hallyn> ok.  it's been an unproductive day so far (emails won't stop coming in).  may not get your template into mine today.  But I assume you're happy with yours so far
<hallyn> i'd like to wait until we figure out the best way to merge stgraber's patches into my template
<SpamapS> hallyn: I made a couple of tweaks so it does less work each time.. but its 99% the same
<hallyn> SpamapS: still in the same branch?
<SpamapS> hallyn: Eventually we need to talk about this lxc-clone.. :)
<hallyn> i'll re-fetch whenever i merge it in
<hallyn> SpamapS: it's in ppa:serge-hallyn/lxc-natty, if you want to work with it
<SpamapS> hallyn: no but I'll push it up sometime
<hallyn> ok
<SpamapS> Getting very close to actually deploying something on LXC. :-D
<hallyn> i should get lvm support into my -create so to ease setting up the canonical container, but lxc-clone -s is there, and lightning-fast
<SpamapS> what does lxc-clone do?
<SpamapS> I don't have it on natty
<hallyn> yes, ppa:serge-hallyn/lxc-natty :)
<hallyn> if you have your rootfs for continer on lvm,
<hallyn> you can 'lxc-clone -s -o oldcontainer -n newcontainer', and it does an lvm snapshot for the new contaienr's rootfs
<hallyn> so you can use it like schroots pretty much
<SpamapS> hallyn: ahhh... thats nice. I'd be happy with just a cp -a at this point
<hallyn> (especially now that you can do --bindhome)
<hallyn> if you're not using lvm, it does cp -a :)
<SpamapS> I am going to spec out some additional things to build snapshotting into ensemble providers.. so we don't have to maintain an AMI manually, but we don't have to wait for 50 packages to install over and over.
 * hallyn goes to lok at his todo list to see if he can do lvm support in lxc-create today
<hallyn> nah, i can't
<SpamapS> omg omg omg .. I just deployed WP in LXC .. 
 * SpamapS looks at his glorious tower of chewing gum and duct tape
<SpamapS> hazmat: so it seems like what I'm missing is the mapping between machine-id and instance-id ... is that just because I'm not setting the right properties of the machine object I return during start_machine ?
<hazmat> SpamapS, you can use any provider specific notion of machine identity
<hazmat> SpamapS, as long as its unique
<hazmat> SpamapS, dir names (if precluding reuse of a name)
<SpamapS>         machine = LXCMachine(len(self._machines), dns_name=container_name)
<hazmat> SpamapS, hmmm so for identity i'd use the dirname, for dns name, whatever is resolvable between the host and container
<SpamapS> yeah the host name resolution seems to be a problem
<SpamapS> dnsmasq may not be reliable enough for this. :-/
<SpamapS> Or I've confused it
<hazmat> SpamapS, is the host configured to use dnsmasq? or is it just setup for the bridge?
<pindonga> SpamapS, I'd be happy to beta test the lxc stuff if you have it in a more-or-less usable state :D
<SpamapS> pindonga: lets let the chewing gum dry a bit before we move it
<SpamapS> hazmat: I've tried both ways.
<SpamapS> hazmat: with the host setup to use dnsmasq.. that seems to create more problems than it solves
<hazmat> SpamapS, can you ssh into one of the containers currently?
<SpamapS> hazmat: I can ssh into all of them
<hazmat> SpamapS, you can pass an ip address for the dns name
<pindonga> SpamapS, let me know when it's dry enough , so I can start using it locally for testing ensemble out :)
<SpamapS> I was thinking about just shoving the IP into a file and pulling that out..
<SpamapS> but hostname needs to work
<SpamapS> hazmat: the issue is, dnsmasq isn't responding to requests for the hosts that it has been told about
<SpamapS> hrm.. and the installation of ensemble is giving python-support fits
<hazmat> SpamapS, i'm wondering if it might be a dnsmasq misconfigure, looking at http://www.phenona.com/blog/using-lxc-linux-containers-in-amazon-ec2/ the host resolution portion uses a separate domain for the lxc machines
<_mup_> ensemble/expose-status r261 committed by jim.baker@canonical.com
<_mup_> Initial commit
<_mup_> ensemble/expose-status r262 committed by jim.baker@canonical.com
<_mup_> Removed obsolete comment + PEP8
<hazmat> anyone know what version of cobbler, orchestra uses?
<hazmat> nevermind
<kirkland> hazmat: did you find it?
<kirkland> hazmat: https://launchpad.net/ubuntu/+source/cobbler
<kirkland> hazmat: 2.1.0+git20110602-0ubuntu8 
<kirkland> hazmat: we're taking git snapshots, at the moment
<bcsaller> done presenting at Structure 2011 :) *whew*
<kirkland> hazmat: i think zul or roaksoax might know when cobbler releases again
<kirkland> bcsaller: nice!  how did it go?
<hazmat> bcsaller, awesome.. how was it
<bcsaller> well, it wasn't that big a crowd, but I think our technologies were well received and importantly, understood
<hazmat> kirkland, i did, i was reviewing their xmlrpc api
<kirkland> hazmat: ah, cool
<hazmat> kirkland, in terms of ensemble integration with orchestra, i was thinking just utilizing the cobbler xmlrpc api would be easiest. any suggestions?
<hazmat> bcsaller, seems to be a nice speaker list.. and the live streams, seem to suggest more strategic/vision than tool oriented per se
<bcsaller> kirkland: it was interesting trying to come up with language that helped people understand that orchestra and ensemble were not competing. I summed it up in a way that I hope you're happy with, "Orchestra is about provisioning infrastructure and ensemble is about provisioning services"
<bcsaller> hazmat: true dat
<bcsaller> but some big players in need of solutions in both these spaces
<_mup_> ensemble/redirect-zk-log-dev-null r261 committed by jim.baker@canonical.com
<_mup_> Initial commit
<kirkland> bcsaller: yeah, that's good!
<kirkland> bcsaller: i've been saying ... "Ensemble is about how you deploy your applications/services INTO the cloud"
<kirkland> bcsaller: "Orchestra is how you deploy THE CLOUD"
<bcsaller> yeah, I avoided that word here because it still means different things to different people. Infrastructure seems to have more agreement 
<hazmat> another slightly more involved way of doing ensemble integration into orchestra would be offering an mcollective plugin that would have a limited command set to just activate machines as ensemble nodes
<kirkland> bcsaller: fair enough
<bcsaller> hazmat: Juan and I were talking about something similar to that today
<hazmat> bcsaller, nice.. it seems pretty inline with the orchestra message.
<kirkland> bcsaller: how was juan's part of the talk?
<bcsaller> kirkland: I think he did really well, he also was willing to adapt a little and focus more on the infrastructure side of the story than the puppet side of things though all options were discussed
<hazmat> bcsaller, where you guys thinking of richer semantics resolved via orchestra  than machine activation?
<bcsaller> hazmat: it goes back to the notion of types of formula that run inside other containers. (so not everything has to provide a relation to something like logging, or in this case maybe puppet infrastructure). I suggested that as a model for thinking about it we talk about things like "ensemble deploy wordpress as myblog with rsyslog, puppet-client"
<bcsaller> where those are a new class of in-container formula
<bcsaller> but thats the sort of thing we need to plan out and roadmap more 
<hazmat> bcsaller, indeed, that's perfect
<bcsaller> :)
<hazmat> its not really inheritance or containment, its association in the same unit same
<hazmat> s/same/space
<bcsaller> also "ensemble deploy rsyslog in service|unitname" works after the initial deployment
<hazmat> SpamapS, ^ re policy formulas
<SpamapS> oo hey what?
<bcsaller> then we just need a way those formula's hooks are consistently triggered but we have a good model for it 
<SpamapS> with
<SpamapS> I like that *a lot*
<hazmat> bcsaller, yeah.. colocated units should work fine, its shrinking the granularity of a machine to the unit, its works really well. 
<bcsaller> we should paste this into an email, huh? :)
<SpamapS> so then I can say 'ensemble add-relation *:rsyslog rsyslog-central-host
 * SpamapS WINNING
<hazmat> bcsaller, s/we/you .. definitely captured at least, that's ensemble's way forward on the last remaining conceptual piece for single dc prod deployments.
<bcsaller> SpamapS: yeah, the formula are not concerned with the logging aspect (except that some metadata might be needed) but the contained formula would still relate like that
<hazmat> s/dc/data center
<bcsaller> I parsed it
<hazmat> bcsaller, an implementation could also clear the way for server side plugins
#ubuntu-ensemble 2011-06-24
<SpamapS> So.. I can deploy and shutdown reliably
<SpamapS> something I've done with the setup.py is borking python-support...
<SpamapS> http://paste.ubuntu.com/631507/
<SpamapS> hostname=`curl http://169.254.169.254/latest/meta-data/local-hostname`
<SpamapS> THIS is where I'm failing! ;)
<SpamapS> 2011-06-23 17:12:47,535 provision:lxc: ensemble.agents.provision INFO: Starting machine id:2 ...
<SpamapS> ruh roh.. here. we go
<hazmat> SpamapS, that's a path issue
<hazmat> SpamapS, the ensemble/bin directory as spec to the hook isn't correct
<SpamapS> I switched to using 'develop' instead of 'install'
<hazmat> SpamapS, cool, that's much better for a source installation
<hazmat> develop/symlinks install/copies
<SpamapS> so..
<SpamapS> it works
<SpamapS> the main problem I have now..
<SpamapS> wordpress needs the host header to be set..
<SpamapS> and chrome won't send a non fqdn host header
<SpamapS> but like..
<SpamapS> they work
 * SpamapS does a dance
<SpamapS> got dnsmasq working too
<SpamapS> ok its just that the wp formula doesn't make its config the default
<SpamapS> So like, I can actually deploy wordpress on LXC
<SpamapS> I do need to figure out the zookeeper shutdown/bootstrap
<m_3> SpamapS: cheers... cork popping!
 * SpamapS is tempted now to commence with optimizing it so it doesn't take 3 minutes per machine...
<m_3> ironic, huh
<m_3> SpamapS: dude, that's awesome.  I definitely wanna set it up in Dublin
<SpamapS> Yeah I hope to have it available as a package in a separate PPA by the end of next week
<SpamapS> The refactoring I did needs more testing before its mergable.
<hazmat> SpamapS, awesome!
<hazmat> SpamapS, re reset.. this is a simple cli script i used before we had automated zk test setups.. https://pastebin.canonical.com/48970/
<hazmat> to reset the tree, it could drop into ensemble/state/initialize
<SpamapS> hazmat: I'm thinking it may make more sense to spawn a bastion ZK
<SpamapS> it doesn't need its own bootstrap node..
<SpamapS> but it can just listen on a random port and we can feed that port to all the nodes esaily
<SpamapS> easily even
<hazmat> SpamapS, yeah.. it does.. its one of many reasons that we wanted zk managed separately for tests (ie. don't accidently reset a prod env)
<hazmat> hmm. more context.. yeah a bastion node sounds nice
<hazmat> be it just a zk on a random port or.. a container
<hazmat> isolation is good
<SpamapS> yeah it could be a container with just ZK actually
<SpamapS> anwyay, family time
<hazmat> SpamapS, machine-0 ;-) enjoy
<SpamapS> I'll try to submit the refactor as a MP tomorrow.. :)
<SpamapS> hazmat: everything is pushed for now
<hazmat> g'morning
<hazmat> bcsaller, the config-set-lifecycle review isn't in the kanban/associated to a bug report
<hazmat> fixed
 * hazmat runs out for a quick errand, bbiab
<joerg_herzinger> Hi everybody. I just read the two parts of the ensemble tutorial and I still don't get it. What exactely is ensemble? Is it some kind of configuration management and if so, then what makes it better than chef or puppet?
<joerg_herzinger> Or is ensemble just for deploying machines on amazon??
<m_3> joerg_herzinger: Hi, the channel's pretty quiet right now... big rally next week
<m_3> joerg_herzinger: I'm still just learning, but I can try to answer
<m_3> joerg_herzinger: the key eye-opener for me was to look at some examples of relation hooks
<joerg_herzinger> Yes, those relations somehow do something like dependencies do for packages.
<joerg_herzinger> But still this is a very very minimal part of what configuration management tools can do...
<m_3> joerg_herzinger: http://bazaar.launchpad.net/~ensemble-composers/principia/oneiric/wordpress/trunk/view/head:/hooks/db-relation-joined
<m_3> joerg_herzinger: ensemble is more about service configuration than machine configuration
<joerg_herzinger> yuck, but that script does everything manually... and it is python.
<m_3> joerg_herzinger: don't have to care about instances as much.. and only concentrate on services
<m_3> joerg_herzinger: that's actually a great aspect of ensemble... it's independent of implementation language
<m_3> joerg_herzinger: you specify the services you want deployed in your infrastructure
<joerg_herzinger> Ok, so if there is a service for wordpress I can use that one, if there is not I have to write one on my own in whatever language I want?
<m_3> joerg_herzinger: and configure the deps
<m_3> joerg_herzinger: the idea is similar to apt-get for the cloud, where there will be lots of formulas to use
<m_3> joerg_herzinger: that you can also fork and customize yourself if necessary
<m_3> joerg_herzinger: (again, I'm no expert yet)
<joerg_herzinger> Ok, so basically it is a reinvention of the wheel, because all of that can already be done in a much nicer way with chef.
<m_3> joerg_herzinger: it's fundamentally different than chef though
<joerg_herzinger> And you in chef and puppet your can use ruby instead of ugly python.
<m_3> joerg_herzinger: different experience when you sit down and use it
<joerg_herzinger> meaning better of worse?
<m_3> joerg_herzinger: really pulls you up away from the cloud and hardware and let's you focus on services within your infrastructure
<m_3> joerg_herzinger: it can even work with chef
<m_3> joerg_herzinger: different... chef's great at configuring individual machines
<joerg_herzinger> just like chef and puppet can work with ensemble... I still don't get what ensemble really can do better or different. I just see what it can't do...
<m_3> joerg_herzinger: but even opscode recognizes that things are moving towards a higher level of abstraction of the infrastructure
<joerg_herzinger> Oh, so ensemble scales up to several machines of the same type (same services...)
<m_3> joerg_herzinger: for one it's higher level... "services"
<m_3> joerg_herzinger: while at the same time it's tighter to the OS
<m_3> joerg_herzinger: ensemble can take advantage of dpkg
<m_3> joerg_herzinger: yes
<m_3> joerg_herzinger: it can deploy a whole cluster at once
<m_3> joerg_herzinger: it's really cool from that perspective
<m_3> joerg_herzinger: the key part of ensemble (again my opinion... still learning)
<m_3> joerg_herzinger: is the relation hooks
<m_3> joerg_herzinger: I deploy mysql service (won't talk about cluster in this example,but it handles that fine)
<joerg_herzinger> Ok, sorry, but I don't take the "higher level" part. It's a tool like many others and those "services" you mention are just services. They shouldn't be treated in any other way than files or packages.
<m_3> joerg_herzinger: then I deploy rails/drupal/wordpress...
<joerg_herzinger> And relations are such a simple thing that I just can't buy that as a big feature...
<m_3> joerg_herzinger: ensemble handles the events that associate those services
<m_3> joerg_herzinger: then I just tell ensemble to "add another rails node"
<joerg_herzinger> Just like I can tell knife (the chef tool) to add another rails node. So thats not a new and big feature...
<m_3> joerg_herzinger: and the way the ensemble events fire the relation hooks in the formula
<m_3> joerg_herzinger: makes it happen out to scale
<m_3> joerg_herzinger: yes, that can accomplish the same thing
<m_3> joerg_herzinger: but the way you configure the relation is different
<joerg_herzinger> Ok, sorry. Have to run now. I will definitely read more about ensemble, maybe there is something I missed all the time, but for now it really looks like ensemble is not made for me.
<m_3> joerg_herzinger: I think the relation_changed hook gives great flexibility to how you deploy the service
<m_3> joerg_herzinger: ok... later man
<robbiew> m_3: good work man....can't convert them all anyway :P
<robbiew> m_3: we need for screencasts...maybe something you and kim0 can work on next week
<m_3> robbiew: yup... setting up blog stuff now
<robbiew> nice
<hazmat>   ugly python
<hazmat> quality feedback
<m_3> robbiew: I'll talk to kim0 about more screencasts too...
<m_3> hazmat: yeah... I'll change the rails formula over from bash to ruby too
<hazmat> m_3, yeah.. for linking to an example formula the wordpress formula in the ensemble source tree is bashified
<robbiew> hazmat: heh
<m_3> guys fix anything I said that was wrong please
<m_3> hazmat: and it'll be prettier once we have more principia tools and templating stuff
<m_3> it's still young... I gotta remember to mention that too
<robbiew> don't sweat it too much
<robbiew> it's FOSS...so some folks are religiously tied to their tools :P
<m_3> robbiew: yup
<m_3> debug-hooks are a huge feature over chef too
<hazmat> and debug log
<hazmat> m_3, so going through it, the only additions i'd make.. are relations are more than simple dependency management, they also model a private bi-directional communication channels between services for configuration
<m_3> hazmat: thanks
<hazmat> m_3, m_3, imo its sometimes helpful to let people compare the equivalent of doing something in chef vs. ensemble.. if there already inquring about the differences, i think its pretty clear that the ensemble version is significantly simpler..  and the other big thing we do because we have a  higher level way of talking about services, is that we encapsulate real reuse to a much better extent than any of the existing solutions.
<hazmat> imo
<m_3> hazmat: what's a good way to say that the relations are dynamic during entire lifecycle? i.e., not just at deployment
<m_3> hazmat: service mgmt, not just service config?  "live" service config?
<hazmat> m_3, i think the example of adding another unit of wordpress/mediawiki some app, and then explaining how it is automatically configured with the db, and the memcache, and the front-end proxy is helpful in that regard..
<m_3> chef search has service discovery, but this is a little different
<m_3> hazmat: oh, right... that shows it can happen at any point in lifecycle
<_mup_> txzookeeper/session-event-handling r51 committed by kapil.foss@gmail.com
<_mup_> unrecoverable is a client property not method.
<hazmat> bcsaller, if you have a chance, please have a look at the review queue today.. with niemeyer out this week, we're getting a backlog to get to 2 reviews per branch
<bcsaller> I'll look, yeah
<hazmat> bcsaller, i think your config-set-lifecycle branched missed the review queue cause it wasn't attached to a bug.. i'm having a look at it now.. where you able to resolve the test failures?
<bcsaller> hazmat: not specifically 
<hazmat> bcsaller, is there anything else needed for the service-config stuff to land?
<bcsaller> hazmat: there are things that can come after, like support in deploy but thats the core feature set
<hazmat> bcsaller, great
<bcsaller> I didn't realize you were not seeing it 
<bcsaller> in the queue
<hazmat> bcsaller, aha.. i found it!
<hazmat> bcsaller, a missing yield
<bcsaller> wow
<bcsaller> thats awesome
<bcsaller> I looked at it for a long time...
<hazmat> test_scheduler setUp needs a yield on add_service_from_formula
<hazmat> bcsaller, yeah.. a missing yield sucks
<SpamapS> hazmat: so the branch now spawns its own ZK
<SpamapS> hazmat: which means bootstrap/shutdown leaves the system, more or less, as it was (though I leave logs around for analysis)
<SpamapS> hazmat: working on getting it to pass the full test suite now.. I broke some stuff for EC2.. ;)
<hazmat> SpamapS, how does it resolve the zk it setup? just a state file in ~/.ensemble ?
<SpamapS> and next week I'll work with hallyn on making spawning a container faster w/ lxc-clone
<hazmat> SpamapS, awesome!
<SpamapS> hazmat: I'm cheating by assuming 192.168.122.1 is me...
<SpamapS> hazmat: but I intend to make that configurable at some point
<hallyn> SpamapS: lxc-clone is accepted upstream now.  lightning-fast.
<hallyn> (with lvm)
<hazmat> the zk server logs aren't particularly useful.. imo.. they tend to be pretty verbose, i honestly think sending them to dev/null is just as useful ;-)
<hazmat> getting stack traces from normal usage in the logs is annoying
<SpamapS> hallyn: so the way I'm thinking I'll do it is bootstrap will be the only thing that calls lxc-create .. it will create and boot the source node, let it do its thing, then shut it down. After that we'll just lxc-clone it.
<SpamapS> hazmat: darn java programmers ;)
<hallyn> SpamapS: sounds good
<niemeyer> Hey all!
<hallyn> SpamapS: note, as it stands, once you lxc-create a natty container, it wont' debootstrap it again
<hallyn> SpamapS: it just rsyncs it from /var/cache/lxc/natty-amd6
<hallyn> 4
<hallyn> niemeyer: hey
<hallyn> SpamapS: but i'm 2 steps away from having it working with cgroups-bin, stop distracting me :)
<niemeyer> On my way to Dublin ATM
<SpamapS> hallyn: I want to do all the cloud-init stuff too, then freeze that
<hallyn> turns out existing code was mistakenly calling the filename 'subsystem'.  so like a trusting idiot i used it as subysstem
<hallyn> SpamapS: yeah, it'd be nice to get that done so smoser would quit his whining
<SpamapS> niemeyer: I've been hacking away this week.. we have an LXC provider to play with next week.  :-D
<hallyn> niemeyer: have a good flight!
<niemeyer> hazmat: Was just checking that branch about FORMULA_DIR on the way to the airport, and am curious.. why did you choose to change the idea of running the formula under formula dir and instead providing an explicit variable?
<niemeyer> SpamapS: Wow!
<niemeyer> SpamapS: Sweet!
<niemeyer> SpamapS: Looking forward to checking it out!
<SpamapS> niemeyer: its still mostly chewing gum and duct tape.. but its functional. :)
<niemeyer> SpamapS: A spike, that's still awesome for learning and getting an idea of the issues we'll face
<robbiew> niemeyer: this is your mule. STOP. received 1 of 2 deliveries.STOP.will notify if/when 2nd delivery arrives. STOP
<robbiew> lol
 * SpamapS wonders if robbiew will get the carrot or the stick
<hazmat> niemeyer, hola, welcome back.. it does both
<hazmat> niemeyer, it executes the formula in the unit directory and sets the FORMULA_DIR environment variable
<niemeyer> robbiew: Haha
<hazmat> s/executes the hook
<niemeyer> hazmat: Why not executing it in the formula directory?
<niemeyer> hazmat: As we originally planned?
<niemeyer> hazmat: This would kill the need for the env variable, and is probably the most comfortable
<hazmat> niemeyer, its operating on the context of the unit, putting in the root of that context made sense to me.. the formula dir is at a defined subdir and accessible via the env
<niemeyer> hazmat: Since data files, etc, will always be sitting within that directory
<niemeyer> robbiew: The second one is supposed to arrive today, btw :-)
<hazmat> i still like the idea of the env variable it makes things like library path manipulation easier, i'd prefer it over CWD just for having a static reference to it
<SpamapS> I like CWD .. the env variable can be saved off as the first thing in a hook that needs it..  FORMULA_DIR=$PWD
<niemeyer> hazmat: My feeling is that the formula directory is a much more important reference point to the author than the unit directory
<niemeyer> hazmat: "My stuff is here"
<robbiew> niemeyer: roger that
<hazmat> niemeyer, its easy enough to change, my thought was  the formula is just a static def, ie. i consider it a read only dir. The hook's purpose is to manipulate the unit context, so it made sense to me have it execute there
<hazmat> i'll switch it out to the formula dir, and drop the env variable
<niemeyer> hazmat: The formula manipulates / in general, right?
<hazmat> niemeyer, yeah.. its typically using absolute path to fs locations
<hazmat> SpamapS, my only concern about $PWD is that its mutable.. so if a formula changes locations and needs to reference its dir, its lost.
<hazmat> s/formula/hook
<niemeyer> hazmat: Well, that's an issue no matter what
<SpamapS> hazmat: Yeah, I think that its ok to suggest to a formula author that if they need to know where formulas are, they should be saving that off early... but I do see the utility in having it always known..
<niemeyer> hazmat, SpamapS: Yeah, I guess it'd make utilities that depend on the formula location easier to write
<niemeyer> hazmat, SpamapS: We can do both! :-)
<niemeyer> robbiew: It's Out for Delivery already.. should be there any time
<robbiew> niemeyer: cool...UPS?
<niemeyer> robbiew: Yeah
<robbiew> okay..they typically come in the late afternoon...just don't want to miss it ;)
<hazmat> out of curiosity anyway know a way to extract a cd from a new thinkpad drive (i'd like to save it for a windows vm) before installing ubuntu across the entire drive?
<niemeyer> robbiew: Yeah, it actually says "Scheduled Delivery: ... By End Of Day"
<niemeyer> robbiew: Besides Out For Delivery
<niemeyer> hazmat: Press that gray button in the middle of the drive
 * niemeyer runs
<hazmat> niemeyer, it looks like a red button
 * hazmat likes red buttons
<niemeyer> hazmat: More seriously, when I actually cared about saving Windows, there was a utility to do this IIRC
<niemeyer> hazmat: I did that in the previous thinkpad
<niemeyer> hazmat: It generates the restoration CDs by itself
<hazmat> hmmm.. yeah.. might be a little more problematic on devices lacking a cd writer (x220)..
<hazmat> niemeyer, cool found it, thanks, not sure its going to work over the network though.. i guess i could extact the drive drop it an enclosure and dd the sectors as an alternative.
<niemeyer> hazmat: Hmm, yeah, that might be trickier
<niemeyer> Alright, I better get going
<niemeyer> Heading to SÃ£o Paulo soon
<SpamapS> niemeyer: have nice flights. :)
<hazmat> niemeyer, have fun
<SpamapS> hazmat: so.. I'm writing tests for the lxc provider.. I notice the order of the tests is alphabetic. Should I be doing a bootstrap/shutdown each time I need to test something that requires a bootstrapped environment?
<SpamapS> hazmat: or does setup/teardown get called before/after each test?
<hazmat> niemeyer, yes
<hazmat> SpamapS, the setup/teardown is per test
<SpamapS> hazmat: I suppose it should work fine as long as the machine ids are unique for each test
<hazmat> SpamapS, the alphabetic ordering is just the default output of the test runner, the actual test definitions are whatever grouping makes sense
<SpamapS> hazmat: but then I need to have a final "ok shut everything down" after all tests..
<hazmat> SpamapS, hmm. trial doesn't support layers.. i did something sort of akin to it for the zookeeper client session tests where i setup a zk cluster
<hazmat> SpamapS, basically using the atexit module to register a cleanup handler
<SpamapS> hazmat: yeah I need a per-suite setup/teardown
<SpamapS> Or, I don't mind just shutting down each test
<hazmat> the atexit usage here might be helpful if you want to do the atexit thing... http://bazaar.launchpad.net/~hazmat/txzookeeper/session-event-handling/view/head:/txzookeeper/tests/test_session.py
<SpamapS> hazmat: seems to be working fine.. tho the lag that zookeeper has between opening its listen port and responding does make the tests a little slower
<SpamapS> also because we're running 'ensemble-admin' every time it craps all over the output. I should probably redirect that log elsewhere anyway
<niemeyer> False alarm.. flight is delayed :(
<SpamapS> hazmat: realistically, we should have a single test suite that runs through all providers generically
<SpamapS> hmm.. maybe I should make LXC mockable.. that would be more interesting and easier to unit test
<hazmat> SpamapS, that might work better, since setting up lxc environment with networking does involve some host changes, but you have to be pretty sure of the mock'd response... it would be nice to toss in a few functional tests into ftests for lxc
<SpamapS> I will definitely do that too
<hazmat> and the document the host setup for them in the module header
<hazmat> s/the/then
<SpamapS> Yeah, I was planning to do more documenting of "how to play with this" today, but I want tests first.
<jimbaker> at the denver airport, waiting for my flight to chicago and then on to dublin
<SpamapS> jimbaker: what time do you arrive tomorrow?
<SpamapS> must be early
<SpamapS> jimbaker: I get in at 10:40pm ... save some jamesons for me. ;)
<jimbaker> SpamapS, 8:25a on aer lingus 
<SpamapS> Ugh.. I just realized I have a 7 hour layover in Frankfurt. At least I know where the lounge is.
<jimbaker> SpamapS, don't worry, i'm just interested in the beer :)
<jimbaker> not a whisky drinker
<SpamapS> I'm quite fond of Jamesons .. looking forward to maybe trying some of the lesser known brands.
<jimbaker> time to go to the gate!
<SpamapS> jimbaker: happy flying!
<jimbaker> SpamapS, should be good, just trying out my new LTE modem right now. i won't bother with the red carpet club wifi next time in denver, for sure
<jimbaker> (on plane)
<SpamapS> jimbaker: hah cool!
<SpamapS> jimbaker: I use my iphone 4's bluetooth or wifi tether. Works great. :)
<jimbaker> fwiw, the little samsung 4G LTE wireless router seems to be a good choice
<SpamapS> LTE would be nicer tho
<jimbaker> SpamapS, my old droid started malfunctioning in budapest, so i'm now using a prepaid phone + LTE router
<jimbaker> i figured i rather just get various wifi devices, to be financed in my part by the savings on my monthly telecommunication costs.
<jimbaker> anyway, the combination of old and new is pretty funny :)
<jimbaker> door is shut. bye!
 * SpamapS scratches his head as he tries to figure out mocker
<hazmat> SpamapS, the mocker docs are worth a gander, and lots of examples in the code base.. i'd avoid looking at the ec2 provider mocks.. their a bit more extensive than what you'll probably be need.
<hazmat> SpamapS, but basically mocker records unordered events against objects and then when put into replay mode, will patch/replace the original objects and expect the same set of events (in the form of method signatures and return values) to be utilized.
<SpamapS> Yeah I'm figuring it out
<daker> is ensemble supporting postgres ?
<hazmat> daker, not atm
<daker> :/
<SpamapS> daker: you can write a postgres formula. :)
<daker> ok
<daker> i am going to be crazy with preseed :/
<SpamapS> Hrm..
<SpamapS> hazmat: so I am trying to mock an object that gets called with an unpredictable temporary file name...
<hazmat> SpamapS, use a MATCH function
<SpamapS> ahh... MATCH . right
<SpamapS> just pgdn'd and saw those special bits
<hazmat> SpamapS, from ensemble.lib.mocker import MATCH.. you pass it a function that takes the parameter in question, if it returns true, its a successful match
<hazmat> and then you pass the MATCH(function) in the mock call
<SpamapS> Ok I'm getting it.. works well.. cool
<SpamapS> Ok.. my tests don't pass, but I'm on my way to making them pass. :-D
<SpamapS> hazmat: lp:~clint-fewbar/ensemble/lxc-container ... I put in some functional tests for LXC too
<hazmat> SpamapS, awesome, i had a look yesterday at the branch, looks good. i'm guessing you and the folks in dublin will play around with it next week. 
<SpamapS> hazmat: not coming? :(
<hazmat> SpamapS, yeah.. sadly not.. my son is in town starting on monday.. the guiness brewery will still be there next time
<SpamapS> hazmat: indeed, well enjoy the week.. you will be missed!
 * SpamapS heads off to pack and jump on plane
<m_3> SpamapS: have a great flight
#ubuntu-ensemble 2011-06-25
 * pindonga is away: Away
 * pindonga is back (gone 00:43:16)
<SpamapS> jamespage!
<jamespage> evening SpamapS
<SpamapS> just about to hop from FRA to DUB
<SpamapS> should I be surprised that nearly 25% of the passengers of this flight seem to be kids?
#ubuntu-ensemble 2011-06-26
<_mup_> Bug #802117 was filed: ensemble ssh command should use a different known_hosts file <Ensemble:New> < https://launchpad.net/bugs/802117 >
