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