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

[RFE] General Purpose Tenant Contact Tool #538

Closed
sadsfae opened this issue Oct 16, 2024 · 2 comments
Closed

[RFE] General Purpose Tenant Contact Tool #538

sadsfae opened this issue Oct 16, 2024 · 2 comments

Comments

@sadsfae
Copy link
Member

sadsfae commented Oct 16, 2024

This is an RFE for a general-purpose tenant contact tool like src/quads/tools/notify_tenant.py

Description

  • Contacts cloud-owner and cc-users of one more more environments either via email, ticket or both
  • Parses a file somewhere for the message payload

Integration

notify_tenant.py

Payload

--message /path/to/message.txt

Usage Options

--cloud "cloud02 cloud03 cloud04" (list of environments)
--all (all active environments)
--rack "rack1 rack2 rack3" (send to all clouds with systems in certain racks) - this may need to wait for #448 to simplify lookups
--ticket (can be used with or without --email)
--email (can be used with or without --ticket)
--subject (used for email)

Example Usage

  • notifying all environments of an outage or downtime
notify_tenant.py --all --ticket --email --subject "Ongoing Power Outage in XYZ!" --message /tmp/2024-10-15-outage.txt
  • notifying cloud02 of switch maintenance via JIRA
notify_tenant.py --cloud "cloud02" --ticket --message /tmp/cloud02-maintenance.txt
  • notifying cloud04 and cloud06 via email of their expiration
notify_tenant.py --cloud "cloud04 cloud06" --email --subject "Upcoming Expiration 2024-10-15" --message /tmp/expirationso-2024-10-15.txt
  • notifying system owners with clouds in rack b01 and b02 about maintenance
notify_tenant.py --rack "b01 b02" --email --subject "Upcoming Maintenance 2024-10" --message /tmp/rack_b01_b02.txt
@kambiz-aghaiepour
Copy link
Contributor

Don't we already send the expiration emails via cron entries for notifications? I only ask because of the 3rd example, but the use cases for power outage, or maintenance work would be great use cases. Perhaps also add something like:

notify_tenant.py --racks <rack1_name[,rack2_name[,rack3_name...]]> --ticket --message /tmp/message.txt

may be a good use case, for which the notification goes out to any environment that has a current/active allocation with hosts that are part of a given rack.

@sadsfae
Copy link
Member Author

sadsfae commented Oct 16, 2024

Don't we already send the expiration emails via cron entries for notifications? I only ask because of the 3rd example, but the use cases for power outage, or maintenance work would be great use cases. Perhaps also add something like:

Yeah we use use postman lib for those notifications currently so any new tool can just import that.

notify_tenant.py --racks <rack1_name[,rack2_name[,rack3_name...]]> --ticket --message /tmp/message.txt

may be a good use case, for which the notification goes out to any environment that has a current/active allocation with hosts that are part of a given rack.

Yeah love the idea of --rack too, I'll update the RFE

--rack may want to wait until we implement #448 where we move rack location into the host metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants