[07:25] <nobuto> hi, can somebody please review my PR for apache-php layer? https://github.com/juju-solutions/layer-apache-php/pull/4
[09:23] <kjackal> admcleod: not enough slaves?
[09:23] <admcleod> kjackal: it appears that trying to run the hbase smoke-test when i dont have a 3 slave cluster deployed (only 1 slave) it dies due to min/max replication factor issue
[09:24] <kjackal> but the smoketest setsup only one slave, right?
[09:25] <kjackal> I mean the amulet test that runs the smoketest sets up a single slave cluster
[09:25] <admcleod> kjackal: im not running the amulet test yet, i deployed it manually
[09:38] <kjackal> admcleod: I have a question
[09:39] <kjackal> you know how we have this flag --no-local-layers
[09:39] <kjackal> is there a way to say no-local-layers except layer XYZ ?
[09:42] <admcleod> kjackal: im not sure. i would probably rename a local dir or something to work around that
[09:42] <admcleod> kjackal: or move things around
[09:43] <admcleod> kjackal: --include and --exclude migth be nice though
[09:43] <kjackal> Yes, for now i am moving thing around
[09:46] <kjackal> admcleod: that is stange.... I see that hadoop-client becomes ready before the plugin even installs java....
[09:46] <admcleod> kjackal: which state?
[09:46] <kjackal> admcleod: I must have something setup worng...
[09:47] <kjackal> http://pastebin.ubuntu.com/17320656/
[10:00] <brunogirin> Hi all, I'm trying to configure Juju 2.0 to work with an OpenStack cloud and I'm getting very confused about how to do this. I've got a Juju 1 environments.yaml file for it but am struggling to migrate that to 2.0. Can anybody help?
[10:03] <admcleod> kjackal: one moment
[10:03] <admcleod> brunogirin: where are you getting stuck?
[10:05] <kjackal> admcleod, brunogirin: I will try!
[10:05] <brunogirin> admcleod: understanding what goes into the cloud config, the model and if anything goes in the model, how I define it
[10:06] <tzounox> hello I got hook failed "update-status" on juju an this error from logs unner.go:275 stopped "api", err: login for "machine-0-lxc-3" blocked because upgrade in progress
[10:06] <tzounox> could you help me with this?
[10:07] <kjackal> brunogirin: what instructions did you follow to configure juju 2.0 with openstack?
[10:07] <admcleod> brunogirin: so there is a basic example here: https://jujucharms.com/docs/devel/clouds (if you search the page for 'openstack.example.com' you'll find it)
[10:08] <admcleod> tzounox: have you actually recently tried to upgrade the charm on that unit?
[10:08] <tzounox> yeah it says that it is on latest version
[10:09] <tzounox> it says upgrade in progress but it is not
[10:09] <brunogirin> admcleod, kjackal: yes, that's the doc I was following; 1st question: the enpoint specified under region-name, is it the identity endpoint, the compute one, another one?
[10:09] <tzounox> dont know whats happening
[10:10] <brunogirin> and where do attributes like "use-floating-ip" ad "tenant-name" go?
[10:12] <admcleod> tzounox: does the juju debug-log show anything more? its not doing something strange?
[10:13] <tzounox> i go this one ERROR juju.worker runner.go:223 exited "firewaller": machine 5 not provisioned
[10:13] <admcleod> brunogirin: https://bugs.launchpad.net/juju-core/+bug/1576750
[10:13] <mup> Bug #1576750: juju2 usability: many options have to be specified for every bootstrap <bootstrap> <juju-release-support> <jujuqa> <landscape> <usability> <juju-core:Fix Released by axwalk> <https://launchpad.net/bugs/1576750>
[10:14] <admcleod> brunogirin: see the 3rd from last comment
[10:14] <admcleod> tzounox: i have seen this before but am struggling to recall why
[10:16] <admcleod> tzounox: which version of juju?
[10:16] <admcleod> brunogirin: does that help?
[10:16] <brunogirin> admcleod: thanks, that clarifies some of it! Is the tenant-name specified when I run juju bootstrap then?
[10:17] <tzounox> admcleod
[10:17] <tzounox> admcleod
[10:17] <tzounox> admcleod
[10:17] <tzounox> 1.25.5-trusty-amd64
[10:17] <admcleod> brunogirin: it looks like that should also go in the config
[10:17] <gnuoy> brunogirin, I have OS_TENANT_NAME env variable set, among others, when bootstrapping to point juju  at the tenant
[10:17] <admcleod> brunogirin: e.g https://jujucharms.com/docs/devel/temp-release-notes, search for 'tenant-name' there
[10:19] <admcleod> brunogirin: but im guessing at this point so probably what gnuoy said :)
[10:19] <brunogirin> admcleod: ah right, it makes sense in the credentials!
[10:20] <brunogirin> admcleod: yes, I might do that for now but in the future I'll have multiple environment on that same cloud (UAT, prod, etc) so it's useful to be able to put it in a config file that can be used on bootstrap
[10:20] <admcleod> brunogirin: ah right ok
[10:21] <admcleod> tzounox: so.. yeah it was a bug that affected an older version. is this an environment that has been bootstrapped for a while, functional, and just stopped working?
[10:21] <admcleod> tzounox: it seems like perhaps lxd is having an issue provisioning machines, so perhaps theres a local resource issue?
[10:22] <tzounox> yeah this error appeared 2 days later and it is a local setup
[10:22] <brunogirin> admcleod: thanks for the help, I'll try all this and tell you what happens
[10:22] <tzounox> is there anything that I can do?
[10:22] <admcleod> brunogirin: no worries, interested to know
[10:23] <admcleod> tzounox: there is some 'lxd refresh' type command, im trying to find ..
[10:23] <brunogirin> admcleod: last question before that, the endpoint in the cloud config, is it the identity endpoint?
[10:27] <admcleod> brunogirin: i think its identity
[10:28] <brunogirin> admcleod: thanks, I'll try that then
[10:28] <admcleod> tzounox: i cant find what im looking for, but are you able to just restart the lxd service?
[10:29] <tzounox> i have done this before, i juju ssh into the service and then sudo reboot but it does not fixed it
[10:29] <tzounox> I have restart the node also and the hole system
[10:33] <admcleod> tzounox: does juju status say anything revealing about machine-0?
[10:34] <kjackal> I remember having this error in the past... "ImportError: cannot import name 'layer'" does anyone know what do I need to do to see the layers from an action?
[10:36] <tzounox> i got this from juju status
[10:36] <tzounox> cannot run instances: cannot run instances: gomaasapi: got
[10:36] <tzounox>       error back from server: 409 CONFLICT (No available node matches constraints:
[10:36] <tzounox>       zone=default)
[10:39] <admcleod> tzounox: have you tried to destroy and re-bootstrap the environment? (or is this not practical for you?)
[10:40] <tzounox> i have done it in the past but again i got the error after 2 days and it is very time consuming
[10:40] <tzounox> so its not actually an option
[10:41] <kjackal> tzounox: anything interesting under /var/log/lxc or /var/log/lxd ?
[10:42] <brunogirin> admcleod: result of my test: I get a beautiful go stack trace in openstack/provider.go
[10:42] <admcleod> tzounox: right - i understand. is upgrading to juju 2.0 an option?
[10:42] <admcleod> brunogirin: pastebin?
[10:43] <tzounox> i go this from /var/log/lxc
[10:43] <tzounox> lxc-start 1465824044.634 ERROR    lxc_cgmanager - cgmanager.c:cgm_destroy:575 - Error connecting to cgroup manager
[10:44] <brunogirin> admcleod: http://pastebin.com/aQFfnnuj
[10:45] <admcleod> tzounox: do you have any more errors after that?
[10:46] <tzounox> no its only this
[10:47] <admcleod> tzounox: one recommendation is to install 'cgroupmanager' but i doubt thats going to help
[10:48] <tzounox> i should install it on the machine with the juju services?
[10:49] <admcleod> tzounox: on the lxd host
[10:49] <tzounox> and whats the other option that i have :)
[10:53] <admcleod> tzounox: well... there should be more people waking up soon (US time zone) who might be able to help with this
[10:53] <tzounox> ok thank you very much for your time
[10:54] <dimitern> brunogirin: hey there
[10:54] <admcleod> dimitern: so brunogirin is trying to bootstrap openstack and gets this: http://pastebin.com/aQFfnnuj
[10:54] <dimitern> brunogirin: you were having some issues with juju 2.0?
[10:54] <brunogirin> dimitern: hi, yes, I seem to struggle with bootstrapping OpenStack
[10:55] <dimitern> nasty! :/
[10:55] <admcleod> tzounox: no problem, ill see if i can find someone who might be able to help more
[10:55] <dimitern> brunogirin: what version of openstack is that if you know?
[10:56] <brunogirin> dimitern: no idea, it's those guys: http://www.datacentred.co.uk/
[10:57] <brunogirin> dimitern: according to the compute endpoint, it might be v2
[10:57] <dimitern> brunogirin: thanks, I'll have a look; and you're using the juju-2.0-beta8 release tarball ?
[10:57] <dimitern> brunogirin: or you build from source?
[10:57] <brunogirin> dimitern: yes 2.0-beta8 from xenial
[10:58] <brunogirin> dimitern: do you want me to file a launchpad bug with the cloud config in it?
[10:58] <dimitern> brunogirin: that will be great, thanks!
[10:59] <dimitern> brunogirin: I'll have a look what might be causing this
[11:01] <brunogirin> dimitern: thanks, I'm happy to create a user for you on that cloud if it helps find out what the problem is
[11:02] <admcleod> it looks like datacentred is running juno
[11:05] <brunogirin> dimitern: stupid question: how do you file a bug when ubuntu-bug tells you that juju-2.0 is not an official ubuntu package and the problem can't be reported?
[11:13] <brunogirin> dimitern: bug filed here: https://bugs.launchpad.net/ubuntu/+source/juju-core/+bug/1592365
[11:13] <mup> Bug #1592365: Juju 2.0 crashes on bootstrap with datacentred.co.uk OpenStack cloud <juju-core (Ubuntu):New> <https://launchpad.net/bugs/1592365>
[11:14] <dimitern> brunogirin: awesome! We'll track the progress there, thanks!
[11:14] <brunogirin> dimitern: thanks! If you need more info, please tell me and as I said, happy to give you access to the environment if it helps
[11:17] <dimitern> brunogirin: hey, can you try something first please? remove the config section in the datacenterd section of your clouds.yaml and try bootstrapping again?
[11:18] <dimitern> brunogirin: default config per cloud cannot be specified in the clouds.yaml as far as I know, and might be the reason of that panic (well, it shouldn't panic)
[11:19] <brunogirin> dimitern: same error; I got the default config example from 3rd comment before last in this bug report: https://bugs.launchpad.net/juju-core/+bug/1576750
[11:19] <mup> Bug #1576750: juju2 usability: many options have to be specified for every bootstrap <bootstrap> <juju-release-support> <jujuqa> <landscape> <usability> <juju-core:Fix Released by axwalk> <https://launchpad.net/bugs/1576750>
[11:21] <dimitern> brunogirin: oh, ok (news to me); can you try bootstrap with --debug and attach the log to the bug please (scrub secrets / keys before that, if any)?
[11:24] <brunogirin> dimitern: done
[11:29] <dimitern> brunogirin: thanks! That revealed the issue, I think
[11:29] <brunogirin> dimitern: excellent!
[11:30] <dimitern> brunogirin: please try using the endpoint with the version - https://compute.datacentred.io:5000/v2.0/ - as endpoint in your confing
[11:31] <dimitern> brunogirin: that should let bootstrap go further (hopefully complete)
[11:32] <brunogirin> dimitern: it did go further and is now finishing with an error that I'll paste in the bug report
[11:34] <brunogirin> dimitern: pasted
[11:34] <dimitern> brunogirin: thanks, looking..
[11:35] <dimitern> brunogirin: ok, that's more like it - it fails now because it needs the metadata for juju tools and cloud images
[11:35] <brunogirin> dimitern: OK so how do I provide it with that?
[11:36] <dimitern> brunogirin: please try following the docs for setting up juju on private clouds: https://jujucharms.com/docs/devel/howto-privatecloud
[11:42] <dimitern> brunogirin: instead of 'tools-metadata-url' though, use 'agent-metadata-url' (the doc needs updating)
[11:42] <brunogirin> dimitern: I'm reading through it and I struggle to understand what I need to do. Isn't that part of the config dependent on my cloud provider and how do I get the right info?
[11:43] <dimitern> brunogirin: basically, you need 2 things - agent metadata (the juju tools tarballs), which you can use 'sync-tools' to copy to a local dir from the official sources, and image-metadata-url (the cloud images, those need to match what you have as images on datacenterd)
[11:46] <dimitern> brunogirin: steps: 1) cd $HOME; mkdir -p juju-metadata/tools; juju sync-tools --local-dir=$HOME/juju-metadata/tools; 2) juju metadata generate-tools -d $HOME/juju-metadata/tools; 3) juju metadata validate-tools -d $HOME/juju-metadata/tools;
[11:48] <brunogirin> dimitern: thanks I'll try that; for the second part (images), do I need to provide a mapping from provider image IDs to series?
[11:49] <dimitern> brunogirin: then for the images, 4) juju metadata generate-image -u https://compute.datacentred.io:5000/v2.0/ -d $HOME/juju-metadata/images -a amd64 -i <nova-image-id>; 5) juju metadata validate-image (same args) to verify
[11:50] <brunogirin> dimitern: thanks! I'll try that and report back
[11:50] <dimitern> brunogirin: yeah, the "nova-image-id" must match for arch and series (e.g. amd64 ubuntu xenial)
[11:51] <dimitern> brunogirin: you should pass -s xenial (for example) to generate-image (and validate-image later), in addition to -i -d and -a
[12:44] <brunogirin> dimitern: I get the following error when I do juju metadata validate-tools: http://pastebin.com/TUnYsV6F
[12:47] <dimitern> brunogirin: I think you need to pass the -u (endpoint url) and -p openstack and -r (region name)
[12:48] <brunogirin> dimitern: for tools as well?
[12:48] <dimitern> brunogirin: yeah, see 'juju help metadata validate-tools'
[12:51] <brunogirin> dimitern: adding the series to all of this works, thanks
[12:52] <dimitern> brunogirin: great! so if validate-image also worked ok, you should be good to bootstrap
[12:55] <dimitern> brunogirin: would you do me a favor please? if you add a comment to the bug describing what commands you needed to run to set up images and tools, that will be extremely useful both for other users and for updating the docs properly for 2.0
[12:55] <brunogirin> dimitern: yes I'll do that
[12:55] <dimitern> brunogirin: awesome! thank you very much, and sorry for the troubles :)
[12:56] <brunogirin> dimitern: apparently, there's no metadata validate-image command so I'll skip that
[12:57] <dimitern> brunogirin: sorry, it's validate-images
[12:57] <dimitern> (but strangely 'generate-image' :()
[13:00] <brunogirin> dimitern: I assumeit's because you can create multiple images and validate them all
[13:01] <dimitern> brunogirin: hmm, good point!
[13:10] <brunogirin> dimitern: I get the same error when I do juju bootstrap and it looks like it doesn't check my local folder: http://pastebin.com/0VqPqYMX
[13:24] <dimitern> brunogirin: sorry, otp, will get back to you soon
[13:25] <brunogirin> dimitern: no worries :)
[13:25] <dimitern> brunogirin: try using "file:///home/<yourusername>/juju-metadata/tools" as "agent-metadata-url" and the same but with "/images" for "image-metadata-url"
[13:26] <dimitern> brunogirin: to pass these to bootstrap, use e.g. --config agent-metadata-url='file:///...' --config image-metadata-url='file:///..'
[13:31] <brunogirin> dimitern: working so far, it's running apt-get upgrade! thanks! I'll add the full set of commands that work to the ticket.
[13:31] <dimitern> brunogirin: great! I'm glad it finally worked ;)
[13:33] <brunogirin> dimitern: so am I :) What's the process to contribute out of the box support for new clouds so that others don't have to go through this?
[13:34] <rick_h_> jamespage: ping, invited you to a chat to get me up to speed on HEAT related stuff if you can do it tomorrow. Let me know if it's not a good time.
[13:35] <dimitern> brunogirin: our documentation can be improved - there's a link in the left menu below about contributing
[13:35] <brunogirin> dimitern: yes I saw that, once I've got it all working, I'll see if I can contribute some docs
[13:36] <dimitern> brunogirin: even if it's a rough draft, that's OK we have technical writers that will take care of formatting, etc.
[13:38] <brunogirin> dimitern: it was so close! But it eventually failed after starting Mongo still because it can't find images but this time on the controller it seems...
[13:39] <dimitern> brunogirin: can you paste? maybe the series / arch do not match?
[13:40] <brunogirin> I'll add the log to the ticket as it's quite long
[13:46] <brunogirin> dimitern: added to the bug with attached log file
[13:48] <rick_h_> lazyPower: got a sec?
[13:51] <dimitern> brunogirin: thanks!
[13:51] <lazyPower> rick_h_ certainly, whats up?
[13:51] <rick_h_> lazyPower: chef questions for you if you have a few to chat?
[13:51] <rick_h_> lazyPower: https://hangouts.google.com/hangouts/_/canonical.com/rick?authuser=0 if so
[14:20] <lazyPower> neiljerram hey o/ are you around
[14:32] <brunogirin> dimitern: I got it to work and can deploy charms now, however, it doesn't seem to expose them properly so I need to investigate that
[14:34] <dimitern> brunogirin: sweet! for exposing should pass the 'use-floating-ip' setting to true (at bootstrap or with `juju set-model-config use-floating-ip=true` (IIRC)
[14:38] <brunogirin> dimitern: I did that but the floating IP points to the Juju controller, not to the charm instance so when I go to that URL I get nothing and `juju status` still shows the internal IP
[14:43] <brunogirin> dimitern: do you need 2 floating IPs for it to work on OpenStack, one for Juju, one for the service you're trying to expose?
[14:43] <dimitern> brunogirin: use-floating-ip=true means juju will add one FIP per instance
[14:44] <dimitern> brunogirin: if you deploy a unit to the controller node and expose its service, you should be able to access it
[14:44] <brunogirin> dimitern: ah right, so my provider needs to allow me to do that! They limit me to one floating IP at the moment so I'll ask them to increase that.
[14:44] <dimitern> brunogirin: no, sorry - it's not that juju will add more than 1 FIP
[14:46] <dimitern> brunogirin: I'd suggest this - try `juju add-machine --series xenial` and once that machine is up, `juju add-unit <yourapp> --to <#>` (the newly added machine id, likely 1)
[14:46] <gennadiy> hi everybody, we are deploying windows(windows server 2012) machine with juju to openstack. so how to get password for this machine?
[14:46] <gennadiy> seems there are not cert with user credentials
[14:46] <gennadiy> so "nova get-password <instance-id> <private-key-path>" it does not work
[14:47] <dimitern> brunogirin: assuming you also did `juju expose <yourapp>` and `juju status` shows the added unit on the new machine is running and has open ports (e.g. 80/tcp), you should be able to access it
[14:48] <dimitern> gennadiy: can you ssh to a linux machine ok?
[14:48] <gennadiy> it's not a linux
[14:48] <gennadiy> it's windows
[14:49] <dimitern> gennadiy: ok, but can you start a linux instance and ssh into it ok?
[14:49] <gennadiy> sure
[14:49] <dimitern> gennadiy: if you keypair is set correctly you should be able to
[14:49] <rick_h_> gennadiy: so this is a hyperv on nova?
[14:50] <gennadiy> i have 10 machines with linux and 1 with windows
[14:50] <gennadiy> it's nova
[14:50] <brunogirin> dimitern: mmm, juju add-machine says that my new machine is in error
[14:51] <rick_h_> gennadiy: right so this is a nova compute instance on openstack you're trying to get into? Was it a juju deployed charm?
[14:51] <gennadiy> i use empty windows charm, just for testing
[14:51] <rick_h_> gennadiy: ah ok
[14:51] <dimitern> brunogirin: what's the error?
[14:52] <gennadiy> machine is created - 40         started 10.9.8.110 9b003da2-bc22-41e3-81ad-def9485df4d2 win2012r2 nova
[14:52] <gennadiy> but i can't connect to it - juju ssh 40 doesn't work
[14:52] <brunogirin> dimitern: juju status just shows state to be error and no explanation, not do I have any log in juju debug-log
[14:52] <gennadiy> also i don't know password for rdp.
[14:52] <dimitern> brunogirin: try juju status --format=yaml for more detail
[14:52] <gennadiy> metadata: Key Name - None
[14:53] <brunogirin> dimitern: ah right, it now says "IP allocation over quota." so I need to ask them for additional IPs
[14:55] <gennadiy> when i create windows machine in openstack manually i can provide pem file and after that i can use "nova get-password <instance-id> <private-key-path>" to get password. but i don't how to do it in juju case
[15:00] <dimitern> brunogirin: yeah, that's it :)
[15:03] <roadmr> hey folks, what's the story about creating new charms using ansible integration? e.g. charmhelpers.contrib.ansible.AnsibleHooks? is it still OK to do so, or should we move toward something else?
[15:03] <dimitern> gennadiy: I'd suggest asking somebody from cloudbase (I've pinged them about your question in #juju-dev)
[15:03] <gennadiy> dimitern, thank
[15:04] <gennadiy> *thank you
[15:05] <dimitern> gennadiy: np, if you get no response, I'd suggest sending a mail to juju@lists.ubuntu.com to ask
[15:52] <gennadiy> dimitern: have you got any updates about windows machine? i don't have access #juju-dev
[15:53] <lazyPower> gennadiy they haven't responded, but they are also far eastern europe
[15:53] <lazyPower> romania i believe
[15:55] <lazyPower> its past EOD (6:55 pm) for that timezone, so you may want to go ahead and ping the list
[15:56] <lazyPower> also, it wont let you join #juju-dev?
[16:08] <rick_h_> balloons: do you have any idea for gennadiy in our tests as to if we deploy a windows application how we log into the server at all?
[16:08] <rick_h_> alexisb: do you recall who might be idling from cloudbase that would know? ^
[16:12]  * balloons looks at scrollback
[16:12] <lazyPower> rick_h_ - from what i recall there was an openssl requirement in maas, you add the tls key to use rdp
[16:12] <rick_h_> lazyPower: hmm, so this is openstack deployed sample windows charm.
[16:12] <lazyPower> oh right
[16:12] <rick_h_> lazyPower: so I'm wondering what we do to get into that then
[16:13] <lazyPower> sorry, I missed that very important detail...
[16:14] <lazyPower> i'm not seeing anything relevant in a cursory google search either
[16:17] <gennadiy> another question related to juju. can we manage openstack networks from juju? also can we manage NICs? because for some machines we need to have 2-3 NICs from different networks
[16:24] <balloons> sounds like a job for maas
[16:25] <alexisb> rick_h_, I would start with gabriel he should be on juju-dev
[16:29] <rick_h_> alexisb: k ty
[16:30] <rick_h_> ,
[16:38] <Prabakaran> My charm uses MySQL database charm and I am developing my charm as layered charm. To connect with MySQL database my charm uses MySQL interface. here my requirement is I will have to create a database running mysql commands (meaning MySQL database in the different container). Is it possible for me to run mysql command from the remote container (where my charm is installed)?
[16:39] <lazyPower> Prabakaran - if you have the mysql client tools available to you, you certainly can. You'll get the data to build a connection string from the interface, which includes a database, username/password, address and port.
[16:39] <Prabakaran> Can u please explain me in detail?
[16:40] <Prabakaran> how to make use of it in my charm?
[16:41] <lazyPower> Prabakaran - so in your layered consumer of mysql, you need to include the mysql interface layer in your layer.yaml, update your metadata.yaml with the requires: declaration, and use that relation name:  @when('mysql.available') - install the mysql client tools, and execute your database migration from there using the mysql tooling (or substitute with your language tooling)
[16:42] <Prabakaran> k.. i will to explore this.. and do u have any example charm for me to understand?
[16:42] <lazyPower> Prabakaran - there's a walkthrough by example of something similar here: https://jujucharms.com/docs/devel/developer-layer-example
[16:51] <jose> bdx: lemme see if I can reproduce that bug
[16:58] <Prabakaran> Hi Lazypower , i just referred this link what you sent, it just uses the database and it is not running any mysql scripts. And adding to this question how ssh works between two containers..if so, we need to exchange ssh keys between two containers?
[16:59] <lazyPower> Prabakaran - you dont need to ssh with the mysql connection string. you can install mysql-client apt package and run mysql -u db.username() -p db.password() db.database()   << prabakarans_mysql_script.sql
[17:00] <Prabakaran> can you help me with an example>
[17:02] <lazyPower> Prabakaran - i dont have a ready made example off hand, no
[17:02] <lazyPower> Prabakaran are you familiar with executing mysql scripts remotely with the mysql cli?
[17:03] <Prabakaran> no i am not.. i will have to explore
[17:03] <lazyPower> Prabakaran - http://stackoverflow.com/questions/10676432/how-to-execute-an-remote-sql-in-mysql-command-line
[17:03] <lazyPower> Prabakaran - are you writing your layer in bash or python?
[17:03] <Prabakaran> in python..
[17:04] <lazyPower> ok, the path to get from a-z will be a little long winded, but bear with me and i'll guide you on irc. i'm multi-tasking so expect long pauses
[17:04] <lazyPower> Prabakaran - add layer:apt and interface:mysql to your layer.yaml to start. confirm when ready for next step
[17:05] <Prabakaran> ya sure
[17:06] <Prabakaran> i am using ibm-base layer which uses apt....i need to use apt here ?
[17:08] <Prabakaran> i have written layer.yaml
[17:09] <lazyPower> Prabakaran - if you have layer:apt in a lower layer you do not need to re-include it, no
[17:09] <Prabakaran> i have written it
[17:10] <lazyPower> Prabakaran - define the mysql requires relationship in metadata.yaml:  http://paste.ubuntu.com/17331636/
[17:12] <Prabakaran> ya i have written metadata.yaml
[17:19] <Prabakaran> metadata.yaml is http://paste.ubuntu.com/17332041/
[17:20] <Prabakaran> Lazypower i am ready for next steps..
[17:20] <Prabakaran> meanwhile
[17:21] <lazyPower> Prabakaran : add the reactive code to your layer - http://paste.ubuntu.com/17332169/
[17:23] <lazyPower> Prabakaran - then build, deploy, and debug the charm interactively. That code is incomplete, and i left documentation around whats happening on each line. But it will attempt to run the sql, against the remote mysql unit. If you have multiple units in the conversation, or encounter the code path twice (there's no @when_not decorator as a tip) it will likely error. So i got you far enough to work with the databag and see one general workflow.
[17:24] <lazyPower> sorry, s/databag/interface
[17:30] <RAJITH> Hi, I have
[17:31] <RAJITH> I have two charms both on different machine, if I need to delete few files in unit 1 from unit 2, please let me know how I can do
[17:32] <Prabakaran> Since i am new to python .. what these two LOC's does "    # Assemble the command     cmd = "mysql -h mysql://{0}:{1} -u {2} -p{3} {4} << {5}"     cmd.format(mysql.host(),mysql.port(), mysql.username(), mysql.password())"
[17:32] <Prabakaran> http://paste.ubuntu.com/17332169/
[17:34] <lazyPower> Prabakaran - that is string manipulation. We're assigning position in the string to replace with variables. In this case, we are surfacing the data coming from the mysql interface, to replace those inline
[17:36] <lazyPower> mysql -h mysql://192.168.1.2:3600 -u chumba -pwomba -d ibm_was_here << sql-template.sql  -- is what that string turns into.
[17:36] <Prabakaran> same way is it possible for me to write a this command 	mysql> use pac; 	mysql> source /var/lib/juju/agents/unit-pac-helper-0/charm/files/archives/dbschema/DBschema/MySQL/egodata.sql; 	mysql> source /var/lib/juju/agents/unit-pac-helper-0/charm/files/archives/dbschema/DBschema/MySQL/lsfdata.sql; 	mysql> source /var/lib/juju/agents/unit-pac-helper-0/charm/files/archives/dbschema/DBschema/MySQL/lsf_sql.sql; 	mysql> source /var/lib/juju
[17:36] <Prabakaran> ya i got it
[17:36] <lazyPower> Prabakaran - that assumes you are on the mysql host, in the mysql cli from that paste.   What i offered was a path to remotely execute the database scripts.
[17:37] <lazyPower> http://paste.ubuntu.com/17332728/ - i also had some errors in there, and i think i missed the database flag, check the mysql cli on the host and adjust as necessary :)
[17:40] <Prabakaran> i got little bit.. but i have some sql script file... like egodata.sql and lsfdata.sql
[17:40] <Prabakaran> i want to execute those scripts
[17:40] <Prabakaran> can u please tel me where i can include these in this code what u sent  http://paste.ubuntu.com/17332728/
[17:42] <Prabakaran> is it under cmd section in the line number 17 and 18 http://paste.ubuntu.com/17332728/?
[17:45] <Prabakaran> manually i will be running in mysql command promt like "source <script file name>". I am not sure where and how i need to implement in the code  http://paste.ubuntu.com/17332728
[17:47] <Prabakaran> hi <lazyPower>
[17:48] <Prabakaran> manually i will be running in mysql command promt like "source <script file name>". I am not sure where and how i need to implement in the code  http://paste.ubuntu.com/17332728
[17:48] <lazyPower> Prabakaran - then generate additional commands to execute those files in the matter outlined in the reactive code i sent?
[17:49] <lazyPower> Prabakaran i'm about to head out for lunch, give what i sent a go, and try to sort it with remote execution instead of assuming you'll be attached over ssh to the mysql cli.
[17:51] <Prabakaran> ys sure
[17:51] <Prabakaran> i will try this
[17:51] <Prabakaran> and come back to you if i have any more doubts
[18:41] <petevg> cory_fu: I've got a philosophical question about smoke tests for you (or for anyone else who wants to chime in). If a test requires more than one unit of a given service to be deployed, is it proper to code it up as a smoke test? Or is it better to just run it with the other amulet-based integration tests?
[18:42] <petevg> My inclination is to say the latter, because a smoke test is an action that you run against a specific unit, and I wouldn't expect it to require me to do some separate action, like spinning up other units.
[18:42] <cory_fu> petevg: The latter.  A smoke-test should be something that you can run on each unit to determine that it's functioning as expected
[18:43] <petevg> That makes sense. The problem is that kind of blocks me writing smoke tests for Zookeeper -- pretty much anything interesting that you can do to test Zookeeper requires that you deploy multiple Zookeeper nodes :-/
[18:43] <cory_fu> The smoke-test could perhaps determine if it's part of a cluster and test that it can communicate with the cluster, for instance, but it should not depend on the cluster
[18:43] <lazyPower> you could put the smoke test in a bundle...
[18:43] <lazyPower> which makes sense in this case
[18:43] <lazyPower> logstash is useless by itself, so all the comprehensive tests live in the bundle deploying the additional components
[18:43] <petevg> lazyPower: the other piece of this is that I'm trying to make a smoke test that can live independently of the charm, in an upstream project.
[18:43] <cory_fu> lazyPower: I don't think that's a smoke-test in that case, it's a bundle or integration test
[18:44] <lazyPower> fair point cory_fu
[18:44] <cory_fu> To me, a smoke-test is something akin to a health check.  Sort of a "am I up and able to perform my role" check
[18:44] <petevg> Agreed. The tricky bit is that Zookeeper's role is mainly to talk to other Zookeepers.
[18:45] <cory_fu> But it is perhaps more comprehensive than a health check, or maybe takes a bit longer (though it shouldn't take too long, eitherR)
[18:45] <petevg> So smoke testing it is hard to disentangle from deploying multiple instances of it.
[18:46] <cory_fu> petevg: I would say make the smoke-test have some conditional logic in it.  If it's deployed by itself, just make sure that the service is up and running and can handle requests.  If it detects a cluster (ensemble), then do some additonal checks to make sure it can work with its peers properly
[18:47] <petevg> cory_fu: That sounds reasonable.
[18:47] <petevg> lazyPower, cory_fu: thx for the thoughts. I think I have a better idea about what I need to do.
[18:53] <kwmonroe> smokes could also be as simple as "is the zk init script present, is the zk java process running as the correct user, is the port open".
[18:54] <kwmonroe> we've hit plenty of errors where just knowing the right process/port was what we thought it should be.
[19:05] <lazyPower> hey cory_fu - wanna see something fun? :) http://paste.ubuntu.com/17336222/ <- thats output of charms.reactive get_states on a k8s leader
[19:14] <cory_fu> lazyPower: That's fair number of states.  :)
[19:15] <lazyPower> Yeah, i was debugging yesterday and that struck me as a heap :)   But there's really a lot going on in here.
[19:33] <cory_fu> lazyPower: https://github.com/juju/plugins/pull/67
[20:04] <lazyPower> cory_fu lgtm - merged
[20:06] <cory_fu> lazyPower: :)  https://github.com/juju/plugins/issues/63 should be resolved now
[20:06] <lazyPower> nice
[22:00] <magicaltrout> the nature of app containers make me sad when it comes to networking. Working in a non-juju docker environment is like pulling teeth when you want stuff to communicate with each other
[22:05] <lazyPower> magicaltrout - i too feel your pain
[22:09] <magicaltrout> thanks lazyPower ! ;)
[22:09] <lazyPower> magicaltrout - i just revised layer:flannel, and i'm still feeling like we can get more punch out of sdn than what i'm currently doing.