/srv/irclogs.ubuntu.com/2018/05/25/#juju.txt

raubCan I use vsphere withotu vcenter with juju?01:06
=== axw_ is now known as axw
thumperraub: not entirely sure, but I *think* so01:35
* thumper goes to make a coffee01:36
raubthumper: the only info I found was either with juju 1.X or if 2.X vcenter01:41
thumperraub: I may well be wrong, I've never tried using vsphere01:48
blahdeblahWhen I last looked at it, vcenter was a requirement, but that was several years back.01:50
thumperrace fix review anyone? https://github.com/juju/juju/pull/876601:53
thumperwallyworld: https://github.com/juju/juju/pull/876602:23
wallyworldlooking02:23
wallyworldthumper: lgtm, so long as tests pass :-)02:26
thumperthey do... see the merge check passes02:28
=== Guest76648 is now known as icey
=== frankban|afk is now known as frankban
=== balloons__ is now known as balloons
kwmonroe>&2 echo "cory_fu, what does stderr redirect at the front of a line do?"13:57
kwmonroecory_fu: i know this works (https://github.com/conjure-up/spells/pull/191/files#diff-adf6301122077a979448abe4928806c0R12), but never knew why it was at the start of the line13:58
kwmonroehmph.. maybe $(echo "foo" >&2) is not the same as $(>&2 echo "foo")?  to the terminals!14:03
cory_fukwmonroe: I don't know why that syntax works, but I can't ever remember the right order and just google "bash echo stderr" and get this result: https://stackoverflow.com/questions/2990414/echo-that-outputs-to-stderr/23550347#2355034714:08
kwmonroefair enough cory_fu, https://paste.ubuntu.com/p/WX8KQwCSCB/ seems to show front or back doesn't matter.  i respect your individuality.  +1 remains on that pr ;)14:14
kjackalHello  do we know who updates these: https://streams.canonical.com/juju/images/releases/streams/v1/com.ubuntu.cloud.released-aws.json14:15
cory_fukwmonroe: heh.  The "more info" page which that answer links to has an "A note on style" section that says "never precede a command with a redirect".  :p14:24
cory_fuBut that's just, like, his opinion, you know?14:25
kwmonroe:)14:27
=== frankban is now known as frankban|afk
CynervaAnyone know how Juju decides what the public address is for a MAAS machine, when the machine is attached to multiple networks?16:13
CynervaIs there a way to tell it to use a specific address / network interface / network space for the public address?16:14
pmatulisCynerva, that's within MAAS network configuration16:19
Cynervaok, thanks, i'll look around and see if i can find it16:22
zeestratpmatulis: How does that work in MAAS? Link to MAAS docs? I've had some issues with this before in some older versions of juju&maas and would be great to see how it should work now.16:24
pmatulisCynerva, zeestrat: https://docs.maas.io/2.3/en/nodes-commission#post-commission-configuration ?16:29
bdxCynerva: --via16:37
bdxhttps://docs.jujucharms.com/2.3/en/developer-network-primitives16:37
Cynervapmatulis: i'm not having much luck with it. In my case I have 6 network interfaces all set to auto-assign. I do see maas is giving special treatment to the first interface, using it for pxe and when populating the A record, so I assume juju's just picking it up from there. haven't found a way to tell maas which interface is primary, or public, or preferred, or anything. will keep looking16:44
zeestratpmatulis: I'm not sure how the maas part comes into play as that is just the regular vlan, subnet selection. How does the --via work with bundles?16:44
Cynervabdx: thanks, but if i'm reading right, --via applies to relations, whereas i'm asking about machines and units which may be standalone with no relations involved. Specifically the value of "DNS" for the machines, or "Public Address" for the units, as seen in `juju status`16:48
bdxit doesnt matter in that case16:49
bdxso you are g2g116:49
bdxooh, I see what you are saying I think16:49
bdxlike unit_get('public-address') ?16:50
bdxhow does it know what the public address is?16:50
Cynervabdx: yeah, that's the one :)16:50
bdxCynerva: *I think* this is what network_get() resolves16:50
bdxCynerva: give your charm some endpoint bindings in the metadata.yaml, then use network_get()16:52
bdx"it doesn't matter in that case" - what I meant by this is that you can grep for the correct ip address in the expanded yaml or json status, and you can't rely on `juju status` for knowing what ip to display if a machine has multiple ip addresses... I think16:54
bdxaha16:55
Cynervabdx: hmm, i thought network_get only replaced unit_get('private-address'), not public-address16:55
bdxwhat if you don't have the concept of a "public-address" anymore, but just replace it with a space binding? - I think I know the answer to this16:56
bdxbecause then on providers other then maas16:57
bdxyou wouldn't get the public16:57
bdxok16:57
bdxI see where you are going with this now16:57
bdxCynerva: I'm not able to get a public address using network_get() in any situation17:34
bdxtried running it on a bunch endpoints in different charms that are deployed to aws and have public ip addresses17:35
bdxCynerva: I think your concern is quite valid sir17:35
bdxI would like to hear someones else take on this though17:36
Cynervathanks for looking into it, bdx17:37
bdxCynerva: I thought I had hit what you were talking about before, this is similar but different17:41
bdxCynerva: from what I understand, unit_get('public-address') will return the public address on public clouds, and on non private clouds (like maas where machines can have multiple ip addresses) it will pick the ip address for which the 0.0.0.0 route lives17:44
bdxlooking into how it figures that out now17:44
bdxCynerva: https://github.com/juju/juju/blob/develop/worker/uniter/runner/jujuc/unit-get.go#L6617:46
bdxso it comes from Context17:47
bdxnow just to find out how what puts it in there17:47
bdxCynerva: getting closer https://github.com/juju/juju/blob/master/api/sshclient/facade.go#L30,L3317:55
bdxso https://github.com/juju/juju/blob/master/api/sshclient/facade.go#L63,L8017:58
bdxCynerva: from what I can tell, the public ip address comes from the the 0th element in the list of ssh ip addresses17:59
bdxI could be totally wrong  though18:00
bdxCynerva: so looks like unit_get('public-address') will return the ip with the 0.0.0.0 route for maas nodes, and the NAT/public ip for machines with public ip18:06
bdxCynerva: there18:07
bdx:)18:07
bdxI wonder if there is a way we can make public address data available in network_get()18:09
Cynervaah okay, thanks bdx18:09
bdxnp18:09
bdxso that people writing charms don't run into this18:10
bdxand they just have a single consistent way of getting network info18:10
bdxI'm sure this will be a rabbit hole for many18:11
bdxand its slightly clunky in my opinion18:11
bdxCynerva: what I think would be cool is if you could do: `ingress_public = network_get('http').get('public-address') `18:21
bdxI wonder if we could make an ask for network_get to just include the public-address18:23
bdxhttps://bugs.launchpad.net/juju/+bug/177343218:35
mupBug #1773432: network-get should always include PublicAddress() <juju:New> <https://launchpad.net/bugs/1773432>18:35

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