diff options
author | Vu Tran <vu.tran@windriver.com> | 2014-09-30 12:22:12 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-09-30 14:30:18 -0400 |
commit | b4d666ff63acd269b0acb2c4419643863c683750 (patch) | |
tree | f22e20ee845a0cca1fe0f7837d92a652325ba036 /meta-openstack | |
parent | 1b8a298689a95c1943f18d8d9c24589e64bbc7b7 (diff) | |
download | meta-cloud-services-b4d666ff63acd269b0acb2c4419643863c683750.tar.gz |
add generic monitor framework
Instead of having a central file or group of files to
describe what data resources should be monitored. The
content of these files will depend on what core system
monitoring is used ((e.g. Nagios or Monasca).
It's desirable to have each recipe describes what
it wants be monitored in generic way such that various system
monitors can understand and convert these into their format.
If a recipe wishes to register itself to system monitor, it
inherits monitor bbclass and use MONITOR_SERVICE_PACKAGES and
MONITOR_SERVICE_<package name> to indicate what processes
should should be monitored. Also MONITOR_CHECKS_<package name>
variale can be used to pass list of scripts which will be run
on target and if any of these scripts fail then will report.
Eventually monitor.bbclass will be expanded to allow recipe
to describe more complicated information passed down to
system monitor (e.g. Nagios or Monasca)
Signed-off-by: Vu Tran <vu.tran@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack')
23 files changed, 243 insertions, 14 deletions
diff --git a/meta-openstack/classes/monitor.bbclass b/meta-openstack/classes/monitor.bbclass new file mode 100644 index 0000000..83aaea2 --- /dev/null +++ b/meta-openstack/classes/monitor.bbclass | |||
@@ -0,0 +1,107 @@ | |||
1 | MONITOR_STAGING_DIR="${STAGING_DIR}/monitor" | ||
2 | MONITOR_STAGING_SERVICES_DIR="${MONITOR_STAGING_DIR}/services" | ||
3 | MONITOR_STAGING_CHECKS_DIR="${MONITOR_STAGING_DIR}/checks" | ||
4 | MONITOR_CONFIG_DIR="${IMAGE_ROOTFS}/etc/monitor" | ||
5 | MONITOR_CONFIG_SERVICES_DIR="${MONITOR_CONFIG_DIR}/services" | ||
6 | MONITOR_CONFIG_CHECKS_DIR="${MONITOR_CONFIG_DIR}/checks" | ||
7 | |||
8 | addtask monitor_install before do_package after do_install | ||
9 | addtask monitor_clean before do_clean | ||
10 | |||
11 | |||
12 | def copy_check_files(d, check_var_name, src, dest): | ||
13 | import shutil | ||
14 | |||
15 | mon_checks = bb.data.getVar(check_var_name, d, 1) | ||
16 | if mon_checks != None: | ||
17 | if not os.path.exists(dest): | ||
18 | os.makedirs(dest) | ||
19 | for check in mon_checks.split(): | ||
20 | if os.path.exists(src + "/" + check): | ||
21 | shutil.copy(src + "/" + check, dest) | ||
22 | os.chmod(dest + "/" + check, 0755) | ||
23 | |||
24 | python do_monitor_install() { | ||
25 | import shutil | ||
26 | |||
27 | if base_contains('OPENSTACK_EXTRA_FEATURES', 'monitoring', "0", "1", d) == "1": | ||
28 | bb.debug(1, 'OpenStack monitoring feature is disabled, skipping do_monitor_install') | ||
29 | return | ||
30 | |||
31 | mon_dir = bb.data.getVar('MONITOR_STAGING_DIR', d, 1) | ||
32 | mon_services_dir = bb.data.getVar('MONITOR_STAGING_SERVICES_DIR', d, 1) | ||
33 | mon_checks_dir = bb.data.getVar('MONITOR_STAGING_CHECKS_DIR', d, 1) | ||
34 | if not os.path.exists(mon_dir): | ||
35 | os.makedirs(mon_dir) | ||
36 | if not os.path.exists(mon_services_dir): | ||
37 | os.makedirs(mon_services_dir) | ||
38 | if not os.path.exists(mon_checks_dir): | ||
39 | os.makedirs(mon_checks_dir) | ||
40 | workdir = d.getVar('WORKDIR', True) | ||
41 | |||
42 | # Process monitor SERVICE catagory | ||
43 | mon_service_pkgs = bb.data.getVar('MONITOR_SERVICE_PACKAGES', d, 1) | ||
44 | if mon_service_pkgs != None: | ||
45 | for pkg in mon_service_pkgs.split(): | ||
46 | f_name = os.path.join(mon_services_dir, pkg + '.service') | ||
47 | if os.path.exists(f_name): | ||
48 | os.remove(f_name) | ||
49 | data = bb.data.getVar('MONITOR_SERVICE_' + pkg, d, 1) | ||
50 | if data != None: | ||
51 | f = open(f_name, 'w') | ||
52 | f.write(d.getVar('MONITOR_SERVICE_' + pkg)) | ||
53 | |||
54 | # Process monior CHECKS catagory | ||
55 | packages = (d.getVar('PACKAGES', True) or "").split() | ||
56 | if len(packages) >= 1 and os.path.exists(mon_checks_dir): | ||
57 | for pkg in packages: | ||
58 | copy_check_files(d, 'MONITOR_CHECKS_' + pkg, workdir, mon_checks_dir + '/' + pkg) | ||
59 | } | ||
60 | |||
61 | python do_monitor_clean() { | ||
62 | import shutil | ||
63 | |||
64 | mon_dir = bb.data.getVar('MONITOR_STAGING_DIR', d, 1) | ||
65 | mon_services_dir = bb.data.getVar('MONITOR_STAGING_SERVICES_DIR', d, 1) | ||
66 | mon_checks_dir = bb.data.getVar('MONITOR_STAGING_CHECKS_DIR', d, 1) | ||
67 | if not os.path.exists(mon_dir): | ||
68 | return | ||
69 | |||
70 | # Clean up monitor SERVICE catagory | ||
71 | mon_service_pkgs = bb.data.getVar('MONITOR_SERVICE_PACKAGES', d, 1) | ||
72 | if mon_service_pkgs != None and os.path.exists(mon_services_dir): | ||
73 | for pkg in mon_service_pkgs.split(): | ||
74 | f_name = os.path.join(mon_services_dir, pkg + '.service') | ||
75 | if os.path.exists(f_name): | ||
76 | os.remove(f_name) | ||
77 | |||
78 | # Process monior CHECKS catagory | ||
79 | packages = (d.getVar('PACKAGES', True) or "").split() | ||
80 | if len(packages) >= 1 and os.path.exists(mon_checks_dir): | ||
81 | for pkg in packages: | ||
82 | if bb.data.getVar('MONITOR_CHECKS_' + pkg, d, 1) != None: | ||
83 | shutil.rmtree(mon_checks_dir + "/" + pkg, True) | ||
84 | } | ||
85 | |||
86 | monitor_rootfs_postprocess() { | ||
87 | if ${@base_contains('OPENSTACK_EXTRA_FEATURES', 'monitoring', "false", "true", d)}; then | ||
88 | echo "OpenStack monitoring feature is disabled, skipping monitor_rootfs_postprocess" | ||
89 | exit | ||
90 | fi | ||
91 | |||
92 | mkdir -p ${MONITOR_CONFIG_DIR} > /dev/null 2>&1 | ||
93 | mkdir -p ${MONITOR_CONFIG_SERVICES_DIR} > /dev/null 2>&1 | ||
94 | mkdir -p ${MONITOR_CONFIG_CHECKS_DIR} > /dev/null 2>&1 | ||
95 | |||
96 | # Process monitor SERVICE catagory | ||
97 | files_list=`find ${MONITOR_STAGING_SERVICES_DIR} -type f` | ||
98 | for f in ${files_list}; do | ||
99 | cat $f >> ${MONITOR_CONFIG_SERVICES_DIR}/service_list.cfg | ||
100 | echo >> ${MONITOR_CONFIG_SERVICES_DIR}/service_list.cfg | ||
101 | done | ||
102 | |||
103 | # Process monior CHECKS catagory | ||
104 | cp -rf ${MONITOR_STAGING_CHECKS_DIR}/* ${MONITOR_CONFIG_CHECKS_DIR} | ||
105 | } | ||
106 | |||
107 | ROOTFS_POSTPROCESS_COMMAND += "monitor_rootfs_postprocess ; " | ||
diff --git a/meta-openstack/recipes-devtools/python/python-barbican_git.bb b/meta-openstack/recipes-devtools/python/python-barbican_git.bb index d5c43ff..e683743 100644 --- a/meta-openstack/recipes-devtools/python/python-barbican_git.bb +++ b/meta-openstack/recipes-devtools/python/python-barbican_git.bb | |||
@@ -19,7 +19,7 @@ SRCREV="ada968e162d9795613bfb346a1018f63ef7025cc" | |||
19 | PV="2014.2.b3+git${SRCPV}" | 19 | PV="2014.2.b3+git${SRCPV}" |
20 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
21 | 21 | ||
22 | inherit update-rc.d setuptools identity hosts useradd default_configs openstackchef | 22 | inherit update-rc.d setuptools identity hosts useradd default_configs openstackchef monitor |
23 | 23 | ||
24 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup" | 24 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup" |
25 | KEYSTONE_HOST="${CONTROLLER_IP}" | 25 | KEYSTONE_HOST="${CONTROLLER_IP}" |
@@ -136,3 +136,6 @@ RDEPENDS_${PN} += " \ | |||
136 | INITSCRIPT_PACKAGES = "${SRCNAME}" | 136 | INITSCRIPT_PACKAGES = "${SRCNAME}" |
137 | INITSCRIPT_NAME_${SRCNAME} = "barbican-api" | 137 | INITSCRIPT_NAME_${SRCNAME} = "barbican-api" |
138 | INITSCRIPT_PARAMS_${SRCNAME} = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 138 | INITSCRIPT_PARAMS_${SRCNAME} = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
139 | |||
140 | MONITOR_SERVICE_PACKAGES = "${SRCNAME}" | ||
141 | MONITOR_SERVICE_${SRCNAME} = "barbican" | ||
diff --git a/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb b/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb index d12715d..90ac1c6 100644 --- a/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb +++ b/meta-openstack/recipes-devtools/python/python-ceilometer_git.bb | |||
@@ -127,7 +127,7 @@ pkg_postinst_${SRCNAME}-setup () { | |||
127 | ceilometer-dbsync | 127 | ceilometer-dbsync |
128 | } | 128 | } |
129 | 129 | ||
130 | inherit setuptools identity hosts update-rc.d default_configs openstackchef | 130 | inherit setuptools identity hosts update-rc.d default_configs openstackchef monitor |
131 | 131 | ||
132 | PACKAGES += " ${SRCNAME}-tests" | 132 | PACKAGES += " ${SRCNAME}-tests" |
133 | PACKAGES += "${SRCNAME}-setup ${SRCNAME}-common ${SRCNAME}-api" | 133 | PACKAGES += "${SRCNAME}-setup ${SRCNAME}-common ${SRCNAME}-api" |
@@ -257,3 +257,6 @@ INITSCRIPT_NAME_${SRCNAME}-alarm-evaluator = "${SRCNAME}-alarm-evaluator" | |||
257 | INITSCRIPT_PARAMS_${SRCNAME}-alarm-evaluator = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 257 | INITSCRIPT_PARAMS_${SRCNAME}-alarm-evaluator = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
258 | INITSCRIPT_NAME_${SRCNAME}-agent-notification = "${SRCNAME}-agent-notification" | 258 | INITSCRIPT_NAME_${SRCNAME}-agent-notification = "${SRCNAME}-agent-notification" |
259 | INITSCRIPT_PARAMS_${SRCNAME}-agent-notification = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 259 | INITSCRIPT_PARAMS_${SRCNAME}-agent-notification = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
260 | |||
261 | MONITOR_SERVICE_PACKAGES = "${SRCNAME}" | ||
262 | MONITOR_SERVICE_${SRCNAME} = "ceilometer" | ||
diff --git a/meta-openstack/recipes-devtools/python/python-cinder_git.bb b/meta-openstack/recipes-devtools/python/python-cinder_git.bb index ef66656..5ae149d 100644 --- a/meta-openstack/recipes-devtools/python/python-cinder_git.bb +++ b/meta-openstack/recipes-devtools/python/python-cinder_git.bb | |||
@@ -24,7 +24,7 @@ SRCREV="58eda5d1f41082a7e1ffef66239be30b8ac1321a" | |||
24 | PV="2014.2.b3+git${SRCPV}" | 24 | PV="2014.2.b3+git${SRCPV}" |
25 | S = "${WORKDIR}/git" | 25 | S = "${WORKDIR}/git" |
26 | 26 | ||
27 | inherit setuptools update-rc.d identity default_configs hosts openstackchef | 27 | inherit setuptools update-rc.d identity default_configs hosts openstackchef monitor |
28 | 28 | ||
29 | CINDER_BACKUP_BACKEND_DRIVER ?= "cinder.backup.drivers.swift" | 29 | CINDER_BACKUP_BACKEND_DRIVER ?= "cinder.backup.drivers.swift" |
30 | 30 | ||
@@ -235,3 +235,6 @@ INITSCRIPT_NAME_${SRCNAME}-scheduler = "cinder-scheduler" | |||
235 | INITSCRIPT_PARAMS_${SRCNAME}-scheduler = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 235 | INITSCRIPT_PARAMS_${SRCNAME}-scheduler = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
236 | INITSCRIPT_NAME_${SRCNAME}-backup = "cinder-backup" | 236 | INITSCRIPT_NAME_${SRCNAME}-backup = "cinder-backup" |
237 | INITSCRIPT_PARAMS_${SRCNAME}-backup = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 237 | INITSCRIPT_PARAMS_${SRCNAME}-backup = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
238 | |||
239 | MONITOR_SERVICE_PACKAGES = "${SRCNAME}" | ||
240 | MONITOR_SERVICE_${SRCNAME} = "cinder" | ||
diff --git a/meta-openstack/recipes-devtools/python/python-cinderclient/cinder-api-check.sh b/meta-openstack/recipes-devtools/python/python-cinderclient/cinder-api-check.sh new file mode 100644 index 0000000..9e64f8b --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-cinderclient/cinder-api-check.sh | |||
@@ -0,0 +1,14 @@ | |||
1 | #! /bin/bash | ||
2 | |||
3 | CMD="cinder list" | ||
4 | |||
5 | data=$($CMD 2>&1) | ||
6 | res=$? | ||
7 | if [ ${res} -eq 127 ]; then | ||
8 | exit 0 | ||
9 | elif [ ${res} -ne 0 ]; then | ||
10 | echo "OpenStack \"cinder api\" failed: " | ||
11 | echo $data | ||
12 | exit $res | ||
13 | fi | ||
14 | exit 0 | ||
diff --git a/meta-openstack/recipes-devtools/python/python-cinderclient_git.bb b/meta-openstack/recipes-devtools/python/python-cinderclient_git.bb index c50b84f..9e0b747 100644 --- a/meta-openstack/recipes-devtools/python/python-cinderclient_git.bb +++ b/meta-openstack/recipes-devtools/python/python-cinderclient_git.bb | |||
@@ -11,13 +11,14 @@ SRCNAME = "python-cinderclient" | |||
11 | SRC_URI = "\ | 11 | SRC_URI = "\ |
12 | git://github.com/openstack/python-cinderclient.git;branch=master \ | 12 | git://github.com/openstack/python-cinderclient.git;branch=master \ |
13 | file://fix_cinderclient_memory_leak.patch \ | 13 | file://fix_cinderclient_memory_leak.patch \ |
14 | file://cinder-api-check.sh \ | ||
14 | " | 15 | " |
15 | 16 | ||
16 | PV="1.1.0+git${SRCPV}" | 17 | PV="1.1.0+git${SRCPV}" |
17 | SRCREV="4c8464114f5539706cffc6888ce007d0d3ceba16" | 18 | SRCREV="4c8464114f5539706cffc6888ce007d0d3ceba16" |
18 | S = "${WORKDIR}/git" | 19 | S = "${WORKDIR}/git" |
19 | 20 | ||
20 | inherit setuptools | 21 | inherit setuptools monitor |
21 | 22 | ||
22 | DEPENDS += " \ | 23 | DEPENDS += " \ |
23 | python-pip \ | 24 | python-pip \ |
@@ -41,3 +42,7 @@ do_install_append() { | |||
41 | 42 | ||
42 | PACKAGES =+ "${BPN}-bash-completion" | 43 | PACKAGES =+ "${BPN}-bash-completion" |
43 | FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" | 44 | FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" |
45 | |||
46 | MONITOR_CHECKS_${PN} += "\ | ||
47 | cinder-api-check.sh \ | ||
48 | " | ||
diff --git a/meta-openstack/recipes-devtools/python/python-glance_git.bb b/meta-openstack/recipes-devtools/python/python-glance_git.bb index fa74aca..53f2d5b 100644 --- a/meta-openstack/recipes-devtools/python/python-glance_git.bb +++ b/meta-openstack/recipes-devtools/python/python-glance_git.bb | |||
@@ -19,7 +19,7 @@ PV="2014.2.b3+git${SRCPV}" | |||
19 | 19 | ||
20 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
21 | 21 | ||
22 | inherit setuptools update-rc.d identity default_configs hosts openstackchef | 22 | inherit setuptools update-rc.d identity default_configs hosts openstackchef monitor |
23 | 23 | ||
24 | GLANCE_DEFAULT_STORE ?= "file" | 24 | GLANCE_DEFAULT_STORE ?= "file" |
25 | GLANCE_KNOWN_STORES ?= "glance.store.rbd.Store,\ | 25 | GLANCE_KNOWN_STORES ?= "glance.store.rbd.Store,\ |
@@ -212,3 +212,6 @@ INITSCRIPT_NAME_${SRCNAME}-api = "glance-api" | |||
212 | INITSCRIPT_PARAMS_${SRCNAME}-api = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 212 | INITSCRIPT_PARAMS_${SRCNAME}-api = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
213 | INITSCRIPT_NAME_${SRCNAME}-registry = "glance-registry" | 213 | INITSCRIPT_NAME_${SRCNAME}-registry = "glance-registry" |
214 | INITSCRIPT_PARAMS_${SRCNAME}-registry = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 214 | INITSCRIPT_PARAMS_${SRCNAME}-registry = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
215 | |||
216 | MONITOR_SERVICE_PACKAGES = "${SRCNAME}" | ||
217 | MONITOR_SERVICE_${SRCNAME} = "glance" | ||
diff --git a/meta-openstack/recipes-devtools/python/python-glanceclient/glance-api-check.sh b/meta-openstack/recipes-devtools/python/python-glanceclient/glance-api-check.sh new file mode 100644 index 0000000..aa8340a --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-glanceclient/glance-api-check.sh | |||
@@ -0,0 +1,14 @@ | |||
1 | #! /bin/bash | ||
2 | |||
3 | CMD="glance image-list" | ||
4 | |||
5 | data=$($CMD 2>&1) | ||
6 | res=$? | ||
7 | if [ ${res} -eq 127 ]; then | ||
8 | exit 0 | ||
9 | elif [ ${res} -ne 0 ]; then | ||
10 | echo "OpenStack \"glance api\" failed: " | ||
11 | echo $data | ||
12 | exit $res | ||
13 | fi | ||
14 | exit 0 | ||
diff --git a/meta-openstack/recipes-devtools/python/python-glanceclient_git.bb b/meta-openstack/recipes-devtools/python/python-glanceclient_git.bb index 0205c49..1d8529a 100644 --- a/meta-openstack/recipes-devtools/python/python-glanceclient_git.bb +++ b/meta-openstack/recipes-devtools/python/python-glanceclient_git.bb | |||
@@ -16,11 +16,12 @@ PR = "r0" | |||
16 | SRC_URI = "\ | 16 | SRC_URI = "\ |
17 | git://github.com/openstack/${BPN}.git;protocol=https \ | 17 | git://github.com/openstack/${BPN}.git;protocol=https \ |
18 | file://fix_glanceclient_memory_leak.patch \ | 18 | file://fix_glanceclient_memory_leak.patch \ |
19 | file://glance-api-check.sh \ | ||
19 | " | 20 | " |
20 | 21 | ||
21 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |
22 | 23 | ||
23 | inherit setuptools | 24 | inherit setuptools monitor |
24 | 25 | ||
25 | FILES_${PN} += "${datadir}/${SRCNAME}" | 26 | FILES_${PN} += "${datadir}/${SRCNAME}" |
26 | 27 | ||
@@ -32,3 +33,6 @@ RDEPENDS_${PN} = "gmp \ | |||
32 | python-pbr \ | 33 | python-pbr \ |
33 | " | 34 | " |
34 | 35 | ||
36 | MONITOR_CHECKS_${PN} += "\ | ||
37 | glance-api-check.sh \ | ||
38 | " | ||
diff --git a/meta-openstack/recipes-devtools/python/python-heat_git.bb b/meta-openstack/recipes-devtools/python/python-heat_git.bb index 5c73b99..8971e41 100644 --- a/meta-openstack/recipes-devtools/python/python-heat_git.bb +++ b/meta-openstack/recipes-devtools/python/python-heat_git.bb | |||
@@ -127,7 +127,7 @@ pkg_postinst_${SRCNAME}-setup () { | |||
127 | heat-manage db_sync | 127 | heat-manage db_sync |
128 | } | 128 | } |
129 | 129 | ||
130 | inherit setuptools identity hosts update-rc.d default_configs openstackchef | 130 | inherit setuptools identity hosts update-rc.d default_configs openstackchef monitor |
131 | 131 | ||
132 | PACKAGES += "${SRCNAME}-tests ${SRCNAME}-templates ${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine" | 132 | PACKAGES += "${SRCNAME}-tests ${SRCNAME}-templates ${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine" |
133 | PACKAGES += "${SRCNAME}-setup" | 133 | PACKAGES += "${SRCNAME}-setup" |
@@ -224,3 +224,5 @@ INITSCRIPT_PARAMS_${SRCNAME}-api-cfn = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | |||
224 | INITSCRIPT_NAME_${SRCNAME}-engine = "${SRCNAME}-engine" | 224 | INITSCRIPT_NAME_${SRCNAME}-engine = "${SRCNAME}-engine" |
225 | INITSCRIPT_PARAMS_${SRCNAME}-engine = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 225 | INITSCRIPT_PARAMS_${SRCNAME}-engine = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
226 | 226 | ||
227 | MONITOR_SERVICE_PACKAGES = "${SRCNAME}" | ||
228 | MONITOR_SERVICE_${SRCNAME} = "heat" | ||
diff --git a/meta-openstack/recipes-devtools/python/python-horizon_git.bb b/meta-openstack/recipes-devtools/python/python-horizon_git.bb index a767bee..8ee1bed 100644 --- a/meta-openstack/recipes-devtools/python/python-horizon_git.bb +++ b/meta-openstack/recipes-devtools/python/python-horizon_git.bb | |||
@@ -60,7 +60,7 @@ SRCREV="bd998fb6094fb16d084c90de1eed619aca4c31ef" | |||
60 | PV="2014.2.b3+git${SRCPV}" | 60 | PV="2014.2.b3+git${SRCPV}" |
61 | S = "${WORKDIR}/git" | 61 | S = "${WORKDIR}/git" |
62 | 62 | ||
63 | inherit setuptools update-rc.d python-dir default_configs openstackchef | 63 | inherit setuptools update-rc.d python-dir default_configs openstackchef monitor |
64 | 64 | ||
65 | # no longer required. kept as reference. | 65 | # no longer required. kept as reference. |
66 | # do_install[dirs] += "${D}/usr/share/bin" | 66 | # do_install[dirs] += "${D}/usr/share/bin" |
@@ -187,3 +187,6 @@ RDEPENDS_${SRCNAME}-apache = "\ | |||
187 | memcached \ | 187 | memcached \ |
188 | python-memcached \ | 188 | python-memcached \ |
189 | " | 189 | " |
190 | |||
191 | MONITOR_SERVICE_PACKAGES = "${SRCNAME}" | ||
192 | MONITOR_SERVICE_${SRCNAME} = "horizon" | ||
diff --git a/meta-openstack/recipes-devtools/python/python-keystone_git.bb b/meta-openstack/recipes-devtools/python/python-keystone_git.bb index 8105d6f..7512742 100644 --- a/meta-openstack/recipes-devtools/python/python-keystone_git.bb +++ b/meta-openstack/recipes-devtools/python/python-keystone_git.bb | |||
@@ -22,7 +22,7 @@ PV="2014.2.b3+git${SRCPV}" | |||
22 | 22 | ||
23 | S = "${WORKDIR}/git" | 23 | S = "${WORKDIR}/git" |
24 | 24 | ||
25 | inherit setuptools update-rc.d identity hosts default_configs openstackchef | 25 | inherit setuptools update-rc.d identity hosts default_configs openstackchef monitor |
26 | 26 | ||
27 | SERVICE_TOKEN = "password" | 27 | SERVICE_TOKEN = "password" |
28 | TOKEN_FORMAT ?= "PKI" | 28 | TOKEN_FORMAT ?= "PKI" |
@@ -301,3 +301,6 @@ RDEPENDS_${SRCNAME}-cronjobs = "cronie ${SRCNAME}" | |||
301 | INITSCRIPT_PACKAGES = "${SRCNAME}" | 301 | INITSCRIPT_PACKAGES = "${SRCNAME}" |
302 | INITSCRIPT_NAME_${SRCNAME} = "keystone" | 302 | INITSCRIPT_NAME_${SRCNAME} = "keystone" |
303 | INITSCRIPT_PARAMS_${SRCNAME} = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 303 | INITSCRIPT_PARAMS_${SRCNAME} = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
304 | |||
305 | MONITOR_SERVICE_PACKAGES = "${SRCNAME}" | ||
306 | MONITOR_SERVICE_${SRCNAME} = "keystone" | ||
diff --git a/meta-openstack/recipes-devtools/python/python-keystoneclient/keystone-api-check.sh b/meta-openstack/recipes-devtools/python/python-keystoneclient/keystone-api-check.sh new file mode 100644 index 0000000..aba6d5f --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-keystoneclient/keystone-api-check.sh | |||
@@ -0,0 +1,14 @@ | |||
1 | #! /bin/bash | ||
2 | |||
3 | CMD="keystone endpoint-list" | ||
4 | |||
5 | data=$($CMD 2>&1) | ||
6 | res=$? | ||
7 | if [ ${res} -eq 127 ]; then | ||
8 | exit 0 | ||
9 | elif [ ${res} -ne 0 ]; then | ||
10 | echo "OpenStack \"keystone api\" failed: " | ||
11 | echo $data | ||
12 | exit $res | ||
13 | fi | ||
14 | exit 0 | ||
diff --git a/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb b/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb index e0c81db..783dca9 100644 --- a/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb +++ b/meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb | |||
@@ -11,13 +11,14 @@ SRC_URI = "\ | |||
11 | git://github.com/openstack/python-keystoneclient.git;branch=master \ | 11 | git://github.com/openstack/python-keystoneclient.git;branch=master \ |
12 | file://fix_keystoneclient_memory_leak.patch \ | 12 | file://fix_keystoneclient_memory_leak.patch \ |
13 | file://keystoneclient-fix-test-path-to-example-certificates.patch \ | 13 | file://keystoneclient-fix-test-path-to-example-certificates.patch \ |
14 | file://keystone-api-check.sh \ | ||
14 | " | 15 | " |
15 | 16 | ||
16 | PV="0.10.1+git${SRCPV}" | 17 | PV="0.10.1+git${SRCPV}" |
17 | SRCREV="3305c7be4b726de4dcc889006d0be30eb46d3ad9" | 18 | SRCREV="3305c7be4b726de4dcc889006d0be30eb46d3ad9" |
18 | S = "${WORKDIR}/git" | 19 | S = "${WORKDIR}/git" |
19 | 20 | ||
20 | inherit setuptools | 21 | inherit setuptools monitor |
21 | 22 | ||
22 | FILES_${PN}-doc += "${datadir}/keystoneclient" | 23 | FILES_${PN}-doc += "${datadir}/keystoneclient" |
23 | 24 | ||
@@ -54,3 +55,6 @@ RDEPENDS_${SRCNAME}-tests += " \ | |||
54 | python-httpretty \ | 55 | python-httpretty \ |
55 | " | 56 | " |
56 | 57 | ||
58 | MONITOR_CHECKS_${PN} += "\ | ||
59 | keystone-api-check.sh \ | ||
60 | " | ||
diff --git a/meta-openstack/recipes-devtools/python/python-neutron_git.bb b/meta-openstack/recipes-devtools/python/python-neutron_git.bb index f961487..6a9e66f 100644 --- a/meta-openstack/recipes-devtools/python/python-neutron_git.bb +++ b/meta-openstack/recipes-devtools/python/python-neutron_git.bb | |||
@@ -25,7 +25,7 @@ PV="2014.2.b3+git${SRCPV}" | |||
25 | 25 | ||
26 | S = "${WORKDIR}/git" | 26 | S = "${WORKDIR}/git" |
27 | 27 | ||
28 | inherit setuptools update-rc.d identity hosts default_configs openstackchef | 28 | inherit setuptools update-rc.d identity hosts default_configs openstackchef monitor |
29 | 29 | ||
30 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup" | 30 | SERVICECREATE_PACKAGES = "${SRCNAME}-setup" |
31 | KEYSTONE_HOST="${CONTROLLER_IP}" | 31 | KEYSTONE_HOST="${CONTROLLER_IP}" |
@@ -313,3 +313,6 @@ INITSCRIPT_NAME_${SRCNAME}-l3-agent = "neutron-l3-agent" | |||
313 | INITSCRIPT_PARAMS_${SRCNAME}-l3-agent = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 313 | INITSCRIPT_PARAMS_${SRCNAME}-l3-agent = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
314 | INITSCRIPT_NAME_${SRCNAME}-metadata-agent = "neutron-metadata-agent" | 314 | INITSCRIPT_NAME_${SRCNAME}-metadata-agent = "neutron-metadata-agent" |
315 | INITSCRIPT_PARAMS_${SRCNAME}-metadata-agent = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 315 | INITSCRIPT_PARAMS_${SRCNAME}-metadata-agent = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
316 | |||
317 | MONITOR_SERVICE_PACKAGES = "${SRCNAME}" | ||
318 | MONITOR_SERVICE_${SRCNAME} = "neutron" | ||
diff --git a/meta-openstack/recipes-devtools/python/python-neutronclient/neutron-api-check.sh b/meta-openstack/recipes-devtools/python/python-neutronclient/neutron-api-check.sh new file mode 100644 index 0000000..160acd2 --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-neutronclient/neutron-api-check.sh | |||
@@ -0,0 +1,14 @@ | |||
1 | #! /bin/bash | ||
2 | |||
3 | CMD="neutron net-list" | ||
4 | |||
5 | data=$($CMD 2>&1) | ||
6 | res=$? | ||
7 | if [ ${res} -eq 127 ]; then | ||
8 | exit 0 | ||
9 | elif [ ${res} -ne 0 ]; then | ||
10 | echo "OpenStack \"neutron api\" failed: " | ||
11 | echo $data | ||
12 | exit $res | ||
13 | fi | ||
14 | exit 0 | ||
diff --git a/meta-openstack/recipes-devtools/python/python-neutronclient_git.bb b/meta-openstack/recipes-devtools/python/python-neutronclient_git.bb index b4e34e3..cbad874 100644 --- a/meta-openstack/recipes-devtools/python/python-neutronclient_git.bb +++ b/meta-openstack/recipes-devtools/python/python-neutronclient_git.bb | |||
@@ -22,13 +22,14 @@ PR = "r0" | |||
22 | 22 | ||
23 | SRC_URI = "git://github.com/openstack/python-neutronclient.git;branch=master \ | 23 | SRC_URI = "git://github.com/openstack/python-neutronclient.git;branch=master \ |
24 | file://neutronclient-use-csv-flag-instead-of-json.patch \ | 24 | file://neutronclient-use-csv-flag-instead-of-json.patch \ |
25 | file://neutron-api-check.sh \ | ||
25 | " | 26 | " |
26 | 27 | ||
27 | PV="2.3.7+git${SRCPV}" | 28 | PV="2.3.7+git${SRCPV}" |
28 | SRCREV="1452193f935f5be0bb2f5f01b54bd4947d27331b" | 29 | SRCREV="1452193f935f5be0bb2f5f01b54bd4947d27331b" |
29 | S = "${WORKDIR}/git" | 30 | S = "${WORKDIR}/git" |
30 | 31 | ||
31 | inherit setuptools | 32 | inherit setuptools monitor |
32 | 33 | ||
33 | PACKAGECONFIG ?= "bash-completion" | 34 | PACKAGECONFIG ?= "bash-completion" |
34 | PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion" | 35 | PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion" |
@@ -40,3 +41,7 @@ do_install_append() { | |||
40 | 41 | ||
41 | PACKAGES =+ "${BPN}-bash-completion" | 42 | PACKAGES =+ "${BPN}-bash-completion" |
42 | FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" | 43 | FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" |
44 | |||
45 | MONITOR_CHECKS_${PN} += "\ | ||
46 | neutron-api-check.sh \ | ||
47 | " | ||
diff --git a/meta-openstack/recipes-devtools/python/python-nova_git.bb b/meta-openstack/recipes-devtools/python/python-nova_git.bb index 5a8ba84..e79302b 100644 --- a/meta-openstack/recipes-devtools/python/python-nova_git.bb +++ b/meta-openstack/recipes-devtools/python/python-nova_git.bb | |||
@@ -30,7 +30,7 @@ PV="2014.2.b3+git${SRCPV}" | |||
30 | 30 | ||
31 | S = "${WORKDIR}/git" | 31 | S = "${WORKDIR}/git" |
32 | 32 | ||
33 | inherit update-rc.d setuptools identity hosts useradd default_configs openstackchef | 33 | inherit update-rc.d setuptools identity hosts useradd default_configs openstackchef monitor |
34 | 34 | ||
35 | LIBVIRT_IMAGES_TYPE ?= "default" | 35 | LIBVIRT_IMAGES_TYPE ?= "default" |
36 | 36 | ||
@@ -368,3 +368,6 @@ INITSCRIPT_PARAMS_${SRCNAME}-novncproxy = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | |||
368 | 368 | ||
369 | INITSCRIPT_NAME_${SRCNAME}-spicehtml5proxy = "nova-spicehtml5proxy" | 369 | INITSCRIPT_NAME_${SRCNAME}-spicehtml5proxy = "nova-spicehtml5proxy" |
370 | INITSCRIPT_PARAMS_${SRCNAME}-spicehtml5proxy = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 370 | INITSCRIPT_PARAMS_${SRCNAME}-spicehtml5proxy = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
371 | |||
372 | MONITOR_SERVICE_PACKAGES = "${SRCNAME}" | ||
373 | MONITOR_SERVICE_${SRCNAME} = "nova-api nova-cert nova-conductor nova-consoleauth nova-scheduler" | ||
diff --git a/meta-openstack/recipes-devtools/python/python-novaclient/nova-api-check.sh b/meta-openstack/recipes-devtools/python/python-novaclient/nova-api-check.sh new file mode 100644 index 0000000..b9ba6bc --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-novaclient/nova-api-check.sh | |||
@@ -0,0 +1,14 @@ | |||
1 | #! /bin/bash | ||
2 | |||
3 | CMD="nova list" | ||
4 | |||
5 | data=$($CMD 2>&1) | ||
6 | res=$? | ||
7 | if [ ${res} -eq 127 ]; then | ||
8 | exit 0 | ||
9 | elif [ ${res} -ne 0 ]; then | ||
10 | echo "OpenStack \"nova api\" failed: " | ||
11 | echo $data | ||
12 | exit $res | ||
13 | fi | ||
14 | exit 0 | ||
diff --git a/meta-openstack/recipes-devtools/python/python-novaclient_git.bb b/meta-openstack/recipes-devtools/python/python-novaclient_git.bb index e8f5aa3..a7a501c 100644 --- a/meta-openstack/recipes-devtools/python/python-novaclient_git.bb +++ b/meta-openstack/recipes-devtools/python/python-novaclient_git.bb | |||
@@ -10,13 +10,14 @@ SRC_URI = "\ | |||
10 | git://github.com/openstack/python-novaclient.git;branch=master \ | 10 | git://github.com/openstack/python-novaclient.git;branch=master \ |
11 | file://fix_novaclient_memory_leak.patch \ | 11 | file://fix_novaclient_memory_leak.patch \ |
12 | file://novaclient-specify-full-path-to-test-certificate.patch \ | 12 | file://novaclient-specify-full-path-to-test-certificate.patch \ |
13 | file://nova-api-check.sh \ | ||
13 | " | 14 | " |
14 | 15 | ||
15 | PV="2.18.1+git${SRCPV}" | 16 | PV="2.18.1+git${SRCPV}" |
16 | SRCREV="2a1c07e790cc95b1e847974e4c757f826507834f" | 17 | SRCREV="2a1c07e790cc95b1e847974e4c757f826507834f" |
17 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
18 | 19 | ||
19 | inherit setuptools | 20 | inherit setuptools monitor |
20 | 21 | ||
21 | DEPENDS = "python-setuptools-git" | 22 | DEPENDS = "python-setuptools-git" |
22 | DEPENDS += " \ | 23 | DEPENDS += " \ |
@@ -44,3 +45,7 @@ do_install_append() { | |||
44 | 45 | ||
45 | PACKAGES =+ "${BPN}-bash-completion" | 46 | PACKAGES =+ "${BPN}-bash-completion" |
46 | FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" | 47 | FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" |
48 | |||
49 | MONITOR_CHECKS_${PN} += "\ | ||
50 | nova-api-check.sh \ | ||
51 | " | ||
diff --git a/meta-openstack/recipes-extended/images/openstack-image-aio.bb b/meta-openstack/recipes-extended/images/openstack-image-aio.bb index 3aff066..ec34770 100644 --- a/meta-openstack/recipes-extended/images/openstack-image-aio.bb +++ b/meta-openstack/recipes-extended/images/openstack-image-aio.bb | |||
@@ -25,6 +25,7 @@ IMAGE_FEATURES += "ssh-server-openssh" | |||
25 | inherit core-image | 25 | inherit core-image |
26 | inherit openstack-base | 26 | inherit openstack-base |
27 | inherit identity | 27 | inherit identity |
28 | inherit monitor | ||
28 | 29 | ||
29 | # check for 5G of free space, so we use 5G as a starting point. | 30 | # check for 5G of free space, so we use 5G as a starting point. |
30 | IMAGE_ROOTFS_EXTRA_SPACE_append += "+ 5000000" | 31 | IMAGE_ROOTFS_EXTRA_SPACE_append += "+ 5000000" |
diff --git a/meta-openstack/recipes-extended/images/openstack-image-compute.bb b/meta-openstack/recipes-extended/images/openstack-image-compute.bb index e9f90e8..979e525 100644 --- a/meta-openstack/recipes-extended/images/openstack-image-compute.bb +++ b/meta-openstack/recipes-extended/images/openstack-image-compute.bb | |||
@@ -16,6 +16,7 @@ IMAGE_FEATURES += "ssh-server-openssh" | |||
16 | 16 | ||
17 | inherit core-image | 17 | inherit core-image |
18 | inherit openstack-base | 18 | inherit openstack-base |
19 | inherit monitor | ||
19 | 20 | ||
20 | # Ensure extra space for guest images, and rabbit MQ has a hard coded | 21 | # Ensure extra space for guest images, and rabbit MQ has a hard coded |
21 | # check for 2G of free space, so we use 3G as a starting point. | 22 | # check for 2G of free space, so we use 3G as a starting point. |
diff --git a/meta-openstack/recipes-extended/images/openstack-image-controller.bb b/meta-openstack/recipes-extended/images/openstack-image-controller.bb index d2cc90f..a410acf 100644 --- a/meta-openstack/recipes-extended/images/openstack-image-controller.bb +++ b/meta-openstack/recipes-extended/images/openstack-image-controller.bb | |||
@@ -21,6 +21,7 @@ POST_KEYSTONE_SETUP_COMMAND = "/etc/keystone/hybrid-backend-setup" | |||
21 | inherit core-image | 21 | inherit core-image |
22 | inherit openstack-base | 22 | inherit openstack-base |
23 | inherit identity | 23 | inherit identity |
24 | inherit monitor | ||
24 | 25 | ||
25 | # Ensure extra space for guest images, and rabbit MQ has a hard coded | 26 | # Ensure extra space for guest images, and rabbit MQ has a hard coded |
26 | # check for 2G of free space, so we use 5G as a starting point. | 27 | # check for 2G of free space, so we use 5G as a starting point. |