Fixes bug 1144907
Previously, the mongod service may fail to launch, if the eager
filesystem freespace check trips over an SELinux AVC or finds
a lack of freespace (depending on the up-to-datedness of the
selinux-policy-targeted package and the disk size/usage in the
hosting instance).
We work around these issues by ensuring the selinux-policy-targeted
package is up-to-date when ceilometer is enabled on Fedora, and
also setting the --smallfiles option.
Change-Id: I74f21662aedf9cc07b9a335d22b833a8a80dfce2
... | ... |
@@ -88,9 +88,20 @@ function configure_ceilometer() { |
88 | 88 |
iniset $CEILOMETER_CONF keystone_authtoken admin_tenant_name $SERVICE_TENANT_NAME |
89 | 89 |
iniset $CEILOMETER_CONF keystone_authtoken signing_dir $CEILOMETER_AUTH_CACHE_DIR |
90 | 90 |
|
91 |
+ configure_mongodb |
|
92 |
+ |
|
91 | 93 |
cleanup_ceilometer |
92 | 94 |
} |
93 | 95 |
|
96 |
+function configure_mongodb() { |
|
97 |
+ if is_fedora ; then |
|
98 |
+ # ensure smallfiles selected to minimize freespace requirements |
|
99 |
+ sudo sed -i '/--smallfiles/!s/OPTIONS=\"/OPTIONS=\"--smallfiles /' /etc/sysconfig/mongod |
|
100 |
+ |
|
101 |
+ restart_service mongod |
|
102 |
+ fi |
|
103 |
+} |
|
104 |
+ |
|
94 | 105 |
# init_ceilometer() - Initialize etc. |
95 | 106 |
function init_ceilometer() { |
96 | 107 |
# Create cache dir |