=== mup_ is now known as mup | ||
setuid | 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:53 |
---|---|---|
setuid | 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/ ? | 05:54 |
kjackal | Good morning juju world! | 07:08 |
=== ant_ is now known as Guest70775 | ||
hoenir | someone has some good documentation on how to bootstrap on manual provider mode?(i'm interested in juju2.0) | 08:22 |
=== ant_ is now known as Guest33019 | ||
=== fginther` is now known as fginther | ||
kjackal | kwmonroe: Good morning! I have some good news for bigtop Zeppelin | 12:52 |
ryebot | is there some way to disable the juju login timeout or login without using the interactive prompt? (juju2) | 13:33 |
Prabakaran | 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 |
Prabakaran | 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 |
Prabakaran | 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. | 13:57 |
Prabakaran | Could somebody help me on this? | 14:10 |
babbageclunk | Prabakaran: So you installed mysql-client on another machine using apt? | 14:16 |
babbageclunk | Prabakaran: Is that machine managed by juju? | 14:16 |
babbageclunk | 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 |
Prabakaran | yes | 14:21 |
babbageclunk | Prabakaran: Essentially, deploying any charm that can be related to mysql should do it. | 14:22 |
Prabakaran | i have just created the container and sshed into it | 14:22 |
babbageclunk | Prabakaran: (and linking them together) | 14:22 |
babbageclunk | Prabakaran: https://jujucharms.com/requires/mysql | 14:23 |
Prabakaran | and thru charm it should work .. is that what u r sayin? | 14:23 |
babbageclunk | Well, at the moment, mysql doesn't know anything about the other machine (and nor does juju). | 14:24 |
babbageclunk | If you want juju to manage it, it needs to know that you want to use the database from outside. | 14:25 |
babbageclunk | or rather, from another machine. | 14:25 |
babbageclunk | Prabakaran: I think so. | 14:26 |
Prabakaran | if i use ubuntu-devenv and add-relation between them.. how do i test mysql-client usage ? | 14:27 |
babbageclunk | Prabakaran: hmm - good question. Just checking... | 14:27 |
babbageclunk | 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:31 |
Prabakaran | k <babbageclunk> thanks | 14:35 |
Prabakaran | let try using a charm | 14:35 |
Prabakaran | 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 |
Prabakaran | Below are the commands which I used juju deploy mysql juju deploy <sampledatabasecharm> juju add-relation mysql sampledatabasecharm | 17:24 |
Prabakaran | Kindly advise me on this issue | 17:29 |
kwmonroe | Prabakaran: you won't be using the 'root' user to connect | 17:29 |
kwmonroe | the mysql relation will return a username that you can use | 17:29 |
Prabakaran | 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:31 |
kwmonroe | Prabakaran: line 13 here should be "user", not "username" :) http://paste.ubuntu.com/19094762/ | 17:33 |
Prabakaran | k let me deploy and try once | 17:33 |
kwmonroe | 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:34 |
Prabakaran | is it a default database? | 17:35 |
kwmonroe | yes | 17:35 |
Prabakaran | k | 17:35 |
kwmonroe | 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:36 |
kwmonroe | 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:38 |
kwmonroe | 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:39 |
kwmonroe | 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:41 |
Prabakaran | for my requirement i need to create a database and let me try with mysqladmin | 17:43 |
Prabakaran | for mysqladmin, should i need to install anything using apt-get ? | 17:43 |
Prabakaran | here i am using apt-get install mysql-client | 17:44 |
kwmonroe | nope Prabakaran, nothing else to install. mysqladmin is included in mysql-client | 17:44 |
Prabakaran | k | 17:44 |
Prabakaran | let me deploy and confirm to you | 17:45 |
kwmonroe | 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:47 |
Prabakaran | so i will have to use db-admin: interface: mysql-root | 17:50 |
Prabakaran | in metadata.yaml | 17:50 |
Prabakaran | then what about "mysql": "interface": "mysql" | 17:51 |
Prabakaran | which i have already included> | 17:51 |
kwmonroe | 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:55 |
cory_fu | 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 |
cory_fu | There is already a mysql-shared interface layer registered for that protocol | 17:57 |
cory_fu | 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' | 17:59 |
kwmonroe | i don't understand how mysql-shared works (especially since provides.py is empty) | 18:01 |
cory_fu | 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:02 |
Prabakaran | should i need to change anything in the layer.yaml file? | 18:03 |
cory_fu | Prabakaran: You would need to change the "includes:" item that references "interface:mysql" to "interface:mysql-root" | 18:04 |
cory_fu | marcoceppi: Is there actually anything different in the protocol between mysql and mysql-root? | 18:07 |
Prabakaran | <cory_fu> 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:08 |
cory_fu | 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:09 |
kwmonroe | 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 |
kwmonroe | who is a ~mysql-charmer? | 18:11 |
cory_fu | 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:11 |
cory_fu | kwmonroe: It's only marcoceppi: https://launchpad.net/~mysql-charmers/+members | 18:12 |
kwmonroe | maintanership through obscurity. i like ;) | 18:12 |
kwmonroe | cory_fu: i'll do the re-register and see how we fair | 18:14 |
cory_fu | +1 | 18:14 |
cory_fu | 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:15 |
kwmonroe | 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:16 |
kwmonroe | 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:17 |
cory_fu | kwmonroe: You're confusing the mysql charm's relation name vs the client charm's relation name | 18:18 |
kwmonroe | dang.. you're right. my bads. | 18:19 |
kwmonroe | 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 |
Prabakaran | after all these changes files looks like http://paste.ubuntu.com/19099534/ http://paste.ubuntu.com/19099537/ http://paste.ubuntu.com/19099560/ | 18:20 |
kwmonroe | LGTM Prabakaran | 18:21 |
Prabakaran | i have pasted my reactive file, metadata.yaml and layer.yaml file...if you see any changes let me know | 18:21 |
Prabakaran | LGTM means :)? | 18:21 |
kwmonroe | Prabakaran: looks good to me :) | 18:23 |
Prabakaran | oh grt thanks:) | 18:23 |
Prabakaran | how about reactive file with database related query changes | 18:24 |
kwmonroe | np, let us know how it works out.. i think mysql-root could be useful to others too. | 18:24 |
kwmonroe | Prabakaran: the relation_calls look fine, but i'm not versed in mysqladmin syntax, so i don't have any input there. | 18:25 |
Prabakaran | 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 |
kwmonroe | Prabakaran: it's already there | 18:25 |
kwmonroe | i added it a few minutes ago | 18:25 |
marcoceppi | cory_fu: the protocol /is/ the same, for the most part | 18:25 |
Prabakaran | oh cool :) added soon | 18:26 |
Prabakaran | thats grear | 18:26 |
Prabakaran | *great | 18:26 |
Prabakaran | Thanks all , i will test and confirm to u.. | 18:26 |
marcoceppi | cory_fu kwmonroe I'll probably re-register the mysql-root and mysql layers as I round out the MySQL charm layerization | 18:26 |
kwmonroe | 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 |
marcoceppi | kwmonroe: no | 18:27 |
marcoceppi | the consumer side shouldn't change much | 18:27 |
kwmonroe | cool | 18:28 |
kwmonroe | 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:33 |
jrwren | im terrible at declaring function local variables. does it lint for that? | 18:36 |
magicaltrout | rock and roll kwmonroe ! You know how to live it up! | 18:38 |
* magicaltrout goes to take a look out of morbid curiosity | 18:38 | |
kwmonroe | jrwren: i'll check in a sec, but here's one that gets me all the time.. | 18:39 |
kwmonroe | if [ -f $ARCHIVE_DIR/*.gz ]; then | 18:39 |
kwmonroe | ^-- SC2086: Double quote to prevent globbing and word splitting. | 18:39 |
kwmonroe | ^-- SC2144: -f doesn't work with globs. Use a for loop. | 18:39 |
jrwren | very nice! | 18:41 |
kwmonroe | well jrwren, it does not seem to bark at local func vars (or lack thereof). i'll adjust my rating to 9/10 ;) | 18:45 |
Prabakaran | 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:50 |
kwmonroe | Prabakaran: can you paste the states that your charm thinks are set? juju run --unit <unit/X> 'charms.reactive -p get_states' | 18:55 |
kwmonroe | Prabakaran: also, did you re-run charm build after the code changes and deploy that new charm? | 18:56 |
Prabakaran | yes | 18:56 |
Prabakaran | root@ptcvm2:~# juju run --unit sampledatabase/3 'charms.reactive -p get_states' {} | 18:57 |
Prabakaran | it shows null | 18:57 |
kwmonroe | Prabakaran: how about: juju status-history sampledatabase/3 | 18:57 |
kwmonroe | that may not show much depending on what states your sampledatabase charm sets | 18:58 |
Prabakaran | juju status-history sampledatabase/3 ----http://pastebin.ubuntu.com/19103015/ | 18:59 |
kwmonroe | hmph.. odd that you wouldn't at least see the mysql.connected state since it clearly ran the joined and changed hooks | 19:01 |
kwmonroe | cory_fu: anything jump out at you? ^^ | 19:02 |
Prabakaran | <kwmonroe> 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 |
kwmonroe | np Prabakaran - have a good night.. | 19:04 |
Prabakaran | Thanks kwmonroe | 19:04 |
cory_fu | Sorry, I was grabbing some food. | 19:06 |
cory_fu | Have a good night, Prabakaran | 19:06 |
cory_fu | That is odd | 19:08 |
cory_fu | 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:09 |
cory_fu | 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 |
cory_fu | We're going to have to clone that repo, change that one line, and re-register | 19:12 |
kwmonroe | ah, on it. | 19:14 |
petevg | 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:27 |
petevg | 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:28 |
cory_fu | petevg: Comments added. I'm particularly confused about the docstring vs implementation of to_mock / mock_layers. | 21:55 |
petevg | cory_fu: reading through your comments now. Thank you very much :-) | 21:55 |
=== urulama is now known as urulama|__ | ||
=== alexisb is now known as alexisb-afk |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!