Merge "DevStack: Configure retrieving logs from the deploy ramdisk"
This commit is contained in:
commit
b7b38352ea
@ -278,6 +278,22 @@ IRONIC_PROVISION_SUBNET_GATEWAY=${IRONIC_PROVISION_SUBNET_GATEWAY:-}
|
|||||||
# Example: IRONIC_PROVISION_SUBNET_PREFIX=10.0.5.0/24
|
# Example: IRONIC_PROVISION_SUBNET_PREFIX=10.0.5.0/24
|
||||||
IRONIC_PROVISION_SUBNET_PREFIX=${IRONIC_PROVISION_SUBNET_PREFIX:-}
|
IRONIC_PROVISION_SUBNET_PREFIX=${IRONIC_PROVISION_SUBNET_PREFIX:-}
|
||||||
|
|
||||||
|
# Retrieving logs from the deploy ramdisk
|
||||||
|
#
|
||||||
|
# IRONIC_DEPLOY_LOGS_COLLECT possible values are:
|
||||||
|
# * always: Collect the ramdisk logs from the deployment on success or
|
||||||
|
# failure (Default in DevStack for debugging purpose).
|
||||||
|
# * on_failure: Collect the ramdisk logs upon a deployment failure
|
||||||
|
# (Default in Ironic).
|
||||||
|
# * never: Never collect the ramdisk logs.
|
||||||
|
IRONIC_DEPLOY_LOGS_COLLECT=${IRONIC_DEPLOY_LOGS_COLLECT:-always}
|
||||||
|
# IRONIC_DEPLOY_LOGS_STORAGE_BACKEND possible values are:
|
||||||
|
# * local: To store the logs in the local filesystem (Default in Ironic and DevStack).
|
||||||
|
# * swift: To store the logs in Swift.
|
||||||
|
IRONIC_DEPLOY_LOGS_STORAGE_BACKEND=${IRONIC_DEPLOY_LOGS_STORAGE_BACKEND:-local}
|
||||||
|
# The path to the directory where Ironic should put the logs when IRONIC_DEPLOY_LOGS_STORAGE_BACKEND is set to "local"
|
||||||
|
IRONIC_DEPLOY_LOGS_LOCAL_PATH=${IRONIC_DEPLOY_LOGS_LOCAL_PATH:-$IRONIC_VM_LOG_DIR/deploy_logs}
|
||||||
|
|
||||||
# get_pxe_boot_file() - Get the PXE/iPXE boot file path
|
# get_pxe_boot_file() - Get the PXE/iPXE boot file path
|
||||||
function get_pxe_boot_file {
|
function get_pxe_boot_file {
|
||||||
local relpath=syslinux/pxelinux.0
|
local relpath=syslinux/pxelinux.0
|
||||||
@ -483,6 +499,11 @@ function configure_ironic_dirs {
|
|||||||
# More info: http://www.syslinux.org/wiki/index.php/Library_modules
|
# More info: http://www.syslinux.org/wiki/index.php/Library_modules
|
||||||
cp -aR $(dirname $IRONIC_PXE_BOOT_IMAGE)/*.{c32,0} $IRONIC_TFTPBOOT_DIR
|
cp -aR $(dirname $IRONIC_PXE_BOOT_IMAGE)/*.{c32,0} $IRONIC_TFTPBOOT_DIR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Create the logs directory when saving the deploy logs to the filesystem
|
||||||
|
if [ "$IRONIC_DEPLOY_LOGS_STORAGE_BACKEND" = "local"] && [ "$IRONIC_DEPLOY_LOGS_COLLECT" != "never" ]; then
|
||||||
|
sudo install -d -o $STACK_USER $IRONIC_DEPLOY_LOGS_LOCAL_PATH
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function configure_ironic_provision_network {
|
function configure_ironic_provision_network {
|
||||||
@ -548,6 +569,11 @@ function configure_ironic {
|
|||||||
iniset $IRONIC_CONF_FILE DEFAULT use_syslog $SYSLOG
|
iniset $IRONIC_CONF_FILE DEFAULT use_syslog $SYSLOG
|
||||||
# NOTE(vsaienko) with multinode each conductor should have its own host.
|
# NOTE(vsaienko) with multinode each conductor should have its own host.
|
||||||
iniset $IRONIC_CONF_FILE DEFAULT host $LOCAL_HOSTNAME
|
iniset $IRONIC_CONF_FILE DEFAULT host $LOCAL_HOSTNAME
|
||||||
|
# Retrieve deployment logs
|
||||||
|
iniset $IRONIC_CONF_FILE agent deploy_logs_collect $IRONIC_DEPLOY_LOGS_COLLECT
|
||||||
|
iniset $IRONIC_CONF_FILE agent deploy_logs_storage_backend $IRONIC_DEPLOY_LOGS_STORAGE_BACKEND
|
||||||
|
iniset $IRONIC_CONF_FILE agent deploy_logs_local_path $IRONIC_DEPLOY_LOGS_LOCAL_PATH
|
||||||
|
|
||||||
# Configure Ironic conductor, if it was enabled.
|
# Configure Ironic conductor, if it was enabled.
|
||||||
if is_service_enabled ir-cond; then
|
if is_service_enabled ir-cond; then
|
||||||
configure_ironic_conductor
|
configure_ironic_conductor
|
||||||
|
Loading…
Reference in New Issue
Block a user