openstack cli v 3.4.1 bug? (unexpected keyword argument at help))

asked 2016-12-09 06:30:39 -0500

theque42 gravatar image

I'm running Mitaka, using centos release repos, and manually updated CLIs using "python/pip upgrade".

Everything looked good until I ran: "openstack network show -h", and I get complains on "__init__() got an unexpected keyword argument 'user_domain_name'", but only IF i have the OS_ parameters defined.

See below. Surely this is a bug in openstack CLI? (I also tried updating via git, but same thing...)

[root@ctrl ~()]# . keystone_admin
[lab6]:admin@admin
[root@ctrl ~(admin)]# openstack network show -h
__init__() got an unexpected keyword argument 'user_domain_name'
[lab6]:admin@admin
[root@ctrl ~(admin)]# . keystone_student1
[lab6]:student1@StackLab1
[root@ctrl ~(student1)]# openstack network show -h
__init__() got an unexpected keyword argument 'user_domain_name'
[lab6]:student1@StackLab1
[root@ctrl ~(student1)]# SOS
OS_AUTH_URL=http://10.10.16.100:35357/v3
OS_IDENTITY_API_VERSION=3
OS_IMAGE_API_VERSION=2
OS_PASSWORD=student1
OS_PROJECT_DOMAIN_NAME=StudentCloud
OS_PROJECT_NAME=StackLab1
OS_REGION_NAME=RegionOne
OS_USERNAME=student1
OS_USER_DOMAIN_NAME=StudentCloud
[lab6]:student1@StackLab1
[root@ctrl ~(student1)]# unset OS_USER_DOMAIN_NAME
[lab6]:student1@StackLab1
[root@ctrl ~(student1)]# openstack network show -h
__init__() got an unexpected keyword argument 'project_name'
[lab6]:student1@StackLab1
[root@ctrl ~(student1)]# . clean.rc
[lab6]:@
[root@ctrl ~()]# openstack network show -h
usage: openstack network show [-h]
                              [-f {html,json,json,shell,table,value,yaml,yaml}]
                              [-c COLUMN] [--max-width <integer>] [--noindent]
                              [--prefix PREFIX]
                              <network>

Show network details

positional arguments:
  <network>             Network to display (name or ID)

optional arguments:
  -h, --help            show this help message and exit

output formatters:
  output formatter options

  -f {html,json,json,shell,table,value,yaml,yaml}, --format {html,json,json,shell,table,value,yaml,yaml}
                        the output format, defaults to table
  -c COLUMN, --column COLUMN
                        specify the column(s) to include, can be repeated

table formatter:
  --max-width <integer>
                        Maximum display width, <1 to disable. You can also use
                        the CLIFF_MAX_TERM_WIDTH environment variable, but the
                        parameter takes precedence.

json formatter:
  --noindent            whether to disable indenting the JSON

shell formatter:
  a format a UNIX shell can parse (variable="value")

  --prefix PREFIX       add a prefix to all variable names
[lab6]:@
edit retag flag offensive close merge delete

Comments

Hopefully you can guess that clean.rc unset's all OS_ variables, and that student1 is a Non-admin user.

theque42 gravatar imagetheque42 ( 2016-12-09 06:31:54 -0500 )edit

The newest Mitaka release version for the openstack client is 2.3.0 (see https://releases.openstack.org/mitaka...). You use the Ocata client on Mitaka. I suppose this is your problem.

Bernd Bausch gravatar imageBernd Bausch ( 2016-12-09 08:13:31 -0500 )edit

From the release notes at: http://docs.openstack.org/releasenote...

OpenStackClient is compatible with all currently supported OpenStack releases, it does not require maintaining a ‘Mitaka’ version to match to a Mitala-release cloud.
theque42 gravatar imagetheque42 ( 2016-12-09 08:34:51 -0500 )edit

secondly, I am running "help". Not using any clever service feature that "should" be using advanced service&&release specific code. So, this should be code for initial parameter parsing that isnt capable of handling env-variables....and with the promise above, from release notes...but i guess neutro

theque42 gravatar imagetheque42 ( 2016-12-09 08:37:00 -0500 )edit

I have a similar problem with the help command. It doesn't matter if the command is simple or complex; when the openstack client is not compatible with some of the libraries installed on the system, it can run into errors. So I guess the statement you cite is not quite correct, and/or this is a bug.

Bernd Bausch gravatar imageBernd Bausch ( 2016-12-09 21:04:33 -0500 )edit