Skip to content

Commit

Permalink
Ensure consistency checks are setup after successful onboarding
Browse files Browse the repository at this point in the history
  • Loading branch information
lagalbra committed Jul 28, 2017
1 parent a00e331 commit 29b9209
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions installer/scripts/omsadmin.sh
Expand Up @@ -621,6 +621,13 @@ onboard()
# Configure omsconfig when the workspace is primary
# This is a temp solution since the DSC doesn't support multi-homing now
# Only the primary workspace receives the configuration from the DSC service

# Set up a cron job to run the OMSConsistencyInvoker every 5 minutes
# This should be done regardless of MetaConfig creation
if [ ! -f /etc/cron.d/OMSConsistencyInvoker ]; then
echo "*/5 * * * * $AGENT_USER /opt/omi/bin/OMSConsistencyInvoker >/dev/null 2>&1" > /etc/cron.d/OMSConsistencyInvoker
fi

if [ "$USER_ID" -eq "0" ]; then
su - $AGENT_USER -c $METACONFIG_PY > /dev/null || error=$?
else
Expand All @@ -636,11 +643,6 @@ onboard()
log_error "Error configuring omsconfig"
return $ERROR_GENERATING_METACONFIG
fi

# Set up a cron job to run the OMSConsistencyInvoker every 5 minutes
if [ ! -f /etc/cron.d/OMSConsistencyInvoker ]; then
echo "*/5 * * * * $AGENT_USER /opt/omi/bin/OMSConsistencyInvoker >/dev/null 2>&1" > /etc/cron.d/OMSConsistencyInvoker
fi
fi
fi

Expand Down

0 comments on commit 29b9209

Please sign in to comment.