/srv/irclogs.ubuntu.com/2012/07/05/#juju.txt

m_3mornin00:24
sep332hello, I was just wondering if there is a way to deploy a Diaspora server using Juju?03:26
hazmatSpamapS, even with format2?03:41
hazmatsep332, there doesn't appear to be a charm for it, only owncloud03:41
hazmatsep332, contributions welcome.. https://juju.ubuntu.com/docs/charm-store.html03:42
sep332of course :) I was wondering if there was a project underway, thank you03:42
imbrandonSpamapS: its the novel way in how it handles the sub commands, i did it POC in ruby a) cuz thats what i knew well enough to pump it out in less than an hour and b) it wasnt php so there was a chance on it to be taken serious and c) python argparse can lick my ...04:32
imbrandonbut language aside its the idea that i'm trying to convey more than anything , and the way i explain things i figured this time it was best said with code :)04:33
imbrandonit could be redone in python , c++, vb6 , i dont care :)04:33
SpamapSimbrandon: heh true :)06:38
* SpamapS gets back to fighting with nrpe, nagios, and *06:49
SpamapShazmat: yes even w/ format 2, config-get on a defaulted "" gives back ''06:52
SpamapShazmat: which I suspect is just format_json doing its job as directed06:52
SpamapShazmat: what I really want is *RAW*06:52
SpamapSnot smart, and not json06:52
SpamapSgive me the raw bytes06:52
SpamapShrm.. seems like there is a bug in relation-ids when used w/ subordinates07:06
lifelessSpamapS: oh noes07:32
=== zyga is now known as zyga-afk
=== daker__ is now known as daker_
matsubaraHello there, I'm writing a charm that needs to install a new kernel so I can load the kvm module. if I install the new kernel, reboot, how can I resume the install hook from where it left?10:25
=== daker__ is now known as daker_
hazmatSpamapS, format2 is yaml, and an empty string is an empty string10:38
=== matsubara is now known as matsubara-afk
hazmatSpamapS, re relation-ids w/ subordinates, could you describe the issue, i don't see a  bug re.10:50
=== zyga-afk is now known as zyga
jcastrojamespage: heya14:26
jcastrojamespage: did you have a chance to look at the ubuntu charm?14:26
* jcastro has a plan to demo it14:26
=== zyga is now known as zyga-afk
=== zyga-afk is now known as zyga
=== salgado is now known as salgado-lunch
jcastroxnox: hazmat: hey so any luck testing the openstack provider?15:31
xnoxjcastro: quantal mirrors on hpcloud were up today. will test tonight.15:32
hazmatjcastro, on vacation today.. doing meetings though15:33
jcastrooh nice, is that what imbrandon set up?15:33
jcastrohazmat: ok I'll catch you on the flip side15:33
xnoxyes15:34
SpamapShazmat: I'm still diagnosing the subordinate issue.15:49
SpamapSmatsubara-afk: you can't resume the install hook, but you can set everything up to resume the process on reboot with an upstart job15:49
SpamapSmatsubara-afk: juju and the agents will also keep track of what has completed, so its possile if you do a 'reboot' without exitting the install hook that on reboot the agent will re-run install.15:50
SpamapSmatsubara-afk: one guarantee we have is that config-changed will run whenever the agent is started up, so you can also put your resume logic in there15:51
negronjl'morning all15:56
SpamapSnegronjl: buenos dias15:56
jimbakernegronjl, morning15:56
negronjlSpamapS: hola15:56
negronjljimbaker: 'morning15:56
=== matsubara-afk is now known as matsubara
matsubarathanks SpamapS15:57
SpamapShazmat: # config-get monitors  │································16:06
SpamapS''  err16:06
SpamapSlets try that again16:06
SpamapS# config-get monitors16:06
SpamapS''16:06
SpamapSjimbaker: ^^ so even individual values are json encoded I assume?16:06
SpamapSactually no looks like smart still16:07
matsubaraSpamapS, do you know of a charm that does the resume with an upstart job as an example?16:07
SpamapSmatsubara: no, reboots are a recent addition16:07
matsubaraSpamapS, do I need to run a special juju command to reboot? or just reboot the machine and juju will do the right thing?16:08
SpamapSwell, 4 or 5 months ago, but still, recent enough that its a new thing to play with16:08
SpamapSno16:08
SpamapSjust reboot16:08
SpamapSmatsubara: juju installs upstart jobs for the machine and unit agents16:08
matsubaraSpamapS, what's the difference between juju-machine-agent.conf and juju-maas-nodes-0.conf in /etc/init/? (maas-nodes-0 is the name of this charm btw)16:11
SpamapSmatsubara: one runs the machine agent, the other runs a unit agent16:12
jimbakerSpamapS, in charm format 1, json encoding is used at some point. in a roundabout way, this accounts for why smart formatting renders strings as unicode16:12
matsubaraSpamapS, what the machine agent does and what the unit agent does? (sorry, if this is explained in the docs, I can read there)16:14
jamespagejcastro, yep - but it appears to be a store issue16:16
jcastroah ok16:16
SpamapSmatsubara: machine agent spawns/removes unit agents and units (units are instantiations of charms)16:16
jamespagejcastro: james_w and niemeyer discussed it after my initial query yesterday16:16
SpamapSjimbaker: I don't know what that means..16:16
jamespageI think a change is proposed which should fix it16:17
jamespagebut I've lost my backscroll....16:17
matsubaraSpamapS, I see. thanks!16:17
SpamapSjimbaker: what I see is '' where I would expect nothing16:17
jcastrojamespage: oh ok, so it's on the right radars then16:17
SpamapSjimbaker: its particularly problematic in shell scripts16:17
jimbakerSpamapS, understood. yaml can properly account for an empty value (= None in Python), but the question is whether this is readily produced by code using relation-set/relation-get16:22
jimbakervs an empty string which can also be kept as a distinct value16:23
jimbakerfwiw, the output was intentionally made as friendly to shell scripts as possible, using the variety of acceptable yaml formats16:24
jimbakerSpamapS, i guess one possible problem here is that relation-set foo= implies that foo should be deleted; so if you want store an empty string, you would say something like relation-set foo='', which then keeps this as an empty string, reporting back ''. i guess we could tweak it such that it returns nothing in this case, at the cost of losing roundtripping on this value16:32
SpamapSjimbaker: yaml is totally unacceptable to shell, so I'm not sure how that computes..16:37
jimbakerSpamapS, i think it sounds like format: 2 has a big problem16:38
SpamapSjimbaker: for shell, I want a string of bytes every time with strings. The only time yaml/json/fooo matters is boolean.16:38
jimbakeras i have implemented it, since it does use yaml, pervasiviely16:38
jimbakerSpamapS, do you want relation settings to interpret booleans?16:39
SpamapSjimbaker: sometimes it will be ok. Many times it will not. :-/16:39
SpamapSjimbaker: no, but this is config settings16:39
jimbakerSpamapS, also, when you say a string of bytes, i assume you mean to keep it as such. so no unicode interpretation. feed bytes in any format (say utf-8, high bytes, whatever), get back as the exact string of bytes16:40
SpamapSjimbaker: just think of how hard it will be to use in shell..  echo "Title='$(confi-get title)'" is pretty common. Now that will be ''thetitle''16:41
SpamapSjimbaker: *yes*16:41
SpamapSwhy the heck would juju try to interpret the bytes?!16:41
SpamapSdon't confuse "string" with "str"16:42
jimbakerSpamapS, my apologies16:42
SpamapSno apology necessary16:44
SpamapSI'm just surprised this never came up during any review16:45
SpamapSlike, did anybody actually try format 2?16:45
jimbakerSpamapS, i did, and i did bear in mind the formatting aspects of shell (hence the format tweaking). in my usage, it seemed fine. but that does not change the fact that it does not work for you16:49
=== salgado-lunch is now known as salgado
jimbakerSpamapS, fwiw, there is an extensive discussion of how it is supposed to work in the merge proposal, https://code.launchpad.net/~jimbaker/juju/charm-format-2/+merge/10883116:50
jimbakerSpamapS, in any event, it should be straightforward to change the format, given the refactoring that was done, to mean use bytes when working with relation settings. this can also be tweaked to provide for special interpretation of true/false if that's desired16:54
SpamapSjimbaker: you guys said way too much for me to find where you all thought it was a good idea to output all strings wrapped in ''17:02
SpamapS+ self.assert_smart_output("", "''\n")17:03
SpamapSI see that it is intentional17:03
jimbakerSpamapS, yes, it does ensure roundtripping of empty strings17:04
SpamapSis it only empty?17:05
SpamapSI haven't actually tried any full strings17:06
jimbakerSpamapS, so a couple of options i see:  1) we could specifically work around that, so empty strings are always ouput as nothing at all; 2) change it to bytestrings17:06
SpamapScan dial my surprise down a lot if its only empties17:06
jimbakerSpamapS, yaml tries to avoid quotes on strings if possible17:06
SpamapSjimbaker: I think I'll just argue for format 3 to have raw byte strings, which is what it should have always been17:06
SpamapSor at least, we need an explicit way to say "don't touch this"17:07
jimbakerSpamapS, i don't think we have to support format 3 if it makes more sense to just use bytestrings17:07
SpamapSI'd also like for relation-set and 'juju set' to be able to take input from stdin17:07
SpamapSjimbaker: no this is bigger than a single issue17:07
SpamapSI've wanted to insert a binary file a few times now17:08
jimbakerjuju set is different, because it does interpret its input17:08
SpamapSx="$(cat foo)" is not the way to do that.17:08
jimbakerSpamapS, well if you do use !!binary, you can feed in a b64 encoded string17:09
SpamapSjimbaker: which I already do. ;)17:10
SpamapSjimbaker: but then on the -get side I have to use yaml again to decode it17:10
SpamapSand then we run into shell fail again17:10
SpamapSjimbaker: I think it makes a ton of sense to use yaml. It just doesn't make any sense to leave the shell without any help parsing it17:11
jimbakerSpamapS, do try it with nonempty strings, to see if that really works or not for your case. if not, we can change to bytestrings and forget yaml for relation-set/relation-get17:12
SpamapSjimbaker: Ok so non empties works. BUT the bigger issue is that it is very non-obvious how juju is interpreting things when I would expect that strings would always just be raw strings. This is something to think about long term.17:20
jimbakerSpamapS, so it sounds like we should at least change the output of empty strings to nothing, as we discussed17:23
SpamapSno17:24
SpamapSspecial casing makes it workse17:24
SpamapSworse17:24
SpamapSjimbaker: this is a deeper issue17:24
SpamapSjimbaker: the fact that relation-set monitors="$(cat monitors.yaml)" does not result in   monitors: "...the content of the yaml file" is a deep and troubling problem17:25
jimbakerSpamapS, then i suggest changing to bytestrings in format: 2 for relation-get/set. config settings should be kept in yaml however17:25
jimbakersince they do have a type interpretation17:25
SpamapSjimbaker: but17:26
SpamapSjimbaker: the type is *string*17:26
SpamapSso, can I expect a string with all the yaml in it?17:26
* SpamapS has not tried it yet17:26
jimbakerof course there is relation-get - to consider17:26
jimbakerbut that could imply yaml output17:27
SpamapSit does imply yaml17:28
SpamapSbut the values must be the strings that were set17:28
jimbakerSpamapS, since we know the types for config values, we could take this into account17:28
jimbakerso use yaml to parse except for string types, which implies bytestrings17:29
SpamapSno except17:29
SpamapSmeh17:30
SpamapSjimbaker: forget I said anything. I'll deal. I don't have the mental capacity to debate these subtleties17:30
jimbakerSpamapS, let's just put it on hold then. your points, especially with respect to reasonable usage like relation-set monitors="$(cat monitors.yaml)" are valid. however, i certainly agree about the subtlety17:32
jcastrojamespage: m_3 hey check this out: http://whirr.apache.org/docs/0.7.1/quick-start-guide.html17:33
jcastroit's like basically juju for hadoop17:33
jimbakerSpamapS, i have just updated this merge proposal to be more robust, but it remains quite useful: it adds help to jitsu. https://code.launchpad.net/~jimbaker/juju-jitsu/subcommand-help/+merge/11163417:37
* avoine just got juju to bootstrap on HP cloud with the openstack branch17:40
SpamapSavoine: woot!17:41
avoinereally cool indeed17:41
avoineusing the latest userpass auth-mode17:42
SpamapSavoine: when I tried it destroy-environment failed17:44
SpamapSavoine: and machine 0 didn't have metadata17:44
avoineyour right, destroy-environment is not working17:45
avoineI think I have the metadata17:47
avoinewell there is something in /var/lib/cloud/instances/i-00010533/user-data.txt17:47
SpamapSno i mean in juju status17:51
avoineok17:52
avoineyeah same here17:52
jcastrohttps://juju.ubuntu.com/docs/getting-started.html18:13
jcastrohey should we recommend installing cgroups-lite for LXC?18:13
jcastroit was my understanding that yes, we should18:13
SpamapSdoesn't lxc recommend it already?18:13
jcastroah yes, correct, that answers my question, ta18:14
jcastro<---- reshuffling getting-started.rst18:14
SpamapScool18:15
SpamapSbcsaller: hey, do subordinates not watch their relation settings like regular unit agents? I do relation-sets in later hooks using -r and they are never propagated to subordinates18:16
bcsallerSpamapS: they should18:19
SpamapShttp://paste.ubuntu.com/1076855/18:19
SpamapSThats on the mysql side.. setting it in upgrade-charm18:19
SpamapShttp://paste.ubuntu.com/1076860/18:21
SpamapSbcsaller: and thats the unit agent that is connected on the other side. sees the change, but does not run changed hook18:21
bcsallerSpamapS: I can look into it but I was pretty sure those code paths were tested18:22
bcsallerthanks for letting me know18:22
=== zyga is now known as zyga-afk
SpamapSbcsaller: Its a corner case, don't spend much time on it18:23
RichardRaseleySo, I am interested in setting up an OpenStack environment using JuJu and MaaS (as outlined here https://help.ubuntu.com/community/UbuntuCloudInfrastructure), but I only have 5 nodes to work with. Is it possible for me to co-locate some of the services but still use juju to do the deployment? Like if I wanted 1x for mass / juju 1x mysql, rabbitmq, keystone, horizon, and 3x nova nodes...19:37
=== Guest54097 is now known as dpb__
=== dpb__ is now known as dpb___
jamespagejcastro, kinda19:39
jcastrojamespage: hey so I think there might be a problem with the etherpad-lite charm19:46
jcastroand the best I can figure out is "some kind of npm error"19:46
jamespagejcastro, marvellous19:46
jamespagejcastro, I'll take a look tomorrow19:47
jcastrohttp://pastebin.ubuntu.com/1076998/19:47
jamespagejcastro, the nodejs PPA has upgraded from 0.6.x to 0.8.x and etherpad does not like it19:57
jamespagejcastro, whats in the archive will probably work - I'll test tomorrow19:59
SpamapSjamespage: the distro caught up with nodejs last cycle btw19:59
jamespageSpamapS, yeah - I know - well at least for about 1month anyway19:59
jcastroheh19:59
jcastroSpamapS: I was waiting for your "archive rocks, told you this would happen."20:00
* SpamapS bows20:00
SpamapSone is glad to be of service20:00
jamespageSpamapS, npm landed pretty late didn't it20:01
jamespageI think thats why the charm still uses the PPA TBH20:01
jcastroI'll test with the archive version and if it works submit a branch20:01
jcastroI need to get better at workflow with charms anyway20:01
jamespagejcastro, thanks - that would be really great20:01
jamespageI'll review it tomorrow20:01
jamespageassuming its working OK :-)20:02
jcastroheh20:02
jcastrosame errors switching to node in the distro20:11
=== salgado is now known as salgado-afk
=== matsubara is now known as matsubara-afk
=== zyga_ is now known as zyga
jamespagejcastro, odd21:44
imbrandonmmm ferrari fxx22:00
* imbrandon want22:00
jimbakerhazmat, i just proposed a branch that reuses security groups (and does not attempt to delete the machine security groups)22:21
jimbakerhazmat, seems to work well in actual usage against ec2 too22:22
hazmatSpamapS, i think some of your output concerns might be addressed by https://code.launchpad.net/~bcsaller/juju/sane_output_test_option/+merge/10606722:28
hazmatjimbaker, sweet!22:28
jimbakerhazmat, it certainly makes for a better experience22:30
SpamapShazmat: hopefully. I think the issues are subtle.. but will bite us22:33
m_3mornin gang22:49
imbrandonheya m_322:49
SpamapSalright, juju precise SRU going to precise-updates!23:00
SpamapS*finally*23:00
m_3whoohoo!23:11
sigmonsays_Hello23:49
imbrandonHello23:49
sigmonsays_This is quite the long shot but I am curious about seeing gozk (go zookeeper) implementation. From my understanding, some pieces of juju were rewritten in Go to take advantage of talking to zookeeper using go. I was wondering what such implementation might look like23:50
imbrandonsigmonsays_: niemeyer wrote that ( gozk ) iirc, might be the best to ask23:52
sigmonsays_thanks imbrandon23:54
m_3sigmonsays_: https://launchpad.net/gozk it's all in the open23:54

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