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

Allow the discovery of Servers which are in the powered On state. #109

Merged
merged 7 commits into from
Aug 21, 2024

Conversation

afritzler
Copy link
Member

@afritzler afritzler commented Aug 15, 2024

Proposed Changes

Currently we are not running the discovery of Servers which are already powered On. A new flag (--enforce-first-boot) has been introduced to enforce the discovery of already powered on Servers. The default of this flag is set to false.

Additionally if we encounter a Server with .spec.power == "" in the initial state, we mutate the Server spec to match the detected PowerState in the Servers status.

Also some sporadic test failures where addressed.

Fixes #103 #108

@github-actions github-actions bot added size/L enhancement New feature or request labels Aug 15, 2024
Currently we are not running the discovery of `Servers` which are
already powered `On`. A new flag (`--enforce-first-boot`) has been introduced
to enforce the discovery of already powered on `Servers`. The default of
this flag is set to `false`.

Additionally if we encounter a `Server` with `.spec.power==""` in the initial
state, we mutate the `Server` spec to macht the detected `PowerState` in
the `Servers` status.

Co-authored-by: Hardik Dodiya <[email protected]>
server.Status.State = metalv1alpha1.ServerStateAvailable
})).Should(Succeed())

By("Ensuring that the Server has the correct claim ref")
Eventually(Object(&server)).Should(SatisfyAll(
HaveField("Spec.ServerClaimRef.Name", claim.Name),
Eventually(Object(server)).Should(SatisfyAll(
Copy link
Member Author

Choose a reason for hiding this comment

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

@defo89 that was the reason for the sporadic test failures which we encountered. Eventually .spec.ServerClaimRef.Name was set but if not the test ran into a nil pointer deref.

@afritzler afritzler force-pushed the enh/initial-state branch 5 times, most recently from 11fffff to 1657543 Compare August 15, 2024 13:38
@afritzler afritzler requested a review from hardikdr August 20, 2024 09:06
@afritzler
Copy link
Member Author

The sporadic issues in the controller suite seems to be fixed now. But there seems to be still an issue in the registry and agent tests. Somehow it looks like the registry server can't be started as (maybe) the port can't be allocated. 🤔

@afritzler afritzler merged commit f7af314 into main Aug 21, 2024
8 checks passed
@afritzler afritzler deleted the enh/initial-state branch August 21, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve new Server power handling
2 participants