Skip to content

Conversation

@h2zh
Copy link
Contributor

@h2zh h2zh commented Oct 22, 2024

This PR enables director to persist the origin/cache server downtime set by the admin in a sqlite db. Fundamentally, it syncs the existing variable filteredServers in cache with the server_downtimes table in db.

To find the .sqlite db file more easily when testing, you can override the default Director.DbLocation to <directory_of_your_choice> (e.g. /workspaces/pelican/director.sqlite) in pelican.yaml

A little bit interpretation of the existing code:
filteredServers has a data field filterType, which have the following types:

permFiltered: "Permanently Disabled via the director configuration"
tempFiltered: "Temporarily disabled via the admin website"
topoFiltered: "Disabled via the Topology policy"
tempAllowed: "Temporarily enabled via the admin website"
"": the empty value at the UI side
default: "Unknown Type"

Different filter types decide the server downtime is temporary or permanent. The new db in this PR coheres this logic.

@h2zh h2zh linked an issue Oct 22, 2024 that may be closed by this pull request
@jhiemstrawisc jhiemstrawisc added this to the v7.12.0 milestone Oct 22, 2024
@jhiemstrawisc jhiemstrawisc added enhancement New feature or request director Issue relating to the director component labels Oct 22, 2024
@h2zh h2zh requested a review from jhiemstrawisc October 22, 2024 20:54
@h2zh h2zh force-pushed the persist-server-downtime branch from b4132a0 to ae05b0a Compare October 30, 2024 15:41
@h2zh h2zh force-pushed the persist-server-downtime branch from 899ef09 to e83cdd8 Compare November 8, 2024 22:25
@h2zh h2zh requested a review from jhiemstrawisc November 8, 2024 22:25
@h2zh
Copy link
Contributor Author

h2zh commented Nov 8, 2024

I think this PR needs to be squashed and merged

Copy link
Member

@jhiemstrawisc jhiemstrawisc left a comment

Choose a reason for hiding this comment

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

One very small change, otherwise things look good to me :)

@jhiemstrawisc jhiemstrawisc self-requested a review November 12, 2024 14:36
Copy link
Member

@jhiemstrawisc jhiemstrawisc left a comment

Choose a reason for hiding this comment

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

🎉

@jhiemstrawisc jhiemstrawisc merged commit c2a3caa into PelicanPlatform:main Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

director Issue relating to the director component enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Persist director server downtime

2 participants