Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TEST_SW_RAID option #1436

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -494,3 +494,6 @@ if [[ -n "$MIRROR_IMAGES" || -z "${IP_STACK:-}" || "$IP_STACK" = "v6" || "$IP_ST
fi

export AGENT_TEST_CASES=${AGENT_TEST_CASES:-}

# Defaults the variable to disable testing software RAID
export TEST_SW_RAID=${TEST_SW_RAID:-true}
4 changes: 4 additions & 0 deletions config_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,10 @@ set -x
# will be used as input to the installer.
# export AGENT_USE_ZTP_MANIFESTS=false

# TEST_SW_RAID -
# Enable testing of software RAID
# export TEST_SW_RAID=true

# Uncomment and set the following value to "true" to disable the automated
# deployment systemd services of the Agent based installation. This is
# particularly useful for WebUI development.
Expand Down
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