Skip to content

Commit

Permalink
Add TEST_SW_RAID option
Browse files Browse the repository at this point in the history
This can config software RAID for worker nodes.

Signed-off-by: Hu Shuai <[email protected]>
  • Loading branch information
hs0210 committed Aug 16, 2022
1 parent 4befdca commit cc4651d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -379,3 +379,6 @@ export TEST_CUSTOM_MAO=${TEST_CUSTOM_MAO:-false}
# Set to configure bootstrap VM baremetal network with static IP
# (Currently this just expects a non-empty value, the IP is fixed to .9)
export ENABLE_BOOTSTRAP_STATIC_IP=${ENABLE_BOOTSTRAP_STATIC_IP:-}

# Defaults the variable to disable testing software RAID
export TEST_SW_RAID=${TEST_SW_RAID:-false}
4 changes: 4 additions & 0 deletions config_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -608,3 +608,7 @@ set -x
# cpu and ip stack.
# This config variable is used only by the agent based installer and is required.
# export AGENT_E2E_TEST_SCENARIO=HA_IPV4

# TEST_SW_RAID -
# Enable testing of software RAID
# export TEST_SW_RAID=true
11 changes: 11 additions & 0 deletions utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,17 @@ function create_cluster() {
mkdir -p ${assets_dir}/openshift
generate_assets

if [[ "$TEST_SW_RAID" == "true" ]] && [[ "$NUM_WORKERS" -gt 0 ]]; then
for n in $(seq "$NUM_MASTERS" $(expr "$NUM_WORKERS" + "$NUM_MASTERS" - 1));
do
sed -i "/status/i \\
raid: \n\
softwareRAIDVolumes: \n\
- level: \"1\" \
" ${assets_dir}/openshift/99_openshift-cluster-api_hosts-$n.yaml
done
fi

if [ -z "${NTP_SERVERS}" ];
then
export NTP_SERVERS="$PROVISIONING_HOST_EXTERNAL_IP"
Expand Down

0 comments on commit cc4651d

Please sign in to comment.