[09:16] <mup> Issue operator#210 closed: ValueError: 'store_true' is not callable <Created by davigar15> <https://github.com/canonical/operator/issues/210>
[11:06] <mthaddon> if 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 dashes
[11:07] <Chipaca> mthaddon: yes, dashes are turned into underscores
[11:08] <mthaddon> awesome, thx :)
[11:11] <Alan21> Is 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 ourselves
[11:13] <Chipaca> facubatista: 👋
[11:13] <Chipaca> Alan21: maybe #juju might be a better place to ask that?
[11:13] <Chipaca> Alan21: i don't know how manual the manual provison thing is
[11:13] <Alan21> Oops :D  Thanks !
[11:13] <facubatista> ¡Muy buenos días a todos!
[11:13] <facubatista> Chipaca, hola!
[11:14] <Chipaca> Alan21: but, https://juju.is/docs/manual-cloud fwiw
[11:14] <Alan21> yeah I've read that, but it expects you to provide access to the OLM to the machine with SSH
[11:15] <Alan21> I would like to setup agents myself through configure management (Salt or Ansible) and then have the OLM only interact with the juju agent directly
[11:16] <Chipaca> Alan21: yeah, that's beyond me, sorry
[11:16] <Chipaca> #juju it is (or https://discourse.charmhub.io/)
[11:16] <Chipaca> facubatista: dunno if you saw we have a bug on master, such that init doesn't work
[11:16] <Chipaca> facubatista: charmcraft#211 fixes it
[11:16] <mup> PR charmcraft#211: Exercise command parsers <Created by chipaca> <https://github.com/canonical/charmcraft/pull/211>
[12:23] <JoseMasson> Good morning!
[12:25] <bthomas> morning JoseMasson
[12:28] <facundo__> hola JoseMasson
[12:28] <bthomas> Chipaca: 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:30] <facundo__> bthomas, can the model be None in real life?
[12:32] <bthomas> facundo__: 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:34] <JoseMasson> While 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:35] <bthomas> JoseMasson: 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 brb
[12:39] <JoseMasson> bthomas: 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:41] <Facu> bthomas, sorry, I asked a question and then got disconnected, don't know if you answered me :/
[12:42] <bthomas> JoseMasson: are you makeing a charm of the mysql shell also ? or are you using mysql shell to just test your mysql server charm ?
[12:43] <bthomas> Facu: (repasting) :  there is a default model. I am not sure about conditions
[12:43] <bthomas>           when it can be none in "real life" perhas jam can shed some light on
[12:43] <bthomas>           this. However "harness" is not real life. So the real question is
[12:43] <bthomas>           can model be None when using harness. I do not know but will try and
[12:43] <bthomas>           see what I can figure out, unless Chipaca or jam already know.
[12:43] <bthomas> oops sorry paste turned out to be bad
[12:43] <bthomas> should I re-repaste ?
[12:43] <bthomas> cleanly !
[12:44] <Facu> no worries, I was able to read it ok
[12:46] <bthomas> JoseMasson: 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] <JoseMasson> bthomas: 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:48] <JoseMasson> bthomas: While writing a charm, which is the best practice to install a snap in localhost?
[12:49] <bthomas> JoseMasson: 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] <bthomas> JoseMasson: 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:50] <facundo__> ugh, my network :(
[12:51] <facundo__> JoseMasson, you need that snap for the charm itself to run, or for mysql to run?
[12:51] <bthomas> facundo__: if you are using wifi you may be having RF interference. Have you tried you network over ethernet.
[12:51] <facundo__> bthomas, I'm wired
[12:52] <JoseMasson> facundo__: I nedd the snap to setup mysql-cluster
[12:53] <Facu> I don't know where the disconnect comes from , though
[12:53] <Facu> I have a somewhat stable ping time against 1.1.1.1
[12:53] <bthomas> Do you have a health check in your ISP portal
[12:53] <Facu> ~8ms, with peaks of 50ms
[12:54] <Facu> ping against irc.freenode.org is !197ms
[12:54] <Facu> ~197ms I mean
[12:54] <bthomas> For 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:55] <bthomas> 197ms is long
[12:55] <Facu> yes, but shouldn't timeout the connection, right?
[12:55] <bthomas> wait not that long.
[12:55] <bthomas> i take back my statement
[12:56] <bthomas> if you have an intermittent problem which does not happen at the very momment that you ping you may not see the issue.
[12:56] <bthomas> question is, is the issue in the LAN or your ISP WAN.
[12:56] <JoseMasson> bthomas: it is not required a human operator's involvement... at least OpenStack guys wrote a charm that executes mysql-shell during the charm deployment
[12:57] <JoseMasson> bthomas: 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.py
[12:58] <facundo__> so, this disconnect was while ping was working fine, ~195ms but not even a missing packet
[12:59] <JoseMasson> facundo__: Did you try something like: $ mtr irc.freenode.org ?
[13:00] <bthomas> JoseMasson: I presume you are referring to charmhelpers.contrib.database.mysql when you say "executes mysql-shell during charm deployment" ?
[13:02] <facundo__> JoseMasson, nice!
[13:02] <bthomas> That looks like the MySQLdb python module. That should be fine.
[13:03] <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.com
[13:03] <facundo__> so it's not me
[13:03] <JoseMasson> bthomas: 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.py
[13:03] <facundo__> I see that hexchat has "net_ping_timeout = 0", which I don't know what it means
[13:03] <bthomas> JoseMasson: Why you say mysql-shell I understand it to be what is provided by the "mysql-client" ubunut deb package for instance
[13:03] <facundo__> I'll change it to superhigh
[13:04] <bthomas> meant "when you say" not "why you say"
[13:07] <JoseMasson> bthomas: 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:11] <bthomas> JoseMasson: 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:14] <JoseMasson> bthomas: You mean this package? https://pypi.org/project/MySQL-python/
[13:15] <bthomas> JoseMasson: "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:16] <bthomas> JoseMasson: Official mysql connector seems to be https://dev.mysql.com/doc/connector-python/en/
[13:18] <bthomas> JoseMasson: ubunut python3-mysql package is built from https://pypi.python.org/pypi/mysqlclient
[13:19] <bthomas> https://mysqlclient.readthedocs.io/
[13:20] <JoseMasson> bthomas: I am reading this, but AFAIU this is a simple mysql client library...
[13:21] <bthomas> Indeed but shouldn't that give you all the functionality you would need from a shell.
[13:22]  * bthomas -> lunch brb
[13:23] <JoseMasson> bthomas: 95% sure it wouldn't provide the features mysql-shell provides...
[13:23] <JoseMasson> bthomas: I will investigate this: https://dev.mysql.com/doc/dev/mysqlsh-api-python/8.0/classmysqlsh_1_1_shell.html#details
[13:32] <mthaddon> Chipaca: I tried that, but it seems to be looking for a shell script - am I missing something? https://pastebin.ubuntu.com/p/BTVc82Q5k5/
[13:34] <Chipaca> mthaddon: why run and not run-action?
[13:36] <mthaddon> Chipaca: doh, I'd just downgraded to 2.9rc3 from 3.0-beta1 and the latter had swapped some command line options - that works, thx
[13:37] <mthaddon> although 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 directory
[13:43] <mthaddon> Chipaca: https://paste.ubuntu.com/p/TDMhs8cZPC/ - any ideas?
[14:11] <Chipaca> mthaddon: actions are run in the application pod, and it looks like you haven't got a python3 in there
[14:11] <Chipaca> mthaddon: you'll need python3 and python3-yaml at the minimum
[14:14] <mthaddon> Chipaca: ah okay - I've installed those and now get https://paste.ubuntu.com/p/k237RHVCzj/ - is that a bug in my action code?
[14:15] <Chipaca> mthaddon: i'm afraid it's a bit obscure but yes: set_result takes a mapping (e.g. a dict)
[14:16] <Chipaca> set_results*
[14:16] <mthaddon> ok, thx
[14:17] <Chipaca> mthaddon: in our defense the docs for set_results say that twice 🙂
[14:21] <mthaddon> sorry, can you point me at the docs?
[14:21] <mthaddon> (might even be good to list those in topic)
[14:22] <Chipaca> mthaddon: https://ops.readthedocs.io/en/latest/#ops.charm.ActionEvent or https://ops.readthedocs.io/en/latest/#ops.charm.ActionEvent.set_results for the actual method
[14:23] <Chipaca> mthaddon: ^ 🙂
[14:23] <mthaddon> :D
[14:25]  * bthomas updated charmcraft to latest/beta
[14:45] <facundo__> Chipaca, I don't fully understand your review status here https://github.com/canonical/charmcraft/pull/204
[14:45] <mup> PR charmcraft#204: Update snapcraft.yaml <Created by markshuttle> <https://github.com/canonical/charmcraft/pull/204>
[14:45] <facundo__> Chipaca, should it be approved?
[14:47] <Chipaca> facundo__: no, i reviewed it once, found it wanting, the issues were addressed but i have not reviewed it again
[14:51] <Facu> Chipaca, ack, thanks
[16:57] <Chipaca> Facu: bring mate for the plenary
[16:57] <Facu> mate! no, I just had lunch
[17:55] <jam> bthomas, 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:56] <jam> (the Model is your view of the world, which must exist)
[17:59] <bthomas> jam I meant when you do not add any model. there is always a model called "admin/controller"
[18:00] <jam> bthomas, still, you always deploy *to a model*, we just create 2 "admin/controller, admin/default" when you bootstrap
[18:01] <bthomas> Indeed. 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:17] <jam> bthomas, you should be able to: juju model-defaults logging-config="<root>=DEBUG"
[18:17] <jam> which should mean new mod
[18:17] <jam> new models also start in DEBUG
[18:20] <bthomas> jam: thank you I think that should do it.
[18:21]  * Chipaca EODs
[20:43]  * Facu eods