Merge "Add vmedia boot support for deploy-ironic element"
This commit is contained in:
commit
7ec2c7cdc4
@ -26,12 +26,20 @@ if [ $? -ne 0 ]; then
|
||||
troubleshoot
|
||||
fi
|
||||
|
||||
if [ "$BOOT_METHOD" = "$VMEDIA_BOOT_TAG" ]; then
|
||||
TOKEN_FILE="$VMEDIA_DIR/token"
|
||||
if [ -f "$TOKEN_FILE" ]; then
|
||||
TOKEN_HEADER="-H 'X-Auth-Token: $(cat $TOKEN_FILE)'"
|
||||
else TOKEN_HEADER=""
|
||||
fi
|
||||
else
|
||||
TOKEN_FILE=token-$DEPLOYMENT_ID
|
||||
|
||||
if tftp -r $TOKEN_FILE -g $BOOT_SERVER
|
||||
then TOKEN_HEADER="-H 'X-Auth-Token: `cat $TOKEN_FILE`'"
|
||||
then TOKEN_HEADER="-H 'X-Auth-Token: $(cat $TOKEN_FILE)'"
|
||||
else TOKEN_HEADER=""
|
||||
fi
|
||||
fi
|
||||
|
||||
DATA="'{\"address\":\"$BOOT_IP_ADDRESS\",\"key\":\"$DEPLOYMENT_KEY\",\"iqn\":\"$ISCSI_TARGET_IQN\",\"error\":\"$FIRST_ERR_MSG\"}'"
|
||||
|
||||
|
@ -105,10 +105,13 @@ readonly _BOOTIF_=$(get_kernel_parameter BOOTIF)
|
||||
readonly _IP_=$(get_kernel_parameter ip)
|
||||
readonly BOOT_MAC_ADDRESS=$(echo "$_BOOTIF_" | sed -e "s/-/:/g" | \
|
||||
sed -e "s/^01://g" | tr 'a-f' 'A-F')
|
||||
readonly BOOT_IP_ADDRESS=$(echo "$_IP_" | cut -d':' -f1)
|
||||
readonly BOOT_SERVER=$(echo "$_IP_" | cut -d':' -f2)
|
||||
readonly BOOT_NETMASK=$(echo "$_IP_" | cut -d':' -f4)
|
||||
readonly BOOT_GATEWAY=$(echo "$_IP_" | cut -d':' -f3)
|
||||
|
||||
# IP address, netmask, gateway can be set a later point of time if
|
||||
# IP address is assigned by dhcp (for non-pxe boots).
|
||||
BOOT_IP_ADDRESS=$(echo "$_IP_" | cut -d':' -f1)
|
||||
BOOT_NETMASK=$(echo "$_IP_" | cut -d':' -f4)
|
||||
BOOT_GATEWAY=$(echo "$_IP_" | cut -d':' -f3)
|
||||
|
||||
readonly DISK=$(get_kernel_parameter disk)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user