Print this page
6865006 ldom validate shouldn't check for password file if migration type is set to normal
6864993 HA-xVM validate messages need to be wrapped by gettext

*** 72,87 **** shift $((${OPTIND} - 1)) LOG_STRING=$(/usr/bin/printf "$@") ${LOGGER} -p ${PRI} -t ${TAG} ${LOG_STRING} fi ! if [[ "${METHOD}" == "validate" ]] ! then ! shift 5 ! /usr/bin/printf "$@" ! fi } debug_message() { typeset DEBUG_TEXT= --- 72,92 ---- shift $((${OPTIND} - 1)) LOG_STRING=$(/usr/bin/printf "$@") ${LOGGER} -p ${PRI} -t ${TAG} ${LOG_STRING} fi + } ! i18n_message() ! { ! debug_message "Function: i18n_message - Begin" ! ${DEBUG} ! ! print -u2 $(/bin/printf "$@") ! ! debug_message "Function: i18n_message - End" ! return 0 } debug_message() { typeset DEBUG_TEXT=
*** 212,221 **** --- 217,227 ---- { debug_message "Function: validate_xvm - Begin" ${SET_DEBUG} typeset rc=0 + typeset msgtext if [ "$(/usr/bin/uname -i)" != "i86xpv" ] then # SCMSGS # @explanation
*** 224,233 **** --- 230,242 ---- # Ensure that the default boot grub menu is set to boot # Solaris xVM. scds_syslog -p daemon.error -t $(syslog_tag) -m \ "Node is not booted with xVM." + msgtext=$(gettext "Node is not booted with xVM.") + i18n_message "${msgtext}" + rc=1 fi debug_message "Function: validate_xvm - End"
*** 238,263 **** { debug_message "Function: validate_ldom - Begin" ${SET_DEBUG} typeset ncount=0 # Make sure that the password file is readable. ! if [ ! -r "${PASSWORD_FILE}" ] then # SCMSGS # @explanation # Incorrect Password file specified. # @user_action # Ensure that a valid password file is specified. scds_syslog -p daemon.error -t $(syslog_tag) -m \ "Invalid password file specified %s." \ "${PASSWORD_FILE}" debug_message "Function: validate_ldom - End" return 1 fi # Ensure that the control domain is a cluster node. if ! ${LDM} ls > /dev/null 2>&1 then # SCMSGS --- 247,296 ---- { debug_message "Function: validate_ldom - Begin" ${SET_DEBUG} typeset ncount=0 + typeset msgtext # Make sure that the password file is readable. ! if [[ ${MIGRATION_TYPE} != "NORMAL" ]] then + if [ -z "${PASSWORD_FILE}" ] + then # SCMSGS # @explanation + # Password file cannot be null. + # @user_action + # Ensure that a password file name is specified. + scds_syslog -p daemon.error -t $(syslog_tag) -m \ + "Password file cannot be (null)." + + msgtext=$(gettext "Password file cannot be (null).") + i18n_message "${msgtext}" + + debug_message "Function: validate_ldom - End" + return 1 + fi + + if [[ ! -f "${PASSWORD_FILE}" ]] || [[ ! -r "${PASSWORD_FILE}" ]] + then + # SCMSGS + # @explanation # Incorrect Password file specified. # @user_action # Ensure that a valid password file is specified. scds_syslog -p daemon.error -t $(syslog_tag) -m \ "Invalid password file specified %s." \ "${PASSWORD_FILE}" + msgtext=$(gettext "Invalid password file specified %s.") + i18n_message "${msgtext}" "${PASSWORD_FILE}" + debug_message "Function: validate_ldom - End" return 1 fi + fi # Ensure that the control domain is a cluster node. if ! ${LDM} ls > /dev/null 2>&1 then # SCMSGS
*** 267,276 **** --- 300,312 ---- # Ensure that the resource is configured in # control domain. scds_syslog -p daemon.error -t $(syslog_tag) -m \ "The LDom Manager is running in configuration mode." + msgtext=$(gettext "The LDom Manager is running in configuration mode.") + i18n_message "${msgtext}" + debug_message "Function: validate_ldom - End" return 1 fi # Ensure that the failure-policy setting is set to "reset".
*** 289,298 **** --- 325,337 ---- # set to "reset" on the control domain. scds_syslog -p daemon.error -t $(syslog_tag) -m \ "Invalid failure policy \"%s\" for %s domain." \ "${policy}" "primary" + msgtext=$(gettext "Invalid failure policy \"%s\" for %s domain.") + i18n_message "${msgtext}" "${policy}" "primary" + debug_message "Function: validate_ldom - End" return 1 fi # The CL_EXEC_CLIENT program executes a command on any of the
*** 317,327 **** fi nodeid=$(${SCHA_CLUSTER_GET} -O NODEID_NODENAME ${nodename}) output=$(${CL_EXEC_CLIENT} -n ${nodeid} -c "${LDM} list-domain ${DOMAIN}") result=${?} - status=$(echo ${output} | ${AWK} '{print $6}') if (( ${result} == 0 )) && (( ${status} == 0 )) then domstate=$(echo $output | ${AWK} -F" " '{print $18}') --- 356,365 ----
*** 335,344 **** --- 373,385 ---- # Ensure that the domain is in inactive or bound state. scds_syslog -p daemon.error -t $(syslog_tag) -m \ "Domain %s is in %s state on %s." \ "${DOMAIN}" "${domstate}" "${nodename}" + msgtext=$(gettext "Domain %s is in %s state on %s.") + i18n_message "${msgtext}" "${DOMAIN}" "${domstate}" "${nodename}" + debug_message "Function: validate_ldom - End" return 1 fi ncount=$((ncount+1))
*** 361,370 **** --- 402,415 ---- if ! ${CCRADM} showkey --key xml_${RESOURCE} ${CCR_TABLE} > /dev/null 2>&1 then scds_syslog -p daemon.error -t $(syslog_tag) -m \ "Domain %s does not exist." \ "${DOMAIN}" + + msgtext=$(gettext "Domain %s does not exist.") + i18n_message "${msgtext}" "${DOMAIN}" + return 1 fi fi if [[ ${ncount} -gt 1 ]]
*** 377,386 **** --- 422,435 ---- # Ensure that the domain is configured on one node # of the cluster. scds_syslog -p daemon.error -t $(syslog_tag) -m \ "Multiple domain %s configuration exists on %s." \ "${DOMAIN}" "${nlist}" + + msgtext=$(gettext "Multiple domain %s configuration exists on %s.") + i18n_message "${msgtext}" "${DOMAIN}" "${nlist}" + return 1 fi debug_message "Function: validate_ldom - End" return 0
*** 405,414 **** --- 454,466 ---- # Ensure that a valid user probe file is specified. scds_syslog -p daemon.error -t $(syslog_tag) -m \ "Invalid user probe file %s." \ "${PLUGIN_PROBE}" + msgtext=$(gettext "Invalid user probe file %s.") + i18n_message "${msgtext}" "${PLUGIN_PROBE}" + return 1 fi fi validate_${VM}