rename keystone bin to keystone-all

Bug #910484 reported by Jesse Andrews
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
nanda

Bug Description

now that we have keystone-client and keystone, we have a name collision.

Currently "keystone" is both:

 * A combined service (service and enduser) api - https://github.com/openstack/keystone/blob/master/bin/keystone
 * a cli (python-keystoneclient)

Ewan suggests renaming the keystone in the service to keystone-combined. Seems reasonable (we do similar things in nova)

Revision history for this message
Jesse Andrews (anotherjesse) wrote :

the patch is trivial - but will probably require devstack, docs and packages to be updated afterward

affects: horizon → keystone
Changed in keystone:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Alan Pevec (apevec) wrote :

Why keystone-combined and not keystone-all ?
Looking at nova, I see there's nova-all

Revision history for this message
Ralf Haferkamp (rhafer) wrote :

Wouldn't it be much easier to rename the one from python-keystoneclient? AFAIK that is not that widely used yes.

Revision history for this message
Cole Robinson (crobinso) wrote :

Ralf, it would be easier certainly, but if the keystoneclient tool is eventually going to be the preferred way of configuring keystone from the command line, better it have the obvious name than the daemon which comparatively few people will launch by hand

Revision history for this message
Thierry Carrez (ttx) wrote :

It's also more coherent with the rest of OpenStack where "nova", "swift" and "glance" are CLI tools.

Alan Pevec (apevec)
summary: - rename keystone bin to keystone-combined
+ rename keystone bin to keystone-all
Revision history for this message
nanda (nandkumar-raghavan) wrote :

Hi,

I am pretty new to open stack. So to start of with fixing bugs on open stack can I work on this particular bug ?

Revision history for this message
Thierry Carrez (ttx) wrote :

Sure, assign the bug to yourself and start hacking... A few docs:

http://wiki.openstack.org/DevQuickstart
http://wiki.openstack.org/GerritWorkflow

Revision history for this message
Dolph Mathews (dolph) wrote :

nanda, ping me on IRC if you need any help (dolphm).

Changed in keystone:
assignee: nobody → nanda (nandkumar-raghavan)
Revision history for this message
nanda (nandkumar-raghavan) wrote :

Hi Thierry/Dolph,

Thanks. Could you please let me know whether we have to change bin/keystone to bin/keystone-all?

Revision history for this message
Thierry Carrez (ttx) wrote :

Yes we have to.

The trick is to pass integration tests in sequential changes. If you just rename keystone, you'll break devstack, which is used to verify the change !

So you have to first push a change (in devstack) that will make it use keystone-all instead of keystone, but only if keystone-all is present... then push a change (in Keystone) to rename keystone to keystone-all. Finally, you could make devstack inconditionally use keystone-all.

It's a bit tricky, but I think it's the only way to pass tests and get merged.

Revision history for this message
nanda (nandkumar-raghavan) wrote :

Hi Thierry,

Yes. I saw that changing to keystone-all will break devstack. I figured out the piece of code where they start keystone in stack.sh. I will try modifying stack.sh with keystone-all and will run stack.sh to see if it succeeds.

Revision history for this message
nanda (nandkumar-raghavan) wrote :

Hi Thierry,

I have done with the code changes and tested the same on my setup.
Below is the expected behavior after changing keystone to keystone-all. Kindly correct me if I am wrong.

# ps -aux | grep keystone
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
stack 3859 0.2 0.5 39744 21648 pts/4 S+ 23:44 0:01 python /opt/stack/keystone/bin/keystone-all --config-file /opt/stack/keystone/etc/keystone.conf -d
root 4757 0.0 0.0 4448 800 pts/15 S+ 23:51 0:00 grep --color=auto keystone

The changes are on stack.sh and setup.py present in keystone. I am just submitting the diff of the files below.

Stack.sh:
------------
# diff -ruN stack.sh.orig stack.sh
--- stack.sh.orig 2012-02-06 23:35:37.375341815 +0530
+++ stack.sh 2012-02-06 23:36:18.527343132 +0530
@@ -1321,7 +1321,7 @@

 # launch the keystone and wait for it to answer before continuing
 if [[ "$ENABLED_SERVICES" =~ "key" ]]; then
- screen_it key "cd $KEYSTONE_DIR && $KEYSTONE_DIR/bin/keystone --config-file $KEYSTONE_CONF $KEYSTONE_LOG_CONFIG -d"
+ screen_it key "cd $KEYSTONE_DIR && $KEYSTONE_DIR/bin/keystone-all --config-file $KEYSTONE_CONF $KEYSTONE_LOG_CONFIG -d"
     echo "Waiting for keystone to start..."
     if ! timeout $SERVICE_TIMEOUT sh -c "while ! http_proxy= wget -q -O- $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT; do sleep 1; done"; then
       echo "keystone did not start"

setup.py:
-------------
# diff -ruN setup.py.orig setup.py
--- setup.py.orig 2012-02-06 23:50:09.765215833 +0530
+++ setup.py 2012-02-06 23:50:18.777215713 +0530
@@ -55,7 +55,7 @@
     url='http://www.openstack.org',
     include_package_data=True,
     packages=find_packages(exclude=['test', 'bin']),
- scripts=['bin/keystone', 'bin/keystone-auth', 'bin/keystone-admin',
+ scripts=['bin/keystone-all', 'bin/keystone-auth', 'bin/keystone-admin',
              'bin/keystone-manage', 'bin/keystone-import',
              'bin/keystone-control'],
     zip_safe=False,

Also I have few problems on how to submit for review, as I have problems importing my pgp key to launchpad. I have signed the CLA and added my name to the contributors list. Could you please tell me how to submit for review?

Thanks,
NandaKumar Raghavan

Revision history for this message
Joseph Heck (heckj) wrote :

note: this bug has been resolved/patched in redux branch, but is not yet resolved in trunk

Revision history for this message
Thierry Carrez (ttx) wrote :

Hmm, do we still need to push the fix in trunk, or will trunk be replaced by redux soon enough ?

Revision history for this message
Ziad Sawalha (ziad-sawalha) wrote : Re: [Bug 910484] rename keystone bin to keystone-all
Download full text (3.3 KiB)

Hi Nanda - to submit code for review, we use Git with Gerrit (and not bazaar with launchpad). See http://wiki.openstack.org/GerritJenkinsGithub

On Feb 6, 2012, at 12:26 PM, nanda wrote:

> Hi Thierry,
>
> I have done with the code changes and tested the same on my setup.
> Below is the expected behavior after changing keystone to keystone-all. Kindly correct me if I am wrong.
>
> # ps -aux | grep keystone
> Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
> stack 3859 0.2 0.5 39744 21648 pts/4 S+ 23:44 0:01 python /opt/stack/keystone/bin/keystone-all --config-file /opt/stack/keystone/etc/keystone.conf -d
> root 4757 0.0 0.0 4448 800 pts/15 S+ 23:51 0:00 grep --color=auto keystone
>
> The changes are on stack.sh and setup.py present in keystone. I am just
> submitting the diff of the files below.
>
> Stack.sh:
> ------------
> # diff -ruN stack.sh.orig stack.sh
> --- stack.sh.orig 2012-02-06 23:35:37.375341815 +0530
> +++ stack.sh 2012-02-06 23:36:18.527343132 +0530
> @@ -1321,7 +1321,7 @@
>
> # launch the keystone and wait for it to answer before continuing
> if [[ "$ENABLED_SERVICES" =~ "key" ]]; then
> - screen_it key "cd $KEYSTONE_DIR && $KEYSTONE_DIR/bin/keystone --config-file $KEYSTONE_CONF $KEYSTONE_LOG_CONFIG -d"
> + screen_it key "cd $KEYSTONE_DIR && $KEYSTONE_DIR/bin/keystone-all --config-file $KEYSTONE_CONF $KEYSTONE_LOG_CONFIG -d"
> echo "Waiting for keystone to start..."
> if ! timeout $SERVICE_TIMEOUT sh -c "while ! http_proxy= wget -q -O- $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT; do sleep 1; done"; then
> echo "keystone did not start"
>
> setup.py:
> -------------
> # diff -ruN setup.py.orig setup.py
> --- setup.py.orig 2012-02-06 23:50:09.765215833 +0530
> +++ setup.py 2012-02-06 23:50:18.777215713 +0530
> @@ -55,7 +55,7 @@
> url='http://www.openstack.org',
> include_package_data=True,
> packages=find_packages(exclude=['test', 'bin']),
> - scripts=['bin/keystone', 'bin/keystone-auth', 'bin/keystone-admin',
> + scripts=['bin/keystone-all', 'bin/keystone-auth', 'bin/keystone-admin',
> 'bin/keystone-manage', 'bin/keystone-import',
> 'bin/keystone-control'],
> zip_safe=False,
>
> Also I have few problems on how to submit for review, as I have problems
> importing my pgp key to launchpad. I have signed the CLA and added my
> name to the contributors list. Could you please tell me how to submit
> for review?
>
> Thanks,
> NandaKumar Raghavan
>
> --
> You received this bug notification because you are a member of Keystone
> Bugs, which is subscribed to Keystone.
> https://bugs.launchpad.net/bugs/910484
>
> Title:
> rename keystone bin to keystone-all
>
> Status in OpenStack Identity (Keystone):
> Confirmed
>
> Bug description:
> now that we have keystone-client and keystone, we have a name
> collision.
>
> Currently "keystone" is both:
>
> * A combined service (service and enduser) api - https://github.com/openstack/keystone/blob/master/bin/keystone
> * a cli (python-keystoneclient)
>
> Ewan suggests renaming the keystone in the service to keyst...

Read more...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/4014

Changed in keystone:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)
Download full text (60.6 KiB)

Reviewed: https://review.openstack.org/4170
Committed: http://github.com/openstack/keystone/commit/eef1f0d93ae19f04601b75cd7a2514e81b4005b9
Submitter: James E. Blair (<email address hidden>)
Branch: master

commit 90068b0143af788869116d08533d5ebc99874a17
Author: Anthony Young <email address hidden>
Date: Tue Feb 14 14:58:55 2012 -0800

    Add docs on keystone_old -> ksl migration

     * Fixes bug 928046

    Change-Id: I4af516dbc9577c08a77850e75e45d98040e4fb27

commit 71436dbf188b3ff1c576fcd54b992530aac98b6c
Author: Brian Waldon <email address hidden>
Date: Wed Feb 8 16:08:08 2012 -0800

    Add token expiration

    * Config option token.expiration defines amount of time tokens should be valid
    * Fixes bug 928545

    Change-Id: I3dff7a1ebf03bb44fc6e5247f976baea0581de08

commit 448c6414a176831b400ed5a1618fe89a8780968b
Author: Anthony Young <email address hidden>
Date: Tue Feb 14 12:30:23 2012 -0800

    Update docs to for current keystone-manage usage

     * Document how to manage users, roles, tenants, services, etc with
       keystoneclient cli
     * keystone-manage only does db_sync right now
     * Fixes bug 931837
     * Add docs for import_legacy and export_legacy_catalog

    Change-Id: I7f55fd607363d0cd4f1646564e430dfb5b12855f

commit 27db5cbc05864b8c130eded9082ee82f7e722c34
Author: termie <email address hidden>
Date: Mon Feb 13 22:07:10 2012 -0800

    add catalog export

    Change-Id: I66a7b3e8136757979c96984242b2bbd5f390b9a0

commit e1a9a1f06f83f9795e03d726a9e41db6dd9b9a9f
Author: Brian Waldon <email address hidden>
Date: Mon Feb 13 14:15:33 2012 -0800

    Handle unicode keys in memcache token backend

    * Cast keys to str in memcache backend
    * Emulate encoding error in fake memcache client
    * Fixes bug 931746

    Change-Id: I13bc573d4aca6849b1b8128ab55823545d5a3a11

commit ed793ad5365e33e2fda54c3900c1ad9b2c93dc37
Author: termie <email address hidden>
Date: Mon Feb 13 20:34:46 2012 -0800

    make sure passwords work after migration

    Change-Id: I0086a362d772bf158e3fdc12fb42c1c7c50d50dd

commit b4096290d149a04d5f3691025ad4adbfb4f4d4eb
Author: termie <email address hidden>
Date: Mon Feb 13 17:38:26 2012 -0800

    add legacy diablo import tests

    Change-Id: Id96b376ad92d906d14c3183eec2739fa34a2e51b

commit 48f2f650c8b622b55e67610081336055ec9a2c8e
Author: termie <email address hidden>
Date: Mon Feb 13 16:49:54 2012 -0800

    change password hash

    Change-Id: Idd5d09dc114cbb0cbd63e23e4178bb74d081c789

commit aa2656c730d57515b0eba1f57c829b673490fdd5
Author: termie <email address hidden>
Date: Mon Feb 13 17:31:58 2012 -0800

    add essex test as well

    Change-Id: Ib71a360568c6fdef4fdf8791d3f41b749391befb

commit 700a397a64bf984ef4c56aec8cc597f212e1f459
Author: termie <email address hidden>
Date: Mon Feb 13 17:01:02 2012 -0800

    add sql for import legacy tests

    Change-Id: I778300970c12bff0c296e6551c1b4e9e079496dc

commit 63adca31f772ab50a2da1c81bda9a66e0e009e02
Author: termie <email address hidden>
Date: Mon Feb 13 16:50:00 2012 -0800

    add import legacy cli command

    Change-Id: I41f0baaf3e7beb...

Changed in keystone:
status: In Progress → Fix Committed
Joseph Heck (heckj)
Changed in keystone:
milestone: none → essex-4
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Revision history for this message
ioriqqe (ioriqqe) wrote :

Script $FILES/keystone_data.sh needs to be updated too.

Thierry Carrez (ttx)
Changed in keystone:
milestone: essex-4 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.