[00:38] <babbageclunk> roadmr: thanks!
[00:53] <evhan> What's the right way to send things to `juju debug-log` from an operator-based charm? Does CharmBase have access to a logging method or similar?
[02:39] <wallyworld> evhan: there will be a logging method somewhere which does the same thing as the existing "juju-log" hook command but i don't know off hand where it is. the folks who can answer for sure will be online later
[03:22] <evhan> wallyworld: Yeah, I had been shelling out to juju-log, then I found a method in charmhelpers.core.hookenv which is working in the meantime.
[03:24] <wallyworld> yeah, the charm helpers one works for now
[03:24] <wallyworld> charm helpers will be going away i expect, so stuff will need to be properly modelled on the charm class
[03:34]  * thumper blows out a long breath
[03:34] <thumper> debugging session over, and email sent out
[03:34] <wallyworld> exhaling is always a good idea at some point
[03:35] <timClicks> looks like it's been a hard day
[04:04] <evhan> If I want to always run juju with some particular options, is there a client config file I should use? Or just set up an alias with some flags?
[04:09] <wallyworld> most people just use an alias AFAIK
[04:10] <evhan> cool, worksforme
[06:58] <icey> wallyworld: charmhelpers won't be going away for a long time, methinks - do you know something I don't?
[06:59] <wallyworld> icey: there's discussions around if it is wanted to be in the new charm operator framework, since it's a relatively uncurated set of funcs() just sort of dumped in a python library
[07:00] <icey> wallyworld: the new charm operator framework that's going to replace the world like reactive did? ;-)
[07:00] <wallyworld> something like that
[07:00] <wallyworld> it's actually quite nice
[07:00] <icey> yeah, don't hold your breath :-P
[07:00] <icey> wallyworld: it looked nice in Paris, but can we migrate workloads using classic charms to it?
[07:01] <icey> and can we get roadmap time to re-do 8 years of charming? :-P
[07:01] <wallyworld> well yeah, there is that :-)
[07:02] <icey> wallyworld: so we'll just have a third generation of charms - at least we kind of know what we need to do with our CI to add a new kind of thing :-D
[07:05] <wallyworld> typically takes 3 goes to get a framework all nice and peachy
[07:22] <icey> heh
[07:54] <flxfoo> Hi all
[07:55] <flxfoo> I have few questions. But a first one would be something about using python juju lib, and using scp to get a file from a container. Is it the right place to ask?
[07:57] <wallyworld> flxfoo: it is, i am about to EOD, but stickupkid (when he comes online) should be able to help with pylibjuju etc
[08:09] <flxfoo> wallyworld: thanks will wait :)
[09:22] <flxfoo> Hi stickupkid, wallyworld told me that I could post a question here regarding the use of juju python lib...
[09:23] <stickupkid> flxfoo, yeah, go for it
[09:25] <flxfoo> ok, I am trying to write small script, I manage to get a unit, go through the model etc... run, and run-action... more explicitely, I want to use the API, to run backup from a non leader percona server, then scp that backup to the caller machine
[09:26] <flxfoo> so I can get a non leader percona server fine
[09:26] <flxfoo> I can run the backup action fine
[09:26] <flxfoo> but not sure how to use the scp method
[09:26] <stickupkid> flxfoo, I didn't write, it, but let me check
[09:28] <flxfoo> I was looking at getting a mchaine object, but I don't see how I would get the "caller" instance to grab the source (remote container) down to "local" location...
[09:28] <flxfoo> stickupkid: thanks
[09:33] <flxfoo> in other words I would like to do something like : "juju scp mysql/1:/home/ubuntu/db.tar.gz /tmp/storage/" kind of
[09:35] <manadart> stickupkid: I think I have found the export issue for relation scopes. Testing now.
[09:49] <stickupkid> flxfoo, I'm actually unsure how to scp from a container, I don't think it's coded for
[09:51] <stickupkid> flxfoo, let me write something and see if I can get it to work, be right back
[09:53] <flxfoo> stickupkid: thanks
[09:53] <flxfoo> stickupkid: that's what I am afraid of... it sounds that one wuld scp from a container to another only... no sure
[09:56] <flxfoo> I would have another question regarding credentials, here locally (lxd) I can connect to the model with "connect_current()" and perform a `run('uname -a')` (eg) without problem, but
[09:58] <flxfoo> on production... I would probably need to use `connect()` with a user/password certificate etc... which we do use with "semaphore" (deployment) ... but when I use `run()` (whatever command) I have a permission denied, I suppose the user is restricted on units?
[10:02] <stickupkid> pylibjuju uses what ever is found in `~/.local/share/juju` unless you override in connect()
[10:05] <flxfoo> stickupkid: ok, so that what I tried is to use connect locally... I got the pem certificate from `juju controller-config ca-cert` but when I try to connect using "endpoint` user /pass and cert (pem) it sasys incorrect certificate
[10:06] <flxfoo> maybe it is a lxd specific stuff?
[10:09] <stickupkid> flxfoo, so yeah, scp doesn't know how to resolve the container address. The work around would be to get your machine to first get the backup from the container and then get it from the machine
[10:10] <stickupkid> flxfoo, this shows how to get it from a machine https://github.com/juju/python-libjuju/pull/383
[10:10] <stickupkid> flxfoo, attempting to get it from a container will fail (it fails for Juju CLI as well by the way)
[10:11] <stickupkid> flxfoo, juju scp 0/lxd/0:/home/ubuntu/.profile /tmp/profile2
[10:12] <stickupkid> 0/lxd/0 <- first machine in a lxd container, wanting the first container
[10:17] <flxfoo> stickupkid: many thanks I will try some stuff and keep you posted...
[10:19] <drul> Hi, all.  Having issues with HA (hacluster charm) on multiple services (mostly testing on openstack-dashboard and keystone).  Deployment is fine, service is reachable via VIP.
[10:19] <drul>   However, when I pause a unit that ISN'T the current active node (i.e. doesn't have the vip on its container), I get a service outage for several (varies, usually 5-30) seconds.  Any thoughts?
[10:21] <drul> (I do pause the related hacluster unit first)
[10:47] <flxfoo> stickupkid: how do I get the machine id from a unit name?
[10:49] <stickupkid> flxfoo, you can't, in order to get a machine id, you would do - `unit.machine.id`
[10:50] <flxfoo> stickupkid: thanks
[10:50] <stickupkid> flxfoo, names aren't a hierarchy, the relations are through requesting methonds
[10:50] <stickupkid> *methods
[10:51] <stickupkid> flxfoo, generally you try and work controller -> models -> machines, not the other way around
[10:51] <stickupkid> it is possible, but it means walking it backwards
[11:09] <stickupkid> manadart, ace
[11:09] <stickupkid> that makes soooo much sense
[11:10] <manadart> stickupkid: You're looking at it? https://github.com/juju/juju/pull/11091
[11:10] <stickupkid> manadart, i am
[11:10]  * manadart nods.
[11:11] <stickupkid> manadart, just doing the QA steps
[11:11] <manadart> stickupkid: Wait on.
[11:11] <stickupkid> :(
[11:13] <manadart> stickupkid: It's alright :) I copied QA from another patch. If you use this, it's faster: https://pastebin.canonical.com/p/ppsKFKrk2Q/
[11:14] <manadart> When that lands, I have the integration tests ready to go.
[11:38] <stickupkid> manadart, done
[11:38] <manadart> stickupkid: Ta.
[11:42] <achilleasa> manadart: stickupkid or rick_h can you recommend a simple charm that stores state that I can use for testing?
[11:42] <stickupkid> what sort of state?
[11:43] <achilleasa> don't care; anything that potentially ends up in sqlite
[11:43] <stickupkid> was going to suggest dummy-sink
[11:44] <stickupkid> but unsure if trolling me with sqlite
[11:44] <stickupkid> redis ;)
[11:45] <drul> Am I right in deducing that pausing the hacluster subordinate will move the vip elsewhere (if it's on that unit), but will not remove the parent charm's service from haproxy?  i.e. service requests to the vip can (and do) still hit that unit?
[11:45] <achilleasa> not trolling. I think that state gets serialized into a blob and stored in a sqlite :D
[11:45] <stickupkid> does it
[12:46] <zeestrat> drul: I recommend asking in #openstack-charms or on discourse.jujucharms.com
[12:47] <drul> zeestrat: ah, okay, thank you, appreciate the response :)
[12:55] <zeestrat> drul: Np. Sorry that I don't have anything more helpful. I don't have dev running at the moment so I can't test.
[14:37] <manadart> stickupkid: https://github.com/juju/juju/pull/11092
[14:47] <manadart> stickupkid: Am I missing something here? It is in the same file... https://github.com/juju/juju/pull/11092/checks?check_run_id=383499793
[14:48] <stickupkid> dunno, that does look suspicious
[15:01] <stickupkid> manadart, looking at the code now
[15:06] <stickupkid> manadart, https://paste.ubuntu.com/p/c7xx8cwp8r/
[15:06] <stickupkid> manadart, it's because you have multiple functions with the same name.... crappy regexp
[15:08] <hml> manadart:  when you’ve time - here’s the change https://github.com/juju/utils/commit/ecdb27d4bf024174ae351b99a94c5400fd219ade
[15:08] <manadart> hml: Ack.
[15:09] <hml> manadart:  in the test, i need to get a cert in pem format to the client to test.  the cert should be know about by the server too to pass.
[15:10] <stickupkid> manadart, quick HO?
[15:16] <manadart> stickupkid: That's done.
[16:01] <manadart> hml: Is there a parent PR for that that I can pull down to play?
[16:02] <hml> manadart:  I don’t have one yes, but give me a few and can do.
[16:12] <achilleasa> hml: have a few minor comments for your PR
[16:13] <hml> achilleasa:  thx
[16:13] <hml> manadart:  getting weird dependency issues with deps on this.  will take a bit longer
[16:59] <hml> manadart:  had to fix a dependency circle with names/utils.  https://github.com/juju/juju/pull/11094
[16:59] <hml> manadart: can wait for monday definitely
[17:09] <manadart> hml, will look first thing.
[17:12] <hml> manadart: ty, have a good weekend