Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 29b9209

Browse files
committed
Ensure consistency checks are setup after successful onboarding
1 parent a00e331 commit 29b9209

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

installer/scripts/omsadmin.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,13 @@ onboard()
621621
# Configure omsconfig when the workspace is primary
622622
# This is a temp solution since the DSC doesn't support multi-homing now
623623
# Only the primary workspace receives the configuration from the DSC service
624+
625+
# Set up a cron job to run the OMSConsistencyInvoker every 5 minutes
626+
# This should be done regardless of MetaConfig creation
627+
if [ ! -f /etc/cron.d/OMSConsistencyInvoker ]; then
628+
echo "*/5 * * * * $AGENT_USER /opt/omi/bin/OMSConsistencyInvoker >/dev/null 2>&1" > /etc/cron.d/OMSConsistencyInvoker
629+
fi
630+
624631
if [ "$USER_ID" -eq "0" ]; then
625632
su - $AGENT_USER -c $METACONFIG_PY > /dev/null || error=$?
626633
else
@@ -636,11 +643,6 @@ onboard()
636643
log_error "Error configuring omsconfig"
637644
return $ERROR_GENERATING_METACONFIG
638645
fi
639-
640-
# Set up a cron job to run the OMSConsistencyInvoker every 5 minutes
641-
if [ ! -f /etc/cron.d/OMSConsistencyInvoker ]; then
642-
echo "*/5 * * * * $AGENT_USER /opt/omi/bin/OMSConsistencyInvoker >/dev/null 2>&1" > /etc/cron.d/OMSConsistencyInvoker
643-
fi
644646
fi
645647
fi
646648

0 commit comments

Comments
 (0)