Implementation of the pool status aggregation (milestone-3c) - #128
Open
alicefr wants to merge 11 commits into
Open
Implementation of the pool status aggregation (milestone-3c)#128alicefr wants to merge 11 commits into
alicefr wants to merge 11 commits into
Conversation
Refactor the function driveRollout to return the rolloutState result. In this way, they can be used to aggregate and set the status in the pool in the next commits. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Collaborator
Author
|
|
||
| // driveRollout is the main function that advances the rollout state machine. | ||
| func (r *BootcNodePoolReconciler) driveRollout(ctx context.Context, pool *bootcv1alpha1.BootcNodePool, ownedBootcNodes map[string]*bootcv1alpha1.BootcNode) error { | ||
| func (r *BootcNodePoolReconciler) driveRollout(ctx context.Context, pool *bootcv1alpha1.BootcNodePool, ownedBootcNodes map[string]*bootcv1alpha1.BootcNode) (*rolloutState, error) { |
There was a problem hiding this comment.
We should probably run go fmt throughout the project as a separate PR
Johan-Liebert1
left a comment
There was a problem hiding this comment.
Looks good overall. CI lint is failing though
Collaborator
Author
|
Need to look at the CI failure |
Add helped functions to populate the pool status. This commit adds also the ObservedGeneration which was missing. Fixes: 35 Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Call the syncPoolStatus in the reconcile loop. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Each test sets the pool result and then calls the syncPoolStatus and check if the pool status contains the correct values and condition. Tests: - TestSyncPoolStatusAllUpdated - TestSyncPoolStatusRolloutInProgress - TestSyncPoolStatusPaused - TestSyncPoolStatusEmptyPool - TestSyncPoolStatusDeployedDigestPreserved Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Verify the status aggregation for existing e2e tests. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Add the coulumns: nodeCount, updatedCount, updatingCount and degradedCount. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Signed-off-by: Alice Frosi <afrosi@redhat.com>
The new tests added some additional delay. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
The passt package, pulled in as a podman dependency, loads its AppArmor profile during installation. Running aa-teardown before apt-get install meant the profile was immediately re-loaded, causing passt to fail with "Permission denied" when creating VMs. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
The daemon watches its own BootcNode with For(), which fires on all changes including status patches. When staging fails, the reconciler sets Degraded=True and returns RequeueAfter for backoff, but the status patch immediately re-triggers a reconcile that bypasses the backoff and retries staging in a tight loop. Add GenerationChangedPredicate so the For() watch only fires on spec changes (generation increments from the pool controller). Status patches no longer self-trigger. The daemon still reconciles on staging completion (stageDone channel) and bootc status changes (StatusWatcher channel). Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR implements the pool status aggregation with the various count for the nodes in the different state.
It also introduce the ObservedGeneration, the print columns and short name for the bootc node and pool.
Fixes: #52
Fixes: #35