CLI: "--fuel-version " should work correctly with credentials now

Bug #1590571 reported by Liubov Efremova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Roman Prykhodchenko
6.1.x
Fix Released
Medium
Denis Meltsaykin
7.0.x
Fix Released
Medium
Denis Meltsaykin
Mitaka
Won't Fix
Medium
Roman Prykhodchenko

Bug Description

As a result of fix for #1585137 --fuel-version request is not public now.
So it should work correctly with user's credentials.

The easiest steps to reproduce:
1.fuel --os-username=admin --os-password=111 --fuel-version

expected result: no auth

actual result: version info

It's not so critical for versions 7.0 and later as "--fuel-version" is deprecated in them. However it's important for 6.1.

Changed in fuel:
importance: Undecided → High
tags: added: customer-found
Revision history for this message
Denis Meltsaykin (dmeltsaykin) wrote :

--fuel-version is not deprecated in 7.0 and 8.0. It's used in updates, for example.

Changed in fuel:
status: New → Confirmed
assignee: nobody → Fuel Sustaining (fuel-sustaining-team)
milestone: none → 9.0
tags: added: area-python
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 9.0 → 10.0
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
assignee: Fuel Sustaining (fuel-sustaining-team) → Roman Prykhodchenko (romcheg)
Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

Please use fuel-version as a command. --fuel-version option is deprecated and will be removed soon.

Changed in fuel:
importance: High → Medium
Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

The mentioned commands work correctly: http://paste.openstack.org/show/509210/

Revision history for this message
Denis Meltsaykin (dmeltsaykin) wrote :

Roman, in 6.1 there is no "fuel-version" command neither in 'fuel' nor in 'fuel2'.

Revision history for this message
Denis Meltsaykin (dmeltsaykin) wrote :

Fix for 6.1: https://review.openstack.org/#/c/327035. The workaround is to use environment variables KEYSTONE_PASS and KEYSTONE_USER.

Revision history for this message
Liubov Efremova (lefremova) wrote :

Yes, all versions work well with the appropriate environment variables.
However with additional parameters in fuel request we have a bug.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to python-fuelclient (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/329085

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Denis Meltsaykin (dmeltsaykin) wrote :

Liubov, in https://review.openstack.org/#/c/327035 this has been fixed, so --fuel-version will work with --user/pass/tenant options. It's a bit of hack, but it works.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-fuelclient (stable/6.1)

Reviewed: https://review.openstack.org/327035
Committed: https://git.openstack.org/cgit/openstack/python-fuelclient/commit/?id=e86c43e85eee3538a7e87902cc51d2c4eceeccff
Submitter: Jenkins
Branch: stable/6.1

commit e86c43e85eee3538a7e87902cc51d2c4eceeccff
Author: Alex Schultz <email address hidden>
Date: Tue May 24 10:52:31 2016 -0600

    Check response from version for auth required

    If the version call requires auth, we need to catch that to understand
    if we should use auth for making requests. Previously the version api
    call may have been open which allowed the CLI to make the call to
    determine if auth should be used. If the version call itself requires
    auth, then we need to check the response code to enable authentication
    for the api requests.
    (cherry-picked from f39ad5b810e46f863d325f24764968cf6f0b991e)

    Note: This commit also contains changes to allow using 'fuel-version'
    together with the 'user', 'password' and 'tenant' command-line options.

    Change-Id: Ie70d601eb4db4909e52e6afaa15cba6195f24045
    Related-Bug: #1585137
    Closes-Bug: #1590571

Revision history for this message
Liubov Efremova (lefremova) wrote :

Denis, thank you!

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

Reviewed: https://review.openstack.org/327718
Committed: https://git.openstack.org/cgit/openstack/python-fuelclient/commit/?id=f698b5a29f5c0222087bab99a2e17e60a07fa548
Submitter: Jenkins
Branch: master

commit f698b5a29f5c0222087bab99a2e17e60a07fa548
Author: Roman Prykhodchenko <email address hidden>
Date: Thu Jun 9 16:27:00 2016 +0200

    Remove deprecated --fuel-version option

    It was kept for compatibility reasons, now there is no need
    to keep it.

    DocImpact: --fuel-version action was removed. Use fuel-version command.

    Closes-bug: #1590571
    Change-Id: I288490985bbdfbc34892e14ee7866e782a15a261

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-fuelclient (stable/7.0)

Fix proposed to branch: stable/7.0
Review: https://review.openstack.org/334527

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to python-fuelclient (master)

Reviewed: https://review.openstack.org/329085
Committed: https://git.openstack.org/cgit/openstack/python-fuelclient/commit/?id=36cc4f1953e558fbdcc3211d9c0d899fe6926832
Submitter: Jenkins
Branch: master

commit 36cc4f1953e558fbdcc3211d9c0d899fe6926832
Author: Roman Prykhodchenko <email address hidden>
Date: Mon Jun 13 18:15:52 2016 +0200

    Use Cliff's formatters for fuel-verion

    fuel-version command used to be introduced by just copying
    and pasting code from the deprecated --fuel-version action.

    Since now that action was removed it's time to re-factor
    the new command to utilize Cliff's features.

    Related-bug: #1590571
    DocImpact: Added new options for showing version of Fuel in
               different formats: -f/--format {json,shell,table,value,yaml}
               the output format, defaults to table
    Change-Id: I1dfe6b25c11e0da533c9cf99f67d28ac652c33dc

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-fuelclient (stable/7.0)

Reviewed: https://review.openstack.org/334527
Committed: https://git.openstack.org/cgit/openstack/python-fuelclient/commit/?id=fcc8b2da50daefedcafe0a26a6875e7870e6385a
Submitter: Jenkins
Branch: stable/7.0

commit fcc8b2da50daefedcafe0a26a6875e7870e6385a
Author: Alex Schultz <email address hidden>
Date: Tue May 24 10:52:31 2016 -0600

    Check response from version for auth required

    If the version call requires auth, we need to catch that to understand
    if we should use auth for making requests. Previously the version api
    call may have been open which allowed the CLI to make the call to
    determine if auth should be used. If the version call itself requires
    auth, then we need to check the response code to enable authentication
    for the api requests.
    (cherry-picked from f39ad5b810e46f863d325f24764968cf6f0b991e)

    Note: This commit also contains changes to allow using 'fuel-version'
    together with the 'user', 'password' and 'tenant' command-line options.

    Change-Id: Ie70d601eb4db4909e52e6afaa15cba6195f24045
    Related-Bug: #1585137
    Closes-Bug: #1590571

tags: added: on-verification
Revision history for this message
Dmitry Belyaninov (dbelyaninov) wrote :

Verified on 6.1 MU7

[root@nailgun ~]# fuel --user=admin --password=1141 --fuel-version
DEPRECATION WARNING: /etc/fuel/client/config.yaml exists and will be used as the source for settings. This behavior is deprecated. Please specify the path to your custom settings file in the FUELCLIENT_CUSTOM_SETTINGS environment variable.

            Unauthorized: need authentication!
            Please provide user and password via client
             fuel --user=user --password=pass [action]
            or modify "KEYSTONE_USER" and "KEYSTONE_PASS" in
            /etc/fuel/client/config.yaml

[root@nailgun ~]# fuel --user=admin --password=admin --fuel-version
DEPRECATION WARNING: /etc/fuel/client/config.yaml exists and will be used as the source for settings. This behavior is deprecated. Please specify the path to your custom settings file in the FUELCLIENT_CUSTOM_SETTINGS environment variable.
api: '1.0'
astute_sha: 1ea8017fe8889413706d543a5b9f557f5414beae
auth_required: true
build_id: 2015-06-19_13-02-31
build_number: '525'
feature_groups:
....

tags: removed: on-verification
tags: added: on-verification
Revision history for this message
TatyanaGladysheva (tgladysheva) wrote :

Verified on MOS 7.0 + MU5 updates.

Before MU5 updates:
[root@nailgun ~]# fuel --user=admin --password=111 --fuel-version
DEPRECATION WARNING: /etc/fuel/client/config.yaml exists and will be used as the source for settings. This behavior is deprecated. Please specify the path to your custom settings file in the FUELCLIENT_CUSTOM_SETTINGS environment variable.
api: '1.0'
astute_sha: 6c5b73f93e24cc781c809db9159927655ced5012
auth_required: true
build_id: '301'
build_number: '301'
feature_groups:
...
[root@nailgun ~]#
[root@nailgun ~]# fuel --user=admin --password=admin --fuel-version
DEPRECATION WARNING: /etc/fuel/client/config.yaml exists and will be used as the source for settings. This behavior is deprecated. Please specify the path to your custom settings file in the FUELCLIENT_CUSTOM_SETTINGS environment variable.
api: '1.0'
astute_sha: 6c5b73f93e24cc781c809db9159927655ced5012
auth_required: true
build_id: '301'
build_number: '301'
feature_groups:
...

After MU5 updates:
[root@nailgun ~]# fuel --user=admin --password=111 --fuel-version
DEPRECATION WARNING: /etc/fuel/client/config.yaml exists and will be used as the source for settings. This behavior is deprecated. Please specify the path to your custom settings file in the FUELCLIENT_CUSTOM_SETTINGS environment variable.

            Unauthorized: need authentication!
            Please provide user and password via client
             fuel --user=user --password=pass [action]
            or modify "KEYSTONE_USER" and "KEYSTONE_PASS" in
            /etc/fuel/client/config.yaml
[root@nailgun ~]#
[root@nailgun ~]# fuel --user=admin --password=admin --fuel-version
DEPRECATION WARNING: /etc/fuel/client/config.yaml exists and will be used as the source for settings. This behavior is deprecated. Please specify the path to your custom settings file in the FUELCLIENT_CUSTOM_SETTINGS environment variable.
api: '1.0'
astute_sha: 6c5b73f93e24cc781c809db9159927655ced5012
auth_required: true
build_id: '301'
build_number: '301'
feature_groups:
...

tags: removed: on-verification
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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