[OSTF] "Can not find any online database" when hostname is not the default
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Confirmed
|
High
|
Fuel QA Team | ||
Mitaka |
Confirmed
|
High
|
Fuel QA Team |
Bug Description
Detailed bug description:
When running OSTF on an operational cluster (3 controllers, 3 computes, 6
OSDs), it fails on all HA-related MySQL tests with the error "Can not find any
online database. Check that at least one database is operable".
All names and hostnames of nodes were updated before deployment and don't have
the default "node-%d" form.
After further investigation the issue seems to be lying in get_database_
from /usr/lib/
where the following code block (L62-64):
----
hiera_cmd = ('ruby -e \'require "hiera";'
'db = Hiera.new(
'if db != [] then puts db else puts "None" end\'')
----
produces the following output (in my case):
----
node-54
node-58
node-60
----
Unfortunately the next code block does not match these hosts as long as it
explicitly checks hostnames (L69-72):
----
for node in cls.config.
hostname = node['hostname']
if hostname in database_nodes and node['online']:
----
Steps to reproduce:
- Create a new env
- Add nodes
- Change name and hostname of nodes (fuel node --name, fuel node --hostname)
- Deploy the env
- Launch OSTF
Expected result:
All checks pass
Actual result:
All HA-related MySQL checks fail:
- Check data replication over mysql
- Check if amount of tables in databases is the same on each node
- Check galera environment state
Workaround:
The following heira_cmd fixes the issue:
----
hiera_cmd = ('ruby -e \'require "hiera";'
'db = Hiera.new(
'if db.keys != [] then db.each_value {|value| puts value["name"]} else puts "None" end\'')
----
In my case hostnames and node names are the same, I'm not sure if it works for
the case when name differs.
Description of the environment:
[root@fuel ~]# shotgun2 short-report
cat /etc/fuel_build_id:
4243
cat /etc/fuel_
4243
cat /etc/fuel_release:
9.0
cat /etc/fuel_
mitaka-9.0
rpm -qa | egrep 'fuel|astute|
fuel-release-
fuel-misc-
fuel-bootstrap
fuel-migrate-
fuel-provision
fuel-mirror-
fuel-notify-
nailgun-
python-
fuelmenu-
fuel-9.
fuel-utils-
fuel-setup-
fuel-library9.
shotgun-
fuel-agent-
fuel-ui-
fuel-ostf-
python-
fuel-nailgun-
rubygem-
network-
fuel-openstack
Changed in fuel: | |
status: | New → Confirmed |
Changed in fuel: | |
milestone: | none → 9.1 |
Changed in fuel: | |
importance: | Undecided → High |
assignee: | nobody → Fuel QA Team (fuel-qa) |
milestone: | 9.1 → 10.0 |
this is reproducible in my setup also.