/srv/irclogs.ubuntu.com/2017/11/13/#juju.txt

=== shadoxx_ is now known as shadoxx
blahdeblahthumper: you around?04:29
=== frankban|afk is now known as frankban
[Kid]kwmonroe, that means anything i deploy with juju has to be in a cloud. I have two sites that i manage and would do cloud, but it is only a tertiary option.13:36
skayfor my charm, I have a db relation, and call set_database and set_roles when the relation is joined. why does the relation not reflect the dbname when I get the relation info?16:43
bdxskay: hey16:47
skayo/16:47
bdxI've beaten that path16:48
bdxso16:48
bdxI know @stub is/was aware of this, as I brought it to his attention when I was having trouble it16:48
bdxthe solution16:48
skay(is there a bug I can subscribe to to keep up to date?)16:49
bdxlooking16:49
skaythank you16:49
skaymeanwhile, halp16:49
skay:)16:49
skays/halp/thanks16:50
bdxnp16:51
bdxso, I cant find the bug16:52
bdxhttps://bugs.launchpad.net/postgresql-charm16:52
bdxthere are only ~12 bugs there16:52
kwmonroeskay: what's the database that you're connecting?16:52
kwmonroemysql/maria/db2/pgres?16:52
bdxand I dont see any the ones I've filed in the past16:52
bdxpostgresql16:52
bdxI just assumed you were using postgresql too because of the functions you are calling16:52
skaykwmonroe: postgresql16:53
skaybdx: how did you work around it?16:54
bdxhttps://bugs.launchpad.net/postgresql-charm/+bug/161824816:57
bdxfinally16:57
bdxha16:57
bdxI had to search by bug number16:58
bdxit looks to be private or something16:58
bdxhaving a tough time finding the mailing list thread16:59
bdxanyway16:59
skayoh. I wonder if that is a mistake16:59
bdxyeah, possibly it has been fixed by using the api differently17:00
bdxif the api did change (which it sounds like it did), then I havent started using  it yet in my charms and probably need to refactor my postgresql relations to take advantage of this17:01
bdxmy work-around was to do this https://github.com/jamesbeedy/layer-django-web/blob/master/reactive/django_web.py#L70,L7417:03
bdxbut it was really just a poor cover up17:03
* bdx ashamed to have moved forward with ^ in so many places previously17:04
kwmonroeyeah skay, it looks like the requested db name gets stored as part of the connection string, so parsing it back out like bdx did (pgsql.master.dbname) seems like a fine way to get it back.17:05
skaykwmonroe: while debugging my hook, I did a relation-get to see the connection string, and it does not have the appropriate name17:06
skayit's named after the unit (which is the default,right?)17:06
skayI mean the app17:06
bdxyea17:06
skayI could get it from my charm's config if I need to17:06
skayas a work around17:07
skayif someone could subscribe me to the bug, I'd appreciate it so that I can keep track for when I don't need a workaround17:07
skay~codersquid17:07
bdxskay: I think this has been fixed though17:08
kwmonroefwiw, i can't see the bug that bdx opened17:08
bdxoh17:08
bdxjust subscribed both of you17:08
kwmonroecool, i'm in bdx.  skay's issue feels a bit different though.  sounds like if you don't explicitly call pgsql.set_database, pg will default to the unit name, yet that dbname isn't coming back with pgsql.master data.17:11
skaywhat is happening to me is that my charm joins a db relation with the posgresql charm17:11
skayand when I get the relation, it is not reflecting the dbname I set when the relation was joined17:12
skayI could maybe make a tiny charm to demonstrate17:12
bdxoh totally, I linked the wrong bug17:12
bdxdarn17:12
skayI explictely call pgsql.set_database17:12
kwmonroeah, ok skay, i wasn't sure if you were calling set_db or not.  either way, sounds like a new bug to me if the connection string from an available pg master doesn't contain the dbname.17:14
skayI'll go ahead and write a small example and file a new bug17:14
bdxhere's another bug I have open in that area https://bugs.launchpad.net/interface-pgsql/+bug/166633717:14
mupBug #1666337: 'NoneType' object has no attribute 'uri' <pgsql Interface for charms.reactive:Fix Released> <https://launchpad.net/bugs/1666337>17:14
bdxhere's the mailing list thread https://lists.ubuntu.com/archives/juju/2017-February/008638.html17:16
bdxwell, @skay possily I didnt file a bug on your exact issue17:16
bdxor at least I cant find it .... I had a lot going on with that charm/interface for a while as you can see17:16
bdxI know I've hit what you are describing though17:18
* skay nods17:19
bdxand I would have filed a bug had I hit this17:19
bdxbut meh17:19
bdxsrry17:19
bdxlol17:19
bdxso essentially, I think the first bug I linked is this bug17:22
bdxbecause you are getting back the wrong db17:22
bdxit means that the rest of the information in the relation is also incorrect17:22
bdxbecause there is a user/database/password affinity17:23
bdxso if you are getting the wrong db back17:23
bdxthen everything else is wrong too17:23
bdxnot just the db17:23
=== frankban is now known as frankban|afk
=== TikTok is now known as michealb
kwmonroerick_h: is there a fast way to clear the hook queue for a failed unit?  [Kid] had a unit go into error state and he wanted to remove it.  however, leadership-hook-foo and like 9 other hooks queued up, so he had to 'resolved --no-retry' 10 times before the remove-unit could go to work.20:34
kwmonroemaybe like a --force on remove-unit could auto resolve a unit?20:35
rick_hkwmonroe: nothing I'm aware of, I wonder if you restart the agent what happens20:43
kwmonroedunno rick_h, none of my units ever go into error state ;)  but i'll try to wedge one and see what agent horrors i can perform.20:48
[Kid]kwmonroe, everything is right again21:03
[Kid]i about about to re-deploy21:03
kwmonroewoohoo!21:04
=== rick_h_ is now known as rick_h
=== icey_ is now known as icey
=== arosales_ is now known as arosales
=== wpk_ is now known as wpk
=== skay is now known as Guest71369

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