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

Comment out monitoring cron if unused. #119

Merged
merged 2 commits into from
Jun 23, 2023

Conversation

steven-safeai
Copy link
Contributor

@steven-safeai steven-safeai commented Jun 20, 2023

Bug in cron tab setup. Does not properly comment out the lines.

@steven-safeai
Copy link
Contributor Author

steven-safeai commented Jun 22, 2023

Gotta rebase this branch
Branch rebased ready again for review.

@steven-safeai steven-safeai force-pushed the 11-comment-out-monitoring-cron branch from 2b73634 to 1308243 Compare June 23, 2023 15:41
@@ -35,15 +35,15 @@
- name: Create a commented Slurm monitoring cron file under /etc/cron.d
cron:
name: slurm monitoring
minute: "*"
minute: "#*"
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure this will only add a single #?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good find! I like it.

I switched to using the built in ansible disabled.

@@ -35,15 +35,15 @@
- name: Create a commented Slurm monitoring cron file under /etc/cron.d
cron:
name: slurm monitoring
minute: "*"
minute: "#*"
user: '{{ ansible_user }}'
job: "#source /opt/oci-hpc/monitoring/env; /opt/oci-hpc/monitoring/monitor_slurm.sh >> /opt/oci-hpc/monitoring/monitor_slurm_`date '+\\%Y\\%m\\%d'`.log 2>&1"
Copy link
Contributor

Choose a reason for hiding this comment

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

If you're adding a # before the minute then you can remove # from the beginning of this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Switched everything to disabled: true

user: '{{ ansible_user }}'
job: "#source /opt/oci-hpc/monitoring/env; /opt/oci-hpc/monitoring/monitor_slurm.sh >> /opt/oci-hpc/monitoring/monitor_slurm_`date '+\\%Y\\%m\\%d'`.log 2>&1"
when: not autoscaling_monitoring | bool

- name: Create a commented OCI monitoring cron file under /etc/cron.d
cron:
name: OCI monitoring
minute: "*"
minute: "#*"
user: '{{ ansible_user }}'
job: "#source /opt/oci-hpc/monitoring/env; /opt/oci-hpc/monitoring/monitor_oci.sh >> /opt/oci-hpc/monitoring/monitor_oci_`date '+\\%Y\\%m\\%d'`.log 2>&1"
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here. Remove the leading #.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Twitter needs the hashtags bro!

@steven-safeai
Copy link
Contributor Author

fixed it @andriy-safe-ai

Copy link
Contributor

@andriy-safe-ai andriy-safe-ai left a comment

Choose a reason for hiding this comment

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

LGTM

@steven-safeai steven-safeai merged commit dc4e3da into main Jun 23, 2023
@steven-safeai steven-safeai deleted the 11-comment-out-monitoring-cron branch June 23, 2023 17:44
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