AttributeError: 'Namespace' object has no attribute 'os_domain_id'

Bug #1695054 reported by Eric Harney
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
python-cinderclient
Fix Released
High
Unassigned

Bug Description

Change 60f92db Fix noauth support

seems to have introduced a cinderclient failure related to keystoneauth1 libraries.

$ git checkout fa4baedb
HEAD is now at fa4baed... Merge "[BugFix] 'Mountpoint' is missing in attachment CLIs."
$ cinder list
+----+--------+------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+----+--------+------+------+-------------+----------+-------------+
+----+--------+------+------+-------------+----------+-------------+
$ git checkout 48d7e3540ff8
Previous HEAD position was fa4baed... Merge "[BugFix] 'Mountpoint' is missing in attachment CLIs."
HEAD is now at 48d7e35... Merge "Fix noauth support"
$ cinder --debug list
DEBUG (shell:973) 'Namespace' object has no attribute 'os_domain_id'
Traceback (most recent call last):
  File "/opt/stack/python-cinderclient/cinderclient/shell.py", line 968, in main
    for item in sys.argv[1:]])
  File "/opt/stack/python-cinderclient/cinderclient/shell.py", line 645, in main
    self.options)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/loading/cli.py", line 105, in load_from_argparse_arguments
    return plugin.load_from_options_getter(_getter)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/loading/base.py", line 182, in load_from_options_getter
    val = getter(opt)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/loading/cli.py", line 103, in _getter
    return getattr(namespace, 'os_%s' % opt.dest)
AttributeError: 'Namespace' object has no attribute 'os_domain_id'
DEBUG:cinderclient.shell:'Namespace' object has no attribute 'os_domain_id'
Traceback (most recent call last):
  File "/opt/stack/python-cinderclient/cinderclient/shell.py", line 968, in main
    for item in sys.argv[1:]])
  File "/opt/stack/python-cinderclient/cinderclient/shell.py", line 645, in main
    self.options)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/loading/cli.py", line 105, in load_from_argparse_arguments
    return plugin.load_from_options_getter(_getter)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/loading/base.py", line 182, in load_from_options_getter
    val = getter(opt)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/loading/cli.py", line 103, in _getter
    return getattr(namespace, 'os_%s' % opt.dest)
AttributeError: 'Namespace' object has no attribute 'os_domain_id'
ERROR: 'Namespace' object has no attribute 'os_domain_id'

Revision history for this message
Eric Harney (eharney) wrote :

$ set | grep ^OS_
OS_AUTH_TYPE=password
OS_AUTH_URL=http://172.16.0.20/identity
OS_CACERT=
OS_IDENTITY_API_VERSION=3
OS_PASSWORD=password
OS_PROJECT_DOMAIN_ID=default
OS_PROJECT_NAME=demo
OS_REGION_NAME=RegionOne
OS_TENANT_NAME=demo
OS_USERNAME=demo
OS_USER_DOMAIN_ID=default
OS_VOLUME_API_VERSION=2

Revision history for this message
Gorka Eguileor (gorka) wrote :

Temporary solution is `unset OS_AUTH_TYPE` and I think changing the code to what I suggest here [1] may fix it, although I'm not sure.

It is most likely related to the dest parameter in the os-auth-system argument being shared with os-auth-type.

[1] https://review.openstack.org/#/c/469428/1/cinderclient/shell.py

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (master)

Reviewed: https://review.openstack.org/469428
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=7a0694084fa3538f7b72c7d4bfe283dca320d151
Submitter: Jenkins
Branch: master

commit 7a0694084fa3538f7b72c7d4bfe283dca320d151
Author: Sean McGinnis <email address hidden>
Date: Wed May 31 05:57:45 2017 -0500

    Fix attribute errors in os-auth-* settings

    This fixes some wording and formatting issues with the help
    text that is printed for CLI arguments.

    The duplication of default values for os-auth-system appears
    to lead to attribute errors requiring explicitly unsetting
    OS_AUTH_TYPE.

    Closes-bug: #1695054
    Change-Id: I0263ef2fb15744f7e352c7365e7d9e61c1ebc974

Changed in python-cinderclient:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-cinderclient 2.2.0

This issue was fixed in the openstack/python-cinderclient 2.2.0 release.

Revision history for this message
Eric Harney (eharney) wrote :

Another instance of this same problem is being tracked here:

https://bugs.launchpad.net/python-cinderclient/+bug/1734945

Revision history for this message
Walt Boring (walter-boring) wrote :

I'm still seeing this issue in cinderclient 3.4.0

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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