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

Fix for many subclusters sandboxed at the same time #815

Merged
merged 3 commits into from
May 17, 2024

Conversation

spilchen
Copy link
Collaborator

This update addresses an issue that occurs when multiple subclusters are added to a new sandbox during the same reconciliation iteration. The problem arose after sandboxing the first subcluster; the second subcluster failed to sandbox.

The failure was due to the need to provide both a host from the main cluster and a host from the sandbox to the vcluster API. To obtain the sandbox host, the system relies on the vdb.status.sandbox being updated. Since this update wasn't happening, the process of finding the sandbox host by checking pod facts didn't locate any sandboxed pods.

The solution is to update vdb.status.sandboxes as each subcluster is sandboxed. This update allows subsequent sandboxes to find the correct pod facts, ensuring the process completes successfully for all subclusters.

This update addresses an issue that occurs when multiple subclusters are
added to a new sandbox during the same reconciliation iteration. The
problem arose after sandboxing the first subcluster; the second
subcluster failed to sandbox.

The failure was due to the need to provide both a host from the main
cluster and a host from the sandbox to the vcluster API. To obtain the
sandbox host, the system relies on the `vdb.status.sandbox` being
updated. Since this update wasn't happening, the process of finding the
sandbox host by checking pod facts didn't locate any sandboxed pods.

The solution is to update `vdb.status.sandboxes` as each subcluster is
sandboxed. This update allows subsequent sandboxes to find the correct
pod facts, ensuring the process completes successfully for all
subclusters.
pkg/controllers/vdb/sandboxsubcluster_reconciler.go Outdated Show resolved Hide resolved
@@ -378,7 +382,8 @@ func (s *SandboxSubclusterReconciler) sandboxSubcluster(ctx context.Context, sub
return ctrl.Result{}, nil
}

// updateSandboxStatus will update sandbox status in vdb
// updateSandboxStatus will update sandbox status in vdb. This is a bulk update
// and can handle multiple subclusters at once.
func (s *SandboxSubclusterReconciler) updateSandboxStatus(ctx context.Context, originalSbScMap map[string][]string) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like this is no longer needed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see this is still used in reconcileSandboxStatus()

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, we still need the bulk update.

Co-authored-by: Roy Paulin <rnguetsopken@opentext.com>
@spilchen spilchen merged commit 79d9952 into vnext May 17, 2024
31 checks passed
@spilchen spilchen deleted the spilchen/sandbox-multi-sc branch May 17, 2024 00:41
cchen-vertica pushed a commit that referenced this pull request Jul 17, 2024
This update addresses an issue that occurs when multiple subclusters are
added to a new sandbox during the same reconciliation iteration. The
problem arose after sandboxing the first subcluster; the second
subcluster failed to sandbox.

The failure was due to the need to provide both a host from the main
cluster and a host from the sandbox to the vcluster API. To obtain the
sandbox host, the system relies on the `vdb.status.sandbox` being
updated. Since this update wasn't happening, the process of finding the
sandbox host by checking pod facts didn't locate any sandboxed pods.

The solution is to update `vdb.status.sandboxes` as each subcluster is
sandboxed. This update allows subsequent sandboxes to find the correct
pod facts, ensuring the process completes successfully for all
subclusters.

---------

Co-authored-by: Roy Paulin <rnguetsopken@opentext.com>
cchen-vertica pushed a commit that referenced this pull request Jul 17, 2024
This update addresses an issue that occurs when multiple subclusters are
added to a new sandbox during the same reconciliation iteration. The
problem arose after sandboxing the first subcluster; the second
subcluster failed to sandbox.

The failure was due to the need to provide both a host from the main
cluster and a host from the sandbox to the vcluster API. To obtain the
sandbox host, the system relies on the `vdb.status.sandbox` being
updated. Since this update wasn't happening, the process of finding the
sandbox host by checking pod facts didn't locate any sandboxed pods.

The solution is to update `vdb.status.sandboxes` as each subcluster is
sandboxed. This update allows subsequent sandboxes to find the correct
pod facts, ensuring the process completes successfully for all
subclusters.

---------

Co-authored-by: Roy Paulin <rnguetsopken@opentext.com>
cchen-vertica pushed a commit that referenced this pull request Jul 24, 2024
This update addresses an issue that occurs when multiple subclusters are
added to a new sandbox during the same reconciliation iteration. The
problem arose after sandboxing the first subcluster; the second
subcluster failed to sandbox.

The failure was due to the need to provide both a host from the main
cluster and a host from the sandbox to the vcluster API. To obtain the
sandbox host, the system relies on the `vdb.status.sandbox` being
updated. Since this update wasn't happening, the process of finding the
sandbox host by checking pod facts didn't locate any sandboxed pods.

The solution is to update `vdb.status.sandboxes` as each subcluster is
sandboxed. This update allows subsequent sandboxes to find the correct
pod facts, ensuring the process completes successfully for all
subclusters.

---------

Co-authored-by: Roy Paulin <rnguetsopken@opentext.com>
cchen-vertica pushed a commit that referenced this pull request Jul 24, 2024
This update addresses an issue that occurs when multiple subclusters are
added to a new sandbox during the same reconciliation iteration. The
problem arose after sandboxing the first subcluster; the second
subcluster failed to sandbox.

The failure was due to the need to provide both a host from the main
cluster and a host from the sandbox to the vcluster API. To obtain the
sandbox host, the system relies on the `vdb.status.sandbox` being
updated. Since this update wasn't happening, the process of finding the
sandbox host by checking pod facts didn't locate any sandboxed pods.

The solution is to update `vdb.status.sandboxes` as each subcluster is
sandboxed. This update allows subsequent sandboxes to find the correct
pod facts, ensuring the process completes successfully for all
subclusters.

---------

Co-authored-by: Roy Paulin <rnguetsopken@opentext.com>
cchen-vertica pushed a commit that referenced this pull request Jul 24, 2024
This update addresses an issue that occurs when multiple subclusters are
added to a new sandbox during the same reconciliation iteration. The
problem arose after sandboxing the first subcluster; the second
subcluster failed to sandbox.

The failure was due to the need to provide both a host from the main
cluster and a host from the sandbox to the vcluster API. To obtain the
sandbox host, the system relies on the `vdb.status.sandbox` being
updated. Since this update wasn't happening, the process of finding the
sandbox host by checking pod facts didn't locate any sandboxed pods.

The solution is to update `vdb.status.sandboxes` as each subcluster is
sandboxed. This update allows subsequent sandboxes to find the correct
pod facts, ensuring the process completes successfully for all
subclusters.

---------

Co-authored-by: Roy Paulin <rnguetsopken@opentext.com>
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.

4 participants