/srv/irclogs.ubuntu.com/2011/12/08/#juju.txt

SpamapSEh, but I have a variable with raw bytes from a file.00:00
SpamapSand I want to print them out00:00
niemeyerSpamapS: foo.decode("utf-8"), for instance00:00
SpamapSactually.. I think for this..00:00
niemeyerSpamapS: Which yields unicode00:00
SpamapSconfig-get and relation-get need to have a --format=raw ..00:00
niemeyerOr rather, the Python notion of unicode00:00
SpamapSbecause right now we're tacking on a \n00:00
niemeyerSpamapS: Yeah, possibly00:01
SpamapSOk, well at the moment, high-byte chars in config/relation settings will likely cause a stacktrace00:01
* SpamapS tries it00:01
SpamapSactually no .. hm00:03
SpamapSjson format encodes it in proper json notation00:04
SpamapS config-get --format=json disable-large-pages00:04
SpamapS"\u5b50"00:04
kees子 made me look00:07
SpamapShahaha00:07
SpamapSThought about going with a 3 byte char but thats just not playing fair ;)00:08
SpamapSok so unicode does cause an error.. but config-get and relation-get just silently swallow it00:08
SpamapSor rather.. high byte chars00:09
_mup_Bug #901494 was filed: config-get and relation-get silently drop values with high-byte characters <juju:New> < https://launchpad.net/bugs/901494 >00:30
_mup_Bug #901495 was filed: config-get and relation-get silently drop values with high-byte characters <juju:Triaged> < https://launchpad.net/bugs/901495 >00:42
* SpamapS continues his bug triage RAMPAGE01:12
hazmat elmo its on the wishlist01:35
elmohazmat: not having a go at you, but FWIW if I didn't work in Canonical, I can't imagine using juju in a production environment without that bug being fixed01:36
hazmatelmo, part of the issue with bothering with the acls, is that there isn't any transport level security01:37
hazmatelmo, but fair enough... does puppet or chef have any notion of multi-user?01:37
hazmatgranted at the level of acl granularity without transport level security, its just about consistency from compromised nodes,01:38
hazmatwhich a ca will give you..01:39
* hazmat wonders about keystone01:39
SpamapShazmat: puppet and chef do have to at least verify each node individually before they're allowed to do things like export configs or shot data into data bags.02:02
SpamapSs/shot/shove/02:02
SpamapS$ killall java02:04
SpamapSso true02:04
=== jrgifford is now known as Guest26880
osahi folks, can you please explain how i can change a "unit" status from stop to start using juju?02:40
SpamapSdoh03:36
smoserSpamapS, i'm maingly walking through http://askubuntu.com/questions/65359/how-do-i-configure-juju-for-local-usage03:47
smosertrying to get localdev . oneiric host, i pulled juju from bzr.03:48
smoserafter 'juju bootstra', i got03:48
smoserSSH authorized/public key not found.03:49
smoser2011-12-08 03:44:11,349 ERROR SSH authorized/public key not found.03:49
smoserthen made myself a key (ssh-keygen)03:49
smosernow juju status shows03:50
smoserhttp://paste.ubuntu.com/763416/03:50
SpamapSsmoser: there are a bunch of logs in weird places you can check05:35
smoseri destroyed and started over and fine.05:36
SpamapSsmoser: but ultimately, I think your main machine is not started05:36
smoserprobably a bug though if you dont have .ssh/id_rsa05:36
SpamapSsmoser: have you tried a destroy-environment and bootstrap again?05:36
smoseryeah, and that worked.05:36
smoserwe can poke at a later date.05:36
smoserheres the initial stab i made at juju local provider -> openstack05:37
smoserhttp://paste.ubuntu.com/763456/05:37
smoser(unsuccessful atm)05:37
SpamapSsmoser: I like the way the config file pans out... one big yaml for the whole thing05:49
smoserthats all adam_g05:49
smoserdo we know what that internal error network issue is about ?05:50
smoserthat forces a reboot?05:50
SpamapSthe pty thing?05:50
SpamapSI think it must be an lxc bug05:52
SpamapSif you're talking about how ssh starts to fail on the containers05:52
smosernot pty, SpamapS05:56
smoserlibvirt network issue on 'juju bootstrap'05:57
smoserwas reproducible 2/2 for me on oneiric instance in canonistack.05:57
SpamapSOH06:07
SpamapSThat I don't know06:07
SpamapSsmoser: the wya virsh is used is kind of weird..06:07
SpamapSway even06:07
smoseri thought so too06:08
SpamapSI believe its done that way so that juju can just sudo out for those few things06:08
SpamapSbut.. seems like juju could just fork and sudo exec itself..then use libvirt.06:08
smosernah, its not that.06:09
SpamapSor leave the network alone06:09
smosernot just the groups.06:09
smosersomething else i think.06:09
SpamapSmy old crappy lxc provider just let libvirt's default network do the dirty work06:09
SpamapSsmoser: is a bug filed about the network problems?06:12
SpamapSsmoser: IIRC there was one that involved non-english locales that was fixed right after 11.10 released06:12
* SpamapS should just go through the 29 commits since 11.10 and cherry pick the bug fixes into an SRU06:13
smoserdont know if ther eis a bug06:13
smoserit is documented at http://askubuntu.com/questions/65359/how-do-i-configure-juju-for-local-usage06:13
SpamapSsmoser: documented pretty scantily06:14
smosergoogle "juju local"06:14
smoserthats what you come up with06:14
smoseryes, its crappy documentation of that bug. and there should be a bug.06:15
* SpamapS went on a triage rampage today, so may be leaning a bit too much toward "File a bug"06:16
SpamapStook new bugs from 75 -> 55 .. but .. still 184 open bugs.. we have to figure out which ones of those actually matter. :-P06:16
TheMuemoo07:37
rogTheMue: mornin'07:42
TheMueWonna setup an EC2 instance today. Any useful hints before I step into a common known trap?07:49
mplhi all09:15
TheMuehi mpl09:17
TheMuehmm, mysql up and running on a second instance. how may I login via ssh to an instance?10:34
koolhead11hi all10:42
nijabaTheMue: via juju ssh?10:43
TheMuenijaba: Ah, that's the missing link. thx10:47
nijabanp10:48
nijabaTheMue: I tend to use this a lot less than 'juju debug-hooks' in my (small) practice of charm dev10:48
TheMueneat10:49
* koolhead11 installed oneiric and will try juju on local system10:49
TheMuenijaba: yep. I'm just doing my fist steps and want to look around a bit.10:50
nijabamarcoceppi: did you change ch_get_file recently, or was I wrongly assuming that the downloaded file would always be /tmp/download?10:51
koolhead11jcastro: around10:52
nijabakoolhead11: jcastro is on vacation this week10:53
koolhead11nijaba: ok. am using http://askubuntu.com/questions/65359/how-do-i-configure-juju-for-local-usage10:53
nijaba(which does not mean he is not around though)10:53
koolhead11nijaba: :P10:53
nijabakoolhead11: sorry, never tried myself yet10:53
koolhead11nijaba: np. i am giving it a try :D10:54
nijabakoolhead11: I would be interested in your findings :)10:54
koolhead11sure10:54
koolhead11smoser: i think its my openstack and networking which gave put me in all the trouble10:55
koolhead11i want to play with juju so i need to see that working :D10:55
koolhead11customized cloud image would not b having any issue.10:56
koolhead11#optimistic thinking :D10:56
koolhead11Am i supposed to do any configuration for networking? http://paste.ubuntu.com/763669/11:08
drt24could someone fix: https://help.ubuntu.com/community/Orchestra/Juju so that the orchestra environment has a default-series as otherwise juju complains of it being invalid (currently having problems with my ubuntu sso)11:10
drt24Also having fixed that I get "Could not find any Cobbler systems marked as available and configured for network boot." though I have two VMs who booted off it.11:20
jseutterjuju bootstrap fails with "error: internal error Network is already in use by interface virbr0".  Does anyone know how to fix this?11:23
koolhead11jseutter: reboot your machine11:24
koolhead11i had same error11:24
jseutterkoolhead11: I've tried that twice, with no change11:24
koolhead11and You may also need to set the net.ipv4.ip_forward=1 in you /etc/sysctl.conf.11:24
jseutterk, taking a look11:24
jseutterhm, do I need to reboot after modifying sysctl.conf?11:25
jseutterrebooting.11:26
koolhead11aah not needed11:26
koolhead11marcoceppi: hey there11:29
koolhead11jseutter: it was not needed11:30
koolhead11now you will get an error for missing keypair11:30
koolhead11so generate one11:30
koolhead11:D11:30
jseutterkoolhead11: ah.11:30
koolhead11:P11:30
jseutterkoolhead11: I still get the same error: Network is already in use by interface virbr011:30
koolhead11jseutter: but i don`t pastebin the whole output11:31
koolhead11i just added net.ipv4.ip_forward=1 in you /etc/sysctl.conf11:31
koolhead11this line and did juju bootstrap11:31
koolhead11next error i got now is for keygen11:31
jseutterkoolhead11: hm...  I must have a different issue then...11:32
koolhead11jseutter: your using Oneiric11:32
koolhead11?11:32
jseutterkoolhead11: yes11:32
koolhead11http://askubuntu.com/questions/65359/how-do-i-configure-juju-for-local-usage11:32
koolhead11see this11:32
koolhead11am thinking to edit this with putting <bold> in the error part and also add the missing key error11:33
drt24solution to bootstrap not working: sudo cobbler system edit --name your-system-name --netboot-enabled=True --mgmt-classes=orchestra-juju-available11:42
jseutterkoolhead11: hm.  Yeah, that askubuntu page you referenced results in me getting the same error still11:43
jseutterkoolhead11: unless I'm misunderstanding something you're trying to tell me11:44
koolhead11jseutter: i also tried juju while having conversation with u and faced same errors11:45
koolhead11drt24: ?11:45
jseutterkoolhead11: ah.  I was originally following the CharmSchool page on the juju site, then found the error, then came here to irc.11:46
jseutterkoolhead11: ahasenack has it working.  I have a mac - what about you?11:47
koolhead11jseutter: well i have ubuntu :d11:47
jseutter:P11:47
jseutterkoolhead11: just wondering if it is hardware related.11:47
koolhead11jseutter: so your running ubuntu inside some VM or however it works in mac11:47
jseutterkoolhead11: no, I'm running ubuntu on mac hardware11:48
nijabajseutter: any chance you are connected to network via wifi?11:48
jseutternijaba: yes, I'm on wifi11:48
nijabajseutter: I don't think wifi supports bridging11:49
drt24koolhead11: I asked a question earlier, and that was the solution.11:49
nijabajseutter: in fact I know for a fact it does not11:49
nijabajseutter: limitation in the wifi drivers11:49
koolhead11aaaaaaaaaaah nijaba if that is the case am going to edit askubuntu doc again :D11:49
nijabakoolhead11: we had the same pb with kvm a few years back11:50
koolhead11ooh. ok11:50
nijaba"Warning: Network bridging will not work when the physical network device (e.g., eth1, ath0) used for bridging is a wireless device (e.g., ipw3945), as most wireless device drivers do not support bridging!"11:51
nijabafrom https://help.ubuntu.com/community/KVM/Networking#bridgednetworking11:51
ahasenacknijaba: the bridge does not involve the wifi interface11:51
ahasenacknijaba: it's just like firing up local kvm instances that use libvirt11:51
ahasenacknijaba: the guest is not getting an IP address from the LAN dhcp server, but from libvirt11:51
ahasenackit's 192.168.122.X11:52
nijabaahasenack: ah...  ok, sorry11:52
nijabakoolhead11: jseutter: ^^11:52
jseutternijaba: nod.  I'm sitting beside ahasenack11:53
koolhead11nijaba: ooh am going to remove the comment i just added :(11:53
koolhead11nijaba: i am done with $ juju expose wordpress12:02
koolhead11but state seems to be null http://paste.ubuntu.com/763702/12:05
nijabakoolhead11: whoa, weird12:09
koolhead11nijaba: :P12:10
jseutterhm..  If I run juju bootstrap as root, then it works12:11
koolhead11http://paste.ubuntu.com/763706/12:11
koolhead11in verbose12:11
koolhead11jseutter: where is your config file locates12:12
koolhead11d12:12
jseutter~/.juju/environments.yaml12:12
koolhead11and its owned by ordinary user with sudo access correct?12:16
koolhead11i just started the debug log12:17
drt24Any idea on what to fix when using orchestra and deploying using juju fails with "Invalid host for SSH forwading: ssh: Could not resolve hostname small0.orchestra.lan: Name or service not known" (the orchestra server does indeed not know what IP small0.orchestra.lan should point to - though cobbler does.12:17
koolhead11and i can see 2011-12-08 17:45:58,864 Machine:0: unit.deploy DEBUG: Creating master container...12:17
jseutterlogging off to save battery12:18
* koolhead11 wonders if he should file a bug.12:19
=== jrgifford is now known as Guest46496
TheMueAfter adding a relation between mysql and wordpress (like in the tutorial), why is the relation called db? Is this part of one of the both charms?12:47
=== jrgiffor1 is now known as jrgifford
marcoceppinijaba: The path to the dowloaded file is returned from the func. You should be doing something like DOWNLOADED_FILE=`ch_get_file ... ...`13:03
nijabamarcoceppi: yes, I figured that, but it seemed to have worked differently previously, or I was on crack13:03
koolhead17nijaba: i figured out what i was doing wrong. :)13:04
koolhead17it takes good time to reach  state: started13:04
marcoceppinijaba: I did, but it didn't work for things like downloading from source forge, or dynamic download scripts since the file was being saved as "download" or "download.php?id=x". This update ensures the file name stays intact, the downside is it's not saved in /tmp/ anymore13:04
koolhead17and also i have to use $ juju deploy --repository=/usr/share/doc/juju/examples local:wordpress13:05
SpamapSTheMue: db is just a free-form identifier name hat is supposed to put in context the interface.. so for instance in mediawiki ther is a need for a slave: and db: both with interface: mysql13:05
nijabamarcoceppi: ah, so I was not on crack then :P13:05
koolhead17hola SpamapS i finally juju running :D13:05
marcoceppiI don't know why I didn't get your charm picked up. I pulled all the official charms down and ran a grep for anyone using ch_file_get to make sure it was being assigned13:05
nijabamarcoceppi: my charmed worked, then broke, so I was surprised13:05
koolhead17via LXC though13:05
marcoceppiI should go check the charms again13:06
nijabamarcoceppi: fixed now, so no worried.  Will have to wait for someone to approve my merge proposal13:06
* koolhead17 is happy!!13:07
* marcoceppi reviews13:09
marcoceppinijaba: Why are you also echoin' the error in limesurvey-common?13:11
nijabamarcoceppi: easier to debug?  would that be a pb?13:11
marcoceppiIt's not a problem, I was just curious since no one would really see the echo - It would just show up in the juju-log :)13:12
nijabamarcoceppi: unless you are using juju debug-hooks13:16
marcoceppiOh, duh.13:17
marcoceppiIt is a little early here for me13:17
nijabanp :P13:17
marcoceppinijaba: Shoot, just realized that the upgrade-hook wasn't updated to use the new ch_get_file13:24
nijabamarcoceppi:  it should just be a link...13:26
nijabamarcoceppi: to install13:26
* marcoceppi wanders off to get coffee13:26
TheMueSpamapS: Thx, found the definition in the charms.13:27
* nijaba got his roundcube charm working :)13:48
koolhead17nijaba: :D13:48
SpamapSnijaba: *Saweet*13:59
SpamapSBTW, sabdfl and I are running a webinar in 1 hour...14:00
* SpamapS fishes out the link14:00
SpamapShttp://www.brighttalk.com/webcast/6793/3930914:00
nijabaSpamapS: just retweeted about it14:02
SpamapSnijaba: ty, retweeted14:02
koolhead17SpamapS: good luck!! :)14:03
SpamapSnijaba: in your limesurvey charm.. you shouldn't need to juju-log *and* echo..14:04
SpamapSjuju-log should be echoing its message14:04
nijabaSpamapS: 1300 registrations to your webinar!14:16
SpamapSonly 1300? ;)14:22
hazmatnice14:25
* hazmat wades through the aftermath of SpamapS's bug-rampage14:25
drt24how do I tell if juju bootstrap is making progress?14:35
SpamapSdrt24: thats the one step that we don't have much insight into, because it starts the first juju agents on new machines14:38
nijabaSpamapS: regarding juju-log, this is not what I am observing :(14:39
drt24SpamapS: is there a log somewhere of what it is doing?14:39
SpamapSnijaba: hrm, we should fix that, though I can see why it might not.. because then the messages would double up in the charm log14:39
koolhead17drt24: juju -v bootstrap14:39
koolhead17does gives some info14:39
SpamapSyes, but that will not tell you what the new instance is doing14:39
SpamapSdrt24: if its an ec2 instance, you can use ec2-get-console-output .. but that sometimes lags by a couple of minutes14:40
SpamapSdrt24: juju status will try to wait a bit for the instance to be started14:40
drt24I am using orchestra14:40
SpamapSdrt24: for orchestra, you should have logs from the install on the orchestra server14:40
SpamapSdrt24: I don't recall the exact location for them, but /var/log/syslog *might* have it14:41
drt24juju status just gets "ERROR Connection refused" after juju bootstrap says it has finished successfully.14:41
SpamapSdrt24: right thats because the install hasn't completed yet14:41
koolhead17drt24: juju -v status14:42
drt24syslog has lots of "Could not open dynamic file '/var/log/orchestra/rysyslog/.../cron' - discarding message14:43
SpamapSdrt24: yeah I think thats a bug.. have to create the dirs underlying those logs and it will fill them up14:44
=== TheMue is now known as TheMueAfk
nijabaduh, I wrongly changed bug #795479 to fix released instead of proposed, and now I can't change it back :(15:01
_mup_Bug #795479: Charm needed: roundcube <new-charm> <juju Charms Collection:Fix Released by nijaba> < https://launchpad.net/bugs/795479 >15:01
nijabaSpamapS: sounds great :)15:06
drt24"ERROR 'dict' object has no attribute 'read'" when running juju bootstrap.15:07
drt24File "/usr/lib/python2.7/dist-packages/juju/providers/orchestra/launch.py" line 4515:09
hazmatrog, what version of go are we using? stable, weekly, tip?15:22
roghazmat: weekly.15:22
roghazmat: it's fast moving at the moment, but stable is just too old15:23
hazmatrog, cool, thanks15:23
mplrog: so I've played with exp/ssh a bit (just connecting a client to a server), and it seems at first sight that there's no out of the box mechanism to do port forwarding (which is what python juju uses iiuc). Gonna investigate some more.15:42
rogmpl: interesting.15:43
kickinz1Hi!15:51
rogkickinz1: hi16:04
kickinz1I just have another question....May I?16:12
SpamapSkickinz1: please do!16:14
kickinz1I'm re-installing an orchestra server to use it in conjonctionwith juju16:15
kickinz1(managing an openstack cloud)16:15
nijabamarcoceppi: thanks for reverting my mistake16:16
kickinz1The other tim (11.10), I had some little troubles, that I've been able to manage, now, I quite know how to do, but...16:16
marcoceppinijaba: which, what?16:16
nijabamarcoceppi: fix-released/proposed16:17
kickinz1In cobbler I don't have anything but hardy by default, I have to use cobbler-ubuntu-import, why?16:17
marcoceppinijaba: Oh! No problem :D16:17
kickinz1The other time I didn't need to do that.16:17
kickinz1Is ther a special comand to do to doanload all repos?16:18
kickinz1Cause I don't have the profiles with *_juju now...16:21
kickinz1Maybe I'm not clear enough?16:22
kickinz1I don't have mgmtclasses too....16:26
SpamapSkickinz1: hm16:36
SpamapSkickinz1: you do need to run the import script, it should end up with all supported releases16:37
_mup_juju/robust-zk-connect r422 committed by jim.baker@canonical.com16:38
_mup_Merged trunk16:38
kickinz1SpamapS: Thanks, but which scritp? cobbler-ubuntu-import?16:45
SpamapSkickinz1: yeah I think thats it16:48
kickinz1I ran it, but doesn't worked, I have the repos but not the profiles (cobbler-ubuntu-import natty-x86-64 oneiric-X86_64 .. )16:50
drt24kickinz1: or orchestra-$something? that got some of my brokenness fixed16:51
=== TheMueAfk is now known as TheMue
kickinz1SpamapS & drt24: thanks orchestra-import-isos, was the good one thanks!16:54
whithazmat: howdy kapil16:55
hazmatwhit, greetings16:55
whithazmat: if I wanted to setup a single box setup of openstack, is that possible to bootstrap with juju?16:56
* whit has a spare ubuntu box, and needs to get a openstack environment set up to play with16:57
nijabamarcoceppi: thanks for your review.  I have now addressed your remarks (or I think I have)16:57
hazmatwhit, i think i'd recommend just using the devstack script in that scenario.. http://devstack.org/16:58
whithazmat: yeah...16:58
SpamapSwhit: smoser has been working on making a juju version of devstack tho16:58
SpamapShazmat: ^^16:58
SpamapSsmoser: how's that juju-devstack script coming btw?16:58
whitheard that in the webcast this morning, hence me showing up here :)16:59
* whit has futzed with devstack script16:59
smoser"working".16:59
smosernot much.16:59
whitwas tempted to hack it to use supervisor rather than a host of screen calls17:00
SpamapSActually the screen bits are nice. I wouldn't mind having that for the juju local provider's consoles.17:00
smoseronly tried a bit last night. hopefully adam_g will be able to help some. but the goal is that its largely just the same juju openstack providers that he's working on.17:00
smoserwhit, "supervisor" ?17:00
SpamapSsmoser: yeah I'd expect it to be a short list of juju commands and the specialized "scaled down" config.yaml17:01
SpamapSsmoser: I think he meant supervisord17:01
whitsmoser: supervisord? http://supervisord.org/17:01
* whit shrugs17:01
whitit's nice for tying together processes that make up a single service and managing those processes together17:02
SpamapSwhoa.. 11 hours for recipe build queue.. :-P17:03
smoserinteresting.17:03
smoserthe niceness of the screen or tmux is that you go to a window for the log of nova-compute17:04
smoserkill it17:04
smoseredit code17:04
smoserpress up a copule times, start it17:04
smosercycle is very fast.17:04
smoserclearly something else could provide the same, even monitoring writes and re-loading like the django development webserver does.17:04
smoserbut it works well enough17:05
whitsmoser: yeah, that is nice.  the cycle with supervisorctl is simular17:05
whitfor example, I have a series of applications sandboxed in virtualenvs, managed by supervisor17:06
whitI have one command to start everything17:06
whitI issue one command to stop something I want to work directly on17:06
whitstart it by hand in the foreground, futz with it17:06
whitget it to where I want, restart it under supervisor17:07
SpamapSwhit: yeah, vagrant users cite similar things. We kind of want you to have that in juju, but also have the ability to move the same thing into production easily.17:07
rogteam meeting now?17:07
marcoceppinijaba: Looks good to me!17:08
roghazmat: ^17:08
hazmatrog, indeed17:08
marcoceppinijaba: Just need someone else to look it over :)17:10
* whit nods at SpamapS 17:10
whitmakes sense17:10
whitthough, we leverage that system to move things to prod easily, since supervisor is also running everything in prod17:11
whitbut it's all handrolled17:11
* whit shrugs17:11
hazmatrog, fwereade, jimbaker, bcsaller, invites out17:12
jimbakerhazmat, ok17:12
niemeyerHello there!17:21
nijabamarcoceppi: I am sure SpamapS will be happy to review ;)17:22
mpl'lo gustavo17:28
nijabaQuestion: should charm enable ssl as an option or should ssl be handled by the loadbalancer?18:04
SpamapSnijaba: good question18:04
SpamapSnijaba: I think there's a decent argument for apache and apache ssl to become subordinate charms to accomplish things like that18:05
nijabaSpamapS: so at he moment you would recommend not to implement it as an option in charms?18:05
SpamapSnijaba: since subordinate charms are still a long way off, it might be interesting to see it done like that.18:07
nijabaSpamapS: I think it would make sense for roundcube.  I'll work on it...18:07
marcoceppiThe problem with SSL is getting a trusted certificate18:11
hazmathttp://theopenphotoproject.org/18:11
marcoceppiNot sure how you would work that in, but I'm interested18:11
nijabamarcoceppi: in the meantime, I like snakeoil better than no ssl on my emails :)18:13
marcoceppiTrue true :)18:13
SpamapSwell we could charm up openca :)18:20
SpamapSAlso you can have Amazon do your SSL w/ cloudfront18:21
nijabaif I need to store a value that can be used by all my unit.  This is a value that should be generated once for the first unit, then reused by all others. is there a 'config-set' that I could use?18:25
marcoceppiah, dash is giving me headaches again18:52
adam_gis it assumed that `unit-get private-address` from one side of a relation will be the same as `relation-get private-address` from the other?18:54
koolhead17SpamapS: is it possible to get the presentation slide of today`s juju cast/talk sumwer19:16
SpamapSkoolhead17: I believe its attached to the webinar somehow19:21
koolhead17SpamapS: i have not finished watching it. cool i will wait for the link :)19:22
koolhead17SpamapS: nopes, i was not able to get/see any link for the slides :(19:44
marcoceppiI'm wondering about the best way to handle this test for charm-helper-sh20:03
SpamapSmarcoceppi: tests should be relatively easy to write20:04
marcoceppiSpamapS:  I'm trying to do this in all.sh (so you can include _all_ libraries)20:05
SpamapSmarcoceppi: you can "mock" wget with an alias.. or.. even better.. fire up a tiny webserver20:05
marcoceppiHowever, I can't reliably get the dirname when sourcing. I'm trying to avoid hardcoded paths :\20:05
marcoceppiI've got a test case written :) It does a test against every type of file pull20:06
SpamapSmarcoceppi: OH I've had this problem before.20:07
SpamapSmarcoceppi: sourcing does not set $020:07
marcoceppiThe internet is failing with help, since they're written in dash I can't use $BASH_SOURCE20:07
SpamapSthats sort of why BASH_SOURCE exists. :)20:07
marcoceppiDASH_SOURCE doesn't seem to exist either :\20:08
SpamapSmarcoceppi: no, dash is minimalistic by design20:08
SpamapS-rwxr-xr-x 1 root root 950896 May 18  2011 /bin/bash20:08
SpamapS-rwxr-xr-x 1 root root 109768 Oct 27 11:20 /bin/dash20:08
marcoceppiRight, I understand the goal I'm just hitting a wall with this20:09
SpamapSmarcoceppi: One way to go is to have users "exec" a command to get all..20:09
SpamapSmarcoceppi: another is to call it all.bash , and don't let people use "all" from dash.20:09
marcoceppiI suppose exec /usr/share/charm-helper/sh/all.sh would be a good solution20:10
marcoceppiwill anything that file sources be available in the global source?20:10
marcoceppiscope*20:10
SpamapSmarcoceppi: I'd be in favor of the latter.. keep all simple for the people who just want bash... let dash/csh/ksh weirdos use the individuals20:10
SpamapSmarcoceppi: no you'd do this20:11
marcoceppiSo, have an all.bash20:11
SpamapSeval `/usr/share/charm-helper/bash/all.bash`20:11
marcoceppilooks kind of ugly20:11
SpamapSand it would spit out the source lines20:11
SpamapSmarcoceppi: you're going to have to figure this out when two helpers share code anyway ;)20:14
marcoceppiSo, right now I have this in the file: http://paste.ubuntu.com/764170/20:15
marcoceppiWhich obviously won't work when sourced, but it's the idea I had20:15
* marcoceppi had ideas for a ch_require function when separate ch modules required functions from another module20:16
SpamapSmarcoceppi: right, just add 'echo' in front of the . and you can eval/exec it.20:16
marcoceppihum, so there really isn't any way around that scoping issue then? I'll go ahead and do that then open a bug to see if we can avoid having to use eval20:17
_mup_juju/robust-zk-connect r423 committed by jim.baker@canonical.com20:17
_mup_Backoff for 1s if environment pending because no addr assigned20:17
_mup_juju/trunk r430 committed by kapil.thangavelu@canonical.com20:17
_mup_[trivial] yield on add_auth calls in tests [f=832384]20:17
SpamapSmarcoceppi: I'm guessing there isn't. But maybe its time to evaluate whether "sh" is worth it. :)20:17
* marcoceppi *nods furiously*20:17
marcoceppi:)20:18
marcoceppiI'll give this a go then! thanks :D20:18
SpamapSmarcoceppi: it may be a good idea for us to just say "never mind that was a bad idea, use bash"20:19
* SpamapS has lots of bad ideas20:19
marcoceppiSpamapS has more good ones than bad20:20
fwereade_hazmat: ping20:25
SpamapSnijaba: isn't @ubuntucloud supposed to retweet stuff I tweet @ubuntucloud ?20:28
hazmatfwereade_, pong20:29
fwereade_hazmat, if a relation goes away while a unit agent is down, can you think of a way to reconstruct the workflow such that we can call the departed hook?20:30
hazmatfwereade_, i don't know that we  need to do that in the workflow20:31
fwereade_hazmat, well, ok, maybe we just need the lifecycle20:32
hazmatfwereade_, its not something we would call the departed hook for, just relation-broken if the relation was removed.20:32
hazmatfwereade_, when the down agent comes back it has a delta to apply or queue for hook execution, the relation-broken hook in that sense is no different20:33
fwereade_hazmat, hm, ok, but wouldn't we call departed if it went away while we were running?20:33
hazmatfwereade_, departed is called when other nodes that where participating in the relation go away20:33
hazmatfwereade_, the on disk record of state, needs a delta computation against current state when it comes back up, to determine what the missed events/hooks are20:34
fwereade_hazmat, ok, scratch nonsense about departed20:35
fwereade_hazmat, the question remains, how do I construct a lifecycle which I can then cause the relation-broken hook to fire?20:36
* hazmat ponders20:37
fwereade_hazmat, the unit_relation appears to be needed for the HookScheduler -- if it were just the watches it were needed for, we could just about get away with a localised hack20:37
SpamapSfwereade_: I had some thoughts on that20:37
hazmatfwereade_, i think you just create one ad hoc20:37
fwereade_hazmat, heh, ok, that looked doable but kinda evil20:38
SpamapSfwereade_: really, when the client says "that relationship is no more" .. it should insert a "TODO" item for each side to ACK the state20:38
SpamapSfwereade_: so if one side is offline, thats fine, when it comes back it will see that it has a TODO and do it, then ack it (possibly just by deleting the TODO)20:38
hazmatfwereade_, actually even simpler than that20:38
hazmatfwereade_, a static method on the unit rel lifecycle, just give it the executor and the rel name.20:39
* fwereade_ peers at the code20:39
hazmatand it will queue a broken hook20:39
hazmatfwereade_, look at the depart lifecycle method, thats basically the same notion20:39
hazmathmm... the relhookcontext..20:40
hazmatso effectively its already broken for depart hooks20:40
fwereade_hazmat, the unit relation is still needed.. yep ^^20:40
fwereade_hazmat, hadn;t thought if it that way but, yeah, I think so20:40
fwereade_SpamapS, I think what you say makes sense, but it's a bit far outside current mental scope for me to be sure20:44
SpamapSAvoids having to store state locally if you keep everything in ZK20:45
fwereade_SpamapS, this is true, I can't actually think of a good reason to store that state locally, but solving this specific problem feels like a pretty fearsome change...20:50
SpamapSfwereade_: not knowing the code, I can't comment much on how hard it will be.. only that I think this would work. ;)20:51
fwereade_hazmat, wait, hold on, will the UnitRelationState actually be *gone*? it suddenly looks to me as though it *is* deleted immediately if the *service* goes away, but may be left around if just the *relation* goes away20:53
* fwereade_ reads some more with furrowed brow20:53
hazmatfwereade_, so right now it appears that the full hook cli api for relations would in a rel-broken  hook.. if the underlying rel states haven't been garbage collected... spamas's notion of capturing intent/acks has some value as it can help a gc known when it safe to clean out the rel structure. an offline node, could be offline for a while.. ie. it should be expected that the relation is gone... so that comes back to what are the expecta20:53
hazmattions of a relation-broken hook execution and the applicable apis that can be used. i can't get around the notion that at a minimum the hook should have access to its own unit's relation settings, so we do need the structures marked explicitly for cleanup as they execute -broken hooks.20:53
hazmatfwereade_, if the rel goes away its removed in  _process_service_changes20:55
fwereade_hazmat, ok, if unit rel state really always stays around (which I don't think it does when the service is destroyed)20:57
hazmatso the memory structures are pruned for unit-rel state, the underlying zk structures are still present atm (lacking gc), and so the unit rel can be constructed on the fly/transiently for the broken hook execution, but that needs the ack coordination around gc of the state.20:57
fwereade_hazmat, I had the impression that GC didn't exist yet20:58
fwereade_hazmat, I was just poking around, and I guess I *couldn't* find anything that deleted unit-relation states20:59
hazmatfwereade_, self._relations.pop20:59
hazmatfwereade_, you mean the in memory  state or zk state?21:00
fwereade_hazmat, sorry, zk state21:00
fwereade_hazmat, things I am now pretty sure of21:00
fwereade_hazmat, actually I'm not that sure, thinking again21:01
hazmatfwereade_, right so the gc doesn't exist, but it has an obvious implementation for most of things, this is one place where coordination would be needed, at the very least that should get captured.. the same problem arises in the stop case (except the states are indeed gc'd), we need to capture intent/ack instead of justs modifying the state21:01
hazmatin this case the state is being modified atm, but it will be, so the need for ack is still there, just creating a new node for the unit would suffice upon depart.21:04
hazmatfwereade_, i wonder though if we don't also need a separate hook context for broken, it should never see any other members of the rel21:05
fwereade_hazmat, I was just looking upon RelationHookContext.get_members, with a sour expression21:05
hazmatnor set settings, just be able to retrieve its own settings21:05
fwereade_hazmat, even that may be tricky, doesn't service destruction delete the unit containers?21:06
hazmatfwereade_, yeah.. this is a more generic problem we have multiple places21:07
hazmatwe express intent by modification of the state, and then have actors change their env to match state21:07
hazmatbut the state we're modifying is identity, and we create missing identity scenaros for the actors21:08
hazmatwe need to capture the intent as a state change that can be coordinated upon by the actors while they retain their identity21:08
fwereade_hazmat, ok, so basically the unit agent is responsible for finally trashing its own state in ZK as it dies, and for trashing the last of the service state as well (if the service is marked as going-away, I guess)21:09
fwereade_hazmat, not *is*, *should be*21:10
hazmatfwereade_, actually it formalizes a new trusted actor, a gc agent, that can enact the final removal of actor identity from the topology21:10
hazmatbut the gc actor needs coordination with any actor that it has completed the intent21:11
hazmatthe actor can of course attempt to clean up its own nodes21:11
fwereade_hazmat, ah, ok: so for example the client marks "dying", each unit agent marks itself "dead", GC cleans up21:12
hazmatbut the topology node in particular is off limits to most actors in the system as it represents truth in the system, as expressed by the user21:12
hazmatthe notion then is that the topology can be extended to capture these intents from users (destroy-service/remove-unit) which still trigger the requisite state changes to enact behavior, but with the identity changes being async to that21:13
fwereade_hazmat, sure, there's no reason to mess with the topology itself, surely the dying flag can live in the actor's own nodes?21:14
hazmatso sort of like on ec2-terminate-instances the instance isn't immediately dead, and it continues to appear in the output of describe-instances for some time, till its identity is finally gc'd21:14
hazmatfwereade_, only if you trust the actor ;-)21:14
fwereade_hazmat, ...ha, yes21:15
hazmati'm not dead yet ;-)21:15
fwereade_hazmat, far from it :)21:15
SpamapSarg.. argparser.HelpFormatter is not an extendable class. :/21:17
fwereade_hazmat, ok; so that would be cool, but my proximate problem is in calling relation-broken21:18
fwereade_hazmat, which it seems is broken anyway21:18
fwereade_hazmat, I'm somewhat taken by the idea of a less-featureful RelationDepartedHookContext21:19
fwereade_hazmat, but there wouldn't be much difference between that and a plain HookContext21:19
fwereade_hazmat, (but that specifically is not really a relevant consideration atm)21:21
fwereade_hazmat, this would definitely qualify as an API change21:22
hazmatfwereade_, that sounds good to me, you'd need stub impl of the relhookcontext, and you'll need at least rel-name identity to queue up the broken hook.21:22
fwereade_hazmat, does that feel like the least worst accessible solution to you?21:22
fwereade_hazmat, yeah, I can probably keep track of the name :p21:22
hazmatfwereade_, yeah.. that seems okay.21:23
hazmatthe api change is sane as well21:23
hazmatbut should get to the list21:23
hazmati'll need to write up the intents stuff21:23
fwereade_hazmat, indeed, I'll start writing it up now, may not land until tomorrow morning21:23
hazmatfwereade_, sounds good21:23
hazmatSpamapS, yeah.. we use raw formatter normally..21:24
fwereade_hazmat, cheers21:24
hazmatSpamapS, i'm pretty disappointed with the extensibility of argparse21:24
hazmatits a mess down there21:24
hazmatit works, and is very useful, but extending it is ugly21:24
SpamapShazmat: techniclaly this is violating its API:21:24
SpamapSclass JujuFormatter(argparse.HelpFormatter):21:25
SpamapS"Only the name of this is considered public API"21:25
SpamapShazmat: doesn't seem to be designed for flexibility.. just seems to want to be the simplest to use.21:26
hazmatSpamapS, yeah.. and its still miles better than what it replaced.. the python stdlib has gone through 3 gens of option parsing21:27
hazmatSpamapS, alternatively we could use commandant (extracted from bzr)21:27
hazmatjimbaker, could you review the ssh cleanup branch.. ideally they should go in together to avoid the output oddities.22:09
hazmatSpamapS, just wanted to confirm txzk in the ppa is a nightly from txzk trunk?22:09
=== marrusl_ is now known as marrusl
_mup_Bug #901901 was filed: error in provisioning agent when terminating machine <juju:New> < https://launchpad.net/bugs/901901 >22:26
hazmatniemeyer, how's the conference?22:27
jimbakerhazmat, i reviewed that branch, so it's all set22:43
hazmatjimbaker, cool, just need one more +122:44
jimbakerhazmat, sounds good. bcsaller, you want to look at this branch, lp:~hazmat/juju/sshclient-refactor ? it's a pretty sweet refactoring imho, and will allow us to get rid of perhaps the most annoying issue in juju :)22:46
niemeyerhazmat: It was great so far22:59
niemeyerhazmat: Today is actually a more "compact" meeting with just the more active users/developers22:59
niemeyerhazmat: Several interesting brainstorms23:00
niemeyerhazmat: Tomorrow is the real MongoSV conference..23:00
niemeyerhazmat: Expected to have 1000+ participants (!)23:00
hazmatniemeyer, right on, wow23:00
jimbakerhazmat, now that bcsaller has approved your branch, just need to a get final OK on lp:~jimbaker/juju/robust-zk-connect. it's a very small change, just adds a sleep to backoff  while waiting for the addr to be assigned instead of hammering away23:52

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