=== mup_ is now known as mup
setuidIf 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
setuidIs 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
kjackalGood morning juju world!07:08
=== ant_ is now known as Guest70775
hoenirsomeone 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
kjackalkwmonroe: Good morning! I have some good news for bigtop Zeppelin12:52
ryebotis there some way to disable the juju login timeout or login without using the interactive prompt? (juju2)13:33
PrabakaranHello 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
PrabakaranTo 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 -u root -pedba1124-c825-4a8a-9ca9-b3caea9789cd” and getting an error stating “ERROR 1130 (HY000): Host '' is not allowed to connect to this MySQL server”13:57
PrabakaranAnd 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
PrabakaranCould somebody help me on this?14:10
babbageclunkPrabakaran: So you installed mysql-client on another machine using apt?14:16
babbageclunkPrabakaran: Is that machine managed by juju?14:16
babbageclunkPrabakaran: 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
babbageclunkPrabakaran: Essentially, deploying any charm that can be related to mysql should do it.14:22
Prabakarani have just created the container and sshed into it14:22
babbageclunkPrabakaran: (and linking them together)14:22
babbageclunkPrabakaran: https://jujucharms.com/requires/mysql14:23
Prabakaranand thru charm it should work .. is that what u r sayin?14:23
babbageclunkWell, at the moment, mysql doesn't know anything about the other machine (and nor does juju).14:24
babbageclunkIf you want juju to manage it, it needs to know that you want to use the database from outside.14:25
babbageclunkor rather, from another machine.14:25
babbageclunkPrabakaran: I think so.14:26
Prabakaranif i use ubuntu-devenv and add-relation between them.. how do i test mysql-client usage ?14:27
babbageclunkPrabakaran: hmm - good question. Just checking...14:27
babbageclunkPrabakaran: 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
Prabakarank <babbageclunk> thanks14:35
Prabakaranlet try using a charm14:35
PrabakaranI 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
PrabakaranBelow are the commands which I used juju deploy mysql juju deploy <sampledatabasecharm> juju add-relation mysql sampledatabasecharm17:24
Prabakaran Kindly advise me on this issue17:29
kwmonroePrabakaran: you won't be using the 'root' user to connect17:29
kwmonroethe mysql relation will return a username that you can use17:29
Prabakaranstill i was getting the same error. and also it was showing there is no username. thats y i commented username and gave as root17:31
kwmonroePrabakaran: line 13 here should be "user", not "username" :)  http://paste.ubuntu.com/19094762/17:33
Prabakarank let me deploy and try once17:33
kwmonroealso 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
Prabakaranis it a default database?17:35
kwmonroePrabakaran: 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
kwmonroePrabakaran: 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.yaml17:38
kwmonroePrabakaran: 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-changed17:39
kwmonroeso 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
Prabakaranfor my requirement i need to create a database and let me try with mysqladmin17:43
Prabakaranfor mysqladmin, should i need to install anything using apt-get ?17:43
Prabakaranhere i am using apt-get install mysql-client17:44
kwmonroenope Prabakaran, nothing else to install.  mysqladmin is included in mysql-client17:44
Prabakaranlet me deploy and confirm to you17:45
kwmonroeok 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
Prabakaranso i will have to use   db-admin:       interface: mysql-root17:50
Prabakaranin metadata.yaml17:50
Prabakaranthen what about   "mysql":     "interface": "mysql"17:51
Prabakaranwhich i have already included>17:51
kwmonroemarcoceppi: 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_fukwmonroe: 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 protocol17:57
cory_fuThere is already a mysql-shared interface layer registered for that protocol17:57
cory_fukwmonroe, 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
kwmonroei don't understand how mysql-shared works (especially since provides.py is empty)18:01
cory_fukwmonroe: 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
Prabakaranshould i need to change anything in the layer.yaml file?18:03
cory_fuPrabakaran: You would need to change the "includes:" item that references "interface:mysql" to "interface:mysql-root"18:04
cory_fumarcoceppi: 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_fuPrabakaran: 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 add18:09
kwmonroecory_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
kwmonroewho is a ~mysql-charmer?18:11
cory_fumarcoceppi, 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 done18:11
cory_fukwmonroe: It's only marcoceppi: https://launchpad.net/~mysql-charmers/+members18:12
kwmonroemaintanership through obscurity.  i like ;)18:12
kwmonroecory_fu: i'll do the re-register and see how we fair18:14
cory_fuPrabakaran: 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 else18:15
kwmonroewait 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-admin18:16
kwmonroeunless 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_fukwmonroe: You're confusing the mysql charm's relation name vs the client charm's relation name18:18
kwmonroedang.. you're right.  my bads.18:19
kwmonroeignore 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
Prabakaranafter all these changes files looks like http://paste.ubuntu.com/19099534/ http://paste.ubuntu.com/19099537/ http://paste.ubuntu.com/19099560/18:20
kwmonroeLGTM Prabakaran18:21
Prabakarani have pasted my reactive file, metadata.yaml and layer.yaml file...if you see any changes let me know18:21
PrabakaranLGTM means :)?18:21
kwmonroePrabakaran: looks good to me :)18:23
Prabakaranoh grt thanks:)18:23
Prabakaranhow about reactive file with database related query changes18:24
kwmonroenp, let us know how it works out.. i think mysql-root could be useful to others too.18:24
kwmonroePrabakaran: the relation_calls look fine, but i'm not versed in mysqladmin syntax, so i don't have any input there.18:25
Prabakaranso you will be adding mysql-root interface under interface.juju.solutions right? than only i willl be able to test my charm?18:25
kwmonroePrabakaran: it's already there18:25
kwmonroei added it a few minutes ago18:25
marcoceppicory_fu: the protocol /is/ the same, for the most part18:25
Prabakaranoh cool :) added soon18:26
Prabakaranthats grear18:26
PrabakaranThanks all , i will test and confirm to u..18:26
marcoceppicory_fu kwmonroe I'll probably re-register the mysql-root and mysql layers as I round out the MySQL charm layerization18:26
kwmonroecool 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
marcoceppikwmonroe: no18:27
marcoceppithe consumer side shouldn't change much18:27
kwmonroeanyone 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
jrwrenim terrible at declaring function local variables. does it lint for that?18:36
magicaltroutrock and roll kwmonroe ! You know how to live it up!18:38
* magicaltrout goes to take a look out of morbid curiosity18:38
kwmonroejrwren: i'll check in a sec, but here's one that gets me all the time..18:39
kwmonroe                if [ -f  $ARCHIVE_DIR/*.gz ]; then18: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
jrwrenvery nice!18:41
kwmonroewell jrwren, it does not seem to bark at local func vars (or lack thereof).  i'll adjust my rating to 9/10 ;)18:45
Prabakarani 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
kwmonroePrabakaran: can you paste the states that your charm thinks are set?  juju run --unit <unit/X> 'charms.reactive -p get_states'18:55
kwmonroePrabakaran: also, did you re-run charm build after the code changes and deploy that new charm?18:56
Prabakaranroot@ptcvm2:~# juju run --unit sampledatabase/3 'charms.reactive -p get_states' {}18:57
Prabakaranit shows null18:57
kwmonroePrabakaran: how about:  juju status-history sampledatabase/318:57
kwmonroethat may not show much depending on what states your sampledatabase charm sets18:58
Prabakaranjuju status-history sampledatabase/3 ----http://pastebin.ubuntu.com/19103015/18:59
kwmonroehmph.. odd that you wouldn't at least see the mysql.connected state since it clearly ran the joined and changed hooks19:01
kwmonroecory_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
kwmonroenp Prabakaran - have a good night..19:04
PrabakaranThanks kwmonroe19:04
cory_fuSorry, I was grabbing some food.19:06
cory_fuHave a good night, Prabakaran19:06
cory_fuThat is odd19:08
cory_fuActually, 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_fukwmonroe: 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_fuWe're going to have to clone that repo, change that one line, and re-register19:12
kwmonroeah, on it.19:14
petevgmarcoceppi, 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/121:27
petevgIt 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_fupetevg: Comments added.  I'm particularly confused about the docstring vs implementation of to_mock / mock_layers.21:55
petevgcory_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!