mupIssue operator#210 closed: ValueError: 'store_true' is not callable <Created by davigar15> <https://github.com/canonical/operator/issues/210>09:16
mthaddonif I have an action called "get-admin-password" will `self.framework.observe(self.on.get_admin_password_action, self._on_get_admin_password_action)` work as expected? Not quite sure from charmcraft init how to handle an action that includes dashes11:06
Chipacamthaddon: yes, dashes are turned into underscores11:07
mthaddonawesome, thx :)11:08
Alan21Is there a way with Juju to configure an agent on the machines we already have, without providing Juju with SSH access on this machine ? like instead of expecting the OLM to deploy the agent we deploy it ourselves11:11
Chipacafacubatista: 👋11:13
ChipacaAlan21: maybe #juju might be a better place to ask that?11:13
ChipacaAlan21: i don't know how manual the manual provison thing is11:13
Alan21Oops :D  Thanks !11:13
facubatista¡Muy buenos días a todos!11:13
facubatistaChipaca, hola!11:13
ChipacaAlan21: but, https://juju.is/docs/manual-cloud fwiw11:14
Alan21yeah I've read that, but it expects you to provide access to the OLM to the machine with SSH11:14
Alan21I would like to setup agents myself through configure management (Salt or Ansible) and then have the OLM only interact with the juju agent directly11:15
ChipacaAlan21: yeah, that's beyond me, sorry11:16
Chipaca#juju it is (or https://discourse.charmhub.io/)11:16
Chipacafacubatista: dunno if you saw we have a bug on master, such that init doesn't work11:16
Chipacafacubatista: charmcraft#211 fixes it11:16
mupPR charmcraft#211: Exercise command parsers <Created by chipaca> <https://github.com/canonical/charmcraft/pull/211>11:16
JoseMassonGood morning!12:23
bthomasmorning JoseMasson12:25
facundo__hola JoseMasson12:28
bthomasChipaca: facundo__ If I want to add a test to remove a relation and unit when the model is None, is it simply a matter of setting harness.charm.model to None. I gather I can not add units if model is none. But seems like I can add a relation.12:28
facundo__bthomas, can the model be None in real life?12:30
bthomasfacundo__: there is a default model. I am not sure about conditions when it can be none in "real life" perhas jam can shed some light on this. However "harness" is not real life. So the real question is can model be None when using harness. I do not know but will try and see what I can figure out, unless Chipaca or jam already know.12:32
JoseMassonWhile deploying a service (MySQL Cluster) I need to use a command line tool (mysql-shell) to set up this cluster from outside the units. Is it possible to install this package in the -operator pod? If not, does anybody knows which is the best practice?12:34
bthomasJoseMasson: It is not clear why you want to install something into the operator pod. Could you not use the mysql shell running on your host system to connect to the mysql server running on the application pod ?12:35
* bthomas brb12:35
JoseMassonbthomas: could be in localhost too, do we have an example charm that installs a snap package in localhost to use it during the deploy?12:39
Facubthomas, sorry, I asked a question and then got disconnected, don't know if you answered me :/12:41
bthomasJoseMasson: are you makeing a charm of the mysql shell also ? or are you using mysql shell to just test your mysql server charm ?12:42
bthomasFacu: (repasting) :  there is a default model. I am not sure about conditions12:43
bthomas          when it can be none in "real life" perhas jam can shed some light on12:43
bthomas          this. However "harness" is not real life. So the real question is12:43
bthomas          can model be None when using harness. I do not know but will try and12:43
bthomas          see what I can figure out, unless Chipaca or jam already know.12:43
bthomasoops sorry paste turned out to be bad12:43
bthomasshould I re-repaste ?12:43
bthomascleanly !12:43
Facuno worries, I was able to read it ok12:44
bthomasJoseMasson: If you only need mysql shell to test your charm (I presume this is the case) then why not just use the Ubunut apt or snap provided mysql shell to access the server provided by your charm.12:46
JoseMassonbthomas: mysql-shell is an administrative tool you need to setup the cluster. Once the units are running you need to connect with each one using mysql-shell and run some commands.12:46
JoseMassonbthomas: While writing a charm, which is the best practice to install a snap in localhost?12:48
bthomasJoseMasson: That sounds like a human operator's involvement is required in the deployment stage of your charm. You may want to check requirements with jldev. I would presume we would want a fully automated install process. I have not dug into mysql docs so can not comment further. But it may well be worth exploring if the process can be scripted in python instead of using mysql shell.12:49
bthomasJoseMasson: Not sure what you mean by install snap on localhost. But yes I have snapd running on my ubuntu and microk8s and juju are installed as snaps among other things.12:49
facundo__ugh, my network :(12:50
facundo__JoseMasson, you need that snap for the charm itself to run, or for mysql to run?12:51
bthomasfacundo__: if you are using wifi you may be having RF interference. Have you tried you network over ethernet.12:51
facundo__bthomas, I'm wired12:51
JoseMassonfacundo__: I nedd the snap to setup mysql-cluster12:52
FacuI don't know where the disconnect comes from , though12:53
FacuI have a somewhat stable ping time against
bthomasDo you have a health check in your ISP portal12:53
Facu~8ms, with peaks of 50ms12:53
Facuping against irc.freenode.org is !197ms12:54
Facu~197ms I mean12:54
bthomasFor example my ISP pings my router periodically and keeps a graph on my login account showing my historical ping times. This tells me if there is a problem on the WAN side of my network or on the LAN side .12:54
bthomas197ms is long12:55
Facuyes, but shouldn't timeout the connection, right?12:55
bthomaswait not that long.12:55
bthomasi take back my statement12:55
bthomasif you have an intermittent problem which does not happen at the very momment that you ping you may not see the issue.12:56
bthomasquestion is, is the issue in the LAN or your ISP WAN.12:56
JoseMassonbthomas: it is not required a human operator's involvement... at least OpenStack guys wrote a charm that executes mysql-shell during the charm deployment12:56
JoseMassonbthomas: In fact the have methods to handle this, in this file https://api.jujucharms.com/charmstore/v5/mysql-innodb-cluster-3/archive/lib/charm/openstack/mysql_innodb_cluster.py12:57
facundo__so, this disconnect was while ping was working fine, ~195ms but not even a missing packet12:58
JoseMassonfacundo__: Did you try something like: $ mtr irc.freenode.org ?12:59
bthomasJoseMasson: I presume you are referring to charmhelpers.contrib.database.mysql when you say "executes mysql-shell during charm deployment" ?13:00
facundo__JoseMasson, nice!13:02
bthomasThat looks like the MySQLdb python module. That should be fine.13:02
facundo__that shows me an average of 12ms to be20-c1900-br-04-bsas.claro.com.ar, and the next step has an average of 160ms to be2025.ccr21.mia01.atlas.cogentco.com13:03
facundo__so it's not me13:03
JoseMassonbthomas: I am referring to the method called "add_instance_to_cluster" in the class "MySQLInnoDBClusterCharm" that are in the file https://api.jujucharms.com/charmstore/v5/mysql-innodb-cluster-3/archive/lib/charm/openstack/mysql_innodb_cluster.py13:03
facundo__I see that hexchat has "net_ping_timeout = 0", which I don't know what it means13:03
bthomasJoseMasson: Why you say mysql-shell I understand it to be what is provided by the "mysql-client" ubunut deb package for instance13:03
facundo__I'll change it to superhigh13:03
bthomasmeant "when you say" not "why you say"13:04
JoseMassonbthomas: Yes, it is not provided by the "mysql-client".... it is a client and code editor for mysql... using mysql-shell you can execute SQL like in mysql-client, and python and JS :-)13:07
bthomasJoseMasson: Awesome. Then I would expect you do not need not do anything special to run any code using the imported python module in the operator pod. If your charm imports MySQLdb python module and uses it, by default all that code will run in the operator pod AFAIU. Only question is you may not be able to connect to the mysql server till such time it is actually running and opens ports your charm hook code can connect to.13:11
JoseMassonbthomas: You mean this package? https://pypi.org/project/MySQL-python/13:14
bthomasJoseMasson: "add_instance_to_cluster" does indeed run a shell script to connect to the mysql server (using run_mysqlsh_script) . I wonder if you could do it all in python instead, even though shell script will also work.13:15
bthomasJoseMasson: Official mysql connector seems to be https://dev.mysql.com/doc/connector-python/en/13:16
bthomasJoseMasson: ubunut python3-mysql package is built from https://pypi.python.org/pypi/mysqlclient13:18
JoseMassonbthomas: I am reading this, but AFAIU this is a simple mysql client library...13:20
bthomasIndeed but shouldn't that give you all the functionality you would need from a shell.13:21
* bthomas -> lunch brb13:22
JoseMassonbthomas: 95% sure it wouldn't provide the features mysql-shell provides...13:23
JoseMassonbthomas: I will investigate this: https://dev.mysql.com/doc/dev/mysqlsh-api-python/8.0/classmysqlsh_1_1_shell.html#details13:23
mthaddonChipaca: I tried that, but it seems to be looking for a shell script - am I missing something? https://pastebin.ubuntu.com/p/BTVc82Q5k5/13:32
Chipacamthaddon: why run and not run-action?13:34
mthaddonChipaca: doh, I'd just downgraded to 2.9rc3 from 3.0-beta1 and the latter had swapped some command line options - that works, thx13:36
mthaddonalthough I do see this in debug-log: application-openldap: 14:35:41 WARNING unit.openldap/2.get-admin-password /usr/bin/env: ‘python3’: No such file or directory13:37
mthaddonChipaca: https://paste.ubuntu.com/p/TDMhs8cZPC/ - any ideas?13:43
Chipacamthaddon: actions are run in the application pod, and it looks like you haven't got a python3 in there14:11
Chipacamthaddon: you'll need python3 and python3-yaml at the minimum14:11
mthaddonChipaca: ah okay - I've installed those and now get https://paste.ubuntu.com/p/k237RHVCzj/ - is that a bug in my action code?14:14
Chipacamthaddon: i'm afraid it's a bit obscure but yes: set_result takes a mapping (e.g. a dict)14:15
mthaddonok, thx14:16
Chipacamthaddon: in our defense the docs for set_results say that twice 🙂14:17
mthaddonsorry, can you point me at the docs?14:21
mthaddon(might even be good to list those in topic)14:21
Chipacamthaddon: https://ops.readthedocs.io/en/latest/#ops.charm.ActionEvent or https://ops.readthedocs.io/en/latest/#ops.charm.ActionEvent.set_results for the actual method14:22
=== ChanServ changed the topic of #smooth-operator to: general discussion of the operator framework || ops.rtfd.io || github.com/canonical/operator || ops 1.1.0 || charmcraft 0.6.1
Chipacamthaddon: ^ 🙂14:23
=== ChanServ changed the topic of #smooth-operator to: general discussion of the operator framework || API docs? ops.rtfd.io || github.com/canonical/operator || ops 1.1.0 || charmcraft 0.6.1
* bthomas updated charmcraft to latest/beta14:25
facundo__Chipaca, I don't fully understand your review status here https://github.com/canonical/charmcraft/pull/20414:45
mupPR charmcraft#204: Update snapcraft.yaml <Created by markshuttle> <https://github.com/canonical/charmcraft/pull/204>14:45
facundo__Chipaca, should it be approved?14:45
Chipacafacundo__: no, i reviewed it once, found it wanting, the issues were addressed but i have not reviewed it again14:47
FacuChipaca, ack, thanks14:51
ChipacaFacu: bring mate for the plenary16:57
Facumate! no, I just had lunch16:57
jambthomas, I don't see how you could have an existing application that isn't in a Model. You deploy an app in a model, thus there is always a Model that is known about.17:55
jam(the Model is your view of the world, which must exist)17:56
bthomasjam I meant when you do not add any model. there is always a model called "admin/controller"17:59
jambthomas, still, you always deploy *to a model*, we just create 2 "admin/controller, admin/default" when you bootstrap18:00
bthomasIndeed. Before launching any now app charm I always created a new model. I think it is the switch of the default logging level from DEBUG to INFO that got me off gaurd.18:01
jambthomas, you should be able to: juju model-defaults logging-config="<root>=DEBUG"18:17
jamwhich should mean new mod18:17
jamnew models also start in DEBUG18:17
bthomasjam: thank you I think that should do it.18:20
* Chipaca EODs18:21
* Facu eods20:43

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