Not setting project returns error AuthorizationFailure: Authorization Failed: Cannot authenticate without an auth_url

Bug #1444640 reported by Adam Young on 2015-04-15
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
High
Juan Antonio Osorio Robles

Bug Description

Running openstack client wihtout --os-project-name or the equivalent env var:returns the message

 AuthorizationFailure: Authorization Failed: Cannot authenticate without an auth_url

this is due to the validation failing for the auth data, but the process still attemepting to continue.

Adam Young (ayoung) wrote :
Download full text (13.4 KiB)

Sample run. OS_USERNAME is set as envar

$ openstack --os-auth-url http://controller.oslab.openstack.engineering.redhat.com:5000/v2.0 --debug project list
DEBUG: cliff.commandmanager found command 'hypervisor_stats_show'
DEBUG: cliff.commandmanager found command 'security_group_create'
DEBUG: cliff.commandmanager found command 'security_group_rule_list'
DEBUG: cliff.commandmanager found command 'ip_floating_add'
DEBUG: cliff.commandmanager found command 'keypair_list'
DEBUG: cliff.commandmanager found command 'flavor_unset'
DEBUG: cliff.commandmanager found command 'host_show'
DEBUG: cliff.commandmanager found command 'host_list'
DEBUG: cliff.commandmanager found command 'hypervisor_show'
DEBUG: cliff.commandmanager found command 'server_pause'
DEBUG: cliff.commandmanager found command 'server_reboot'
DEBUG: cliff.commandmanager found command 'server_migrate'
DEBUG: cliff.commandmanager found command 'server_set'
DEBUG: cliff.commandmanager found command 'server_add_security_group'
DEBUG: cliff.commandmanager found command 'server_unrescue'
DEBUG: cliff.commandmanager found command 'usage_list'
DEBUG: cliff.commandmanager found command 'keypair_show'
DEBUG: cliff.commandmanager found command 'security_group_set'
DEBUG: cliff.commandmanager found command 'compute_agent_create'
DEBUG: cliff.commandmanager found command 'server_rescue'
DEBUG: cliff.commandmanager found command 'console_log_show'
DEBUG: cliff.commandmanager found command 'compute_agent_delete'
DEBUG: cliff.commandmanager found command 'server_ssh'
DEBUG: cliff.commandmanager found command 'server_lock'
DEBUG: cliff.commandmanager found command 'server_unset'
DEBUG: cliff.commandmanager found command 'server_show'
DEBUG: cliff.commandmanager found command 'server_suspend'
DEBUG: cliff.commandmanager found command 'server_add_volume'
DEBUG: cliff.commandmanager found command 'server_image_create'
DEBUG: cliff.commandmanager found command 'flavor_list'
DEBUG: cliff.commandmanager found command 'server_remove_volume'
DEBUG: cliff.commandmanager found command 'compute_agent_set'
DEBUG: cliff.commandmanager found command 'aggregate_add_host'
DEBUG: cliff.commandmanager found command 'aggregate_remove_host'
DEBUG: cliff.commandmanager found command 'compute_service_set'
DEBUG: cliff.commandmanager found command 'aggregate_create'
DEBUG: cliff.commandmanager found command 'keypair_create'
DEBUG: cliff.commandmanager found command 'ip_floating_list'
DEBUG: cliff.commandmanager found command 'aggregate_delete'
DEBUG: cliff.commandmanager found command 'flavor_set'
DEBUG: cliff.commandmanager found command 'security_group_rule_create'
DEBUG: cliff.commandmanager found command 'security_group_delete'
DEBUG: cliff.commandmanager found command 'server_rebuild'
DEBUG: cliff.commandmanager found command 'flavor_delete'
DEBUG: cliff.commandmanager found command 'server_delete'
DEBUG: cliff.commandmanager found command 'project_usage_list'
DEBUG: cliff.commandmanager found command 'availability_zone_list'
DEBUG: cliff.commandmanager found command 'hypervisor_list'
DEBUG: cliff.commandmanager found command 'flavor_create'
DEBUG: cliff.commandmanager found command 'console_url_show'
DEBUG: cliff.c...

Terry Howe (thowe-g) wrote :
Dean Troyer (dtroyer) on 2015-04-16
Changed in python-openstackclient:
status: New → Confirmed
importance: Undecided → High
milestone: none → m9
Dean Troyer (dtroyer) on 2015-04-21
Changed in python-openstackclient:
milestone: m9 → m10
Changed in python-openstackclient:
assignee: nobody → Juan Antonio Osorio Robles (juan-osorio-robles)
Changed in python-openstackclient:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/177652
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=48b52a0d40013d65e85ebeadcfb80a06c431b6db
Submitter: Jenkins
Branch: master

commit 48b52a0d40013d65e85ebeadcfb80a06c431b6db
Author: Juan Antonio Osorio Robles <email address hidden>
Date: Mon Apr 27 08:39:21 2015 +0300

    Raise exception if no session is created

    If the clientmanager is unable to create a keystone session (due to
    insufficient auth parameters or something else) then the exception
    caused by this shouldn't be ignored, as was the case.

    On the other hand, we don't want this behaviour in the case of the
    'complete' command, so this is now properly detected.

    Change-Id: If4f453d23cc87900cda752e9ffbcf41ded59e26f
    Closes-Bug: #1444640

Changed in python-openstackclient:
status: In Progress → Fix Committed
Dean Troyer (dtroyer) on 2015-04-30
Changed in python-openstackclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers