Merge "Enable Ocata Amulet Tests"
This commit is contained in:
commit
c5448acb58
@ -227,6 +227,7 @@ class NRPE(object):
|
||||
nagios_logdir = '/var/log/nagios'
|
||||
nagios_exportdir = '/var/lib/nagios/export'
|
||||
nrpe_confdir = '/etc/nagios/nrpe.d'
|
||||
homedir = '/var/lib/nagios' # home dir provided by nagios-nrpe-server
|
||||
|
||||
def __init__(self, hostname=None, primary=True):
|
||||
super(NRPE, self).__init__()
|
||||
@ -369,7 +370,7 @@ def add_init_service_checks(nrpe, services, unit_name, immediate_check=True):
|
||||
)
|
||||
elif os.path.exists(sysv_init):
|
||||
cronpath = '/etc/cron.d/nagios-service-check-%s' % svc
|
||||
checkpath = '/var/lib/nagios/service-check-%s.txt' % svc
|
||||
checkpath = '%s/service-check-%s.txt' % (nrpe.homedir, svc)
|
||||
croncmd = (
|
||||
'/usr/local/lib/nagios/plugins/check_exit_status.pl '
|
||||
'-s /etc/init.d/%s status' % svc
|
||||
@ -383,7 +384,9 @@ def add_init_service_checks(nrpe, services, unit_name, immediate_check=True):
|
||||
description='service check {%s}' % unit_name,
|
||||
check_cmd='check_status_file.py -f %s' % checkpath,
|
||||
)
|
||||
if immediate_check:
|
||||
# if /var/lib/nagios doesn't exist open(checkpath, 'w') will fail
|
||||
# (LP: #1670223).
|
||||
if immediate_check and os.path.isdir(nrpe.homedir):
|
||||
f = open(checkpath, 'w')
|
||||
subprocess.call(
|
||||
croncmd.split(),
|
||||
|
@ -306,6 +306,8 @@ SYSTEMD_SYSTEM = '/run/systemd/system'
|
||||
|
||||
def init_is_systemd():
|
||||
"""Return True if the host system uses systemd, False otherwise."""
|
||||
if lsb_release()['DISTRIB_CODENAME'] == 'trusty':
|
||||
return False
|
||||
return os.path.isdir(SYSTEMD_SYSTEM)
|
||||
|
||||
|
||||
|
@ -12,6 +12,7 @@ tags:
|
||||
- openstack
|
||||
series:
|
||||
- xenial
|
||||
- zesty
|
||||
- trusty
|
||||
- yakkety
|
||||
provides:
|
||||
|
@ -81,7 +81,7 @@ class NovaBasicDeployment(OpenStackAmuletDeployment):
|
||||
{'name': 'nova-cloud-controller'},
|
||||
{'name': 'keystone'},
|
||||
{'name': 'glance'},
|
||||
{'name': 'percona-cluster', 'constraints': {'mem': '3072M'}},
|
||||
{'name': 'percona-cluster'},
|
||||
]
|
||||
if self._get_openstack_release() >= self.xenial_ocata:
|
||||
other_ocata_services = [
|
||||
@ -179,10 +179,7 @@ class NovaBasicDeployment(OpenStackAmuletDeployment):
|
||||
'admin-token': 'ubuntutesting',
|
||||
}
|
||||
pxc_config = {
|
||||
'dataset-size': '25%',
|
||||
'max-connections': 1000,
|
||||
'root-password': 'ChangeMe123',
|
||||
'sst-password': 'ChangeMe123',
|
||||
}
|
||||
|
||||
configs = {
|
||||
|
@ -306,6 +306,8 @@ SYSTEMD_SYSTEM = '/run/systemd/system'
|
||||
|
||||
def init_is_systemd():
|
||||
"""Return True if the host system uses systemd, False otherwise."""
|
||||
if lsb_release()['DISTRIB_CODENAME'] == 'trusty':
|
||||
return False
|
||||
return os.path.isdir(SYSTEMD_SYSTEM)
|
||||
|
||||
|
||||
|
7
tox.ini
7
tox.ini
@ -14,13 +14,18 @@ install_command =
|
||||
pip install --allow-unverified python-apt {opts} {packages}
|
||||
commands = ostestr {posargs}
|
||||
whitelist_externals = juju
|
||||
passenv = HOME TERM AMULET_*
|
||||
passenv = HOME TERM AMULET_* CS_API_URL
|
||||
|
||||
[testenv:py27]
|
||||
basepython = python2.7
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:py35]
|
||||
basepython = python3.5
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python2.7
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
|
Loading…
x
Reference in New Issue
Block a user