From 11824d3a37d39245beb061038857d4f15ae4aeea Mon Sep 17 00:00:00 2001 From: James Slagle Date: Tue, 28 Apr 2015 14:38:17 -0400 Subject: [PATCH] Set $REG_MACHINE_NAME Default $REG_MACHINE_NAME for satellite or portal registration to $UNDERCLOUD_VM_NAME so we get a more meaningful registered name. Change-Id: I6946a3661a87faad11aebfabe1872017cfc9ba0e --- scripts/instack-virt-setup | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/instack-virt-setup b/scripts/instack-virt-setup index 293b478c3..9aaf3edfc 100755 --- a/scripts/instack-virt-setup +++ b/scripts/instack-virt-setup @@ -58,6 +58,11 @@ if [ "$TRIPLEO_OS_FAMILY" = "redhat" ]; then fi export UNDERCLOUD_VM_NAME=${UNDERCLOUD_VM_NAME:-"instack"} +# Set REG_MACHINE_NAME to match UNDERCLOUD_VM_NAME if it isn't already defined. +# This will be the name used to register the system to satllite/portal. If +# registration is not in use, this doesn't hurt anything. +export REG_MACHINE_NAME=${REG_MACHINE_NAME:-"$UNDERCLOUD_VM_NAME"} + if sudo virsh list --all --name | grep -q "^$UNDERCLOUD_VM_NAME$"; then set +x echo "*** Error ***"