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 lock to tron start to mitigate the risk of running duplicate jobs… #938

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

KaspariK
Copy link
Member

@KaspariK KaspariK commented Feb 7, 2024

Lock tron start to prevent multiple masters starting.

@KaspariK KaspariK marked this pull request as ready for review February 7, 2024 20:08
@@ -5,7 +5,7 @@ After=network.target
[Service]
User=tron
EnvironmentFile=/etc/default/tron
ExecStart=/usr/bin/trond --lock-file=${LOCKFILE:-$PIDFILE} --working-dir=${WORKINGDIR} --host ${LISTEN_HOST} --port ${LISTEN_PORT} ${DAEMON_OPTS}
ExecStart=/usr/bin/zk-flock tron_master_${CLUSTER_NAME} "/usr/bin/trond --lock-file=${LOCKFILE:-$PIDFILE} --working-dir=${WORKINGDIR} --host ${LISTEN_HOST} --port ${LISTEN_PORT} ${DAEMON_OPTS}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what ends up populating CLUSTER_NAME? I don't see it in /etc/default/tron

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'll be the erb file in the puppet PR

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, gotcha!

@KaspariK KaspariK merged commit 9844868 into master Feb 8, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants