Merge "Skip vips tests with load balancer"
This commit is contained in:
commit
8cc77acc41
@ -157,6 +157,10 @@ subparsers:
|
|||||||
type: Value
|
type: Value
|
||||||
help: user name to be used to connect to TripleO Overcloud hosts
|
help: user name to be used to connect to TripleO Overcloud hosts
|
||||||
ansible_variable: overcloud_ssh_username
|
ansible_variable: overcloud_ssh_username
|
||||||
|
has_external_load_balancer:
|
||||||
|
type: Bool
|
||||||
|
help: OSP env was done with an external load balancer
|
||||||
|
ansible_variable: has_external_load_balancer
|
||||||
|
|
||||||
- title: Run stage
|
- title: Run stage
|
||||||
options:
|
options:
|
||||||
|
@ -14,6 +14,7 @@ test_default_conf:
|
|||||||
undercloud_ssh_hostname: "{{ undercloud_ssh_hostname }}"
|
undercloud_ssh_hostname: "{{ undercloud_ssh_hostname }}"
|
||||||
overcloud_ssh_username: "{{ overcloud_ssh_username }}"
|
overcloud_ssh_username: "{{ overcloud_ssh_username }}"
|
||||||
undercloud_ssh_key_filename: "{{ undercloud_ssh_key_filename }}"
|
undercloud_ssh_key_filename: "{{ undercloud_ssh_key_filename }}"
|
||||||
|
has_external_load_balancer: "{{ has_external_load_balancer }}"
|
||||||
|
|
||||||
test_log_debug: ''
|
test_log_debug: ''
|
||||||
|
|
||||||
@ -26,5 +27,6 @@ stackrc_file: '{{ ansible_user_dir }}/overcloudrc'
|
|||||||
undercloud_hostname: '{{ groups.get("undercloud", []) | first | default("undercloud-0") }}'
|
undercloud_hostname: '{{ groups.get("undercloud", []) | first | default("undercloud-0") }}'
|
||||||
undercloud_ssh_hostname: ''
|
undercloud_ssh_hostname: ''
|
||||||
undercloud_ssh_key_filename: ''
|
undercloud_ssh_key_filename: ''
|
||||||
|
has_external_load_balancer: ''
|
||||||
|
|
||||||
overcloud_ssh_username: ''
|
overcloud_ssh_username: ''
|
||||||
|
@ -74,6 +74,9 @@ OPTIONS = [
|
|||||||
cfg.StrOpt('inventory_file',
|
cfg.StrOpt('inventory_file',
|
||||||
default='.ansible/inventory/tripleo.yaml',
|
default='.ansible/inventory/tripleo.yaml',
|
||||||
help="path to where to export tripleo inventory file"),
|
help="path to where to export tripleo inventory file"),
|
||||||
|
cfg.BoolOpt('has_external_load_balancer',
|
||||||
|
default=False,
|
||||||
|
help="OSP env was done with an external load balancer"),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,11 +8,13 @@ from oslo_log import log
|
|||||||
import pandas
|
import pandas
|
||||||
|
|
||||||
import tobiko
|
import tobiko
|
||||||
|
from tobiko import config
|
||||||
from tobiko.tripleo import overcloud
|
from tobiko.tripleo import overcloud
|
||||||
from tobiko.shell import sh
|
from tobiko.shell import sh
|
||||||
from tobiko.openstack import topology
|
from tobiko.openstack import topology
|
||||||
|
|
||||||
|
|
||||||
|
CONF = config.CONF
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@ -165,19 +167,31 @@ class PacemakerResourcesStatus(object):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def vips_resource_healthy(self):
|
def vips_resource_healthy(self):
|
||||||
|
if CONF.tobiko.tripleo.has_external_load_balancer:
|
||||||
|
LOG.info("external load balancer used - "
|
||||||
|
"we can skip vips_resource sanity")
|
||||||
|
return True
|
||||||
|
else:
|
||||||
vips_resource_str = f"({self.ocf_prefix}heartbeat:IPaddr2):"
|
vips_resource_str = f"({self.ocf_prefix}heartbeat:IPaddr2):"
|
||||||
nodes_num = self.resource_count(vips_resource_str)
|
nodes_num = self.resource_count(vips_resource_str)
|
||||||
started_num = self.resource_count_in_state(
|
started_num = self.resource_count_in_state(
|
||||||
vips_resource_str, "Started")
|
vips_resource_str, "Started")
|
||||||
if nodes_num == started_num and nodes_num > 0:
|
if nodes_num == started_num and nodes_num > 0:
|
||||||
LOG.info("pcs status check: resources vips are in healthy state")
|
LOG.info("pcs status check: resources vips are "
|
||||||
|
"in healthy state")
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
LOG.info(
|
LOG.info(
|
||||||
"pcs status check: resources vips are not in healthy state")
|
"pcs status check: resources"
|
||||||
|
" vips are not in healthy state")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def ha_proxy_cinder_healthy(self):
|
def ha_proxy_cinder_healthy(self):
|
||||||
|
if CONF.tobiko.tripleo.has_external_load_balancer:
|
||||||
|
LOG.info("external load balancer used "
|
||||||
|
"- we can skip ha_proxy_resource sanity")
|
||||||
|
return True
|
||||||
|
else:
|
||||||
ha_proxy_resource_str = (f"({self.ocf_prefix}heartbeat:"
|
ha_proxy_resource_str = (f"({self.ocf_prefix}heartbeat:"
|
||||||
f"{self.container_runtime()}):")
|
f"{self.container_runtime()}):")
|
||||||
nodes_num = self.resource_count(ha_proxy_resource_str)
|
nodes_num = self.resource_count(ha_proxy_resource_str)
|
||||||
@ -189,8 +203,8 @@ class PacemakerResourcesStatus(object):
|
|||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
LOG.info(
|
LOG.info(
|
||||||
"pcs status check: resources ha_proxy and cinder are not in "
|
"pcs status check: resources ha_proxy and cinder "
|
||||||
"healthy state")
|
"are not in healthy state")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def ovn_resource_healthy(self):
|
def ovn_resource_healthy(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user