Authentication using command line parameters is broken in old Fuel Client

Bug #1535417 reported by Egor Kotko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Won't Fix
Medium
Roman Prykhodchenko
8.0.x
Won't Fix
Medium
Roman Prykhodchenko
Mitaka
Won't Fix
Medium
Roman Prykhodchenko

Bug Description

Steps to reproduce:
1)Deploy any cluster
2)Change default keystone credentials (admin, ceph1 - as example)
3)Try to use commands from cli help

Actual result - additional parameters (non default credentials) brake cli.

root@nailgun ~]# fuel --user=admin --password=ceph1 node --node-id 64:88:de:ad:c1:91
Unauthorized: need authentication!
Please provide user and password via client
fuel --user=user --password=pass [action]
or modify your credentials in your configuration file.

[root@nailgun ~]# fuel --user=admin --password=ceph1 node
id | status | name | cluster | ip | mac | roles | pending_roles | online | group_id
---|----------|------------------|---------|-------------|-------------------|-------|---------------|--------|---------
3 | discover | Untitled (8c:20) | None | 10.109.0.8 | 64:f9:02:82:8c:20 | | | True | None
5 | discover | Untitled (31:73) | None | 10.109.0.9 | 64:ff:7d:23:31:73 | | | True | None
1 | discover | Untitled (c1:91) | None | 10.109.0.3 | 64:88:de:ad:c1:91 | | | True | None
4 | discover | Untitled (cd:a8) | None | 10.109.0.10 | 64:8f:15:77:cd:a8 | | | True | None
2 | discover | Untitled (b7:be) | None | 10.109.0.4 | 64:67:6e:5a:b7:be | | | True | None

# fuel node help
 . . .

fuel node --node-id 80:ac

Egor Kotko (ykotko)
description: updated
Maciej Relewicz (rlu)
Changed in fuel:
status: New → Confirmed
Revision history for this message
Roman Prykhodchenko (romcheg) wrote : Re: Authentication using command line parameters is broken

@Egor: I kindly ask to use specific topics for bugs. Most of the bugs is "Something failed".

summary: - Fuel cli fails on the command from help
+ Authentication using command line parameters is broken
summary: - Authentication using command line parameters is broken
+ Authentication using command line parameters is broken in old Fuel
+ Client
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 8.0 → 9.0
tags: added: module-client
Dmitry Pyzhov (dpyzhov)
tags: added: team-bugfix
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-fuelclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/272975

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

This bug has an easy workaround that is utilizing KEYSTONE_USER and KEYSTONE_PASS environment variables so it does not qualify to have high priority.

Changed in fuel:
importance: High → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-library (master)

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

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

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

commit 1566c52f3dd1d4538fe08d01db0adb5a5a5d47bc
Author: Roman Prykhodchenko <email address hidden>
Date: Wed Jan 27 11:13:07 2016 +0100

    Use OS command line parameters for credentials

    In order to comply with OpenStack de-facto standards
    user's credentials must be supplied via appropriate
    --os parameters.

    Closes-bug: #1535417
    Change-Id: Ifd186f0d703a840635f6f111c379338e93fde0a3

Changed in fuel:
status: In Progress → Fix Committed
tags: added: on-verification
Revision history for this message
Egor Kotko (ykotko) wrote :

Could reproduce bug on 9.0 - 436

Changed in fuel:
status: Fix Committed → Confirmed
Revision history for this message
Mikhail Samoylov (msamoylov) wrote :

Verified in #490 ISO

tags: removed: on-verification
Changed in fuel:
status: Confirmed → Fix Released
Revision history for this message
Egor Kotko (ykotko) wrote :

[roo@nailgun ~]# fuel --os-username=admin --os-password=tester node --node-id 1
id | status | name | cluster | ip | mac | roles | pending_roles | online | group_id
---+--------+---------------------+---------+------------+-------------------+------------+---------------+--------+---------
 1 | ready | slave-01_controller | 1 | 10.109.5.3 | 64:3f:6f:c0:fe:6d | controller | | 1 | 1
[root@nailgun ~]# fuel --os-username=admin --os-password=tester node --node-id 64:3f:6f:c0:fe:6d
Unauthorized: need authentication!
Please provide user and password via client
fuel --os-username=user --os-password=pass [action]
or modify your credentials in your configuration file.
[root@nailgun ~]#

ISO 9.0-507

Changed in fuel:
status: Fix Released → Confirmed
Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

This recent misbehavior seems to be another bug actually but let's track it here. The original bug was caused by --user and --password options not being used in the old CLI. That caused the inability to set either login or password using command line options. After https://review.openstack.org/272975 was merged it introduced new parameters for setting both login and password which are actually used. If you try filtering node by its id, not by its mac address, it will be clear the parameters actually work.

The observed behavior mentioned by Egor is another problem that was introduced by some other change and its RC seems to be an issue with the option parser in the old CLI. The parser seems to be fooled by providing a mac address to it.

Since the bug has obvious workarounds, either using appropriate environment variables or fixing the configuration file, it has a medium priority and cannot be fixed in Mitaka release. I will also set it as a Won't fix for the Newton release because old commands in fuel client are in process of being dropped, so there is no reason to waste time for hacking the old option parser.

Changed in fuel:
milestone: 9.0 → 10.0
status: Confirmed → Won't Fix
Revision history for this message
Egor Kotko (ykotko) wrote :
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.