[00:21] <orospakr> hey, can I ask juju to shrink the number of machines if they are not being used as any service units?
[00:21] <orospakr> or do I just have to manually use destroy-machine?
[00:40] <sidnei> orospakr: you have to do it manually
[00:40] <orospakr> fair enough.
[00:41] <orospakr> tx. :)
[00:45] <marcoceppi> orospakr: terminate-machine for reference :) Juju will try to make sure it saves your data as best as possible!
[00:45] <orospakr> iirc terminate-machine and destroy-machine are aliases?
[01:09] <sidnei> stub: https://bugs.launchpad.net/charms/+source/postgresql/+bug/1172086 when you get around
[01:09] <_mup_> Bug #1172086: Database creation fails with syntax error <postgresql (Juju Charms Collection):New> <https://launchpad.net/bugs/1172086>
[01:17] <stub> Indentation wars are starting
[01:26] <sidnei> he
[01:26] <sidnei> some of it i could have left alone but flake8 is really picky
[01:32] <sidnei> i see that in create_user it uses  action.append('"{}"'.format(user))
[01:33] <sidnei> but maybe the right way to do it is to sanitize the database name like the username is sanitized
[01:43] <sidnei> stub: any suggestion?
[01:44] <stub> sidnei: just added comments
[01:46] <stub> sidnei: I've linked code to do the quoting correctly. Sanitizing is good too, because if we create things like databases or roles with names requiring the quotes it causes headaches
[01:46] <sidnei> great, thanks!
[01:47] <stub> Because nobody ever remembers to add the quotes, and you are left scratching your head because the tablename is in mixed case and without the quotes it gets munged by the SQL parser
[01:48] <stub> CREATE TABLE "Foo" (a text); SELECT * FROM Foo; -- Fail
[01:52] <stub> sidnei: I'm torn. I'd normally recommend sanitizing the database name to avoid the quoting foot gun. Even if you write good code that always quotes the identifiers correctly, not every tool you might want to use is good code.
[01:53] <stub> sidnei: But that creates namespace issues, and annoys people who want to shoot themselves in the foot.
[01:56] <sidnei> in the specific case (-joined hook) where the database name comes from the service name, i believe it makes sense to sanitize
[01:57] <sidnei> not sure if it should be also sanitized in the -changed hook for consistency or left alone for the shoot-themselves-in-the-foot crowd
[01:59] <sidnei> also, can't decide if im annoyed that "SELECT datname FROM pg_database WHERE datname = %s" doesn't complain about the single quote
[02:02] <mwhudson> sidnei: you do know the difference between single and double quotes in sql, right?
[02:02] <sidnei> is it the same difference as in shell scripts? *wink*
[02:02] <mwhudson> no :)
[02:02] <mwhudson> single quotes are string literals
[02:03] <mwhudson> double quotes are for identifiers
[02:04] <sidnei> the distinction is a bit blurry, i guess. but it makes more sense now.
[02:21] <sidnei> stub: in the create role, does the password need to be quoted too?
[02:23] <stub> sidnei: The password is not an SQL identifier, just a string, so needs standard single quoting
[02:23] <stub> sidnei: yay SQL standards committee
[02:24] <sidnei> stub: http://paste.ubuntu.com/5597272/
[02:24] <stub> I'm sure there is a reason. Maybe parser implementation. Maybe LSD.
[02:26] <stub> sidnei: that looks fine
[02:28] <stub> I should submit quote_identifier to psycopg2 to add as an extension
[02:31] <sidnei> progress. and fail. and progress and fail. http://paste.ubuntu.com/5597289/
[02:33] <stub> yay. guess the publication of the names needs to be moved then.
[02:34] <stub> Or dump AsIs and do the interpolation yourself, safe with quote_identifier.
[02:35] <sidnei> stub: is that related to the error above? if so im confused ;)
[02:35] <stub> There is so much of this sort of cruft... branches get scope creep.
[02:36] <stub> sidnei: Yes. I suspect you will find we are now calling 'relation-set user="foo"' instead of 'relation-set user=foo'
[02:36] <stub> Assuming it was working before this change ;)
[02:37] <sidnei> stub: nope, im using quote_identifier inside create_user(), so it doesn't leak the quoting outside to db_relation_joined_changed which is what calls relation-set
[02:38] <stub> mmm...
[02:38] <sidnei> stub: the error here is that relation-get didn't return a user for a relation
[02:38] <stub> There might be race conditions in the hook logic still
[02:38] <sidnei> maybe because it wasn't flushed yet, or something
[02:38] <stub> one end trying to get the username before the remote end set it. Needs a guard.
[02:39] <sidnei> something like that yes
[02:39] <stub> My functional tests are on hold until I'm back from leave.
[02:39] <sidnei> but also, we just created the user above, why not pass it to generate_postgresql_hba directly instead of getting it from relation-get?
[02:42] <stub> sidnei: Probably no reason at all
[02:43] <stub> sidnei: except I've been trying to limit my diff sizes - too tempting to just rewrite the whole thing in one hit.
[02:44] <sidnei> i'll hack it until it works (tm) then let's see about splitting this diff
[02:44] <stub> sidnei: I've been promising myself to just make minimal changes until I've got some sort of test harness
[02:46] <stub> http://bazaar.launchpad.net/~stub/charms/precise/postgresql/tests/view/head:/test.py
[02:47] <sidnei> stub: ah, nice. i'll see about adding some unit-y tests instead.
[03:12] <mwhudson> hm
[03:13] <mwhudson> juju bootstrap (pointed at a maas install) fails with "error: no tools available"
[03:13] <mwhudson> any ideas?
[03:17] <sidnei> mwhudson: being really nosy, i saw mention of using --upload-tools to fix that
[03:18] <sidnei> no idea if it actually fixes the problem
[03:18] <mwhudson> hm
[03:18] <mwhudson> sidnei: thanks, that just gets me stuff like
[03:18] <mwhudson> 2013/04/24 04:18:39 ERROR command failed: build command "go" failed: exit status 1; can't load package: package launchpad.net/juju-core/cmd/jujud: import "launchpad.net/juju-core/cmd/jujud": cannot find package
[03:19] <mwhudson> do i need to go install a bunch of things?
[03:19] <mwhudson> or whatever the command is
[03:19] <sidnei> sorry, haven't got to that part yet.
[03:19] <mwhudson> "Ahh, yes, --upload-tools is a developer flag, it won't work unless you have built juju from source."
[03:20] <mwhudson> i guess i'm going to give up on this until some more devs are around
[07:11] <AskUbuntu> juju with openstack on precise | http://askubuntu.com/q/284846
[11:45] <marcoceppi> jcastro: the first of the gojuju related problems are coming in to AU now
[12:55] <jcastro> excellent. :)
[13:23] <orospakr> how do I ask juju debug-log to give me more lines of tail?
[13:23] <orospakr> (I'm running -core, if that matters)
[13:50] <jcastro> hey mgz
[13:54] <mgz> hey jcastro
[13:55] <jcastro> hey so for the packages
[13:55] <jcastro> can you explain how that will work?
[13:55] <jcastro> like, apt-get install juju does both python and go with an alternative or what?
[13:58] <mgz> apt-get install juju will install python juju
[13:59] <mgz> but, you can install juju-core, and that also provides the juju binaries and so on
[13:59] <mgz> so, if you just install that, go juju is what you get when you run juju
[14:00] <mgz> install both and you can pick which you want under the juju name with alternatives, or run under the juju-0.7 and juju-core names
[14:03] <jamespage> mgz, gah :
[14:03] <jamespage> src/launchpad.net$ find . -size +1000
[14:03] <jamespage> ./juju-core/cmd/juju/juju
[14:05] <jamespage> 9.8MB
[14:05] <jamespage> ooops
[14:05] <mgz> this is.. not unusual
[14:05] <mgz> yeah, it's painful
[14:05] <mgz> but at least it's only *one* 10MB binary rather than three these days
[14:06] <jamespage> mgz, yep - can we get that cut from the tar.gz please
[14:06] <mgz> wait, the binary is *in* the tar?
[14:06] <mgz> gah
[14:07] <mgz> okay, I'll start from scratch on that, also omitting the junk we don't need
[14:07] <mgz> but could really do with some confirmation on exactly what we're trying to ship from someone else
[14:08] <mgz> fwereade: we don't need lbox for juju-core, right?
[14:08] <fwereade> mgz, we shouldn't no
[14:08] <jamespage> great - that solves one problem!
[14:10] <mgz> we do need, from code.google.com/p/go.net and mgo from labix.org
[14:10] <mgz> then of...
[14:10] <mgz> go/src/launchpad.net/:
[14:10] <mgz> gnuflag  gocheck   gomaasapi  goyaml	 lbox  tomb
[14:10] <mgz> goamz	 goetveld  goose      juju-core  lpad
[14:11] <mgz> we want everything but lpad and lbox?
[14:12] <mgz> ...and not goetveld
[14:14] <marcoceppi> I've got some jitsu questions
[14:15] <marcoceppi> Can jitsu watch for a machine-state in addition to agent-state?
[14:16] <jcastro> mgz: seen this before? http://askubuntu.com/questions/284846/juju-doesnt-bootstrap-due-to-error-command-failed-no-tools-available-error
[14:18] <m_3> marcoceppi: don't remember, but `jitsu watch -h` is pretty verbose
[14:19] <marcoceppi> m_3: yeah, doesn't appear so
[14:20] <fwereade> jcastro, that indicates that we need to upload the new tools to the juju-dist bucket
[14:21] <fwereade> mgz, AIUI you have the keys necessary to do so?
[14:22] <jcastro> fwereade: ok
[14:23] <ahasenack> jcastro: that was happening to me too a few times this week, they said it was "broken on purpose until the right fix lands"
[14:23] <fwereade> mgz, pretty sure that's correct -- if you want to be really really sure move your src out of the way and go get juju-core into a fresh src/ again ;)
[14:23] <jcastro> ahasenack: so if we redeploy over and over will it eventually work?
[14:24] <jcastro> also does anyone have a bug report handy?
[14:24] <mgz> I do, when we have something built (I could upload from the ppa for now... but would prefer not to)
[14:24] <fwereade> mgz, ah, what's the problem with the ppa?
[14:24] <fwereade> mgz, just not the same in actuality even if it is in theory?
[14:25] <jcastro> this guy would be using juju from the PPA no?
[14:27] <ahasenack> jcastro: I don't know, I haven't tried today
[14:31] <mgz> fwereade: no problem, just doing the stuff we need for the archive has to happen like, now
[14:31] <fwereade> mgz, ah, ok: yes, I agree that it takes precedence
[14:34] <jcastro> fwereade: ok so I can just tell the guy to sit tight for a bit until we sort ourselves?
[14:35] <fwereade> jcastro, I'm afraid that's the best we can do right now
[14:35] <jcastro> no worries, I prefer to tell people to wait than be silent, heh.
[14:39] <jcastro> man, I wasn't expecting people to be playing with juju on openstack so soon after ODS.
[14:46] <jcastro> arosales: ok so there's no way to record a meeting from the G+ URL in the calendar invite
[14:46] <jcastro> so I am going to try launching the hangout early and updating the link on the invitation
[14:46] <jcastro> if that ends up not working I'll ask you to send everyone from the hangout to the new URL so we can record the charm meeting
[14:59] <arosales> jcastro, I looked at this last week.
[14:59] <arosales> jcastro, what the person launching the G+ has to "check box" hangout on air
[14:59] <arosales> jcastro, from I can see that can't be done via google cal invite
[15:00] <arosales> jcastro, what you can do is fire up a indiv hangout, check box on air, and then capture the embedded link
[15:00] <arosales> jcastro, only question if that persists week to week
[15:01] <jcastro> right
[15:02] <jcastro> I think what I will do is fire it up early, and see if I can replace the existing link in the invite with the new one
[15:02] <jcastro> so people get the updated URL in the invite
[15:18] <marcoceppi> jcastro: I wonder if you can find a URL variable that you can overload the hangout link to force it to be on-air
[15:20] <arosales> jcastro, sounds good lets see if it works.  I am sure it will work this week, I am just not sure if it will persist week-to-week. But good experiment to find out.
[15:21] <jcastro> nod
[15:50] <jcastro> OK everyone
[15:51] <jcastro> here's the hangout URL for the charm call in 10 minutes:
[15:51] <jcastro> https://plus.google.com/hangouts/_/ca6e8841c9aed5e51daf941607b9613f93bd0261?authuser=0&hl=en
[15:54] <jamespage> jcastro, charmers hangout?
[15:54] <jcastro> weekly call
[15:55] <jcastro> we're just recording them now so we can make them public, etc.
[15:58] <marcoceppi> jcastro: may be a few mins late. About to reboot
[15:58] <jcastro> no worries
[16:18] <m_3> arosales: how do you get that banner on the bottom
[16:18] <m_3> it's perdy
[16:18] <marcoceppi> m_3: "hangout tools" on the left
[16:18] <arosales> m_3, add the hangout tool box
[16:19] <arosales> m_3, http://pad.ubuntu.com/Q01gbDLLfh
[16:20] <arosales> m_3, ubuntu orange is able.virginmedia.com) has joined #juju
[16:20] <arosales> * eschnou has quit (Quit: Leaving)
[16:20] <arosales> wrong paste
[16:20] <arosales> dd4814 is the ubuntu orange
[16:21] <arosales> m_3, http://newraycom.com/how-to-set-up-google-hangout-lower-third/
[16:21] <m_3> arosales: thanks
[16:21] <arosales> sorry about my clipboard buffer being defunc
[16:37] <jcastro> aha
[16:38] <jcastro> arosales: for next time I'll add a pad.u.c to the invite, so we don't split brain again
[16:38] <arosales> jcastro, ok thanks. Sorry for not thinking of that earlier
[16:39] <jcastro> it's ok, first one's always rough
[16:39] <jcastro> or second
[16:39] <jcastro> or third. :)
[16:40] <marcoceppi> jcastro: FYI for the notes: https://jenkins.qa.ubuntu.com/view/Precise/view/Precise%20Charms/
[16:43] <jcastro> got it!
[16:45] <marcoceppi> it takes about 3 years to load, but it has all the tests so far
[16:47] <m_3> marcoceppi: we might need to get james or somebody to create other/better views in there
[16:47] <marcoceppi> m_3: yeah, there is a Charms view, but it doesn't have openstack
[16:54] <m_3> marcoceppi: those're custom views... created by somebody with auth into j.q.u.c
[16:54]  * m_3 doesn't know how to do it
[19:30] <imsplitbit> I wonder if anyone here has experience connecting juju with rackspace cloud
[19:31] <imsplitbit> https://juju.ubuntu.com/get-started/rackspace/
[19:31] <imsplitbit> if you look there it says "heres an example configuration..." but theres no example :-)
[19:32] <imsplitbit> I tried using the openstack_s3 provider as some google searches said to do but it fails because the api returns a 404 for os-security-groups
[19:32] <imsplitbit> not sure if thats a bug or if there's some special things you need to do with rackspace to make it all go
[20:07] <marcoceppi> imsplitbit: rackspace provider does not work as they have a non standard open stack. they're changing this soon which will fox this problem in juju
[20:08] <marcoceppi> not sure an eta... jcastro ?
[20:13] <rshade98> I keep getting no matching tools on amazon.
[20:13] <rshade98> Is there a package I need to upload to s3
[20:17] <jcastro> they said "soon" and wouldn't really commit to anything
[20:25] <marcoceppi> rshade98: see this: http://askubuntu.com/q/284846/41
[20:28] <rshade98> oh, haha, sorry for the ask guys, I saw this, just didn't realize it was 5 hours ago
[20:30] <marcoceppi> rshade98: NP, still a bit of a new issue :)
[20:38] <jcastro> rshade98: that's inprogress
[20:38] <jcastro> the fix for that
[20:38] <jcastro> mgz: you still around doing distro things or will we likely see this fix tomorrowish?
[20:43] <rshade98> thanks guys
[20:50] <mgz> I'll sort it out tonight
[20:50] <mgz> jcastro: ^
[20:51] <jcastro> <3 thanks dude
[21:03] <mgz> okay, tools in the ec2 public bucket for the ppa
[21:03] <mgz> I don't have credentials for any of the other ones
[21:04] <mgz> also need to do a release announcement...
[21:04] <mgz> well, four release announcements now
[21:09] <jcastro> heh
[21:09] <jcastro> rshade98: wanna give it a shot now?
[21:25] <rshade98> looks good
[21:26] <jcastro> ok so it worked?