[ostf] Unable to provide credentials via cli

Bug #1578137 reported by Aleksey Zvyagintsev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Georgy Kibardin
Mitaka
Fix Released
High
Georgy Kibardin

Bug Description

fuel health cli cmd doesn't support credentials.

fuel --env 2 health --help
usage: fuel health [-h] --env ENV [--list] [--force] [--check CHECK]

optional arguments:
  -h, --help show this help message and exit
  --env ENV, --env-id ENV
                        environment id
  --list, -l List all available checks
  --force, -f Forced test run
  --check CHECK Run check for some testset.

#
fuel --env 2 health --check smoke
...
[ 1 of 12] [failure] 'Create instance flavor' (0.1118 s) Authorization failure. Please provide the valid credentials for your OpenStack environment, and reattempt.
...

Changed in fuel:
assignee: Fuel Python (Deprecated) (fuel-python) → Fuel for Openstack (fuel)
milestone: none → 9.0
Revision history for this message
Bug Checker Bot (bug-checker) wrote : Autochecker

(This check performed automatically)
Please, make sure that bug description contains the following sections filled in with the appropriate data related to the bug you are describing:

actual result

expected result

steps to reproduce

For more detailed information on the contents of each of the listed sections see https://wiki.openstack.org/wiki/Fuel/How_to_contribute#Here_is_how_you_file_a_bug

tags: added: need-info
Changed in fuel:
status: New → Confirmed
assignee: Fuel for Openstack (fuel) → Fuel Sustaining (fuel-sustaining-team)
Changed in fuel:
milestone: 9.0 → 10.0
Revision history for this message
Artem Roma (aroma-x) wrote :

In case user has access to UI, changed credentials can be supplied directly through "Provide credentials" drop-down form. But as correctly described here - fuel client does not support the possibility to provide new credentials to OSTF adapter.

The credentials data must be send in payload of request for test run start in 'ostf_os_access_creds' field. The access data must have following format:
{ostf_os_username: username, ostf_os_tenant_name: tenant_name, ostf_os_password: password}

Changed in fuel:
status: Confirmed → Triaged
Dmitry Pyzhov (dpyzhov)
tags: added: area-python module-client
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
assignee: Fuel Sustaining (fuel-sustaining-team) → Georgy Kibardin (gkibardin)
Revision history for this message
Georgy Kibardin (gkibardin) wrote :

I cannot reproduce the issue:
1. Created cluster
2. Changed admin password to admin2
3.
 [root@fuel ~]# fuel env
 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@fuel ~]# fuel --env 1 health --check sanity
 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.

4.
 [root@fuel ~]# fuel --os-username=admin --os-password=admin2 env
 id | status | name | release_id
 ---|-------------|-----------|-----------
 1 | operational | mycluster | 2

 [root@fuel ~]# fuel --os-username=admin --os-password=admin2 --env 1 health --check smoke
 [ 1 of 12] [success] 'Create instance flavor' (0.8071 s)
 [ 2 of 12] [success] 'Check create, update and delete image actions using Glance v2' (4.982 s)
 [ 3 of 12] [skipped] 'Create volume and boot instance from it' (0.02598 s) There are no cinder nodes or ceph storage for volume
 [ 4 of 12] [skipped] 'Create volume and attach it to instance' (0.00727 s) There are no cinder nodes or ceph storage for volume
 [ 5 of 12] [success] 'Check network connectivity from instance via floating IP' (138.8 s)
 [ 6 of 12] [success] 'Create keypair' (0.6422 s)
 [ 7 of 12] [success] 'Create security group' (0.8961 s)
 [ 8 of 12] [success] 'Check network parameters' (0.1692 s)
 [ 9 of 12] [success] 'Launch instance' (25.14 s)
 [10 of 12] [success] 'Launch instance with file injection' (63.94 s)
 [11 of 12] [success] 'Launch instance, create snapshot, launch instance from snapshot' (82.82 s)
 [12 of 12] [success] 'Create user and authenticate with it.' (9.524 s)

Revision history for this message
Aleksey Zvyagintsev (azvyagintsev) wrote :

Steps to reproduce:
1)Create cluster. in #cluster/1/settings/general OpenStack Access are:
Username: rados
password: rados
2) Deploy cluster
3) Change password in horizon to "admin"
fuel --env 1 health --check smoke
[ 1 of 11] [failure] 'Create instance flavor' (0.2007 s) Authorization failure. Please provide the valid credentials for your OpenStack environment, and reattempt.
[ 2 of 11] [failure] 'Check create, update and delete image actions using Glance v2' (0.009402 s) Authorization failure. Please provide the valid credentials for your OpenStack environment, and reattempt.
###
fuel --os-username=rados --os-password=admin --env 1 health --check smoke
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.
####
So, issue about openstack env credentials, not fuel itself.

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/315434

Changed in fuel:
status: Triaged → In Progress
Revision history for this message
Georgy Kibardin (gkibardin) wrote :

ETA 02.06.2016

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

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/325136

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

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

commit 9dceac9530ca51a02e978bac2f736cb5a50d2505
Author: Georgy Kibardin <email address hidden>
Date: Thu May 12 11:56:41 2016 +0300

    Pass credentials to ostf

    "--ostf-tenant-name", "--ostf-username" and "--ostf-password" are now passed
    to ostf so that cli behaviour matches webui

    Change-Id: I1d407833ed9e1bcbc18febe7885006d1012b1351
    Closes-Bug: #1578137

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

Reviewed: https://review.openstack.org/325136
Committed: https://git.openstack.org/cgit/openstack/python-fuelclient/commit/?id=8fe27741f975512a2fab47fedebaf36ad2ccf208
Submitter: Jenkins
Branch: stable/mitaka

commit 8fe27741f975512a2fab47fedebaf36ad2ccf208
Author: Georgy Kibardin <email address hidden>
Date: Thu May 12 11:56:41 2016 +0300

    Pass credentials to ostf

    "--ostf-tenant-name", "--ostf-username" and "--ostf-password" are now passed
    to ostf so that cli behaviour matches webui

    Change-Id: I1d407833ed9e1bcbc18febe7885006d1012b1351
    Closes-Bug: #1578137

tags: added: on-verification
Revision history for this message
Ekaterina Shutova (eshutova) wrote :

Fuel health cli cmd now supports credentials:
[root@nailgun ~]# fuel --env 1 health --check sanity --ostf-tenant-name=admin --ostf-username=admin --ostf-password=admin2
[ 1 of 13] [success] 'Request flavor list' (0.2913 s)
[ 2 of 13] [success] 'Request image list using Nova' (0.9181 s)
.....
Verified on:
cat /etc/fuel_build_id:
 455
cat /etc/fuel_build_number:
 455
cat /etc/fuel_release:
 9.0
cat /etc/fuel_openstack_version:
 mitaka-9.0

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.