Incorrect usage message

Bug #1615110 reported by Brant Knudson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Medium
Ukesh

Bug Description

When I login to a system and try the openstack command it prints out a usage error:

# openstack user list
Missing parameter(s):
Set a username with --os-username, OS_USERNAME, or auth.username
Set an authentication URL, with --os-auth-url, OS_AUTH_URL or auth.auth_url
Set a scope, such as a project or domain, set a project scope with --os-project-name, OS_PROJECT_NAME or auth.project_name, set a domain scope with --os-domain-name, OS_DOMAIN_NAME or auth.domain_name

This is terrible advice. The correct thing for me to do is set OS_CLOUD=admin (since this is what's in /etc/openstack/clouds.yaml ).

The usage message should be changed to mention OS_CLOUD at least. At best, seems like it should be able to check if there's clouds defined already.

Could just pick the first cloud defined if there's only 1, or maybe there's a way to define a default cloud?

Revision history for this message
Igor Yozhikov (iyozhikov) wrote :

Using python-openstackclient >= 3.0.0 lead to this result(token auth is broken):
# pip freeze | grep openstackclient
python-openstackclient==3.0.1
# openstack --os-token=ADMIN --os-url=http://127.0.0.1:35357/v3 user list
Missing parameter(s):
Set a username with --os-username, OS_USERNAME, or auth.username
Set an authentication URL, with --os-auth-url, OS_AUTH_URL or auth.auth_url

After switching back to v2.6.0 token auth works again!
# pip freeze | grep openstackclient
python-openstackclient==2.6.0
# openstack --os-token=ADMIN --os-url=http://127.0.0.1:35357/v3 user list
+----------------------------------+-------+
| ID | Name |
+----------------------------------+-------+
| e1e325738ed849dfa78fc93257207c57 | admin |
+----------------------------------+-------+

Versions of the rest installed components:
# pip freeze | grep keystone
keystone==10.0.0.0b2
keystoneauth1==2.11.1
keystonemiddleware==4.8.0
python-keystoneclient==3.4.0

Ukesh (ukeshkumar)
Changed in python-openstackclient:
assignee: nobody → Ukesh (ukeshkumar)
Revision history for this message
Ukesh (ukeshkumar) wrote :
Changed in python-openstackclient:
status: New → Fix Released
Revision history for this message
Steve Martinelli (stevemar) wrote :

I don't think this one is quite fixed. The message given to the user is now:

$ openstack user list
Missing value auth-url required for auth plugin password

which, is not much more helpful, especially since it doesn't tell a user how to set auth-url; further, it's not addressing Brant's main issue (to advise the user to use os-cloud).

Changed in python-openstackclient:
status: Fix Released → Confirmed
importance: Undecided → Medium
Revision history for this message
Steve Martinelli (stevemar) wrote :

Maybe we can add a check in validate_auth to see if no auth params are passed in? https://github.com/openstack/python-openstackclient/blob/master/openstackclient/common/client_config.py#L198-L206

then advise the user to use os-cloud

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

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

Changed in python-openstackclient:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to osc-lib (master)

Reviewed: https://review.openstack.org/368768
Committed: https://git.openstack.org/cgit/openstack/osc-lib/commit/?id=e65d4f712040cce9f98fe05097e59e78e64da929
Submitter: Jenkins
Branch: master

commit e65d4f712040cce9f98fe05097e59e78e64da929
Author: Ukesh Kumar Vasudevan <email address hidden>
Date: Mon Sep 12 17:01:31 2016 +0530

    Incorrect usage message when no auth param passed

    When no auth params passed, user is advised to use os-cloud

    Change-Id: I1365487668c7d7c3c31db9b8b311c4e06eb6e16a
    Closes-bug: #1615110

Changed in python-openstackclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/osc-lib 1.2.0

This issue was fixed in the openstack/osc-lib 1.2.0 release.

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.