/srv/irclogs.ubuntu.com/2020/01/10/#juju.txt

babbageclunkroadmr: thanks!00:38
evhanWhat'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?00:53
wallyworldevhan: 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 later02:39
evhanwallyworld: 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:22
wallyworldyeah, the charm helpers one works for now03:24
wallyworldcharm helpers will be going away i expect, so stuff will need to be properly modelled on the charm class03:24
* thumper blows out a long breath03:34
thumperdebugging session over, and email sent out03:34
wallyworldexhaling is always a good idea at some point03:34
timClickslooks like it's been a hard day03:35
evhanIf 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:04
wallyworldmost people just use an alias AFAIK04:09
evhancool, worksforme04:10
iceywallyworld: charmhelpers won't be going away for a long time, methinks - do you know something I don't?06:58
wallyworldicey: 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 library06:59
iceywallyworld: the new charm operator framework that's going to replace the world like reactive did? ;-)07:00
wallyworldsomething like that07:00
wallyworldit's actually quite nice07:00
iceyyeah, don't hold your breath :-P07:00
iceywallyworld: it looked nice in Paris, but can we migrate workloads using classic charms to it?07:00
iceyand can we get roadmap time to re-do 8 years of charming? :-P07:01
wallyworldwell yeah, there is that :-)07:01
iceywallyworld: 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 :-D07:02
wallyworldtypically takes 3 goes to get a framework all nice and peachy07:05
iceyheh07:22
flxfooHi all07:54
flxfooI 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:55
wallyworldflxfoo: it is, i am about to EOD, but stickupkid (when he comes online) should be able to help with pylibjuju etc07:57
flxfoowallyworld: thanks will wait :)08:09
flxfooHi stickupkid, wallyworld told me that I could post a question here regarding the use of juju python lib...09:22
stickupkidflxfoo, yeah, go for it09:23
flxfoook, 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 machine09:25
flxfooso I can get a non leader percona server fine09:26
flxfooI can run the backup action fine09:26
flxfoobut not sure how to use the scp method09:26
stickupkidflxfoo, I didn't write, it, but let me check09:26
flxfooI 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
flxfoostickupkid: thanks09:28
flxfooin other words I would like to do something like : "juju scp mysql/1:/home/ubuntu/db.tar.gz /tmp/storage/" kind of09:33
manadartstickupkid: I think I have found the export issue for relation scopes. Testing now.09:35
stickupkidflxfoo, I'm actually unsure how to scp from a container, I don't think it's coded for09:49
stickupkidflxfoo, let me write something and see if I can get it to work, be right back09:51
flxfoostickupkid: thanks09:53
flxfoostickupkid: that's what I am afraid of... it sounds that one wuld scp from a container to another only... no sure09:53
flxfooI 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, but09:56
flxfooon 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?09:58
stickupkidpylibjuju uses what ever is found in `~/.local/share/juju` unless you override in connect()10:02
=== disposable3 is now known as disposable2
flxfoostickupkid: 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 certificate10:05
flxfoomaybe it is a lxd specific stuff?10:06
stickupkidflxfoo, 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 machine10:09
stickupkidflxfoo, this shows how to get it from a machine https://github.com/juju/python-libjuju/pull/38310:10
stickupkidflxfoo, attempting to get it from a container will fail (it fails for Juju CLI as well by the way)10:10
stickupkidflxfoo, juju scp 0/lxd/0:/home/ubuntu/.profile /tmp/profile210:11
stickupkid0/lxd/0 <- first machine in a lxd container, wanting the first container10:12
flxfoostickupkid: many thanks I will try some stuff and keep you posted...10:17
drulHi, 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:19
drul(I do pause the related hacluster unit first)10:21
flxfoostickupkid: how do I get the machine id from a unit name?10:47
stickupkidflxfoo, you can't, in order to get a machine id, you would do - `unit.machine.id`10:49
flxfoostickupkid: thanks10:50
stickupkidflxfoo, names aren't a hierarchy, the relations are through requesting methonds10:50
stickupkid*methods10:50
stickupkidflxfoo, generally you try and work controller -> models -> machines, not the other way around10:51
stickupkidit is possible, but it means walking it backwards10:51
stickupkidmanadart, ace11:09
stickupkidthat makes soooo much sense11:09
manadartstickupkid: You're looking at it? https://github.com/juju/juju/pull/1109111:10
stickupkidmanadart, i am11:10
* manadart nods.11:10
stickupkidmanadart, just doing the QA steps11:11
manadartstickupkid: Wait on.11:11
stickupkid:(11:11
manadartstickupkid: It's alright :) I copied QA from another patch. If you use this, it's faster: https://pastebin.canonical.com/p/ppsKFKrk2Q/11:13
manadartWhen that lands, I have the integration tests ready to go.11:14
stickupkidmanadart, done11:38
manadartstickupkid: Ta.11:38
achilleasamanadart: stickupkid or rick_h can you recommend a simple charm that stores state that I can use for testing?11:42
stickupkidwhat sort of state?11:42
achilleasadon't care; anything that potentially ends up in sqlite11:43
stickupkidwas going to suggest dummy-sink11:43
stickupkidbut unsure if trolling me with sqlite11:44
stickupkidredis ;)11:44
drulAm 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
achilleasanot trolling. I think that state gets serialized into a blob and stored in a sqlite :D11:45
stickupkiddoes it11:45
zeestratdrul: I recommend asking in #openstack-charms or on discourse.jujucharms.com12:46
drulzeestrat: ah, okay, thank you, appreciate the response :)12:47
=== drul is now known as drulgaard
zeestratdrul: Np. Sorry that I don't have anything more helpful. I don't have dev running at the moment so I can't test.12:55
manadartstickupkid: https://github.com/juju/juju/pull/1109214:37
manadartstickupkid: Am I missing something here? It is in the same file... https://github.com/juju/juju/pull/11092/checks?check_run_id=38349979314:47
stickupkiddunno, that does look suspicious14:48
stickupkidmanadart, looking at the code now15:01
stickupkidmanadart, https://paste.ubuntu.com/p/c7xx8cwp8r/15:06
stickupkidmanadart, it's because you have multiple functions with the same name.... crappy regexp15:06
hmlmanadart:  when you’ve time - here’s the change https://github.com/juju/utils/commit/ecdb27d4bf024174ae351b99a94c5400fd219ade15:08
manadarthml: Ack.15:08
hmlmanadart:  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:09
stickupkidmanadart, quick HO?15:10
manadartstickupkid: That's done.15:16
manadarthml: Is there a parent PR for that that I can pull down to play?16:01
hmlmanadart:  I don’t have one yes, but give me a few and can do.16:02
achilleasahml: have a few minor comments for your PR16:12
hmlachilleasa:  thx16:13
hmlmanadart:  getting weird dependency issues with deps on this.  will take a bit longer16:13
hmlmanadart:  had to fix a dependency circle with names/utils.  https://github.com/juju/juju/pull/1109416:59
hmlmanadart: can wait for monday definitely16:59
manadarthml, will look first thing.17:09
hmlmanadart: ty, have a good weekend17:12

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