changed logic to use power status from underlying inventory #707
+2
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
In a scenario when Harvester seeder is enabled, and user performs an out of band power operation, seeder does not reconcile with the underlying hardware.
It currently uses power action request and state to identify if underlying host is power off / on.
Harvester UI reports the node as
Offthough the underlying kubelet and workloads may be running.This can lead to a scenario, where a machine may have been power on out of band from Harvester seeder integration
PR: harvester/seeder#81 adds a new field in inventory status called
machinePowerStatewhich reconciles underlying hardware power state directly from the hardware.The UI PR makes the corresponding change in
isStoppedandisStartedmethod to leverage this field rather than the current combination ofpowerActionRequestedandactionStatusPost this change, if a machine is poweredOn out of band from Harvester seeder, the machine power state is correctly reflected in the UI
PR Checklists
Related Issue
harvester/harvester#5780
harvester/harvester#9749
Test screenshot or video