Merge lp://staging/~fnordahl/openstack-charm-testing/kv3-update into lp://staging/openstack-charm-testing

Proposed by Frode Nordahl
Status: Rejected
Rejected by: Ryan Beisner
Proposed branch: lp://staging/~fnordahl/openstack-charm-testing/kv3-update
Merge into: lp://staging/openstack-charm-testing
Diff against target: 89 lines (+46/-4)
4 files modified
novarc (+11/-1)
novarcv3_domain (+5/-1)
novarcv3_identity_only (+24/-0)
novarcv3_project (+6/-2)
To merge this branch: bzr merge lp://staging/~fnordahl/openstack-charm-testing/kv3-update
Reviewer Review Type Date Requested Status
Ryan Beisner Needs Resubmitting
Edward Hope-Morley Needs Fixing
Review via email: mp+312023@code.staging.launchpad.net

Description of the change

Update novarcv3_project to reflect the current state of charm-keystone master

To post a comment you must log in.
258. By Frode Nordahl

[fnordahl,r=hopem] Add support for getting Keystone IP from Juju 2 directly

259. By Frode Nordahl

[fnordahl,r=hopem] Add novarcv3_identity_only

This file is useful for interacting with a Keystone deployment where
the server software supports identity API v3 but the directory layout
is set up for v2 only

Revision history for this message
Edward Hope-Morley (hopem) wrote :

Couple of minor nits but otherwise good.

review: Needs Fixing
Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

See inline comment.

260. By Frode Nordahl

[fnordahl,r=hopem] Simplify get keystone IP logic. Add unset OS params to rc scripts that did not allready have them.

Revision history for this message
Billy Olsen (billy-olsen) wrote :

The useful IP for novarc in an environment with multiple keystone units
looks much different as it should use the VIP instead of a juju unit's IP
address. However, this being said, shaving a second is nice.
On Fri, Dec 9, 2016 at 2:43 AM Alex Kavanagh <email address hidden>
wrote:

> See inline comment.
>
> Diff comments:
>
> >
> > === modified file 'novarcv3_domain'
> > --- novarcv3_domain 2016-03-31 11:45:31 +0000
> > +++ novarcv3_domain 2016-12-09 07:26:28 +0000
> > @@ -1,9 +1,19 @@
> > +USE_JUJU2=""
> > +if [ -z "`which juju-deployer`" ]; then
> > + USE_JUJU2=true
> > +fi
> > +KEYSTONE_IP=""
> > +if [ ! -z ${USE_JUJU2} ]; then
> > + KEYSTONE_IP=`juju run --unit keystone/0 'unit-get private-address'`
> > +else
> > + KEYSTONE_IP=`juju-deployer -f keystone`
> > +fi
>
> I'd like to offer an alternative option. The 'juju run' is REALLY
> expensive just to get the IP. A much, much cheaper way to do it for Juju
> 2.x is:
>
> keystone_ip=`juju status keystone --format=oneline | cut -f 3 -d " " |
> tail -n 1 | tr -d '\n'`
>
> This works with one keystone unit deployed. I'm sure it can be modded to
> work with multiple. Shaving a second or so off the novarc source is much
> nicer for the user.
>
> > _OS_PARAMS=$(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd
> ' ')
> > for param in $_OS_PARAMS; do
> > unset $param
> > done
> > unset _OS_PARAMS
> > -export OS_AUTH_URL=${OS_AUTH_PROTOCOL:-http}://`juju-deployer -f
> keystone`:5000/v3
> > +export OS_AUTH_URL=${OS_AUTH_PROTOCOL:-http}://${KEYSTONE_IP}:5000/v3
> > export OS_USERNAME=admin
> > export OS_PASSWORD=openstack
> > export OS_REGION_NAME=RegionOne
>
>
> --
>
> https://code.launchpad.net/~fnordahl/openstack-charm-testing/kv3-update/+merge/312023
> Your team OpenStack Charmers is subscribed to branch
> lp:openstack-charm-testing.
>

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

> The useful IP for novarc in an environment with multiple keystone units
> looks much different as it should use the VIP instead of a juju unit's IP
> address. However, this being said, shaving a second is nice.

Yes, of course, that would be the case. I use my version for single unit tests with Juju 2.x as juju-deployer didn't work for me either.

> On Fri, Dec 9, 2016 at 2:43 AM Alex Kavanagh <email address hidden>
> wrote:
>
> > See inline comment.
> >
> > Diff comments:
> >
> > >
> > > === modified file 'novarcv3_domain'
> > > --- novarcv3_domain 2016-03-31 11:45:31 +0000
> > > +++ novarcv3_domain 2016-12-09 07:26:28 +0000
> > > @@ -1,9 +1,19 @@
> > > +USE_JUJU2=""
> > > +if [ -z "`which juju-deployer`" ]; then
> > > + USE_JUJU2=true
> > > +fi
> > > +KEYSTONE_IP=""
> > > +if [ ! -z ${USE_JUJU2} ]; then
> > > + KEYSTONE_IP=`juju run --unit keystone/0 'unit-get private-address'`
> > > +else
> > > + KEYSTONE_IP=`juju-deployer -f keystone`
> > > +fi
> >
> > I'd like to offer an alternative option. The 'juju run' is REALLY
> > expensive just to get the IP. A much, much cheaper way to do it for Juju
> > 2.x is:
> >
> > keystone_ip=`juju status keystone --format=oneline | cut -f 3 -d " " |
> > tail -n 1 | tr -d '\n'`
> >
> > This works with one keystone unit deployed. I'm sure it can be modded to
> > work with multiple. Shaving a second or so off the novarc source is much
> > nicer for the user.
> >
> > > _OS_PARAMS=$(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd
> > ' ')
> > > for param in $_OS_PARAMS; do
> > > unset $param
> > > done
> > > unset _OS_PARAMS
> > > -export OS_AUTH_URL=${OS_AUTH_PROTOCOL:-http}://`juju-deployer -f
> > keystone`:5000/v3
> > > +export OS_AUTH_URL=${OS_AUTH_PROTOCOL:-http}://${KEYSTONE_IP}:5000/v3
> > > export OS_USERNAME=admin
> > > export OS_PASSWORD=openstack
> > > export OS_REGION_NAME=RegionOne
> >
> >
> > --
> >
> > https://code.launchpad.net/~fnordahl/openstack-charm-
> testing/kv3-update/+merge/312023
> > Your team OpenStack Charmers is subscribed to branch
> > lp:openstack-charm-testing.
> >

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

> > The useful IP for novarc in an environment with multiple keystone units
> > looks much different as it should use the VIP instead of a juju unit's IP
> > address. However, this being said, shaving a second is nice.
>
> Yes, of course, that would be the case. I use my version for single unit
> tests with Juju 2.x as juju-deployer didn't work for me either.\

I meant that in a non-snarky way! (reading back makes me sound really petulant) -- I meant, 'duh', I'd forgotten about the VIP! :)
>
> > On Fri, Dec 9, 2016 at 2:43 AM Alex Kavanagh <email address hidden>
> > wrote:
> >
> > > See inline comment.
> > >
> > > Diff comments:
> > >
> > > >
> > > > === modified file 'novarcv3_domain'
> > > > --- novarcv3_domain 2016-03-31 11:45:31 +0000
> > > > +++ novarcv3_domain 2016-12-09 07:26:28 +0000
> > > > @@ -1,9 +1,19 @@
> > > > +USE_JUJU2=""
> > > > +if [ -z "`which juju-deployer`" ]; then
> > > > + USE_JUJU2=true
> > > > +fi
> > > > +KEYSTONE_IP=""
> > > > +if [ ! -z ${USE_JUJU2} ]; then
> > > > + KEYSTONE_IP=`juju run --unit keystone/0 'unit-get private-address'`
> > > > +else
> > > > + KEYSTONE_IP=`juju-deployer -f keystone`
> > > > +fi
> > >
> > > I'd like to offer an alternative option. The 'juju run' is REALLY
> > > expensive just to get the IP. A much, much cheaper way to do it for Juju
> > > 2.x is:
> > >
> > > keystone_ip=`juju status keystone --format=oneline | cut -f 3 -d " " |
> > > tail -n 1 | tr -d '\n'`
> > >
> > > This works with one keystone unit deployed. I'm sure it can be modded to
> > > work with multiple. Shaving a second or so off the novarc source is much
> > > nicer for the user.
> > >
> > > > _OS_PARAMS=$(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd
> > > ' ')
> > > > for param in $_OS_PARAMS; do
> > > > unset $param
> > > > done
> > > > unset _OS_PARAMS
> > > > -export OS_AUTH_URL=${OS_AUTH_PROTOCOL:-http}://`juju-deployer -f
> > > keystone`:5000/v3
> > > > +export OS_AUTH_URL=${OS_AUTH_PROTOCOL:-http}://${KEYSTONE_IP}:5000/v3
> > > > export OS_USERNAME=admin
> > > > export OS_PASSWORD=openstack
> > > > export OS_REGION_NAME=RegionOne
> > >
> > >
> > > --
> > >
> > > https://code.launchpad.net/~fnordahl/openstack-charm-
> > testing/kv3-update/+merge/312023
> > > Your team OpenStack Charmers is subscribed to branch
> > > lp:openstack-charm-testing.
> > >

Revision history for this message
Frode Nordahl (fnordahl) wrote :

My main goal with the keystone ip change is to get rid of the dependency on juju-deployer.

I'll make an attempt at finding a way to retain functionality in regard to VIP with just bash and juju.

--
Frode Nordahl

Den 9. des. 2016 kl. 15.07 skrev Alex Kavanagh <email address hidden>:

>> The useful IP for novarc in an environment with multiple keystone units
>> looks much different as it should use the VIP instead of a juju unit's IP
>> address. However, this being said, shaving a second is nice.
>
> Yes, of course, that would be the case. I use my version for single unit tests with Juju 2.x as juju-deployer didn't work for me either.
>
>> On Fri, Dec 9, 2016 at 2:43 AM Alex Kavanagh <email address hidden>
>> wrote:
>>
>>> See inline comment.
>>>
>>> Diff comments:
>>>
>>>>
>>>> === modified file 'novarcv3_domain'
>>>> --- novarcv3_domain 2016-03-31 11:45:31 +0000
>>>> +++ novarcv3_domain 2016-12-09 07:26:28 +0000
>>>> @@ -1,9 +1,19 @@
>>>> +USE_JUJU2=""
>>>> +if [ -z "`which juju-deployer`" ]; then
>>>> + USE_JUJU2=true
>>>> +fi
>>>> +KEYSTONE_IP=""
>>>> +if [ ! -z ${USE_JUJU2} ]; then
>>>> + KEYSTONE_IP=`juju run --unit keystone/0 'unit-get private-address'`
>>>> +else
>>>> + KEYSTONE_IP=`juju-deployer -f keystone`
>>>> +fi
>>>
>>> I'd like to offer an alternative option. The 'juju run' is REALLY
>>> expensive just to get the IP. A much, much cheaper way to do it for Juju
>>> 2.x is:
>>>
>>> keystone_ip=`juju status keystone --format=oneline | cut -f 3 -d " " |
>>> tail -n 1 | tr -d '\n'`
>>>
>>> This works with one keystone unit deployed. I'm sure it can be modded to
>>> work with multiple. Shaving a second or so off the novarc source is much
>>> nicer for the user.
>>>
>>>> _OS_PARAMS=$(env | awk 'BEGIN {FS="="} /^OS_/ {print $1;}' | paste -sd
>>> ' ')
>>>> for param in $_OS_PARAMS; do
>>>> unset $param
>>>> done
>>>> unset _OS_PARAMS
>>>> -export OS_AUTH_URL=${OS_AUTH_PROTOCOL:-http}://`juju-deployer -f
>>> keystone`:5000/v3
>>>> +export OS_AUTH_URL=${OS_AUTH_PROTOCOL:-http}://${KEYSTONE_IP}:5000/v3
>>>> export OS_USERNAME=admin
>>>> export OS_PASSWORD=openstack
>>>> export OS_REGION_NAME=RegionOne
>>>
>>>
>>> --
>>>
>>> https://code.launchpad.net/~fnordahl/openstack-charm-
>> testing/kv3-update/+merge/312023
>>> Your team OpenStack Charmers is subscribed to branch
>>> lp:openstack-charm-testing.
>>>
> --
> https://code.launchpad.net/~fnordahl/openstack-charm-testing/kv3-update/+merge/312023
> You are the owner of lp:~fnordahl/openstack-charm-testing/kv3-update.

Revision history for this message
Billy Olsen (billy-olsen) wrote :

@Alex - I never took it as snarky :-)

My comment was mostly to suggest that multiple units should be handled differently since a different address is important here. A subsequent merge proposal can be provided for the HA/multiple unit case. I see no reason to hold this change up based on the multiple unit scenario as the previous cases using juju-deployer do not properly handle that case either.

Revision history for this message
Ryan Beisner (1chb1n) wrote :

$0.02, here's what I'd like to see.

The novarc* files should:
 - Be Juju1 and Juju2-friendly.
 - Not depend on juju-deployer at all.

The one-time expense of a `juju run` call seems to be the cost of achieving that at this time, and is the prevailing method in other public examples.

Also: We need to understand that `unit-get private-address` may not be reliable in all cases going forward. Reference: https://bugs.launchpad.net/charms/+source/percona-cluster/+bug/1657305. For that, I'm afraid I offer no advice just yet.

Revision history for this message
Ryan Beisner (1chb1n) :
review: Needs Resubmitting
Revision history for this message
Ryan Beisner (1chb1n) wrote :

The code repo for this project is now at the following location:
https://github.com/openstack-charmers/openstack-charm-testing

review: Needs Resubmitting

Unmerged revisions

260. By Frode Nordahl

[fnordahl,r=hopem] Simplify get keystone IP logic. Add unset OS params to rc scripts that did not allready have them.

259. By Frode Nordahl

[fnordahl,r=hopem] Add novarcv3_identity_only

This file is useful for interacting with a Keystone deployment where
the server software supports identity API v3 but the directory layout
is set up for v2 only

258. By Frode Nordahl

[fnordahl,r=hopem] Add support for getting Keystone IP from Juju 2 directly

257. By Frode Nordahl

[fnordahl,r=hopem] admin project now lives in admin_domain

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: