summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVu Tran <vu.tran@windriver.com>2014-09-30 12:22:12 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-09-30 14:30:18 -0400
commitb4d666ff63acd269b0acb2c4419643863c683750 (patch)
treef22e20ee845a0cca1fe0f7837d92a652325ba036
parent1b8a298689a95c1943f18d8d9c24589e64bbc7b7 (diff)
downloadmeta-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>
-rw-r--r--meta-openstack/classes/monitor.bbclass107
-rw-r--r--meta-openstack/recipes-devtools/python/python-barbican_git.bb5
-rw-r--r--meta-openstack/recipes-devtools/python/python-ceilometer_git.bb5
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinder_git.bb5
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinderclient/cinder-api-check.sh14
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinderclient_git.bb7
-rw-r--r--meta-openstack/recipes-devtools/python/python-glance_git.bb5
-rw-r--r--meta-openstack/recipes-devtools/python/python-glanceclient/glance-api-check.sh14
-rw-r--r--meta-openstack/recipes-devtools/python/python-glanceclient_git.bb6
-rw-r--r--meta-openstack/recipes-devtools/python/python-heat_git.bb4
-rw-r--r--meta-openstack/recipes-devtools/python/python-horizon_git.bb5
-rw-r--r--meta-openstack/recipes-devtools/python/python-keystone_git.bb5
-rw-r--r--meta-openstack/recipes-devtools/python/python-keystoneclient/keystone-api-check.sh14
-rw-r--r--meta-openstack/recipes-devtools/python/python-keystoneclient_git.bb6
-rw-r--r--meta-openstack/recipes-devtools/python/python-neutron_git.bb5
-rw-r--r--meta-openstack/recipes-devtools/python/python-neutronclient/neutron-api-check.sh14
-rw-r--r--meta-openstack/recipes-devtools/python/python-neutronclient_git.bb7
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova_git.bb5
-rw-r--r--meta-openstack/recipes-devtools/python/python-novaclient/nova-api-check.sh14
-rw-r--r--meta-openstack/recipes-devtools/python/python-novaclient_git.bb7
-rw-r--r--meta-openstack/recipes-extended/images/openstack-image-aio.bb1
-rw-r--r--meta-openstack/recipes-extended/images/openstack-image-compute.bb1
-rw-r--r--meta-openstack/recipes-extended/images/openstack-image-controller.bb1
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 @@
1MONITOR_STAGING_DIR="${STAGING_DIR}/monitor"
2MONITOR_STAGING_SERVICES_DIR="${MONITOR_STAGING_DIR}/services"
3MONITOR_STAGING_CHECKS_DIR="${MONITOR_STAGING_DIR}/checks"
4MONITOR_CONFIG_DIR="${IMAGE_ROOTFS}/etc/monitor"
5MONITOR_CONFIG_SERVICES_DIR="${MONITOR_CONFIG_DIR}/services"
6MONITOR_CONFIG_CHECKS_DIR="${MONITOR_CONFIG_DIR}/checks"
7
8addtask monitor_install before do_package after do_install
9addtask monitor_clean before do_clean
10
11
12def 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
24python 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
61python 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
86monitor_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
107ROOTFS_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"
19PV="2014.2.b3+git${SRCPV}" 19PV="2014.2.b3+git${SRCPV}"
20S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
21 21
22inherit update-rc.d setuptools identity hosts useradd default_configs openstackchef 22inherit update-rc.d setuptools identity hosts useradd default_configs openstackchef monitor
23 23
24SERVICECREATE_PACKAGES = "${SRCNAME}-setup" 24SERVICECREATE_PACKAGES = "${SRCNAME}-setup"
25KEYSTONE_HOST="${CONTROLLER_IP}" 25KEYSTONE_HOST="${CONTROLLER_IP}"
@@ -136,3 +136,6 @@ RDEPENDS_${PN} += " \
136INITSCRIPT_PACKAGES = "${SRCNAME}" 136INITSCRIPT_PACKAGES = "${SRCNAME}"
137INITSCRIPT_NAME_${SRCNAME} = "barbican-api" 137INITSCRIPT_NAME_${SRCNAME} = "barbican-api"
138INITSCRIPT_PARAMS_${SRCNAME} = "${OS_DEFAULT_INITSCRIPT_PARAMS}" 138INITSCRIPT_PARAMS_${SRCNAME} = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
139
140MONITOR_SERVICE_PACKAGES = "${SRCNAME}"
141MONITOR_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
130inherit setuptools identity hosts update-rc.d default_configs openstackchef 130inherit setuptools identity hosts update-rc.d default_configs openstackchef monitor
131 131
132PACKAGES += " ${SRCNAME}-tests" 132PACKAGES += " ${SRCNAME}-tests"
133PACKAGES += "${SRCNAME}-setup ${SRCNAME}-common ${SRCNAME}-api" 133PACKAGES += "${SRCNAME}-setup ${SRCNAME}-common ${SRCNAME}-api"
@@ -257,3 +257,6 @@ INITSCRIPT_NAME_${SRCNAME}-alarm-evaluator = "${SRCNAME}-alarm-evaluator"
257INITSCRIPT_PARAMS_${SRCNAME}-alarm-evaluator = "${OS_DEFAULT_INITSCRIPT_PARAMS}" 257INITSCRIPT_PARAMS_${SRCNAME}-alarm-evaluator = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
258INITSCRIPT_NAME_${SRCNAME}-agent-notification = "${SRCNAME}-agent-notification" 258INITSCRIPT_NAME_${SRCNAME}-agent-notification = "${SRCNAME}-agent-notification"
259INITSCRIPT_PARAMS_${SRCNAME}-agent-notification = "${OS_DEFAULT_INITSCRIPT_PARAMS}" 259INITSCRIPT_PARAMS_${SRCNAME}-agent-notification = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
260
261MONITOR_SERVICE_PACKAGES = "${SRCNAME}"
262MONITOR_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"
24PV="2014.2.b3+git${SRCPV}" 24PV="2014.2.b3+git${SRCPV}"
25S = "${WORKDIR}/git" 25S = "${WORKDIR}/git"
26 26
27inherit setuptools update-rc.d identity default_configs hosts openstackchef 27inherit setuptools update-rc.d identity default_configs hosts openstackchef monitor
28 28
29CINDER_BACKUP_BACKEND_DRIVER ?= "cinder.backup.drivers.swift" 29CINDER_BACKUP_BACKEND_DRIVER ?= "cinder.backup.drivers.swift"
30 30
@@ -235,3 +235,6 @@ INITSCRIPT_NAME_${SRCNAME}-scheduler = "cinder-scheduler"
235INITSCRIPT_PARAMS_${SRCNAME}-scheduler = "${OS_DEFAULT_INITSCRIPT_PARAMS}" 235INITSCRIPT_PARAMS_${SRCNAME}-scheduler = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
236INITSCRIPT_NAME_${SRCNAME}-backup = "cinder-backup" 236INITSCRIPT_NAME_${SRCNAME}-backup = "cinder-backup"
237INITSCRIPT_PARAMS_${SRCNAME}-backup = "${OS_DEFAULT_INITSCRIPT_PARAMS}" 237INITSCRIPT_PARAMS_${SRCNAME}-backup = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
238
239MONITOR_SERVICE_PACKAGES = "${SRCNAME}"
240MONITOR_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
3CMD="cinder list"
4
5data=$($CMD 2>&1)
6res=$?
7if [ ${res} -eq 127 ]; then
8 exit 0
9elif [ ${res} -ne 0 ]; then
10 echo "OpenStack \"cinder api\" failed: "
11 echo $data
12 exit $res
13fi
14exit 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"
11SRC_URI = "\ 11SRC_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
16PV="1.1.0+git${SRCPV}" 17PV="1.1.0+git${SRCPV}"
17SRCREV="4c8464114f5539706cffc6888ce007d0d3ceba16" 18SRCREV="4c8464114f5539706cffc6888ce007d0d3ceba16"
18S = "${WORKDIR}/git" 19S = "${WORKDIR}/git"
19 20
20inherit setuptools 21inherit setuptools monitor
21 22
22DEPENDS += " \ 23DEPENDS += " \
23 python-pip \ 24 python-pip \
@@ -41,3 +42,7 @@ do_install_append() {
41 42
42PACKAGES =+ "${BPN}-bash-completion" 43PACKAGES =+ "${BPN}-bash-completion"
43FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" 44FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*"
45
46MONITOR_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
20S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
21 21
22inherit setuptools update-rc.d identity default_configs hosts openstackchef 22inherit setuptools update-rc.d identity default_configs hosts openstackchef monitor
23 23
24GLANCE_DEFAULT_STORE ?= "file" 24GLANCE_DEFAULT_STORE ?= "file"
25GLANCE_KNOWN_STORES ?= "glance.store.rbd.Store,\ 25GLANCE_KNOWN_STORES ?= "glance.store.rbd.Store,\
@@ -212,3 +212,6 @@ INITSCRIPT_NAME_${SRCNAME}-api = "glance-api"
212INITSCRIPT_PARAMS_${SRCNAME}-api = "${OS_DEFAULT_INITSCRIPT_PARAMS}" 212INITSCRIPT_PARAMS_${SRCNAME}-api = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
213INITSCRIPT_NAME_${SRCNAME}-registry = "glance-registry" 213INITSCRIPT_NAME_${SRCNAME}-registry = "glance-registry"
214INITSCRIPT_PARAMS_${SRCNAME}-registry = "${OS_DEFAULT_INITSCRIPT_PARAMS}" 214INITSCRIPT_PARAMS_${SRCNAME}-registry = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
215
216MONITOR_SERVICE_PACKAGES = "${SRCNAME}"
217MONITOR_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
3CMD="glance image-list"
4
5data=$($CMD 2>&1)
6res=$?
7if [ ${res} -eq 127 ]; then
8 exit 0
9elif [ ${res} -ne 0 ]; then
10 echo "OpenStack \"glance api\" failed: "
11 echo $data
12 exit $res
13fi
14exit 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"
16SRC_URI = "\ 16SRC_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
21S = "${WORKDIR}/git" 22S = "${WORKDIR}/git"
22 23
23inherit setuptools 24inherit setuptools monitor
24 25
25FILES_${PN} += "${datadir}/${SRCNAME}" 26FILES_${PN} += "${datadir}/${SRCNAME}"
26 27
@@ -32,3 +33,6 @@ RDEPENDS_${PN} = "gmp \
32 python-pbr \ 33 python-pbr \
33 " 34 "
34 35
36MONITOR_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
130inherit setuptools identity hosts update-rc.d default_configs openstackchef 130inherit setuptools identity hosts update-rc.d default_configs openstackchef monitor
131 131
132PACKAGES += "${SRCNAME}-tests ${SRCNAME}-templates ${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine" 132PACKAGES += "${SRCNAME}-tests ${SRCNAME}-templates ${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine"
133PACKAGES += "${SRCNAME}-setup" 133PACKAGES += "${SRCNAME}-setup"
@@ -224,3 +224,5 @@ INITSCRIPT_PARAMS_${SRCNAME}-api-cfn = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
224INITSCRIPT_NAME_${SRCNAME}-engine = "${SRCNAME}-engine" 224INITSCRIPT_NAME_${SRCNAME}-engine = "${SRCNAME}-engine"
225INITSCRIPT_PARAMS_${SRCNAME}-engine = "${OS_DEFAULT_INITSCRIPT_PARAMS}" 225INITSCRIPT_PARAMS_${SRCNAME}-engine = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
226 226
227MONITOR_SERVICE_PACKAGES = "${SRCNAME}"
228MONITOR_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"
60PV="2014.2.b3+git${SRCPV}" 60PV="2014.2.b3+git${SRCPV}"
61S = "${WORKDIR}/git" 61S = "${WORKDIR}/git"
62 62
63inherit setuptools update-rc.d python-dir default_configs openstackchef 63inherit 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
191MONITOR_SERVICE_PACKAGES = "${SRCNAME}"
192MONITOR_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
23S = "${WORKDIR}/git" 23S = "${WORKDIR}/git"
24 24
25inherit setuptools update-rc.d identity hosts default_configs openstackchef 25inherit setuptools update-rc.d identity hosts default_configs openstackchef monitor
26 26
27SERVICE_TOKEN = "password" 27SERVICE_TOKEN = "password"
28TOKEN_FORMAT ?= "PKI" 28TOKEN_FORMAT ?= "PKI"
@@ -301,3 +301,6 @@ RDEPENDS_${SRCNAME}-cronjobs = "cronie ${SRCNAME}"
301INITSCRIPT_PACKAGES = "${SRCNAME}" 301INITSCRIPT_PACKAGES = "${SRCNAME}"
302INITSCRIPT_NAME_${SRCNAME} = "keystone" 302INITSCRIPT_NAME_${SRCNAME} = "keystone"
303INITSCRIPT_PARAMS_${SRCNAME} = "${OS_DEFAULT_INITSCRIPT_PARAMS}" 303INITSCRIPT_PARAMS_${SRCNAME} = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
304
305MONITOR_SERVICE_PACKAGES = "${SRCNAME}"
306MONITOR_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
3CMD="keystone endpoint-list"
4
5data=$($CMD 2>&1)
6res=$?
7if [ ${res} -eq 127 ]; then
8 exit 0
9elif [ ${res} -ne 0 ]; then
10 echo "OpenStack \"keystone api\" failed: "
11 echo $data
12 exit $res
13fi
14exit 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
16PV="0.10.1+git${SRCPV}" 17PV="0.10.1+git${SRCPV}"
17SRCREV="3305c7be4b726de4dcc889006d0be30eb46d3ad9" 18SRCREV="3305c7be4b726de4dcc889006d0be30eb46d3ad9"
18S = "${WORKDIR}/git" 19S = "${WORKDIR}/git"
19 20
20inherit setuptools 21inherit setuptools monitor
21 22
22FILES_${PN}-doc += "${datadir}/keystoneclient" 23FILES_${PN}-doc += "${datadir}/keystoneclient"
23 24
@@ -54,3 +55,6 @@ RDEPENDS_${SRCNAME}-tests += " \
54 python-httpretty \ 55 python-httpretty \
55 " 56 "
56 57
58MONITOR_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
26S = "${WORKDIR}/git" 26S = "${WORKDIR}/git"
27 27
28inherit setuptools update-rc.d identity hosts default_configs openstackchef 28inherit setuptools update-rc.d identity hosts default_configs openstackchef monitor
29 29
30SERVICECREATE_PACKAGES = "${SRCNAME}-setup" 30SERVICECREATE_PACKAGES = "${SRCNAME}-setup"
31KEYSTONE_HOST="${CONTROLLER_IP}" 31KEYSTONE_HOST="${CONTROLLER_IP}"
@@ -313,3 +313,6 @@ INITSCRIPT_NAME_${SRCNAME}-l3-agent = "neutron-l3-agent"
313INITSCRIPT_PARAMS_${SRCNAME}-l3-agent = "${OS_DEFAULT_INITSCRIPT_PARAMS}" 313INITSCRIPT_PARAMS_${SRCNAME}-l3-agent = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
314INITSCRIPT_NAME_${SRCNAME}-metadata-agent = "neutron-metadata-agent" 314INITSCRIPT_NAME_${SRCNAME}-metadata-agent = "neutron-metadata-agent"
315INITSCRIPT_PARAMS_${SRCNAME}-metadata-agent = "${OS_DEFAULT_INITSCRIPT_PARAMS}" 315INITSCRIPT_PARAMS_${SRCNAME}-metadata-agent = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
316
317MONITOR_SERVICE_PACKAGES = "${SRCNAME}"
318MONITOR_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
3CMD="neutron net-list"
4
5data=$($CMD 2>&1)
6res=$?
7if [ ${res} -eq 127 ]; then
8 exit 0
9elif [ ${res} -ne 0 ]; then
10 echo "OpenStack \"neutron api\" failed: "
11 echo $data
12 exit $res
13fi
14exit 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
23SRC_URI = "git://github.com/openstack/python-neutronclient.git;branch=master \ 23SRC_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
27PV="2.3.7+git${SRCPV}" 28PV="2.3.7+git${SRCPV}"
28SRCREV="1452193f935f5be0bb2f5f01b54bd4947d27331b" 29SRCREV="1452193f935f5be0bb2f5f01b54bd4947d27331b"
29S = "${WORKDIR}/git" 30S = "${WORKDIR}/git"
30 31
31inherit setuptools 32inherit setuptools monitor
32 33
33PACKAGECONFIG ?= "bash-completion" 34PACKAGECONFIG ?= "bash-completion"
34PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion" 35PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-completion"
@@ -40,3 +41,7 @@ do_install_append() {
40 41
41PACKAGES =+ "${BPN}-bash-completion" 42PACKAGES =+ "${BPN}-bash-completion"
42FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" 43FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*"
44
45MONITOR_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
31S = "${WORKDIR}/git" 31S = "${WORKDIR}/git"
32 32
33inherit update-rc.d setuptools identity hosts useradd default_configs openstackchef 33inherit update-rc.d setuptools identity hosts useradd default_configs openstackchef monitor
34 34
35LIBVIRT_IMAGES_TYPE ?= "default" 35LIBVIRT_IMAGES_TYPE ?= "default"
36 36
@@ -368,3 +368,6 @@ INITSCRIPT_PARAMS_${SRCNAME}-novncproxy = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
368 368
369INITSCRIPT_NAME_${SRCNAME}-spicehtml5proxy = "nova-spicehtml5proxy" 369INITSCRIPT_NAME_${SRCNAME}-spicehtml5proxy = "nova-spicehtml5proxy"
370INITSCRIPT_PARAMS_${SRCNAME}-spicehtml5proxy = "${OS_DEFAULT_INITSCRIPT_PARAMS}" 370INITSCRIPT_PARAMS_${SRCNAME}-spicehtml5proxy = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
371
372MONITOR_SERVICE_PACKAGES = "${SRCNAME}"
373MONITOR_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
3CMD="nova list"
4
5data=$($CMD 2>&1)
6res=$?
7if [ ${res} -eq 127 ]; then
8 exit 0
9elif [ ${res} -ne 0 ]; then
10 echo "OpenStack \"nova api\" failed: "
11 echo $data
12 exit $res
13fi
14exit 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
15PV="2.18.1+git${SRCPV}" 16PV="2.18.1+git${SRCPV}"
16SRCREV="2a1c07e790cc95b1e847974e4c757f826507834f" 17SRCREV="2a1c07e790cc95b1e847974e4c757f826507834f"
17S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
18 19
19inherit setuptools 20inherit setuptools monitor
20 21
21DEPENDS = "python-setuptools-git" 22DEPENDS = "python-setuptools-git"
22DEPENDS += " \ 23DEPENDS += " \
@@ -44,3 +45,7 @@ do_install_append() {
44 45
45PACKAGES =+ "${BPN}-bash-completion" 46PACKAGES =+ "${BPN}-bash-completion"
46FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*" 47FILES_${BPN}-bash-completion = "${sysconfdir}/bash_completion.d/*"
48
49MONITOR_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"
25inherit core-image 25inherit core-image
26inherit openstack-base 26inherit openstack-base
27inherit identity 27inherit identity
28inherit 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.
30IMAGE_ROOTFS_EXTRA_SPACE_append += "+ 5000000" 31IMAGE_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
17inherit core-image 17inherit core-image
18inherit openstack-base 18inherit openstack-base
19inherit 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"
21inherit core-image 21inherit core-image
22inherit openstack-base 22inherit openstack-base
23inherit identity 23inherit identity
24inherit 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.