/srv/irclogs.ubuntu.com/2018/04/18/#juju.txt

jambabbageclunk: a thought. Another possibility is to have leader epochs. So when unit A becomes leader it gets 10, and then when B supersedes it, it gets 11, etc. And then in the DB we store what epoc we think of the leader. Sort of equiv to the raft log entry, but less specifically tied to raft05:36
babbageclunkjam: yeah - that makes sense - I'll use that.05:40
=== frankban|afk is now known as frankban
jammanadart: I don't see an update on 2/7, shall we punt again today?08:21
manadartjam: Fine with me.08:22
srihashi, can we install juju controller on the same MAAS node which hosts the Rack controller+region controller ?09:02
zeestratsrihas: Yes, if you setup some KVM VM's on the region/controller and add it to MAAS as nodes (see https://docs.maas.io/2.3/en/nodes-add#kvm-guest-nodes). Then you can use those VM's when you bootstrap your juju controller using constraints09:13
srihaszeestrat: I have MAAS controller running on a Physical node, in UCS cluster09:15
zeestratsrihas: Right. I'm not so familiar with UCS, but if you install KVM on that host and create some VM's on there according to the link above then you get some MAAS nodes for your juju controllers.09:27
srihasI have a MAAS region+rack controller already, won't it work?09:29
zeestratsrihas: Not out of the box unfortunately. Juju needs a ready MAAS node to bootstrap a controller on. In order to do that you can use physical nodes or some VM's. Easiest is probably to colocate KVM VM's on the MAAS controller or use VMWare VM's if you have that infrastructure.09:37
srihaszeestrat: ok, what do you mean by a "ready MAAS node" ?09:38
zeestratsrihas: Just a machine/node that is managed by MAAS and commissioned and ready to go: https://maas.io/how-it-works09:40
srihaszeestrat: ok, thank you :) I have deployed ubuntu on all commissioned nodes09:43
srihasso the process is like step1: add nodes; step2: commission; step3: Juju controller; and then deploy ubuntu? or its fine eventhough I have the deployed nodes to provision OpenStack ?09:44
zeestratsrihas: Aha, I see. You can skip the last step deploy ubuntu unless you really want blank ubuntu machines. If you want to use them with juju you'll need to leave them as ready.09:56
zeestratIs the end goal to deploy OpenStack with Juju on MAAS?09:56
srihaszeestrat: yes thats the goal. aha, only ready :(09:57
zeestratHave you checked out https://docs.openstack.org/charm-deployment-guide/latest/?09:57
srihaszeestrat: yrah, I am at this https://docs.openstack.org/charm-deployment-guide/latest/install-juju.html#testing-the-environment step and doubts raised09:58
zeestratsrihas: Cool. Do you end up with a functioning juju controller?09:59
srihaszeestrat: I think no, because I haven't bootstrapped yet10:00
zeestratsrihas: Ok. So as the guide mentions with `juju bootstrap --constraints tags=juju maas maas-controller` it expects a MAAS node tagged with `juju`. If you add the `juju` tag to a machine in MAAS then you can try to bootstrap to tat machine.10:04
srihaszeestrat: and I cannot use that machine in future for swift for example ?10:05
zeestratNope, that machine will be occupied by Juju then. That's why it's recommended to create some VM's on the MAAS controller so you don't lose more physical nodes.10:06
zeestratThen you can add the `juju` tag to those VM's in MAAS so it uses those instead of physical nodes.10:07
srihaszeestrat: nice, thank you :) what's the purpose of this juju node ?10:08
srihasto act as controller for juju ops?10:08
zeestratsrihas: No problemo. Yes, the bootstrapped juju controller is the master controller which controls juju deployments10:09
zeestratSo your juju client talks to the juju controller which again talks to deployments10:09
srihasnice :)10:10
jammanadart: since you've been in the area, I have a RFC pr: https://github.com/juju/juju/pulls/862410:35
jamI'd appreciate your feedback if you feel it is clearer/cleaner. Or whether you prefer the old styel.10:35
manadartjam: Looking.10:36
jammanadart: thoughts/comments ?10:49
manadartjam: I like it. Just adding some comments.10:50
thimI have a problem using bindings with the openstack-charms. For example if I try to deploy keystone I get an error "machine-0: 12:39:55 WARNING juju.provisioner failed to start machine 0/lxd/0 (unable to setup network: no obvious space for container "0/lxd/0", host machine has spaces: "admin-space", "default", "internal-space"), retrying in 10s (10 more attempts)".  Using MAAS 2.3.0 and Juju 2.3.5. Anyone else having these problems?10:56
thimpart of yaml: https://pastebin.com/54isF2sJ10:58
manadartjam: Done.10:59
manadartjam: BTW, wouldn't mind a 2 minute chat if youv'e the time.10:59
rmcdHello all, just a couple of questions regarding Apache Drill/Zookeeper. 1) How do I check the IP address of nodes with Amulet? and 2) How do I look up files on a node with Amulet? magicaltrout reckons there should be a way to do it with the deployment object... Thanks for the help!11:03
manadartthim: I believe you need to bind to the correct space. Something like: juju deploy <charm> --bind <space> --to lxd:011:15
thimYeah, done that - `juju deploy --bind "public=default admin=admin-space internal=internal-space shared-db=internal-space" cs:keystone -n 1 --to lxd:0`11:16
thimSame problem as using the yaml-file.11:20
jammanadart: I can join a HO if you like11:29
* manadart heads to standup.11:29
jamthim: if you're deploying from a bundle to a substrate that has multiple spaces, then you need to edit the bundle to map your spaces for the various applications11:30
jamthim: easiest is to set all bindings for an application to a given space with a stanza:11:30
jambindings:11:30
jam "": internal-space11:30
jambut if you're doing openstack and you want internal vs admin vs etc, then you probably need to set multiple values11:30
thim@jam I've done that see - https://pastebin.com/54isF2sJ11:32
thimjam: also tried without the "": default11:33
jamthim: are you putting keystone into a container?11:33
thimjam: yeah, but I tried a couple of other charms as well - the error is still the same.11:34
zeestratthim: Just to confirm, have you setup those spaces in maas and are they available for the nodes you're deploying on?11:35
magicaltroutkjackal: et al, got any pattern for checking files on a unit within amulet for my minions rmcd11:36
kjackalmagicaltrout: what do you mean by checking?11:37
magicaltroutah11:37
magicaltroutamulet sentry directory_listing11:37
magicaltroutor soemthing11:37
magicaltroutI want to check a config file is actually set correctly11:37
magicaltroutfile_contents11:38
magicaltroutI believe11:38
kjackalI cannot think of anything fancy other than getting the file and looking at its content11:38
magicaltrouthttps://github.com/juju/amulet/blob/master/amulet/sentry.py#L153 that?11:38
thimzeestrat: Correct - https://pastebin.com/GtFzCLfL11:38
thimzeestrat: `juju spaces` is populated from MAAS11:39
kjackalsure magicaltrout, looks ok. Although you would better start using libjuju ;)11:40
magicaltroutdon't make me sad kjackal11:40
magicaltroutwhats the deal with testing these days11:40
magicaltroutamulet? or libjuju? or a munge of both?11:40
kjackalhttps://github.com/juju/python-libjuju  forget about amulet11:41
magicaltroutya'll make me so sad11:42
kjackalhttps://github.com/juju/python-libjuju/blob/37a7500245ae61fc2c103d1728a65b99485a9ef4/tests/integration/test_machine.py#L6711:42
magicaltroutthanks kjackal11:47
magicaltroutwe're all very sad11:47
rmcdcan confirm ^11:48
jamthim: so the values you have there look correct to me in passing, with the caveat that you probably need to do it for all applications. also, what specific version of Juju are you running. IIRC we fixed a particular bug where space constraints weren't being set early enough for containers11:49
jamso if the host machine launches fast enough and you're deploying a bundle, the container could try to start before the spaces were set.11:49
jamI *think* that is fixed in 2.3.5 but I'd have to look through changelogs to know for sure11:49
jamin the very short term, you can add a "constraints: spaces=X,Y,Z" to get around it.11:50
thimYeah, I'm using 2.3.5 with MAAS 2.3.0. I'm currently just deploying Keystone because of time saving when destroying the machines. Already using constraints as well. `constraints: "tags=controller spaces=admin-space,internal-space,public-space"`11:51
thim*public-space = default11:51
thimjust pasted from the wrong file.11:52
kjackalmagicaltrout: rmcd: how can we cheer you up?11:55
thimjam: are you talking about constraints on the charm or the machine btw?11:57
TheAbsentOnekjackal: Is it actually possible with python-libjuju to deploy charms from within a charm in the same model? :/ Haven't used it so far12:02
kjackalTheAbsentOne: that charm should be able to talk to the controller, right?12:03
kjackalHavent tried it either12:03
zeestratTheAbsentOne: Yeah, but it's a bit clunky. You'll need to create a juju service user in the model then talk to that. I asked about that on the last juju show and it's something that the team would like allow for inside the charms in the future12:05
TheAbsentOnekjackal: euhm yes, I suppose. I'm on a heavy theorycrafting trip and I kinda want a charm to decide what service should be deployed. I'll give an example. Imagine a charm that represents a mysql OR a postgres service. The charm then should deploy one of the 2 services itself all automatically.12:06
TheAbsentOneAhn so it's a kinda a request zeestrat ?12:06
TheAbsentOneSo as a summary: I want to create a charm that that listens on an incomming relation, it takes the requirements, chooses a good service and deploys the chosen service all in one kjackal zeestrat. As I see it now, it seems pretty impossible with juju12:11
zeestratTheAbsentOne: Yeah. You can check out the latest episode for a bit more eloquent details. I asked about better interfacing charms and juju in order to scale and deploy things and it's on their list.12:12
TheAbsentOneGood to know!12:13
kjackalTheAbsentOne: I know of one charm that talks to the juju controller: https://jujucharms.com/charmscaler/212:15
zeestratTheAbsentOne: Regarding your summary, if you use an juju service account then you should be able to talk to juju with libjuju just fine and use any logic you want inside your charm. It's a bit greenfield at the moment but not impossible.12:15
zeestratTheAbsentOne: Yeah, the charm above uses that approach (although a bit old).12:16
TheAbsentOneThanks for the insight, big help guys!12:19
jamthim: so bug #1737565 was where we ran into this in the past, and that says it was fixed in 2.3.2 so it should be in 2.3.512:25
mupBug #1737565: no obvious space for container <cdo-qa> <cdo-qa-blocker> <foundations-engine> <juju:Fix Released by wpk> <https://launchpad.net/bugs/1737565>12:25
jama proper "bindings" section should be sufficient, so if it isn't working, we'd like to get logs of the controller preferably with: juju model-config logging-config="<root>=DEBUG;juju.rpc=INFO;juju.apiserver=INFO"12:26
thimjam: Yeah, I previously ran 2.3.2 and didn't work there either - so I upgraded to 2.3.5.12:26
TheAbsentOneJust one small question zeestrat what exactly do you mean with a "juju service account". Could you point me to some documentation?12:31
rick_h_TheAbsentOne: so the model credential work that's follow up to the current trust (cloud credentials access) isn't there atm12:32
rick_h_TheAbsentOne the way it's been done so far is to create a juju account with model access and set via model config12:33
rick_h_err, not model config, but the charm config12:33
rick_h_TheAbsentOne: so that the charm can behave as a juju user with access to the model to make changes over the API (libjuju) like deploy thihngs12:33
TheAbsentOneI see, thanks for that clarificiation rick_h_ !12:34
rick_h_np, morning party people12:34
thimjam: Hmm.. I think i found the problem. It's the Juju GUI that probably parses the yaml file incorrectly.12:34
thim`juju add-machine -n 1 --constraints 0=t 1=a 2=g 3=s 4== 5=c 6=o 7=n 8=t 9=r 10=o 11=l 12=l 13=e 14=r 15= 16=s 17=p 18=a 19=c 20=e 21=s 22== 23=a 24=d 25=m 26=i 27=n 28=- 29=s 30=p 31=a 32=c 33=e 34=, 35=i 36=n 37=t 38=e 39=r 40=n 41=a 42=l 43=- 44=s 45=p 46=a 47=c 48=e 49=, 50=d 51=e 52=f 53=a 54=u 55=l 56=t --series xenial`12:35
rick_h_TheAbsentOne: what's this?12:35
TheAbsentOneI think you wanted to tag thim rick_h_ ? Or am I missing something? x)12:38
thimjam: When using juju cli it seem to work, but the state on the LXD is pending, but container is started and I can ssh to the machine.12:38
rick_h_TheAbsentOne: oh sorry, tab complete fail12:38
TheAbsentOnehehe no problemo12:41
bdxthim: if you haven't yet noticed, you were giving incorrect space names above14:07
bdxwhy you space bindings were failing14:07
bdx"host machine has spaces: "admin-space", "default", "internal-space""14:08
bdxor, excuse me, the way you were specifying them looks incorrect14:10
bdx`juju deploy <charm> --constraints "spaces=admin-space,internal-space,public-space"`14:10
bdxshould be14:10
magicaltroutlibjuju why does unit object only have a public address?14:11
magicaltroutam I missing something obvious?14:11
bdxthim: `juju deploy keysone --constraints "spaces=admin-space,internal-space,public-space" --bind default,public=default,admin=admin-space,internal=internal-space,shared-db=internal-space`14:13
TheAbsentOnemagicaltrout: to be fair it feels I'm missing sanity and knowledge, when it comes to understanding libjuju x) I too was wondering before what unit really represented14:17
bdxTheAbsentOne: https://jujucharms.com/docs/2.3/charms-working-with-units14:42
bdxit just represents a unit of an applications14:43
bdxapplication14:43
TheAbsentOneyeah bdx exactly but it was as a remark on what magicaltrout said. A unit in libjuju doesn't seem to know anything about the application14:44
bdxI see, is there an "application" object?14:45
bdxTheAbsentOne: possibly what you are looking for is https://github.com/juju/python-libjuju/blob/master/juju/application.py#L2614:46
admcleod_hrm, anyone have any ideas why unit-get private-address is returning a hostname instead of an ip?14:49
admcleod_cory_fu: ^ ? :)14:49
cory_fuadmcleod_: Unfortunately, it depends on the cloud.  There are some new fields in there that might be of help, but I'm not sure if any are guaranteed to be an IP14:50
admcleod_cory_fu: curious, cos its manual provider and im sure it was working until recently. new fields such as?14:51
cory_fuadmcleod_: Fields related to the networking primitives: https://jujucharms.com/docs/stable/developer-network-primitives14:52
TheAbsentOneahn thx bdx that might help14:52
cory_fuadmcleod_: But like I said, I don't know if any of those will end up being helpful, but I think you are supposed to use them instead of private-address14:53
admcleod_ah ok14:54
admcleod_thanks14:54
admcleod_cory_fu: erm. do you know how i can list the bindings?14:57
cory_fuadmcleod_: It's not integrated into reactive yet, unfortunately, but there are charmhelpers for it.  I have to admit, though, I haven't really used it.  I know stub understands it, but I'm sure he's asleep now.14:59
admcleod_...15:00
admcleod_good lord15:00
cory_fuadmcleod_: I *think* those fields might also be present in the relation data.  It's worth doing a raw dump of the relation data15:01
admcleod_all i want to do is get the private address of the machine. really shouldnt be that hard should it  :}15:01
cory_fuadmcleod_: Try seeing if there are other auto-keys in the relation data15:02
admcleod_what if i only have one unit of one app deployed?15:02
TheAbsentOnecory_fu: not trying to meddle in the conversation but now that you are talking about it. What is the best way to dump all relation data actually, according to you?15:02
cory_fuTheAbsentOne: One-off / by hand for debugging?  I usually use: juju run --unit <unit/n> -- relation-get -r <rel:id> - <remote_or_local_unit/n>15:03
cory_fuTheAbsentOne: You can get the <rel:id> with: juju run --unit <unit/n> -- relation-list <rel_name>15:04
cory_fuTheAbsentOne: You could also always use debug-hooks and put a breakpoint in your charm code.15:05
TheAbsentOneRight cool, and could you access a list or something inside hooks or is a breakpoint the way to go15:05
TheAbsentOneohn you answered already, thx cory_fu15:05
admcleod_cory_fu: ill go back to trying network-get (ill let you know what happens)15:06
cory_fuadmcleod_: Thanks.15:12
jamballoons: bug #1765096 looks like our "updated" jujud-versions.yaml holds the wrong data15:34
mupBug #1765096: 2.3.6 bootstrap fails <juju:New> <https://launchpad.net/bugs/1765096>15:34
balloonsyea, I was just noticing15:34
jamballoons: the code seems to expect a version.Binary which includes series and architecture, but it only contains the version #15:34
balloonsyea, I'm certain I broke it in the new snapcraft build; not the one that was penidng15:34
balloonsI'll push the right revision, trying to find it now15:35
balloonsjam, ohh, nvm. hmm. it's just reading version=$(jujud version)15:37
balloonsso that's odd15:38
balloonsjam, yea it was the experimental snapcraft changes in the end, but I'm no longer sure why :-)15:41
balloonsahh, diff reveals all15:42
admcleod_cory_fu: i cant list the spaces, cos its maas. so i cant specify a binding...15:47
jamballoons: manadart: thumper: for whoever would like "juju remove-machine 0" now works on controllers for Mongo: https://github.com/juju/juju/pull/862515:54
jamwith caveats, but step along the path15:54
admcleod_cory_fu: sorry that shouldve been 'not maas'15:55
cory_fuadmcleod_: My understanding was that the ingress-address should fall back to private-address when spaces aren't being used.15:56
cory_fuadmcleod_: Also, I don't think maas / not maas is relevant, I think it depends on whether your charm defines network spaces.15:56
cory_fuadmcleod_: But the ingress-address stuff is also relevant for cross-model relations, irrespective of network spaces.  wallyworld is also on the other hemisphere, though, unfortunately15:57
admcleod_cory_fu: well if i cant list spaces, i cant specify a binding, and i am told 'spaces not supported' when trying to list them with manual provider. i dont think i should have to change the charm to get the private ip address.16:03
=== hml_ is now known as hml
cory_fuadmcleod_: Did you check the relation data?16:26
admcleod_nope16:26
admcleod_cory_fu: if thers 1 unit and no relations, will that still work?16:28
cory_fuadmcleod_: Oh, I was confused.  I thought you were trying to get the private address for a relation, but you want the local unit.16:29
admcleod_right, thats why unit-get originally16:29
cory_fuadmcleod_: So, if you really need an IP, you have to do something like this: https://github.com/juju-solutions/jujubigdata/blob/master/jujubigdata/utils.py#L427-L44116:32
cory_fuadmcleod_: But if you recall, that was a source of errors for us with the big data charms16:32
admcleod_cory_fu: lol16:32
admcleod_cory_fu: i thought i remembered something like that16:32
cory_fuYeah16:33
admcleod_cory_fu: fwiw... wtf.16:33
=== frankban is now known as frankban|afk
admcleod_cory_fu: meanwhile. i seem to be having a pip3 issue with charm build. 'no such option: -d'16:54
cory_fuadmcleod_: Are you using the snap?16:56
admcleod_cory_fu: yeah - i just refreshed it, then i refreshed with --beta16:56
admcleod_cory_fu: i would paste the error but my laptop is going crazy16:56
admcleod_cory_fu: oh of course i also have the apt version installed.17:00
cory_fuadmcleod_: Ah yeah, I can only see that error coming from the apt version, since the snap is strictly confined and bundles its deps17:01
admcleod_been a while since i used this17:01
=== mwhudson is now known as Guest20250
=== Guest20250 is now known as mwhudson_
wallyworldcory_fu: admcleod_ : ingress-address will just be "private address" normally. with cmr, it may instead be set to "public address". network-get now talks generically in terms of ingress-address, bind-address, egress-subnets instead of  private/public address which have little semantic meaning21:31
wallyworldcory_fu: did you see the mysql interface bug? it seems relation-broken hook is, well, broken21:33
cory_fuwallyworld: Yeah, the -broken hook handling with RelationBase-based interface layers is known to be broken in general.  The easiest fix would be to update that interface layer to use Endpoints21:35
wallyworldcory_fu: is that on the todo list for anyone? i'd not be very productive trying to do it at my end21:36
cory_fuwallyworld: Not really, but it should be a fairly easy conversion.21:37
cory_fuwallyworld: With network-get, does it only work if a network space has been created?  How do you know what bind name to use?21:38
wallyworldcory_fu: network-get works with or without. from memory there's a --binding arg21:39
cory_fuwallyworld: Not according to https://jujucharms.com/docs/2.3/developer-network-primitives#network-get and admcleod_'s comment from earlier (he's EOD now)21:42
cory_fuwallyworld: The charmhelpers wrapper also require the binding name21:43
wallyworldcory_fu: just looked at code, network-get takes a positional arg for bindingname21:43
cory_fuwallyworld: So, I'm unclear on what one would pass to that?21:44
wallyworldcory_fu: i think you pass the endpoint name for which you want the address info21:45
wallyworldhttps://pastebin.ubuntu.com/p/YPTTYzFMbM/21:45
wallyworldcory_fu: if there's questions, best to send an email to #juju-dev since john will be able to give a much better answer. i didn't write the original code (just added the new args) so am not totally familiar with the finer detail21:48
cory_fuwallyworld: I guess the "what address I should listen on" really depends on who is going to be connecting to you, i.e. a relation (at least, an endpoint), and that's the bit that's confusing for me21:48
cory_fuBut I think that calling it a "binding name" is confusing if it's in fact the endpoint name21:49
wallyworldcory_fu: right. juju knows if you are in a relation context or not, so it will vary what it gives to be the thing that is needed to listen on21:49
cory_fuwallyworld: About the mysql interface; are you hitting that?21:50
wallyworldcory_fu: generally, what you bind to will be independent of relation. what you advertise to the other side to send to (ingress address), will be relation dependent21:50
cory_fuI've just been called to dinner21:50
wallyworldcory_fu: i am not sure why it's called binding instead of endpoint, i didn;t write the code :-(21:51
wallyworldcory_fu: yeeah, am hitting the bug21:51
wallyworldin the interface layer21:51
wallyworldin my caas charm21:51
cory_fuwallyworld: I'll take a look at the mysql interface tomorrow21:51
wallyworldyay, ty21:51
wallyworldenjoy dinner21:51
cory_fuo/21:51

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