/srv/irclogs.ubuntu.com/2016/08/04/#juju.txt

bryan_attHi any JuJU experts: How do I restart a JuJu service VM after reboot?00:33
lazyPowerbryan_att  hey there o/ still around?01:50
bryan_attlazyPower: yes - but  I think I figured it out... power-on via MAAS restored it.01:51
lazyPowerperfect, just making sure you werent' left hangin01:51
lazyPowerbest of luck :)01:51
bryan_attlazyPower: thanks01:51
joseohai, anyone hit timeout problems when using ubuntu-repository-cache? It never downloads the data, gets stuck in a timeout loop01:56
blahdeblahjose: yes; check bugs.launchpad.net for details01:56
joseblahdeblah: do you by chance have a bug#? on mobilr and can't seem to find jt01:58
blahdeblahjose: not handy - but it shouldn't be hard to find; the list of bugs on u-r-c isn't that long01:59
* blahdeblah checks01:59
blahdeblahjose: I think https://bugs.launchpad.net/charms/+source/ubuntu-repository-cache/+bug/1564215 is the one I've seen02:00
josethe thing is it doesn't even download the data. any known workarounds so it can download stuff?02:00
* jose needs to set a local mirror for a conf02:00
blahdeblahthere's an rsync which runs from a cron job on the lowest-numbered u-r-c unit; make sure your juju units are all idle, then try the rsync manually and see what it says02:01
blahdeblahusually it's a hung rsync from a previous try, or some other failed juju unit getting in the way02:02
blahdeblahhttps://bugs.launchpad.net/charms/+source/ubuntu-repository-cache/+bug/1576920 has been logged asking for the design to be changed, but I haven't seen any action on that02:02
mupBug #1576920: ubuntu-repository-cache-sync should be called outside of juju hooks <ubuntu-repository-cache (Juju Charms Collection):New> <https://launchpad.net/bugs/1576920>02:02
joseI think i'll just try ubumirror02:05
hloeungyou sure it's not egress filtering or something else?02:07
hloeung'rsync -avz --dry-run rsync://us.archive.ubuntu.com/ubuntu' should give you a listing02:07
hloeungjose: ^02:08
hloeungrun that from one of the u-r-c units02:08
hloeungif it fails, then check your secgroups or the equivalent for whatever provider you're using02:08
joseI'm using manual on a local machine, but I'll double check02:09
joseooooh ports. firewalled connection02:09
josethanks for the idea, it never popped up!02:10
hloeungheh yeah :)02:10
=== frankban|afk is now known as frankban
godleonHi all, is there any way to resolve or recover service from blocked status ?08:50
magicaltroutyou can mark units resolved godleon08:50
magicaltroutso they will continue starting up08:50
magicaltroutof course if something broke, it will remain broke :)08:51
godleonjuju resolved ?08:51
magicaltroutyup08:51
magicaltroutyou normally have to run it a few times to get past the failed hooks08:51
godleonok, but I got message "ERROR unit "neutron-gateway/1" is not in an error state"08:51
magicaltroutsorry my bad08:52
magicaltroutblocked could be waiting for a relation from something else08:52
magicaltroutlike if my charms need a java relation, i set them blocked until the relation is made08:52
magicaltroutor awaitng an action or something08:52
magicaltroutdepends why its set the blocked state08:53
godleonmagicaltrout, ok, I try to deploy openstack base bundle in xenial, but I got unit errors in neutron-gateway. After resolving it, it turned into blocked forever......08:53
godleonand never recovered again.08:53
magicaltrouthttps://api.jujucharms.com/charmstore/v5/xenial/neutron-gateway-2/archive/hooks/neutron_hooks.py08:54
magicaltroutyou can see where it blocks up here08:54
magicaltroutif valid_plugin() returns false08:54
magicaltroutit should also give you an error message?08:55
magicaltrouthttps://api.jujucharms.com/charmstore/v5/xenial/neutron-gateway-2/archive/hooks/neutron_utils.py08:55
godleonyap => Services not running that should be: neutron-openvswitch-agent08:55
magicaltrouti guess skipping the unit errors just skipped whatever is now blocked :)08:56
magicaltroutgodleon: you'd be better off looking at the juju log for the unit and figuring out why you had to juju resolved08:56
magicaltroutthat will probably get you running easier than hacking around in the charm08:57
magicaltrout(i've never deployed openstack, but that seems like a reasonable guess)08:57
godleonhmm.....ok, will do.08:57
godleonthanks for your advices. :)08:58
magicaltroutyou can juju debug-log although personally i just ssh to the unit and grep through the logs looking for whatever broke it08:58
jamonhow does this pattern work with charm relation-foo scripts? https://api.jujucharms.com/charmstore/v5/hadoop/archive/hooks/namenode-relation-joined09:04
jamonwhen i try referencing a common script in a charm, i just get script not found, e.g. it looks like a path issue09:04
jamon(this is with juju 1.25.6)09:04
* magicaltrout wonders who could offer some sage advice there09:10
magicaltroutbabbageclunk or stub if they are around could probably help jamon09:10
jamoni can just write the relation scripts, but i thought that hadoop pattern looked rather clever09:10
jamonsaves on repetition since my config-changed handles things nicely09:11
stubthat link doesn't work for me09:12
kjackalHello Juju World!09:14
jamonstub: does it just says 'hadoop-common'?09:16
jamons/says/say09:16
stubyes09:16
jamonah that's expected, it is calling this script:09:16
jamonhttps://api.jujucharms.com/charmstore/v5/hadoop/archive/hooks/hadoop-common09:17
jamonall the relation joined or changed hooks refer to that common one09:18
stubAnd its bash, so I'm not going to be any help ;)09:18
stubbut the pattern should work fine once you create the foo-relation-changed symlink (and foo-relation-joined, departed and whatever else you need)09:20
stubI much prefer the reactive approach though - no need for this sort of thing any more.09:21
magicaltrouti can't even write non reactive charms any more09:22
magicaltroutmy brain can't process the hookage09:22
jamonis there a good charm to show this reactive pattern?09:24
jamoni'm exactly new to this :)09:24
magicaltroutokay if you're new chuck that stuff away :)09:25
magicaltroutrun09:26
magicaltroutcharm-create mycharmname09:26
magicaltroutand it will create you a charm skeleton09:26
magicaltroutin that skeleton you'll find a reactive directory09:26
jamoni think i did that, but i may have been looking at the 1.25 docs09:26
magicaltroutyou'll also find layer.yaml09:26
magicaltroutwhich allows you to inherit layers and interfaces from that website you were perusing09:27
magicaltroutthe when you run charm build09:27
magicaltroutit will compile all of is into a funcioning charms09:27
magicaltrout-s09:27
magicaltrout(make sure you have some environment variables set so stuff goes in the correct place)09:27
magicaltroutJUJU_REPOSITORY INTERFACE_PATH LAYER_PATH09:28
magicaltroutso for example I build my charm in ~/Projects/mycharm, JUJU_REPOSITORY is set to ~/Projects/charms09:28
magicaltroutthen charm build will compile my charm and put the whole thing into ~/Projects/charms/....09:29
magicaltroutat which point you can juju deploy etc09:29
magicaltroutjamon: are you seem to be fiddling with hadoop stuff, I have a pretty simple drill charm that is reactive09:30
magicaltrouthttps://github.com/buggtb/layer-drillbit09:30
jamonhttps://gitlab.com/jamonation/layer-hubot/tree/master09:30
jamonhere's where i'm at09:30
jamoni was just using hadoop as a reference09:30
magicaltroutah right09:30
jamonso i must have run charm-create09:31
jamonall hazy now :)09:31
magicaltroutwell reactive/hybot.py is where you want to be09:31
jamonso i'll work on porting my bash stuff there?09:31
jamonusing your reference?09:31
magicaltroutyou can write bash reactive scripts09:31
magicaltroutbut i've never done it09:31
jamoni'd rather ansible if i'm honest09:32
magicaltroutkjackal likes this stuff, kjackal got any bash reactive samples?09:32
kjackalmagicaltrout: Hello, lgive me a sec to read the conversation09:32
magicaltroutjamon: there is some ansible stuff kicking around09:33
magicaltrouthttps://micknelson.wordpress.com/2013/11/08/juju-ansible-simpler-charms/09:33
magicaltrouthttps://docs.google.com/presentation/d/1e0jKfeQmCRLasFGePGFZb_6dg2IDgaY_gW6O2iICHJM/edit#slide=id.p09:33
magicaltroutI don't know what the state is09:33
jamoni've seen references to something possibly being integrated into juju core?09:33
magicaltroutbut I've seen some demo stuff09:33
magicaltroutso you write a juju charm that calls your ansible stuff09:34
magicaltroutthe new hadoop stuff does similar using puppet09:34
magicaltroutkjackal knows about that stuff i'm just an observer09:34
magicaltroutbut you could use python to install and run the ansible stuff on a node09:35
jamonaweomse, thanks for the pointers, there should be lots to get me going here09:35
jamonawesome09:35
kjackalHey jamon!09:35
magicaltroutin which case you could just dump it into that hubot.py install hook thats already in the template you see09:35
* magicaltrout passes the baton over09:35
magicaltroutNASA project go live day and i'm discussing ansible09:36
magicaltroutshould probably get my priorities sorted out ;)09:36
kjackalmagicaltrout: :)09:36
jamonjuju deploy spaceshuttle :D09:36
magicaltroutif only09:36
magicaltroutmore like docker-compose up huge-genomics-project.yaml09:36
kjackalso jamon, did you go through the documentation we have for the reactive things?09:37
kjackalIt is a good place to start09:38
kjackallet me find some good starting point09:38
jamoni wasn't sure about using 2.0 docs09:39
kjackaljamon: what version of juju do you have deployed? 2.0 or 1.25?09:40
jamon1.25.609:40
kjackalCool, 1.25 is the stable one09:40
kjackal2.0 is almost stable09:40
kjackalso we are on 1.25, great09:41
kjackalhere is the starting point https://jujucharms.com/docs/1.25/authors-intro09:41
jamonright that's where i did the walkthrough09:41
jamonhttps://jujucharms.com/docs/1.25/authors-charm-writing09:42
jamonthat got me my running hubot09:42
kjackaljamon: awesome!09:42
kjackaland what are your next steps?09:42
jamonwhere i'm at now might be useful information09:42
jamonhubot likes to talk to redis to persist information09:43
jamonso i'm trying to get that linked up via relations09:43
jamone.g. i expect it is as easy as relation-get private-address in a relation changed/joined hook09:43
kjackaljamon: yes it should be as easy as that09:44
jamonbut if i should be trying with reactive, i'm happy to port it over09:44
kjackalso first you need the interface layer09:44
jamonthat will give me experience with both types of charms09:44
kjackalwhere is your charm right now? Is is availuable for me to see how it looks like?09:45
jamonkjackal: not sure you saw this, but here's my charm now09:45
jamonhttps://gitlab.com/jamonation/layer-hubot/tree/master09:45
jamonhah nice timing09:45
kjackalCool!09:46
kjackalSo I see you created the charm by providing the install etc scripts under hooks and now you want to do the same thing with layers09:46
kjackallayers + reactive09:47
kjackalnice09:47
kjackalThis example shows how to use layers: https://jujucharms.com/docs/1.25/authors-charm-building09:49
kjackalSo, here is how we are going to do this09:50
jamonah ok09:50
kjackalStrongly suggest you create a branch, because you will have to remove the hooks directory09:50
jamonright easy enough09:50
kjackalThen lets pick up some layers to form our charm so that we reuse code09:51
jamoni was wondering what a good base charm would be09:52
kjackalLets use the "basic" layer: https://github.com/juju-solutions/layer-basic09:52
kjackaland you also said we will need to interface with reddis. So we will need the reddis interface09:52
kjackalhttps://github.com/jamesbeedy/interface-redis09:53
jamonright ok, so my layer.yaml has includes: ['layer:basic'] already09:53
jamonnow i just need to add the redis interface09:53
kjackalI am not making all this up. In this url: http://interfaces.juju.solutions/ you can find all the layers and interfaces registered with juju09:54
kjackalyou can also register your own layers for others to use09:54
jamonah terrific09:55
kjackali do not know anything about hubot, so I need to ask you, is the relation to redis optional or is it required to have hubot running?09:56
kjackalis redis a had dependency or is it good to have ?09:56
jamonit is optional but highly recommended for production09:56
jamoni'd make a config.yaml option to disable redis09:57
magicaltroutyou can handle all of that in the relation jamon :)09:58
kjackalok, do you want to have hubot up and running without redis and when redis becomes available (related to hubot) then hubot gets reconfigured to use redis?09:58
magicaltroutoptions are for wimps ;)09:58
jamonkjackal: yeah that sounds right09:58
kjackalcool, I am trying to find the state the basic layer sets to signal "all-is_ready"10:01
kjackalok, we do not need to care much about the states of the basic layer10:05
kjackalfor now at least10:05
kjackaljamon: looking at the install script https://gitlab.com/jamonation/layer-hubot/blob/master/hooks/install10:06
kjackalI see we first add a repository then we apt-get install nodejs things10:07
kjackalI wonder if there is any nodejs specific layer we could reuse10:08
jamonhttps://jujucharms.com/ghost/0 was the only one i found when searching for nodejs on the store10:09
kjackaljamon: Hey it seems we have this layer: https://github.com/battlemidget/juju-layer-node10:09
kjackalI was looking at the http://interfaces.juju.solutions/10:10
jamonhmm i'll have to start looking there it sounds like10:10
magicaltroutthe stuff you see there jamon is all the stuff you can inherit10:11
magicaltroutand get free code ;)10:11
magicaltroutsimilarly, you could deploy layer-hubot there and I could pick it up and customise it to fit my needs10:11
magicaltroutfor example10:11
jamonright, reusability10:12
kjackaljamon: so, looking at the readme of nodejs layer we can easily get npm installed!10:12
magicaltroutabsolutely. The hadoop example is a good one, I don't care how hadoop is installed, and I don't know how to install it, but I do need haddop and the hadoop client10:12
jamonlooks like that layer will let me specify the nodejs versions too, which is important10:12
magicaltroutso I can just pickup a layer that allows me to reuse all of that10:12
jamonhttps://github.com/battlemidget/juju-layer-node/blob/master/config.yaml10:12
kjackaljamon: awesome, lets do this!10:13
kjackalyou can provide these options at deployment time10:15
kjackaljamon: like so: https://jujucharms.com/docs/1.24/charms-config10:15
jamonright yes i've been using a hubot.yaml with api tokens in it for config10:16
kjackalthere is always the option to use the apt-layer and add your repository in the same way nodejs layer is doing here: https://github.com/battlemidget/juju-layer-node/blob/master/reactive/node.py#L3010:21
jamonthis looks like a great example layer to use10:22
kjackaljamon: Do you have enough material to go on by yourself?10:32
kjackalDo you want to ping me when/if you get stuck again?10:33
kjackaljamon: I would be very happy look at how you are handling this10:34
jamonabsolutely, it's lots to go on10:34
jamonjust have to do a bit of $dayjob work here for a bit10:34
jamonthen back to this charm and provisioning a new laptop with 16.04 so i can hack on charms more easily10:35
kjackaljamon: we have this program that might interest you: https://developer.juju.solutions/ Basicaly resources for work on charms10:39
jamonah cool10:40
jamoni'm hoping i can just use my laptop with lxc10:40
jamonlots of resources10:41
jamoni've been using my aws account in the meantime10:41
magicaltroutyou can certainly use lxc10:41
magicaltroutyou can also get aws credits for juju developers10:41
jamonnice and lightweight10:41
kjackalyes, lxc is also my first option10:42
magicaltroutnot sure what the aws application link is any more, but marcoceppi deals with that stuff10:42
D4RKS1D3Hi, someone knows how to add new parameters in juju to be added to my config files?11:57
D4RKS1D3test = test for example in /etc/test.conf11:58
magicaltroutconfig.json I suspect D4RKS1D311:58
D4RKS1D3you mean config.yaml ?12:00
magicaltroutyeah sorry12:00
magicaltroutbrains not in gear12:00
D4RKS1D3hahaha, do not worry, i have the same "problem" hahaha thanks for your help12:01
lazyPowero/ morning charmers, bug filers, and fellow community constituents12:10
jrwrengood morning lazyPower12:11
lazyPowerEjat: having trouble with conjure?12:14
=== redelmann is now known as rudi|wfh
=== rudi|wfh is now known as rudi_wfh
=== rudi_wfh is now known as rudi|wfh
stokachuhis problem is running on ppc6413:01
lazyPowerah, makes sense13:02
=== cory_fu-vac is now known as cory_fu
D4RKS1D3Its possible to debug a value in a charm?13:51
D4RKS1D3{% if metadata_shared_secret -%}13:51
kjackalwait up petevg I havent yet created a PR for the part we consider ugly. That one is on the namenode.13:54
kjackal:)13:54
petevgkjackal: I look forward to being grumpy about it in the comments :-)13:54
kjackallol petevg13:54
lazyPowerD4RKS1D3 - that looks like a jinja template, and you sure can. but we'll need to know where its getting context from13:56
D4RKS1D3I am trying to enable metadata_shared_secret in the nova-compute charm13:57
D4RKS1D3in the config.yaml does not exist this parameter13:57
D4RKS1D3I do not know how to enable13:58
D4RKS1D3you have enough details lazyPower ?14:02
lazyPowerD4RKS1D3 - looks like its either coming from neutron or keystone14:04
lazyPowerjust based on its location in the nova.conf14:04
lazyPowerD4RKS1D3 - so you will need to do one of two things. Inspect the relationship data coming from keystone/neutron, or dump the context object before it renders that configuration to see whats in there.14:05
D4RKS1D3Okey I will do that thanks lazyPower14:05
=== zz_CyberJacob is now known as CyberJacob
mbruzekevilnickveitch: I was looking for how to set the default region for juju and I found it in the docs15:46
mbruzekevilnickveitch: Thanks!15:46
mbruzekevilnickveitch: that was a surprisingly excellent experience and I wanted to thank you15:46
evilnickveitchmbruzek, I knew those thousands of words would come in handy some day :)15:48
* lazyPower +1's this conversation thread15:48
* lazyPower has reacted with :cake:15:48
evilnickveitchheh15:48
mbruzekevilnickveitch: Some people always complain when something goes wrong, I am letting you know it went well.15:48
mbruzekI could open an issue against the docs to thank you if you wish!15:49
=== CyberJacob is now known as zz_CyberJacob
=== zz_CyberJacob is now known as CyberJacob
=== CyberJacob is now known as zz_CyberJacob
=== zz_CyberJacob is now known as CyberJacob
=== frankban is now known as frankban|afk
kjackal_cory_fu: I am done with the review queue for today17:14
cory_fukjackal_: Thanks.  I'll send it out in a bit.17:14
cory_fukjackal_: Have a good evening!17:14
kjackal_cory_fu: Just a sec17:14
kjackal_I gave a +1 to pubphoto. So, if it is fine with everyone I could try to promulgate it tomorrow, but I would appreciate if you could look over my shoulder this time17:16
kjackal_cory_fu: also, the card with Hadoop HA has links to branches that I was working on.17:17
kjackal_It would be great if i could give you a tour, any feedback would be much appreciated17:17
cory_fukjackal_: Sure.  Did you want to do that tomorrow, since it's late for you, or spin through it now?17:18
kjackal_I have some time now but, whatever is more convenient for you17:18
kjackal_I do not want to pull you from whatever you were doing17:19
cory_fukjackal_: Now is fine17:19
kjackal_ok cool, daily sync then?17:19
cory_fuYep17:19
D4RKS1D3someone can explain me this variable "relation_ids('neutron-plugin')" where is filled this var is in a method and this method is called when @hooks.hook('neutron-plugin-relation-changed')17:49
D4RKS1D3Thanks17:49
lazyPowerD4RKS1D3 - sure, each unit participating in a relationship gets a numeric id17:49
lazyPowerthe relation_ids('neutron-plugin') returns the numeric identifier for the relationships attached to that relation. it should return an array of those id's17:50
D4RKS1D3And then with related_units(id) I can extract the information about the units?17:52
D4RKS1D3lazyPower, I am lost here, I do not understand where the charms change information among them17:53
lazyPowerare you trying to get at the relation data D4RKS1D3?17:53
D4RKS1D3Could you explain me?17:54
=== CyberJacob is now known as zz_CyberJacob
lazyPowerso, normally how this is done is you attach to the unit in debug-hooks, and when you hit the context of   *-relation-changed you invoke on the shell directly "relation-get"17:54
lazyPowerits already got context setup for you17:54
lazyPowerif you have that relation-id, you can inspect the relation data out of band17:54
lazyPowerrelation-get -r #17:54
D4RKS1D3lazyPower, I am trying to know  in which part of code this "if enable_nova_metadata:"17:54
D4RKS1D3is true17:54
lazyPowerbeisner - do you have a short answer for D4RKS1D3 here which relation provides the shared_metadata_secret key?17:55
lazyPowercc thedac17:55
* thedac reads backscroll17:56
D4RKS1D3I saw all the neutron charms, ovs charm and I do not know how to enable17:56
D4RKS1D3thanks for your help lazyPower17:56
lazyPowerD4RKS1D3 np, i'm not terribly familiar with the intricacies of the openstack charms, but i can certainly lend a hand with generic info. I try not to ping the openstack charmers until we're out of my depth17:57
* beisner may need to defer to thedac on this one18:00
D4RKS1D3thanks beisner for your time too18:01
thedacD4RKS1D3: ok, so you can see that the neutron-ovs sets metadata-shared-secret and passes it to nova-compute. I an see that it is not clear. But this only happens when using DVR and we want the compute node to run metadata itself rather than the neutron-gateway charm which does by default.18:01
thedacs/an/can18:01
D4RKS1D3I check it18:02
thedacSo if you are writing an SDN charm you only set that to a value if you need the compute node to run nova-api-metadata rather than have it centralized on neutron-gateway18:02
D4RKS1D3I am not writing a charm, i am trying to enable metadata in my computes nodes18:03
thedacI see18:03
thedacI am thinking if there is a way to do that without turning on DVR. Give me a sec18:04
D4RKS1D3thedac, you mean this value "enable-local-dhcp-and-metadata"18:04
D4RKS1D3put a true this value?18:04
thedacD4RKS1D3: yes that will do it18:05
thedacThat means the dhcp agents and the metadata agents will run on the compute nodes18:05
D4RKS1D3I want to configure in /etc/neutron/metadata_agent.ini in the defaultconfig nova_metadata_ip = controllerIP18:07
D4RKS1D3and metadata_secret= METADATA_SECRET_PASSWORD18:07
D4RKS1D3and in the computes service metadata proxy = true18:08
D4RKS1D3and the same password in this file18:08
D4RKS1D3After saw all the python scripts i am not sure if this boolean flag you talk me enable this option, you know it thedac ?18:09
thedacD4RKS1D3: it will enable the metadata service on the compute nodes18:09
thedacD4RKS1D3: which openstack version are you deploying? mitaka liberty etc?18:10
D4RKS1D3liberty18:10
D4RKS1D3thedac, http://docs.openstack.org/liberty/install-guide-ubuntu/neutron-controller-install.html#configure-the-metadata-agent18:12
thedacWe are setting the metadata_proxy_shared_secret https://github.com/openstack/charm-neutron-openvswitch/blob/master/templates/juno/metadata_agent.ini18:14
thedacI am double checking to make sure we don't need a template refresh for liberty+18:14
D4RKS1D3I will enable this option18:15
D4RKS1D3Thanks for your help thedac18:15
thedacno problem18:15
D4RKS1D3lazyPower, thanks for your help and explanations too18:16
lazyPowernp D4RKS1D318:16
lazyPowerthedac - thanks for picking that up. i tried :)18:16
thedacno worries. That was a bit in the weeds18:17
thedacfor completeness for anyone following allong the other side of the relation, nova-compute, adds the metadata info to nova.conf: https://github.com/openstack/charm-nova-compute/blob/master/templates/liberty/nova.conf#L14318:19
beisnerthanks thedac, lazyPower :)18:25
petevgcory_fu: in the interest of working on the open more better, I am going to merge https://github.com/juju-solutions/bigtop/pull/36 with the spark branch. That way, it will show up in the upstream PR, and people can make comments as part of the whole spark PR.19:15
cory_fupetevg: +119:17
petevgcory_fu: Cool. I just did the same thing w/ the fixes for the hbase tests.19:18
=== natefinch is now known as natefinch-afk
=== petevg is now known as petevg_vacation
=== petevg_vacation is now known as petevg_afk
=== petevg_afk is now known as petevg_vacation

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!