=== mup_ is now known as mup [05:53] If I use 'openstack-install' on 14.04, and it installs all of the nodes using juju except the broken keystone node, why does 'juju status' in another session to the same host, not show all of the nodes currently deployed? [05:54] Is there a way to tell juju to use the specific config that openstack-install uses in ~/.cloud-installer/juju/local/, vs. the 'normal' config that would go in ~/.juju/ ? [07:08] Good morning juju world! === ant_ is now known as Guest70775 [08:22] someone has some good documentation on how to bootstrap on manual provider mode?(i'm interested in juju2.0) === ant_ is now known as Guest33019 === fginther` is now known as fginther [12:52] kwmonroe: Good morning! I have some good news for bigtop Zeppelin [13:33] is there some way to disable the juju login timeout or login without using the interactive prompt? (juju2) [13:57] Hello Team, I am facing the scenario wherein I will have to create a database for my product installation in the remote container/machine and for this I am using Mysql charm and in my host I have installed mysql-client in order to create a database and run some sql commands. [13:57] To test this functionality, I have installed mysql charm in the container 1 and installed mysql-client in an another container 2. I ran the command “mysql -h 10.178.209.124 -u root -pedba1124-c825-4a8a-9ca9-b3caea9789cd” and getting an error stating “ERROR 1130 (HY000): Host '10.178.209.157' is not allowed to connect to this MySQL server” [13:57] And I was trying to trace this issue and found out an actual cause by running this command SELECT host FROM mysql.user WHERE User = 'root'; As per this command there is no % symbol to allow remote unit to execute mysql commands. Kindly advise me on how to use mysql-client for mysql charm. [14:10] Could somebody help me on this? [14:16] Prabakaran: So you installed mysql-client on another machine using apt? [14:16] Prabakaran: Is that machine managed by juju? [14:21] Prabakaran: If so, I think you could deploy ubuntu-devenv to the machine and add a relation between mysql and ubuntu-devenv. That should set up access to the database from there. [14:21] yes [14:22] Prabakaran: Essentially, deploying any charm that can be related to mysql should do it. [14:22] i have just created the container and sshed into it [14:22] Prabakaran: (and linking them together) [14:23] Prabakaran: https://jujucharms.com/requires/mysql [14:23] and thru charm it should work .. is that what u r sayin? [14:24] Well, at the moment, mysql doesn't know anything about the other machine (and nor does juju). [14:25] If you want juju to manage it, it needs to know that you want to use the database from outside. [14:25] or rather, from another machine. [14:26] Prabakaran: I think so. [14:27] if i use ubuntu-devenv and add-relation between them.. how do i test mysql-client usage ? [14:27] Prabakaran: hmm - good question. Just checking... [14:31] Prabakaran: I'm fairly sure you'd use a hook tool to find out the connection information, but I don't know the exact command. [14:35] k thanks [14:35] let try using a charm [17:24] I am not able to run sql commands in the remote-database using mysql charm and mysql interface. I am getting permission error. Below is the log file and reactive file link Log: http://paste.ubuntu.com/19094490/ Reactive file of sampledatabasecharm: http://paste.ubuntu.com/19094762/ [17:24] Below are the commands which I used juju deploy mysql juju deploy juju add-relation mysql sampledatabasecharm [17:29] Kindly advise me on this issue [17:29] Prabakaran: you won't be using the 'root' user to connect [17:29] the mysql relation will return a username that you can use [17:31] still i was getting the same error. and also it was showing there is no username. thats y i commented username and gave as root [17:33] Prabakaran: line 13 here should be "user", not "username" :) http://paste.ubuntu.com/19094762/ [17:33] k let me deploy and try once [17:34] also Prabakaran, the mysql relation will create and return a database for you to use.. you would get the name of that database with "relation_call --state 'mysql.available' 'database'" [17:35] is it a default database? [17:35] yes [17:35] k [17:36] Prabakaran: i don't think you'll need the config_db() function at all. unless you have a specific need to create a database, user, and grant privs for that user, you should just use the default db that mysql creates for you. [17:38] Prabakaran: if you *do* need to create dbs and users and do stuff like "grant", you'll need to relate your charm to mysql over the mysql-admin relation. see the openbook charm for an example that uses the admin relation vs the normal mysql relation: https://api.jujucharms.com/charmstore/v5/trusty/openbook-3/archive/metadata.yaml [17:39] Prabakaran: the openbook db-admin-relation-changed hook shows how they use the admin relation to create specific databases and users: https://api.jujucharms.com/charmstore/v5/trusty/openbook-3/archive/hooks/db-admin-relation-changed [17:41] so i think the first thing you'll need to decide is whether or not you need to do administrative things to the mysql charm, or if you can simply use the db and credentials that mysql creates for you by default. [17:43] for my requirement i need to create a database and let me try with mysqladmin [17:43] for mysqladmin, should i need to install anything using apt-get ? [17:44] here i am using apt-get install mysql-client [17:44] nope Prabakaran, nothing else to install. mysqladmin is included in mysql-client [17:44] k [17:45] let me deploy and confirm to you [17:47] ok Prabakaran, but just to be clear, the mysql relation only grants your user access to a default db. since you need to create your own db, you will need to specify the mysql-root relation in your metadata.yaml. [17:50] so i will have to use db-admin: interface: mysql-root [17:50] in metadata.yaml [17:51] then what about "mysql": "interface": "mysql" [17:51] which i have already included> [17:55] marcoceppi: cory_fu: Prabakaran needs a mysql-root interface insted of mysql. i'm pretty sure that means he can remove "interface: mysql" from his metadata.yaml, but i'm not sure what state he will then need to react too. will mysql.available be set with mysql-root? [17:57] kwmonroe: It will not, because mysql-root is a different interface than mysql, so the mysql interface layer will not work with mysql-root. A new interface layer will need to be created to support the mysql-root interface protocol [17:57] There is already a mysql-shared interface layer registered for that protocol [17:59] kwmonroe, Prabakaran: That said, if you change the interface to 'mysql-root' but keep the relation name as 'mysql', and the interface layer for the mysql-root protocol follows the same pattern, then you could conceivably still use the 'mysql.available' state, since the prefix ('mysql') is based on the relation name, not the interface name. But from your conversation above, it would probably need to change to 'db-admin.available' [18:01] i don't understand how mysql-shared works (especially since provides.py is empty) [18:02] kwmonroe: Well, the provides.py would presumably be used by the mysql charm itself, but since that hasn't been converted to layers yet, it's currently unused. It should definitely be filled in, though. [18:03] should i need to change anything in the layer.yaml file? [18:04] Prabakaran: You would need to change the "includes:" item that references "interface:mysql" to "interface:mysql-root" [18:07] marcoceppi: Is there actually anything different in the protocol between mysql and mysql-root? [18:08] here i have a doubt ... there is no mysql-root interface available in the interface.juju.solutions then how charm build cmd will pick mysql-client? [18:09] Prabakaran: Yes, the mysql-root interface does not currently exist and needs to be created. However, I think that the protocol may actually be identical to 'mysql' in which case it could be trivial to add [18:11] cory_fu: i don't see (m)any diffs between mysql and mysql-root.. it's just that root grants privs on everything vs just a single db (https://api.jujucharms.com/charmstore/v5/mysql/archive/hooks/db-relation-joined) [18:11] who is a ~mysql-charmer? [18:11] marcoceppi, kwmonroe, Prabakaran: From my reading of the mysql charm, I think the protocol itself is actually identical and we can probably just re-register https://github.com/johnsca/juju-relation-mysql under the mysql-root name and call it done [18:12] kwmonroe: It's only marcoceppi: https://launchpad.net/~mysql-charmers/+members [18:12] maintanership through obscurity. i like ;) [18:14] cory_fu: i'll do the re-register and see how we fair [18:14] +1 [18:15] Prabakaran: For you, that means that all you have to do is change your layer.yaml to "interface:mysql-root" and metadata.yaml to "interface: mysql-root" If you keep the same relation name, you shouldn't have to change anything else [18:16] wait wait.. he'll need to make the relation name db-admin because the "admin = xyz" line here https://api.jujucharms.com/charmstore/v5/mysql/archive/hooks/db-relation-joined looks for db-admin [18:17] unless i'm reading this wrong... "admin = os.path.basename(sys.argv[0]) == 'db-admin-relation-joined'" means mysql is checking to see if the hook name is 'db-admin-relation-joined', right cory_fu? [18:18] kwmonroe: You're confusing the mysql charm's relation name vs the client charm's relation name [18:19] dang.. you're right. my bads. [18:20] ignore my last couple comments Prabakaran. any really, any time cory_fu is in the covo, just do what he says... "Prabakaran: For you, that means that all you have to do is change your layer.yaml to "interface:mysql-root" and metadata.yaml to "interface: mysql-root" If you keep the same relation name, you shouldn't have to change anything else" [18:20] after all these changes files looks like http://paste.ubuntu.com/19099534/ http://paste.ubuntu.com/19099537/ http://paste.ubuntu.com/19099560/ [18:21] LGTM Prabakaran [18:21] i have pasted my reactive file, metadata.yaml and layer.yaml file...if you see any changes let me know [18:21] LGTM means :)? [18:23] Prabakaran: looks good to me :) [18:23] oh grt thanks:) [18:24] how about reactive file with database related query changes [18:24] np, let us know how it works out.. i think mysql-root could be useful to others too. [18:25] Prabakaran: the relation_calls look fine, but i'm not versed in mysqladmin syntax, so i don't have any input there. [18:25] so you will be adding mysql-root interface under interface.juju.solutions right? than only i willl be able to test my charm? [18:25] Prabakaran: it's already there [18:25] i added it a few minutes ago [18:25] cory_fu: the protocol /is/ the same, for the most part [18:26] oh cool :) added soon [18:26] thats grear [18:26] *great [18:26] Thanks all , i will test and confirm to u.. [18:26] cory_fu kwmonroe I'll probably re-register the mysql-root and mysql layers as I round out the MySQL charm layerization [18:27] cool marcoceppi -- any beef with Prabakaran using the mysq-root interface as-is for now? (which is just a dupe of the mysql interface with a new name atm) [18:27] kwmonroe: no [18:27] the consumer side shouldn't change much [18:28] cool [18:33] anyone writing bash charms (or anyone that has bash scripts in general).. i was at texas linux fest this past weekend and got turned on to http://www.shellcheck.net/. it's a *really* neat way to lint your bash, if you're into that kind of thing. turns out, i'm terrible at quoting my ${variables}. [18:36] im terrible at declaring function local variables. does it lint for that? [18:38] rock and roll kwmonroe ! You know how to live it up! [18:38] * magicaltrout goes to take a look out of morbid curiosity [18:39] jrwren: i'll check in a sec, but here's one that gets me all the time.. [18:39] if [ -f $ARCHIVE_DIR/*.gz ]; then [18:39] ^-- SC2086: Double quote to prevent globbing and word splitting. [18:39] ^-- SC2144: -f doesn't work with globs. Use a for loop. [18:41] very nice! [18:45] well jrwren, it does not seem to bark at local func vars (or lack thereof). i'll adjust my rating to 9/10 ;) [18:50] i kwmonroe, i just tested my sample charm and it is pending for long time on unknown state with the log http://paste.ubuntu.com/19102078/ and code files are http://paste.ubuntu.com/19099534/ http://paste.ubuntu.com/19099537/ http://paste.ubuntu.com/19099560/. [18:55] Prabakaran: can you paste the states that your charm thinks are set? juju run --unit 'charms.reactive -p get_states' [18:56] Prabakaran: also, did you re-run charm build after the code changes and deploy that new charm? [18:56] yes [18:57] root@ptcvm2:~# juju run --unit sampledatabase/3 'charms.reactive -p get_states' {} [18:57] it shows null [18:57] Prabakaran: how about: juju status-history sampledatabase/3 [18:58] that may not show much depending on what states your sampledatabase charm sets [18:59] juju status-history sampledatabase/3 ----http://pastebin.ubuntu.com/19103015/ [19:01] hmph.. odd that you wouldn't at least see the mysql.connected state since it clearly ran the joined and changed hooks [19:02] cory_fu: anything jump out at you? ^^ [19:04] it is time for me to sleep.. i will lookinto this issue... and if you come to know anything regarding this please mail me. Thanks for your support :) [19:04] np Prabakaran - have a good night.. [19:04] Thanks kwmonroe [19:06] Sorry, I was grabbing some food. [19:06] Have a good night, Prabakaran [19:08] That is odd [19:09] Actually, it looks like the hooks aren't getting built properly: 2016-07-11 18:38:40 INFO juju.worker.uniter.operation runhook.go:116 skipped "mysql-relation-joined" hook (missing) [19:12] kwmonroe: I think I know what the problem is. Interface layers aren't designed to be re-used like that; it's interface.yaml still calls it "mysql" and I think that's blocking it from being included in the build (should have gotten a build warning or something) [19:12] We're going to have to clone that repo, change that one line, and re-register [19:14] ah, on it. [21:27] marcoceppi, cory_fu: following up on the coversation in the broadcast hangout on Friday, I put together a first pass at a unit testing helper lib for layered charms. Feedback, harsh criticism, etc. welcome! PR here: https://github.com/juju-solutions/charms.unit/pull/1 [21:28] It works with the unit tests that I wrote here: https://github.com/juju-solutions/layer-apache-bigtop-base/pull/28 (You just have to change the name of the import, and put charms.unit somewhere in your path). [21:55] petevg: Comments added. I'm particularly confused about the docstring vs implementation of to_mock / mock_layers. [21:55] cory_fu: reading through your comments now. Thank you very much :-) === urulama is now known as urulama|__ === alexisb is now known as alexisb-afk