distributed testing

This commit is contained in:
Jason Ertel
2023-03-09 15:04:42 -05:00
parent 894a20b3ad
commit 23b344bf14
3 changed files with 21 additions and 2 deletions

View File

@@ -2303,6 +2303,9 @@ set_initial_firewall_access() {
if [[ ! -z "$ALLOW_CIDR" ]]; then
$default_salt_dir/salt/common/tools/sbin/so-firewall --role=analyst --ip=$ALLOW_CIDR --apply=true
fi
if [[ ! -z "$MINION_CIDR" ]]; then
$default_salt_dir/salt/common/tools/sbin/so-firewall --role=sensors --ip=$MINION_CIDR --apply=true
fi
}
# Set up the management interface on the ISO

View File

@@ -189,7 +189,7 @@ if [ -n "$test_profile" ]; then
HOSTNAME=sensor
MSRVIP_OFFSET=-2
elif [[ "$test_profile" =~ "-search" ]]; then
install_type=SEARCH
install_type=SEARCHNODE
HOSTNAME=search
MSRVIP_OFFSET=-1
else
@@ -198,6 +198,7 @@ if [ -n "$test_profile" ]; then
info "Activating test profile; profile=$test_profile; install_type=$install_type"
MINION_CIDR=10.0.0.0/8
MSRV=manager
if [[ "$test_profile" =~ "-net" ]]; then
address_type=DHCP

View File

@@ -79,6 +79,19 @@ status_failed() {
return 1
}
create_temp_so_status_if_missing() {
if ! which so-status &> /dev/null; then
if [ -f /root/success ]; then
echo "echo 'Minion installation succeeded - so-status not yet available'" > /usr/sbin/so-status
echo "exit 0" >> /usr/sbin/so-status
else
echo "echo 'Installation failed - so-status not available'" > /usr/sbin/so-status
echo "exit 100" >> /usr/sbin/so-status
fi
chmod a+x /usr/sbin/so-status
fi
}
main() {
exit_code=0
if [ -f /root/success ]; then
@@ -103,6 +116,8 @@ main() {
touch /root/success
fi
create_temp_so_status_if_missing
exit $exit_code
}