openstack CLI only works if OS_PASSWORD is set
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-openstackclient |
Fix Released
|
High
|
tamil vanan |
Bug Description
as demonstrated below, the openstack CLI works when OS_PASSWORD is set:
# env | grep OS_
OS_REGION_
OS_NETWORK_
OS_USER_
OS_IMAGE_
OS_PROJECT_
OS_IDENTITY_
OS_PASSWORD=
OS_AUTH_URL=https:/
OS_COMPUTE_
OS_USERNAME=myuser
OS_TENANT_
OS_VOLUME_
OS_CACERT=
OS_PROJECT_
# openstack token issue
+------
| Field | Value |
+------
| expires | 2016-08-26 21:43:49.
| id | gAAAAABXwGO19rB
| | 4i0jS2RqAEKiloj
| | vNmf1QTiekM09GA
| | jYPLc3HVFukBNAF
| project_id | 5449a9e696014d8
| user_id | 0688b01e6439ca3
| | 9 |
+------
but as soon as I unset it things break:
# unset OS_PASSWORD
# openstack token issue
Password:
must be string or buffer, not None (HTTP 400) (Request-ID: req-c765742c-
I'm sure that the correct password was entered at the prompt (and a different error should have been surfaced anyway if it wasn't). I believe this is new with version 3.0.1. I don't remember seeing this with openstackclient 2.6.0.
Adding --debug yields this trace data:
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self._auth_ref = self.auth.
File "/usr/lib/
return self._plugin.
File "/usr/lib/
authenticat
File "/usr/lib/
return self.request(url, 'POST', **kwargs)
File "/usr/lib/
resp = super(TimingSes
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
raise exceptions.
BadRequest: must be string or buffer, not None (HTTP 400) (Request-ID: req-ac6a3813-
clean_up IssueToken: must be string or buffer, not None (HTTP 400) (Request-ID: req-ac6a3813-
Traceback (most recent call last):
File "/usr/lib/
ret_val = super(OpenStack
File "/usr/lib/
result = self.run_
File "/usr/lib/
ret_value = super(OpenStack
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self._auth_ref = self.auth.
File "/usr/lib/
return self._plugin.
File "/usr/lib/
authenticat
File "/usr/lib/
return self.request(url, 'POST', **kwargs)
File "/usr/lib/
resp = super(TimingSes
File "/usr/lib/
return func(*args, **kwargs)
File "/usr/lib/
raise exceptions.
BadRequest: must be string or buffer, not None (HTTP 400) (Request-ID: req-ac6a3813-
Changed in python-openstackclient: | |
assignee: | nobody → tamil vanan (tamilhce) |
This is a casualty of os-client-config loading auth plugins waaaaaay earlier than we used to. The fix is to transition to using the KSa plugin prompt mechanism, which will have to live in os-client-config.