Bug 1419038 - OS_BAREMETAL_API_VERSION is not exported in stackrc
Summary: OS_BAREMETAL_API_VERSION is not exported in stackrc
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: instack-undercloud
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: z3
: 10.0 (Newton)
Assignee: Dmitry Tantsur
QA Contact: mlammon
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-03 13:59 UTC by Steve Reichard
Modified: 2020-07-16 09:10 UTC (History)
10 users (show)

Fixed In Version: instack-undercloud-5.2.0-3.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-28 14:44:12 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 428756 0 None MERGED export OS_BAREMETAL_API_VERSION in stackrc 2020-02-01 13:20:59 UTC
Red Hat Product Errata RHBA-2017:1585 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 10 director Bug Fix Advisory 2017-06-28 18:42:51 UTC

Description Steve Reichard 2017-02-03 13:59:43 UTC
Description of problem:

Running a command that has been working failed on a new deployment this week:

[stack@ospha-inst ~]$ openstack baremetal node list --fields 'uuid' -f value
Requested API version 1.6 is not supported by the server or the
requested operation is not supported by the requested version.
Supported version range is 1.1 to 1.22
[stack@ospha-inst ~]$ 


This is on the undercloud after source stackrc

Without the arguments, the command itself works:

[stack@ospha-inst ~]$ openstack baremetal node list 
+--------------------------------------+------+---------------+-------------+--------------------+-------------+
| UUID                                 | Name | Instance UUID | Power State | Provisioning State | Maintenance |
+--------------------------------------+------+---------------+-------------+--------------------+-------------+
| b1042bbd-1929-4f47-b5db-d79054b72598 | None | None          | power off   | available          | False       |
| ec332302-524b-4d0a-b5a0-b57a0784791a | None | None          | power off   | available          | False       |
| 37a09a49-ce2c-48fa-b9e6-9fdd494145f7 | None | None          | power off   | available          | False       |
| 4ac4d8a3-a482-41c3-a62a-0b884447b9dd | None | None          | power off   | available          | False       |
| 92c481b3-c322-48d6-9ae7-da78326de496 | None | None          | power off   | available          | False       |
+--------------------------------------+------+---------------+-------------+--------------------+-------------+
[stack@ospha-inst ~]$ 


Version-Release number of selected component (if applicable):

[stack@ospha-inst ~]$ yum list installed |& grep -A 1 -e tripleo -e '^openstack'
openstack-aodh-api.noarch    3.0.1-5.el7ost     @rhel-7-server-openstack-10-rpms
openstack-aodh-common.noarch 3.0.1-5.el7ost     @rhel-7-server-openstack-10-rpms
openstack-aodh-evaluator.noarch
                             3.0.1-5.el7ost     @rhel-7-server-openstack-10-rpms
openstack-aodh-listener.noarch
                             3.0.1-5.el7ost     @rhel-7-server-openstack-10-rpms
openstack-aodh-notifier.noarch
                             3.0.1-5.el7ost     @rhel-7-server-openstack-10-rpms
openstack-ceilometer-api.noarch
                             1:7.0.1-1.el7ost   @rhel-7-server-openstack-10-rpms
openstack-ceilometer-central.noarch
                             1:7.0.1-1.el7ost   @rhel-7-server-openstack-10-rpms
openstack-ceilometer-collector.noarch
                             1:7.0.1-1.el7ost   @rhel-7-server-openstack-10-rpms
openstack-ceilometer-common.noarch
                             1:7.0.1-1.el7ost   @rhel-7-server-openstack-10-rpms
openstack-ceilometer-notification.noarch
                             1:7.0.1-1.el7ost   @rhel-7-server-openstack-10-rpms
openstack-ceilometer-polling.noarch
                             1:7.0.1-1.el7ost   @rhel-7-server-openstack-10-rpms
openstack-glance.noarch      1:13.0.0-1.el7ost  @rhel-7-server-openstack-10-rpms
openstack-heat-api.noarch    1:7.0.1-2.el7ost   @rhel-7-server-openstack-10-rpms
openstack-heat-api-cfn.noarch
                             1:7.0.1-2.el7ost   @rhel-7-server-openstack-10-rpms
openstack-heat-common.noarch 1:7.0.1-2.el7ost   @rhel-7-server-openstack-10-rpms
openstack-heat-engine.noarch 1:7.0.1-2.el7ost   @rhel-7-server-openstack-10-rpms
openstack-heat-templates.noarch
                             0-0.10.1e6015dgit.el7ost
--
openstack-ironic-api.noarch  1:6.2.2-3.el7ost   @rhel-7-server-openstack-10-rpms
openstack-ironic-common.noarch
                             1:6.2.2-3.el7ost   @rhel-7-server-openstack-10-rpms
openstack-ironic-conductor.noarch
                             1:6.2.2-3.el7ost   @rhel-7-server-openstack-10-rpms
openstack-ironic-inspector.noarch
                             4.2.1-2.el7ost     @rhel-7-server-openstack-10-rpms
openstack-keystone.noarch    1:10.0.0-4.el7ost  @rhel-7-server-openstack-10-rpms
openstack-mistral-api.noarch 3.0.2-9.el7ost     @rhel-7-server-openstack-10-rpms
openstack-mistral-common.noarch
                             3.0.2-9.el7ost     @rhel-7-server-openstack-10-rpms
openstack-mistral-engine.noarch
                             3.0.2-9.el7ost     @rhel-7-server-openstack-10-rpms
openstack-mistral-executor.noarch
                             3.0.2-9.el7ost     @rhel-7-server-openstack-10-rpms
openstack-neutron.noarch     1:9.1.1-2.el7ost   @rhel-7-server-openstack-10-rpms
openstack-neutron-common.noarch
                             1:9.1.1-2.el7ost   @rhel-7-server-openstack-10-rpms
openstack-neutron-ml2.noarch 1:9.1.1-2.el7ost   @rhel-7-server-openstack-10-rpms
openstack-neutron-openvswitch.noarch
                             1:9.1.1-2.el7ost   @rhel-7-server-openstack-10-rpms
openstack-nova-api.noarch    1:14.0.2-7.el7ost  @rhel-7-server-openstack-10-rpms
openstack-nova-cert.noarch   1:14.0.2-7.el7ost  @rhel-7-server-openstack-10-rpms
openstack-nova-common.noarch 1:14.0.2-7.el7ost  @rhel-7-server-openstack-10-rpms
openstack-nova-compute.noarch
                             1:14.0.2-7.el7ost  @rhel-7-server-openstack-10-rpms
openstack-nova-conductor.noarch
                             1:14.0.2-7.el7ost  @rhel-7-server-openstack-10-rpms
openstack-nova-scheduler.noarch
                             1:14.0.2-7.el7ost  @rhel-7-server-openstack-10-rpms
openstack-puppet-modules.noarch
                             1:9.3.0-1.el7ost   @rhel-7-server-openstack-10-rpms
openstack-selinux.noarch     0.7.13-3.el7ost    @rhel-7-server-openstack-10-rpms
openstack-swift-account.noarch
                             2.10.1-1.el7ost    @rhel-7-server-openstack-10-rpms
openstack-swift-container.noarch
                             2.10.1-1.el7ost    @rhel-7-server-openstack-10-rpms
openstack-swift-object.noarch
                             2.10.1-1.el7ost    @rhel-7-server-openstack-10-rpms
openstack-swift-proxy.noarch 2.10.1-1.el7ost    @rhel-7-server-openstack-10-rpms
openstack-tempest.noarch     1:13.0.0-9.bafe630git.el7ost
                                                @rhel-7-server-openstack-10-rpms
openstack-tripleo.noarch     0.0.8-0.2.4de13b3git.el7ost
                                                @rhel-7-server-openstack-10-rpms
openstack-tripleo-common.noarch
                             5.4.1-1.el7ost     @rhel-7-server-openstack-10-rpms
openstack-tripleo-heat-templates.noarch
                             5.2.0-3.el7ost     @rhel-7-server-openstack-10-rpms
openstack-tripleo-image-elements.noarch
                             5.2.0-1.el7ost     @rhel-7-server-openstack-10-rpms
openstack-tripleo-puppet-elements.noarch
                             5.2.0-2.el7ost     @rhel-7-server-openstack-10-rpms
openstack-tripleo-ui.noarch  1.1.0-1.el7ost     @rhel-7-server-openstack-10-rpms
openstack-tripleo-validations.noarch
                             5.1.1-1.el7ost     @rhel-7-server-openstack-10-rpms
openstack-utils.noarch       2016.1-1.el7ost    @rhel-7-server-openstack-10-devtools-rpms
openstack-zaqar.noarch       1:3.0.0-3.el7ost   @rhel-7-server-openstack-10-rpms
openvswitch.x86_64           2.5.0-22.git20160727.el7fdp
--
puppet-tripleo.noarch        5.5.0-2.el7ost     @rhel-7-server-openstack-10-rpms
puppet-trove.noarch          9.4.0-1.el7ost     @rhel-7-server-openstack-10-rpms
--
python-tripleoclient.noarch  5.4.1-1.el7ost     @rhel-7-server-openstack-10-rpms
python-trollius.noarch       2.0-1.el7ost       @rhel-7-server-openstack-10-rpms
[stack@ospha-inst ~]$ 


How reproducible:
Every time


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Dmitry Tantsur 2017-02-03 14:04:58 UTC
What you see is actually correct: one has to provide an API version to use newer features (a UX inconvenience we're aware of). Now, the reason it used to work is because we set OS_BAREMETAL_API_VERSION in stackrc. Or we used to set.

Could you please paste your localrc (without passwords)?

Comment 2 Lucas Alvares Gomes 2017-02-03 14:08:55 UTC
(In reply to Dmitry Tantsur from comment #1)
> What you see is actually correct: one has to provide an API version to use
> newer features (a UX inconvenience we're aware of). Now, the reason it used
> to work is because we set OS_BAREMETAL_API_VERSION in stackrc. Or we used to
> set.
> 
> Could you please paste your localrc (without passwords)?

++

I don't know why we are not exporting that variable anymore, another way to specify the version on the openstack CLI is to use the "--os-baremetal-api-version" parameter, for example:

$ openstack baremetal --os-baremetal-api-version 1.8 node list --fields 'uuid' -f value
c1ebcb91-c35b-4e1f-8853-70f754f634f9
2cb30791-b43f-4a87-b081-034a33142447

# Here with a version < than the supported for filtering fields:

$ openstack baremetal --os-baremetal-api-version 1.1 node list --fields 'uuid' -f value
Requested API version 1.1 is not supported by the server or the
requested operation is not supported by the requested version.
Supported version range is 1.1 to 1.29

Comment 3 Steve Reichard 2017-02-03 14:20:24 UTC
[stack@ospha-inst ~]$ cat stackrc
NOVA_VERSION=1.1
export NOVA_VERSION
OS_PASSWORD=$(sudo hiera admin_password)
export OS_PASSWORD
OS_AUTH_URL=https://192.168.9.2:13000/v2.0
PYTHONWARNINGS="ignore:Certificate has no, ignore:A true SSLContext object is not available"
export OS_AUTH_URL
export PYTHONWARNINGS
OS_USERNAME=admin
OS_TENANT_NAME=admin
COMPUTE_API_VERSION=1.1
OS_BAREMETAL_API_VERSION=1.15
OS_NO_CACHE=True
OS_CLOUDNAME=undercloud
OS_IMAGE_API_VERSION=1
export OS_USERNAME
export OS_TENANT_NAME
export COMPUTE_API_VERSION
export OS_BAREMETAL
export OS_NO_CACHE
export OS_CLOUDNAME
export OS_IMAGE_API_VERSION
[stack@ospha-inst ~]$

Comment 4 Dmitry Tantsur 2017-02-03 14:24:34 UTC
I see, it's a know bug with exporting wrong variable name (OS_BAREMETAL vs OS_BAREMETAL_API_VERSION). I'll check the status of the fix and its backport.

Comment 5 Dmitry Tantsur 2017-02-03 14:28:41 UTC
Backport requested: https://review.openstack.org/#/c/428756/

Comment 7 Mohammad Rizwan 2017-03-08 09:26:23 UTC
can we suggest customer to set "export OS_BAREMETAL_API_VERSION" in stackrc as a workaround?

Comment 8 Dmitry Tantsur 2017-03-08 09:32:41 UTC
Yes, you can apply a change to your stackrc similar to https://review.openstack.org/#/c/428756/2/elements/undercloud-install/os-apply-config/root/stackrc

Comment 10 mlammon 2017-04-25 19:31:43 UTC
This is verified against Ocata (11) latest from today APR 25
We see the OS_BAREMETAL_API_VERSION=1.15 in rc file

[stack@undercloud-0 ~]$ cat stackrc
# Clear any old environment that may conflict.
for key in $( set | awk '{FS="="}  /^OS_/ {print $1}' ); do unset $key ; done
NOVA_VERSION=1.1
export NOVA_VERSION
OS_PASSWORD=$(sudo hiera admin_password)
export OS_PASSWORD
OS_AUTH_TYPE=password
export OS_AUTH_TYPE
OS_AUTH_URL=https://192.168.24.2:13000/v2.0
PYTHONWARNINGS="ignore:Certificate has no, ignore:A true SSLContext object is not available"
export OS_AUTH_URL
export PYTHONWARNINGS
OS_USERNAME=admin
OS_TENANT_NAME=admin
COMPUTE_API_VERSION=1.1
OS_BAREMETAL_API_VERSION=1.15
OS_NO_CACHE=True
OS_CLOUDNAME=undercloud
export OS_USERNAME
export OS_TENANT_NAME
export COMPUTE_API_VERSION
export OS_BAREMETAL_API_VERSION
export OS_NO_CACHE
export OS_CLOUDNAME

[stack@undercloud-0 ~]$ openstack baremetal node list --fields 'uuid' -f value
7ec4fb7b-f793-4ff0-9618-747299557dab
130e8043-305c-47da-8283-905d2d28bc78
42189a4d-c058-492a-9f8b-008fe3c16a42
990e0949-7cee-43ed-9126-711303b68b96
436e00b2-5963-49b6-9d5e-8cc215b287ec
17338f5d-ec42-40ab-bad0-d0e54896ea90
91bce55e-774e-43cb-9f8e-257ae9adc118
a0d6a5fc-22d3-41de-aa6b-e09a460b5076
2254c6fc-8c87-4444-8ead-a0b35e4c910e

[stack@undercloud-0 ~]$ rpm -qa | grep instack-undercloud
instack-undercloud-6.0.0-6.el7ost.noarch

[stack@undercloud-0 ~]$ yum info instack-undercloud
Loaded plugins: search-disabled-repos
rhelosp-11.0-devtools-puddle                                                                                                                                                       3/3
rhelosp-11.0-puddle                                                                                                                                                            735/735
Installed Packages
Name        : instack-undercloud
Arch        : noarch
Version     : 6.0.0
Release     : 6.el7ost
Size        : 234 k
Repo        : installed
From repo   : rhelosp-11.0-puddle
Summary     : Installation tools to install an undercloud via instack
URL         : https://github.com/openstack/instack-undercloud
License     : ASL 2.0
Description : instack-undercloud is a collection of installation tools to install an
            : undercloud via python-instack. It contains scripts and elements to complete the
            : installation.

Comment 13 errata-xmlrpc 2017-06-28 14:44:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1585


Note You need to log in before you can comment on or make changes to this bug.