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

Operation policies #3293

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Operation policies #3293

wants to merge 8 commits into from

Conversation

arbulu89
Copy link
Contributor

@arbulu89 arbulu89 commented Feb 12, 2025

Description

Add operations framework policy. It tries to replicate what we do with Bodyguard for the user authorizations.

The operations that will be executed in the trento agents are really sensitive, so this policies guard them against incorrect usage. They will protect the operation new endpoints, so the users cannot run the operations if the resources are not in good state.

This is just the first model. We can add more conditions, and of course, more operations.

By now I have included the saptune_solution_apply main operation, which depends on having the SAP instances in a maintainable state:

  • Cluster:
    . The cluster can have maintenance operations if it is actually in maintenance mode
    . Or the resource that will be changed is not managed
  • Application and database instances
    . The instances are not running
    . Cluster is in maintenance
  • Host
    . All the SAP instances running on this host are in maintenance mode

PD:
Here a ref with SUSE docs explaining a general way of doing SAP maintenance (like applying saptune) in clustered nodes: https://documentation.suse.com/sbp/sap-15/html/SLES4SAP-hana-sr-guide-PerfOpt-15/index.html#id-maintenance

How was this tested?

UT

@arbulu89 arbulu89 added the enhancement New feature or request label Feb 12, 2025
Copy link
Member

@nelsonkopliku nelsonkopliku left a comment

Choose a reason for hiding this comment

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

Hey @arbulu89 a few questions and typos.

I believe the mob review will answer those, and then I will review again.

lib/trento/clusters.ex Outdated Show resolved Hide resolved
lib/trento/clusters.ex Outdated Show resolved Hide resolved
lib/trento/clusters.ex Show resolved Hide resolved
lib/trento/operations/policy_behaviour.ex Show resolved Hide resolved
lib/trento/operations/host_policy.ex Show resolved Hide resolved
lib/trento/operations/host_policy.ex Outdated Show resolved Hide resolved
lib/trento/operations/host_policy.ex Outdated Show resolved Hide resolved
lib/trento/operations/host_policy.ex Show resolved Hide resolved
Co-authored-by: Nelson Kopliku <[email protected]>
@arbulu89 arbulu89 marked this pull request as ready for review February 13, 2025 11:03
Copy link
Member

@nelsonkopliku nelsonkopliku left a comment

Choose a reason for hiding this comment

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

Based on the discussion had synchronously, we cannot but keep going and see how it evolves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

4 participants