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

Adds Goslmailer install to allow for SLURM notifications #109

Merged
merged 1 commit into from
Jun 15, 2023

Conversation

rumiah-safe
Copy link
Contributor

@rumiah-safe rumiah-safe commented Jun 13, 2023

Adds Goslmailer ansible playbook. This installs Mutt and all requisite config files and directories from our fork of goslmailer. README contains instructions on how to run the script and where to find the secrets. They are entered into the prompts that ansible makes.

Issue: #47

This does overwrite the mutt local config to ensure it functions correctly and by default it is blank. However, if, in the future other systems, want to use mutt we should look into integrating them properly.

Testing:

Installed multiple times to test idempotency.
Uninstalled multiple times to test idempotency.

Used this script to test the functionality of the service using my email as the sending email during installation:

#SBATCH --nodes=1
#SBATCH --time=10:00
#SBATCH --partition=compute  # OPTIONAL can be removed to run on big/normal partition
#SBATCH --job-name=Example
#SBATCH --mail-user=mailto:[email protected],slack:U059RL6PSKC
#SBATCH --mail-type=ALL

gcc --version # if you print it out here it'll be 4.8.5
sleep 5

# Recommended way if you want to enable gcc version 10 for the "sbatch" session
source /opt/rh/devtoolset-10/enable

gcc --version # if you print it out again here it'll be version 10

sleep 5

Then used this script to test failing notifications:

#SBATCH --nodes=1
#SBATCH --time=10:00
#SBATCH --partition=compute  # OPTIONAL can be removed to run on big/normal partition
#SBATCH --job-name=Example
#SBATCH --mail-user=mailto:[email protected],slack:U059RL6PSKC
#SBATCH --mail-type=ALL

gcc --version # if you print it out here it'll be 4.8.5
sleep 5

exit 1
# Recommended way if you want to enable gcc version 10 for the "sbatch" session
source /opt/rh/devtoolset-10/enable

gcc --version # if you print it out again here it'll be version 10

sleep 5

All of this handling is done by slurm and without any edit from my config so the rest of the notifications are expected to work and appear to, but I am unaware of how to create some of the situations that they notify for.

@rumiah-safe rumiah-safe linked an issue Jun 13, 2023 that may be closed by this pull request
@rumiah-safe rumiah-safe requested review from a user, steven-safeai and andriy-safe-ai June 13, 2023 21:24
@rumiah-safe rumiah-safe added the enhancement New feature or request label Jun 13, 2023
Copy link
Contributor

@steven-safeai steven-safeai left a comment

Choose a reason for hiding this comment

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

Some comments.

Additionally where and how is the token set.
Update the README docs are important.

playbooks/goslmailer_install.yml Show resolved Hide resolved
playbooks/goslmailer_install.yml Show resolved Hide resolved
playbooks/goslmailer_install.yml Outdated Show resolved Hide resolved
playbooks/goslmailer_install.yml Show resolved Hide resolved
playbooks/goslmailer_install.yml Outdated Show resolved Hide resolved
playbooks/goslmailer_install.yml Show resolved Hide resolved
playbooks/goslmailer_install.yml Show resolved Hide resolved
@steven-safeai
Copy link
Contributor

Please reference the git issue somewhere in the pr so I can go back to look at it as well.

@rumiah-safe
Copy link
Contributor Author

Sorry I shouldn't have pinged you yet I was still writing the request

@steven-safeai
Copy link
Contributor

One last thing before I forget. Squash or fixup your commits before merging.

playbooks/README.md Outdated Show resolved Hide resolved
playbooks/goslmailer_install.yml Show resolved Hide resolved
playbooks/roles/slurm/templates/slurm.conf.j2 Show resolved Hide resolved
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

Copy link
Contributor

@steven-safeai steven-safeai left a comment

Choose a reason for hiding this comment

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

Squish them merge :)

@rumiah-safe rumiah-safe merged commit 731dd14 into main Jun 15, 2023
@rumiah-safe rumiah-safe deleted the Goslmailer_install branch June 15, 2023 00:06
@steven-safeai steven-safeai changed the title Goslmailer install Adds Goslmailer install to allow for SLURM notifications Jun 21, 2023
steven-safeai pushed a commit that referenced this pull request Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add email notifications to Slurm
3 participants