Browse code

Assign unique name to each fake nova-compute

Without a unique name, the scheduler (and anything else, really) will
consider each of these nova-compute processes as being one and the same,
so only one entry in the services table, only one hypervisor seen by the
scheduler, etc. Assigning unique names lets us simulate an arbitrary
amount of nova-computes which is very handy for benchmarking the
scheduler.

Change-Id: Ie03aad81bd2a8e73b876a9eae934bc00bf2f71e9

Soren Hansen authored on 2013/11/27 18:06:58
Showing 1 changed files
... ...
@@ -650,7 +650,7 @@ function start_nova_compute() {
650 650
         screen_it n-cpu "cd $NOVA_DIR && sg $LIBVIRT_GROUP '$NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf'"
651 651
     elif [[ "$VIRT_DRIVER" = 'fake' ]]; then
652 652
         for i in `seq 1 $NUMBER_FAKE_NOVA_COMPUTE`; do
653
-            screen_it n-cpu "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf"
653
+            screen_it n-cpu "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-compute --config-file $compute_cell_conf --config-file <(echo -e '[DEFAULT]\nhost=${HOSTNAME}${i}')"
654 654
         done
655 655
     else
656 656
         if is_service_enabled n-cpu && [[ -r $NOVA_PLUGINS/hypervisor-$VIRT_DRIVER ]]; then