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

OCPBUGS-18658: Unify agent install-complete with installer #7678

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rwsu
Copy link
Contributor

@rwsu rwsu commented Nov 3, 2023

Removed custom agent wait-for install-complete code.

Moved installer WaitForInstallComplete function from cmd/openshift-install/main to cmd/openshift-install/command so that the function can be made public.

Modified agent.newWaitForInstallCompleted() to use the common WaitForInstallComplete function.

The benefit of moving agent over to the common WaitForInstallComplete function is that the common function has a step to wait for operators to be in a stable state before calling the cluster installation complete.

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Nov 3, 2023
@openshift-ci-robot
Copy link
Contributor

@rwsu: This pull request references Jira Issue OCPBUGS-18658, which is invalid:

  • expected the bug to target the "4.15.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Removed custom agent wait-for install-complete code.

Moved installer WaitForInstallComplete function from cmd/openshift-install/main to cmd/openshift-install/command so that the function can be made public.

Modified agent.newWaitForInstallCompleted() to use the common WaitForInstallComplete function.

The benefit of moving agent over to the common WaitForInstallComplete function is that the common function has a step to wait for operators to be in a stable state before calling the cluster installation complete.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rwsu
Copy link
Contributor Author

rwsu commented Nov 3, 2023

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Nov 3, 2023
@openshift-ci-robot
Copy link
Contributor

@rwsu: This pull request references Jira Issue OCPBUGS-18658, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.15.0) matches configured target version for branch (4.15.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @mhanss

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Contributor

openshift-ci bot commented Nov 3, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from rwsu. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rwsu rwsu force-pushed the OCPBUGS-18658 branch 2 times, most recently from 6c866b0 to 42b48a1 Compare November 6, 2023 18:37
@rwsu
Copy link
Contributor Author

rwsu commented Nov 6, 2023

/retest-required

1 similar comment
@andfasano
Copy link
Contributor

/retest-required

pkg/agent/cluster.go Show resolved Hide resolved
@@ -93,25 +86,24 @@ func newWaitForInstallCompleteCmd() *cobra.Command {
ctx := context.Background()
cluster, err := agentpkg.NewCluster(ctx, assetDir)
if err != nil {
logrus.Exit(exitCodeBootstrapFailed)
logrus.Exit(command.ExitCodeBootstrapFailed)
Copy link
Contributor

Choose a reason for hiding this comment

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

On a second though/alternative proposal, instead of modifying the rest of the code to unify agent's newWaitForInstallCompleteCmd(), what about using directly installer's newWaitForInstallCompleteCmd()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Intriguing idea. There is a slight difference with agent wait-for install-complete. Inside it, it calls agentpkg.WaitForBootstrapComplete. In addition to kubeapi, agent bootstrap-complete also looks queries the assisted-service rest-api for additional status information like printing out the host validations. I don't think we want to lose this additional information by switching to installer's newWaitForInstallCompleteCmd().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Considering Zane's input, I don't think we can remove the bootstrap-complete from the agent's install-complete because it will break existing user's expectations. Therefore we cannot use the installer's newWaitForInstallCompleteCmd() directly.

@rwsu
Copy link
Contributor Author

rwsu commented Nov 8, 2023

/retest-required

@rwsu
Copy link
Contributor Author

rwsu commented Nov 10, 2023

/test e2e-agent-compact-ipv4

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 14, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 13, 2024
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 15, 2024
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 6, 2024
Removed custom agent wait-for install-complete code.

Moved installer WaitForInstallComplete function from
cmd/openshift-install/main to cmd/openshift-install/command so
that the function can be made public.

Modified agent.newWaitForInstallCompleted() to use the common
WaitForInstallComplete function.

The benefit of moving agent over to the common
WaitForInstallComplete function is that the common function has a
step to wait for operators to be in a stable state before calling
the cluster installation complete.
@rwsu
Copy link
Contributor Author

rwsu commented Dec 9, 2024

/test e2e-aws-ovn

@pawanpinjarkar
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 9, 2024
@rwsu
Copy link
Contributor Author

rwsu commented Jan 9, 2025

/retest-required

1 similar comment
@rwsu
Copy link
Contributor Author

rwsu commented Jan 9, 2025

/retest-required

Copy link
Contributor

openshift-ci bot commented Jan 9, 2025

@rwsu: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-e2e-agent-sno-ipv6 d1dacaf9f22740e858ee6aece55ae9a8e12726b7 link false /test okd-e2e-agent-sno-ipv6
ci/prow/okd-e2e-agent-ha-dualstack d1dacaf9f22740e858ee6aece55ae9a8e12726b7 link false /test okd-e2e-agent-ha-dualstack
ci/prow/okd-scos-e2e-agent-compact-ipv4 d1dacaf9f22740e858ee6aece55ae9a8e12726b7 link false /test okd-scos-e2e-agent-compact-ipv4
ci/prow/okd-scos-e2e-agent-sno-ipv6 d1dacaf9f22740e858ee6aece55ae9a8e12726b7 link false /test okd-scos-e2e-agent-sno-ipv6
ci/prow/okd-e2e-aws-ovn-upgrade 4267938dd75955527e714dd0bf4a4c29513aab7f link false /test okd-e2e-aws-ovn-upgrade
ci/prow/okd-scos-unit 4267938dd75955527e714dd0bf4a4c29513aab7f link false /test okd-scos-unit
ci/prow/okd-unit 4267938dd75955527e714dd0bf4a4c29513aab7f link true /test okd-unit
ci/prow/okd-e2e-agent-compact-ipv4 4267938dd75955527e714dd0bf4a4c29513aab7f link false /test okd-e2e-agent-compact-ipv4
ci/prow/agent-integration-tests 4267938dd75955527e714dd0bf4a4c29513aab7f link true /test agent-integration-tests
ci/prow/altinfra-periodics-images 4267938dd75955527e714dd0bf4a4c29513aab7f link true /test altinfra-periodics-images
ci/prow/e2e-agent-compact-ipv4-none-platform 38c05c7 link false /test e2e-agent-compact-ipv4-none-platform
ci/prow/okd-scos-e2e-aws-ovn 38c05c7 link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-azure-ovn-upi 38c05c7 link true /test e2e-azure-ovn-upi
ci/prow/images 38c05c7 link true /test images
ci/prow/e2e-azure-ovn 38c05c7 link true /test e2e-azure-ovn

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@rwsu
Copy link
Contributor Author

rwsu commented Jan 10, 2025

/retest-required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants