OSTF test for default password usage: unexpected result

Bug #1589117 reported by Eugene Korekin
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Confirmed
Low
Fuel Sustaining
Mitaka
Confirmed
Medium
Fuel Documentation Team

Bug Description

Our partner (Infoblox) has found that after he changed default OpenStack password for admin, Fuel OSTF test still claim that default password is used:

"Authorization failure. Please provide the valid credentials for your OpenStack environment, and reattempt.
Target component: Configuration

Scenario:
1. Check if default credentials for OpenStack cluster have changed."

Looks like OSTF test only verifies password value in nailgun database, not the current password, used by OpenStack environment(see https://github.com/openstack/fuel-ostf/blob/master/fuel_health/tests/configuration/test_configuration.py#L81)

This is counterintuitive and not very useful and there is no easy way to pass this test if password wasn't changed before the deployment (and of course, we only could see that the test failed after deployment end).

This behavior should at least be documented, better yet, error message should elaborate that this test might fail, even after the password was changed from default, and the best fix would be to verify if we can use the default password on the environment like it's done on the similar test test_001_check_default_master_node_credential_usage (https://github.com/openstack/fuel-ostf/blob/master/fuel_health/tests/configuration/test_configuration.py#L44) instead of checking values in the database.

[root@fuel ~]# cat /etc/fuel/version.yaml
VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "589"
  build_id: "589"
  fuel-nailgun_sha: "558ca91a854cf29e395940c232911ffb851899c1"
  python-fuelclient_sha: "4f234669cfe88a9406f4e438b1e1f74f1ef484a5"
  fuel-agent_sha: "658be72c4b42d3e1436b86ac4567ab914bfb451b"
  fuel-nailgun-agent_sha: "b2bb466fd5bd92da614cdbd819d6999c510ebfb1"
  astute_sha: "b81577a5b7857c4be8748492bae1dec2fa89b446"
  fuel-library_sha: "c2a335b5b725f1b994f78d4c78723d29fa44685a"
  fuel-ostf_sha: "3bc76a63a9e7d195ff34eadc29552f4235fa6c52"
  fuel-mirror_sha: "fb45b80d7bee5899d931f926e5c9512e2b442749"
  fuelmenu_sha: "78ffc73065a9674b707c081d128cb7eea611474f"
  shotgun_sha: "63645dea384a37dde5c01d4f8905566978e5d906"
  network-checker_sha: "a43cf96cd9532f10794dce736350bf5bed350e9d"
  fuel-upgrade_sha: "616a7490ec7199f69759e97e42f9b97dfc87e85b"
  fuelmain_sha: "643a1ef27c7dccc1c2a2ad26b85c09226b35a67d"

description: updated
description: updated
description: updated
description: updated
tags: added: area-ostf customer-found
Changed in fuel:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → Fuel Sustaining (fuel-sustaining-team)
milestone: none → 10.0
Revision history for this message
Oleksii Aleksieiev (alexzzman) wrote :

The OSTF error "Authorization failure. Please provide the valid credentials for your OpenStack environment, and reattempt." is not generally unexpected.

Next to "Run test" button there is "Provide credentials" button.
You can provide valid admin credential in that window. Although i agree that this test should not require any login into except keystone URL to test.

The real problem with this test is that it still shows "Default credentials values are used. We kindly recommend that you changed all defaults." even if you already changed them.

From what i can tell this test actually uses login into you provide to test authentication instead of using admin/admin user and password.

Jugging from the test code it is so:

/usr/lib/python2.7/site-packages/fuel_health/tests/configuration/test_configuration.py
.....

    def test_002_check_default_openstack_credential_usage(self):
        """Check if default credentials for OpenStack cluster have changed
        Target component: Configuration

        Scenario:
            1. Check if default credentials for OpenStack cluster have changed.
        Duration: 20 s.
         Available since release: 2014.2-6.1
        """
        cluster_data = {
            'password': self.config.identity.admin_password,
            'username': self.config.identity.admin_username,
            'tenant': self.config.identity.admin_tenant_name}

Revision history for this message
heyao1992 (heyao2) wrote :

i just want to know how to change the default credentials for OpenStack cluster

Revision history for this message
Dmitry Belyaninov (dbelyaninov) wrote :

It seems you should redeploy the cluster after changing the credentials.

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.