nova service cmd not working

Bug #1833099 reported by Peng Peng
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Critical
Stefan Dinescu

Bug Description

Brief Description
-----------------
run nova service cmd but not working

Severity
--------
Critical

Steps to Reproduce
------------------
login to system
source to openrc
run nova service cmd

TC-name:

Expected Behavior
------------------
cmd runs out without error

Actual Behavior
----------------
cmd failed

Reproducibility
---------------
Reproducible

System Configuration
--------------------
One node system

Lab-name: SM-2

Branch/Pull Time/Commit
-----------------------
stx master as of 20190616T233000Z

Last Pass
---------
20190612T013000Z

Timestamp/Logs
--------------
controller-0:~$ source /etc/platform/openrc
[wrsroot@controller-0 ~(keystone_admin)]$ system host-list
+----+--------------+-------------+----------------+-------------+--------------+
| id | hostname | personality | administrative | operational | availability |
+----+--------------+-------------+----------------+-------------+--------------+
| 1 | controller-0 | controller | unlocked | enabled | available |
+----+--------------+-------------+----------------+-------------+--------------+
[wrsroot@controller-0 ~(keystone_admin)]$ nova list --a
ERROR (CommandError): You must provide a user name/id (via --os-username, --os-user-id, env[OS_USERNAME] or env[OS_USER_ID]) or an auth token (via --os-token).
command terminated with exit code 1
[wrsroot@controller-0 ~(keystone_admin)]$ openstack keypair list

[wrsroot@controller-0 ~(keystone_admin)]$ nova keypair-lst
ERROR (CommandError): You must provide a user name/id (via --os-username, --os-user-id, env[OS_USERNAME] or env[OS_USER_ID]) or an auth token (via --os-token).
command terminated with exit code 1
[wrsroot@controller-0 ~(keystone_admin)]$ date
Mon Jun 17 15:23:50 UTC 2019

controller-0:~$ cat ~/openrc.admin
unset OS_SERVICE_TOKEN

export OS_ENDPOINT_TYPE=internalURL
export CINDER_ENDPOINT_TYPE=internalURL

export OS_USERNAME=admin
export OS_PASSWORD=`TERM=linux /opt/platform/.keyring/19.01/.CREDENTIAL 2>/dev/null`
export OS_AUTH_TYPE=password
export OS_AUTH_URL=http://keystone.openstack.svc.cluster.local/v3

export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_IDENTITY_API_VERSION=3
export OS_REGION_NAME=RegionOne
export OS_INTERFACE=internal

if [ ! -z "${OS_PASSWORD}" ]; then
    export PS1='[\u@\h \W(keystone_$OS_USERNAME)]\$ '
else
    echo 'Openstack Admin credentials can only be loaded from the active controller.'
    export PS1='\h:\w\$ '
fi

Test Activity
-------------
Sanity

Revision history for this message
Peng Peng (ppeng) wrote :
Revision history for this message
Yang Liu (yliu12) wrote :

This is the step to reproduce, where ~/openrc.admin contains auth info for admin user of containerized openstack:

# source to openrc and run cmd, error indicate auth info needed.
controller-0:~$ source ~/openrc.admin ; nova list
ERROR (CommandError): You must provide a user name/id (via --os-username, --os-user-id, env[OS_USERNAME] or env[OS_USER_ID]) or an auth token (via --os-token).
command terminated with exit code 1

## openrc file contains following:
unset OS_SERVICE_TOKEN

export OS_ENDPOINT_TYPE=internalURL
export CINDER_ENDPOINT_TYPE=internalURL

export OS_USERNAME=admin
export OS_PASSWORD=`TERM=linux /opt/platform/.keyring/19.01/.CREDENTIAL 2>/dev/null`
export OS_AUTH_TYPE=password
export OS_AUTH_URL=http://keystone.openstack.svc.cluster.local/v3

export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_IDENTITY_API_VERSION=3
export OS_REGION_NAME=RegionOne
export OS_INTERFACE=internal

# run cmd with auth info provided via cmdline works though:
nova --os-username 'admin' --os-password 'Li69nux*' --os-project-name admin --os-auth-url http://keystone.openstack.svc.cluster.local/v3 --os-user-domain-name Default --os-project-domain-name Default --os-endpoint-type internalURL --os-region-name RegionOne list
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+

Numan Waheed (nwaheed)
tags: added: stx.retestneeded
Peng Peng (ppeng)
description: updated
Revision history for this message
Ghada Khalil (gkhalil) wrote :

This appears to be related to the openstack client containerization. Frank is following up.

tags: added: stx.containers
Changed in starlingx:
assignee: nobody → Frank Miller (sensfan22)
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → High
tags: added: stx.sanity
Revision history for this message
Frank Miller (sensfan22) wrote :
Changed in starlingx:
status: New → Fix Released
Ghada Khalil (gkhalil)
tags: added: stx.2.0
Changed in starlingx:
assignee: Frank Miller (sensfan22) → Stefan Dinescu (stefandinescu)
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: High → Critical
Revision history for this message
Peng Peng (ppeng) wrote :

Verified on
Load: 20190620T013000Z

tags: removed: stx.retestneeded
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.