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

feat: auto resync when session expire or host reboot #36

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

Conversation

HJ-Fan
Copy link
Collaborator

@HJ-Fan HJ-Fan commented Sep 30, 2024

No description provided.

Needed to combine new auto-resync with recently added online\offline status functionality.
New DeleteBladeByIdBackend() gives service the ability to only delete sessions from the backend.  This allows the webui to still see the blade, even if it's powered down.
New UpdateBladeById() give service the ability to update (resync) an existing blade that's already visible to the client.
Created a new "found" Status state for devices (which represents "powered" but with no valid redfish session id).
Previous commit should have been a feat(service):, not fix:.
Needed to combine new auto-resync with recently added online\offline status functionality.
New DeleteHostByIdBackend() gives service the ability to only delete sessions from the backend. This allows the webui to still see the host, even if it's powered down.
New UpdateHostById() gives service the ability to update (resync) an existing host that's already visible to the client.
Created a new "found" Status state for devices (which represents "powered" but with no valid redfish session id).
Two things were added to the frontend code, logging and a client api entry mutex.
NO performance issues were seen after adding the mutex.  The mutex may get removed later, but it is helping right now.

There are 2 reason for adding these items:

First, there has historically been no logging in this frontend layer.  This has made the service logs hard to read when we're not sure which client api has been requested.

Second, the service log output did NOT show sychronous API execution. One or more API's are logging as started BEFORE previous ones were completed.
So, the mutex was added to:
1.) improve log readability (no inter-mixed api logging output)
2.) Ensure that the service code is executed in a synchronous manner, as it is not designed to run asychrounously.
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.

2 participants