Separate out Cinder's rootwrap configuration so that it can be called
from Grenade's upgrade scripts. This follows the same model as Nova uses
with configure_nova_rootwrap() which can be called from Grenade to
refresh rootwrap config.
Change-Id: Id808abc2b5754443362b3de4b3453e305d3720f3
... | ... |
@@ -163,15 +163,8 @@ function cleanup_cinder() { |
163 | 163 |
fi |
164 | 164 |
} |
165 | 165 |
|
166 |
-# configure_cinder() - Set config files, create data dirs, etc |
|
167 |
-function configure_cinder() { |
|
168 |
- if [[ ! -d $CINDER_CONF_DIR ]]; then |
|
169 |
- sudo mkdir -p $CINDER_CONF_DIR |
|
170 |
- fi |
|
171 |
- sudo chown $STACK_USER $CINDER_CONF_DIR |
|
172 |
- |
|
173 |
- cp -p $CINDER_DIR/etc/cinder/policy.json $CINDER_CONF_DIR |
|
174 |
- |
|
166 |
+# configure_cinder_rootwrap() - configure Cinder's rootwrap |
|
167 |
+function configure_cinder_rootwrap() { |
|
175 | 168 |
# Set the paths of certain binaries |
176 | 169 |
CINDER_ROOTWRAP=$(get_rootwrap_location cinder) |
177 | 170 |
if [[ ! -x $CINDER_ROOTWRAP ]]; then |
... | ... |
@@ -214,6 +207,18 @@ function configure_cinder() { |
214 | 214 |
chmod 0440 $TEMPFILE |
215 | 215 |
sudo chown root:root $TEMPFILE |
216 | 216 |
sudo mv $TEMPFILE /etc/sudoers.d/cinder-rootwrap |
217 |
+} |
|
218 |
+ |
|
219 |
+# configure_cinder() - Set config files, create data dirs, etc |
|
220 |
+function configure_cinder() { |
|
221 |
+ if [[ ! -d $CINDER_CONF_DIR ]]; then |
|
222 |
+ sudo mkdir -p $CINDER_CONF_DIR |
|
223 |
+ fi |
|
224 |
+ sudo chown $STACK_USER $CINDER_CONF_DIR |
|
225 |
+ |
|
226 |
+ cp -p $CINDER_DIR/etc/cinder/policy.json $CINDER_CONF_DIR |
|
227 |
+ |
|
228 |
+ configure_cinder_rootwrap |
|
217 | 229 |
|
218 | 230 |
cp $CINDER_DIR/etc/cinder/api-paste.ini $CINDER_API_PASTE_INI |
219 | 231 |
|