/srv/irclogs.ubuntu.com/2017/04/03/#juju.txt

aisraelI've done something slightly dumb; moved a juju controller/model, on lxd, to a new bridge. The containers have the right ip now, but the juju controller isn't accessible. It looks like the api websocket isn't listening on the new ip.01:36
=== frankban|afk is now known as frankban
kjackalGood morning Juju world!07:43
admcleodkjackal: hello! do you have a good example for peer relations?08:00
kjackalhello admcleod, I guess the best would be ZK or spark08:00
admcleodspark please08:01
kjackaladmcleod: Give me a sec to spot the respective08:01
kjackalcode08:01
admcleodinterface-spark-quorum?08:01
kjackaladmcleod: Here is the interface: https://github.com/juju-solutions/interface-spark-quorum/blob/master/peers.py08:05
kjackaladmcleod: Here is the interface: https://github.com/juju-solutions/interface-spark-quorum/blob/master/peers.py08:05
admcleodthanks08:05
kjackaladmcleod: updating peers ends up here: https://github.com/juju-solutions/layer-apache-spark/blob/master/lib/charms/layer/apache_spark.py08:06
kjackaladmcleod: after going though the reactive part: https://github.com/juju-solutions/layer-apache-spark/blob/master/reactive/spark.py#L14308:07
admcleodkjackal: i wonder, why use unit scope and not global for peering?08:07
kjackaladmcleod: https://github.com/juju-solutions/layer-apache-spark/blob/master/lib/charms/layer/apache_spark.py#L29408:07
kjackaladmcleod: that is a good question!08:07
kjackaladmcleod: not sure I have a good answer08:08
admcleodor service08:09
admcleodkjackal: looks like UNIT is what it should be. im trying to do something really simple, just setting a state (conv.set_remote('thing', True) and then trying to read it back (a = conv.get_remote('thing')08:33
admcleodkjackal: but it keeps returning None and im sure its something simple. got a good example of this?08:34
kjackaladmcleod: you want all nodes to agree on a remote 'thing'?08:35
admcleodkjackal: yep08:35
kjackaladmcleod: have you consedered using the leadership layer?08:36
admcleodyes, but this should work no?08:36
kjackalyes, peers should work as well but I feel you will be coding the same logic that you can find in leadership08:37
admcleodthats fine08:37
kjackaladmcleod: let me look at the zk layer, It might be easier08:37
admcleodkjackal: i want the leader to be able to set 'is_leader, True', which all other peers should be able to see - that bit i could do with leadership. but i also want all other peers to set a state, "non-leader ready"08:39
kjackaladmcleod: looking at the zk quorum there is not magic: https://github.com/juju-solutions/interface-zookeeper-quorum/blob/master/peers.py#L5508:40
kjackaladmcleod: give me a sec for the non-leader state, I have seen an example08:41
kjackaladmcleod: here is how kubernetes-master figures out if it is the leader: https://github.com/kubernetes/kubernetes/blob/master/cluster/juju/layers/kubernetes-master/reactive/kubernetes_master.py#L14508:42
kjackaladmcleod: and here is what happens if it is not: https://github.com/kubernetes/kubernetes/blob/master/cluster/juju/layers/kubernetes-master/reactive/kubernetes_master.py#L19108:43
kjackalI think you should have something like "when_not('leadership.is_leader')08:44
kjackaldef nonleader():08:44
kjackalset_state('non-leader')08:44
kjackalstatus_set('active', 'non-leader ready')"08:44
kjackaladmcleod: ^08:44
admcleodkjackal: right.. yeah... but08:45
admcleodkjackal: when_not leader, i want to set something.. like "ok im ready".08:45
admcleodkjackal: then once all the other nodes have set ready, the leader can do action08:46
kjackaladmcleod: I see... this is tricky... how would you know that all your non-leaders are up? What if you have some non-leader pending provision?08:48
admcleodkjackal: it gets a list of all other nodes (it knows its the leader). it checks if those other nodes had set a state (ready). if it hasnt, it waits08:48
=== firl_ is now known as firl
=== stormmore is now known as Budgie^Smore
admcleodkjackal: anyway. i guess the thing here is... for me, set_remote and get_remote dont appear to be working as id expect08:57
kjackaladmcleod: The thing that needed some care when we were doing these interactions was that we would have to use conv.set_state('my_state') to signal the other side that something has changed https://github.com/juju-solutions/interface-zookeeper-quorum/blob/master/peers.py#L3109:00
admcleodah.09:01
kjackaladmcleod: after that the other end would have to go and do a get_remote('whatever')09:01
kjackaladmcleod: basicaly you should model the message enchange "protocol" using conversation states09:02
admcleodkjackal: told you it was somethign simple. thanks09:02
kjackaladmcleod: :)09:02
admcleodkjackal: also, how do you force an update-status now?09:58
admcleodkjackal: nvm10:04
joedborghey all!  is the Joyent cloud still supported?11:02
joedborghey all!  is the Joyent cloud still officially supported?11:03
Diabelkois there anything special I should know about using Juju with MAAS?11:21
Diabelkoused to work just fine up until I removed the model and tried to redeploy the environment11:22
Diabelkonow it doesn't boot the servers and I don't see anything in the logs11:22
joedborgDiabelko: can you still play with the nodes via MaaS?11:48
kjackaljoedborg: Joyent should be still supported12:37
joedborgkjackal: seems that apt fails now13:15
kjackaljoedborg: how does it fail? At which point?13:25
=== lazyPower is now known as lp|swap
=== freyes__ is now known as freyes
admcleodkjackal: turns out its a problem with the function im calling after i set the state (with set_remote) - it seems as if, since its in 'executing' state, the state i sent hasnt been committed.. and there doesnt seem to be a flush that applies to set_remote14:57
cory_futvansteenburgh, petevg, stokachu (and anyone else who feels like reviewing): https://github.com/juju/python-libjuju/pull/102 when you have a chance16:03
stormmorelp|swap, what you swaping today?17:15
=== frankban is now known as frankban|afk
mbruzekstormmore: Yes he is. Is there something I can help you wiht?17:45
stormmorembruzek, not at the moment, thanks though :) just wanted to let him know that I think I figured out the last "bug" I came across with regards to seeing old replicasets for heapster17:58
mbruzekWas there any code change needed? (hint: I am working on our next release)17:59
stormmorembruzek, no I think based on what I am seeing elsewhere, it is working as designed.18:00
stormmorembarnett, the "problem" (hence the confusion) is that heapster ends up with 3 replicasets but only 1 which has running containers18:00
stormmorembruzek, no code needed I think based on what I am seeing elsewhere, it is working as designed.18:01
mbruzekstormmore: OK glad to read that. If you need anything in the next release please let me know18:01
stormmorembruzek, in testing deployments of my own services, it would appear that this is the design so that it makes it easier to roll back18:02
mcapsali1hi guys18:03
mcapsali1i have a problem with python-jujuclient and juju ha and maybe you can help me18:03
derekcatjamespage: Hey, thanks for the reply!  Could you resend that message?  I didn't have chat logging turned on until now >_<  [I got a notification that said, "Actually that's a charm bug that's been...", but I didn't have enough scrollback]18:04
mcapsali1we run juju 2.0.1 with 3 state machines in ha18:04
mcapsali1we have a custom python code that uses python-jujuclient to deploy a bundle and then use juju.watcher to monitor the deployment untill it is finished18:05
mcapsali1the problem is that sometimes after a bundle deployment, jujuclient tries to reconnect to a watcher18:06
mcapsali1https://paste.ubuntu.com/24307892/18:06
mcapsali1here is a paste of the error18:06
mcapsali1iḿ not that good with python but as i understand there is no ´connector´ instanciated in jujuclient code when the reconnect occurs18:06
mcapsali1there is a bug opened in december 2016 with the same problem, it seems this only occurs in a juju ha env18:07
mcapsali1this bug https://bugs.launchpad.net/python-jujuclient/+bug/1639104 is similar to what we expirience18:08
mupBug #1639104: can no longer deploy to model: 'error': 'shared state watcher was stopped' <canonical-bootstack> <canonical-is> <landscape> <python-jujuclient:New> <https://launchpad.net/bugs/1639104>18:08
mcapsali1any suggestion will be greatly appreciated :)18:12
tvansteenburghmcapsali1: the best suggestion i can give is to submit a patch for the bug18:16
tvansteenburghmcapsali1: or you can try using the new python client18:17
tvansteenburghmcapsali1: python-jujuclient isn't gonna get much love going forward18:17
tvansteenburghmcapsali1: https://github.com/juju/python-libjuju18:18
cory_fumcapsali1: I should note, though, that I think that also has an issue with reconnects (issues #98 and #99)18:19
mcapsali1iĺl take a look into that18:20
mcapsali1did not know there was a new python client18:20
mcapsali1ty everyone18:20
mcapsali1i will get back if i run into same problem is the new client :)18:21
cory_fumcapsali1: It seems like the connector call ought to be picking up https://bazaar.launchpad.net/~juju-deployers/python-jujuclient/trunk/view/head:/jujuclient/juju2/environment.py#L2118:24
tvansteenburghcory_fu: it's a Watcher though18:24
tvansteenburghi think there are just missing connector properties on the juju1 and juju2 Watcher subclasses18:24
cory_futvansteenburgh: Hrm.  I figured the Watcher would need to be based off the correct Environment for the correct version of Juju?18:25
cory_fuI see18:25
cory_fuSo it might be enough to copy that connector method to the Watcher class there?18:25
tvansteenburghyeah18:26

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