Skip checking pcs resources if they nodes are offline

If some nodes are offline and some resource is located on
any of the offline nodes then skip checking the resource,
assuming that the resource is node-related, such as 'sysinfo'.

Change-Id: I8009611a8cff7bd082fa8e47e92c79dd76c2f036
Closes-Bug:#1506945
This commit is contained in:
Dennis Dmitriev 2015-10-16 20:25:25 +03:00 committed by tatyana-leontovich
parent 17a093c05b
commit b6a999f0e4
1 changed files with 9 additions and 6 deletions

View File

@ -160,11 +160,14 @@ class TestPacemakerStatus(ha_base.TestPacemakerBase):
'{1}, but actually started on the nodes {2}'
.format(rsc, disallowed, started))
# If 'allowed' is not empty than in 'started' should be at least
# one node where the resource is running
if allowed:
# If 'allowed' is not empty and contains:
# - more than one node where resource is allowed, or
# - at least one working controller node,
# then 'started' should contain at least one node where
# the resource is actually running.
if (len(allowed) > 1) or (set(allowed) - nailgun_offline):
self.verify_response_true(
started,
set(started) - nailgun_offline,
'Step 7 failed: Resource {0} allowed to start on the nodes'
' {1}, but it is not started on any node.'
.format(rsc, disallowed, started))
' {1}, but it is not started on any node'
.format(rsc, allowed, started))