|
...
|
...
|
@@ -1461,28 +1461,23 @@ sudo chown `whoami` $NOVA_CONF_DIR
|
|
1461
|
1461
|
|
|
1462
|
1462
|
cp -p $NOVA_DIR/etc/nova/policy.json $NOVA_CONF_DIR
|
|
1463
|
1463
|
|
|
1464
|
|
-# If Nova ships the new rootwrap filters files, deploy them
|
|
1465
|
|
-# (owned by root) and add a parameter to ``$NOVA_ROOTWRAP``
|
|
1466
|
|
-ROOTWRAP_SUDOER_CMD="$NOVA_ROOTWRAP"
|
|
1467
|
|
-if [[ -d $NOVA_DIR/etc/nova/rootwrap.d ]]; then
|
|
1468
|
|
- # Wipe any existing rootwrap.d files first
|
|
1469
|
|
- if [[ -d $NOVA_CONF_DIR/rootwrap.d ]]; then
|
|
1470
|
|
- sudo rm -rf $NOVA_CONF_DIR/rootwrap.d
|
|
1471
|
|
- fi
|
|
1472
|
|
- # Deploy filters to /etc/nova/rootwrap.d
|
|
1473
|
|
- sudo mkdir -m 755 $NOVA_CONF_DIR/rootwrap.d
|
|
1474
|
|
- sudo cp $NOVA_DIR/etc/nova/rootwrap.d/*.filters $NOVA_CONF_DIR/rootwrap.d
|
|
1475
|
|
- sudo chown -R root:root $NOVA_CONF_DIR/rootwrap.d
|
|
1476
|
|
- sudo chmod 644 $NOVA_CONF_DIR/rootwrap.d/*
|
|
1477
|
|
- # Set up rootwrap.conf, pointing to /etc/nova/rootwrap.d
|
|
1478
|
|
- sudo cp $NOVA_DIR/etc/nova/rootwrap.conf $NOVA_CONF_DIR/
|
|
1479
|
|
- sudo sed -e "s:^filters_path=.*$:filters_path=$NOVA_CONF_DIR/rootwrap.d:" -i $NOVA_CONF_DIR/rootwrap.conf
|
|
1480
|
|
- sudo chown root:root $NOVA_CONF_DIR/rootwrap.conf
|
|
1481
|
|
- sudo chmod 0644 $NOVA_CONF_DIR/rootwrap.conf
|
|
1482
|
|
- # Specify rootwrap.conf as first parameter to nova-rootwrap
|
|
1483
|
|
- NOVA_ROOTWRAP="$NOVA_ROOTWRAP $NOVA_CONF_DIR/rootwrap.conf"
|
|
1484
|
|
- ROOTWRAP_SUDOER_CMD="$NOVA_ROOTWRAP *"
|
|
1485
|
|
-fi
|
|
|
1464
|
+# Deploy new rootwrap filters files (owned by root).
|
|
|
1465
|
+# Wipe any existing rootwrap.d files first
|
|
|
1466
|
+if [[ -d $NOVA_CONF_DIR/rootwrap.d ]]; then
|
|
|
1467
|
+ sudo rm -rf $NOVA_CONF_DIR/rootwrap.d
|
|
|
1468
|
+fi
|
|
|
1469
|
+# Deploy filters to /etc/nova/rootwrap.d
|
|
|
1470
|
+sudo mkdir -m 755 $NOVA_CONF_DIR/rootwrap.d
|
|
|
1471
|
+sudo cp $NOVA_DIR/etc/nova/rootwrap.d/*.filters $NOVA_CONF_DIR/rootwrap.d
|
|
|
1472
|
+sudo chown -R root:root $NOVA_CONF_DIR/rootwrap.d
|
|
|
1473
|
+sudo chmod 644 $NOVA_CONF_DIR/rootwrap.d/*
|
|
|
1474
|
+# Set up rootwrap.conf, pointing to /etc/nova/rootwrap.d
|
|
|
1475
|
+sudo cp $NOVA_DIR/etc/nova/rootwrap.conf $NOVA_CONF_DIR/
|
|
|
1476
|
+sudo sed -e "s:^filters_path=.*$:filters_path=$NOVA_CONF_DIR/rootwrap.d:" -i $NOVA_CONF_DIR/rootwrap.conf
|
|
|
1477
|
+sudo chown root:root $NOVA_CONF_DIR/rootwrap.conf
|
|
|
1478
|
+sudo chmod 0644 $NOVA_CONF_DIR/rootwrap.conf
|
|
|
1479
|
+# Specify rootwrap.conf as first parameter to nova-rootwrap
|
|
|
1480
|
+ROOTWRAP_SUDOER_CMD="$NOVA_ROOTWRAP $NOVA_CONF_DIR/rootwrap.conf *"
|
|
1486
|
1481
|
|
|
1487
|
1482
|
# Set up the rootwrap sudoers for nova
|
|
1488
|
1483
|
TEMPFILE=`mktemp`
|
|
...
|
...
|
@@ -1944,7 +1939,7 @@ add_nova_opt "[DEFAULT]"
|
|
1944
|
1944
|
add_nova_opt "verbose=True"
|
|
1945
|
1945
|
add_nova_opt "auth_strategy=keystone"
|
|
1946
|
1946
|
add_nova_opt "allow_resize_to_same_host=True"
|
|
1947
|
|
-add_nova_opt "root_helper=sudo $NOVA_ROOTWRAP"
|
|
|
1947
|
+add_nova_opt "rootwrap_config=$NOVA_CONF_DIR/rootwrap.conf"
|
|
1948
|
1948
|
add_nova_opt "compute_scheduler_driver=$SCHEDULER"
|
|
1949
|
1949
|
add_nova_opt "dhcpbridge_flagfile=$NOVA_CONF_DIR/$NOVA_CONF"
|
|
1950
|
1950
|
add_nova_opt "fixed_range=$FIXED_RANGE"
|