Skip to content

WIP OCPBUGS-55300: For agent-installer remove bypass of manifest generation #7606

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

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

Conversation

bfournie
Copy link
Contributor

@bfournie bfournie commented Apr 23, 2025

When OVE UI uses the downloads/credentials endpoint the API handler generates the InstallConfig for the agent-based installer in order to make the credentials available in the Ready state. In order to prevent overwriting the kubeadmin-password, the generation of the InstallConfig the second time was bypassed (#7546). This inadvertently prevented the operator manifests from also being generated, and since the OVE UI configures the operators after it retrieves the credentials, the operators are not correctly installed.

This fix removes the bypass of the GenerateInstallConfig. To prevent the kubeadmin-password overwrite a installer change has been made openshift/installer#9679

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • [] No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 23, 2025
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Apr 23, 2025
@openshift-ci-robot
Copy link

@bfournie: This pull request references Jira Issue OCPBUGS-55300, 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.19.0) matches configured target version for branch (4.19.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @mhanss

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

In response to this:

When OVE UI uses the downloads/credentials endpoint the API handler generates the InstallConfig for the agent-based installer in order to make the credentials available in the Ready state. In order to prevent overwriting the kubeadmin-password, the generation of the InstallConfig the second time was bypassed (#7546). This inadvertently prevented the operator manifests from also being generated, and since the OVE UI configures the operators after it retrieves the credentials, the operators are not correctly installed.

This fix removes the bypass of the GenerateInstallConfig and skips the upload of the kubeadmin-password if it has already been uploaded in order to prevent overwriting it.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • [] No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from mhanss April 23, 2025 23:36
@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 23, 2025
@openshift-ci openshift-ci bot requested review from CrystalChun and pastequo April 23, 2025 23:36
Copy link

openshift-ci bot commented Apr 23, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bfournie
Once this PR has been reviewed and has the lgtm label, please assign gamli75 for approval. For more information see the 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

Copy link

codecov bot commented Apr 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.35%. Comparing base (5099cdf) to head (60ead81).
Report is 3 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7606   +/-   ##
=======================================
  Coverage   67.34%   67.35%           
=======================================
  Files         335      335           
  Lines       42363    42367    +4     
=======================================
+ Hits        28530    28535    +5     
+ Misses      11261    11260    -1     
  Partials     2572     2572           

see 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

func skipAgentUpload(ctx context.Context, key string, s3Client s3wrapper.API) bool {
skipFiles := []string{
"kubeadmin-password",
"99_kubeadmin-password-secret.yaml",
Copy link
Contributor

Choose a reason for hiding this comment

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

From a quick test the console login is still broken. The password update is skipped, but it seems that "99_kubeadmin-password-secret.yaml" is generated before (so this skip is ignored here essentially), so very likely it's stil being generated with the new kubeadmin-password.hash

When OVE UI uses the downloads/credentials endpoint the API handler
generates the InstallConfig for the agent-based installer in order to
make the credentials available in the Ready state. In order to prevent
overwriting the kubeadmin-password, the generation of the InstallConfig
the second time was bypassed (openshift#7546).
This inadvertently prevented the operator manifests from also being
generated, and since the OVE UI configures the operators after it
retrieves the credentials, the operators are not correctly installed.

This fix removes the bypass of the GenerateInstallConfig and
skips the upload of the kubeadmin-password if it has already been
uploaded in order to prevent overwriting it.
@bfournie bfournie force-pushed the agent-skip-upload-files branch from 62fb342 to 60ead81 Compare April 24, 2025 23:02
@openshift-ci openshift-ci bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 24, 2025
@openshift-ci-robot
Copy link

@bfournie: This pull request references Jira Issue OCPBUGS-55300, which is valid.

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

Requesting review from QA contact:
/cc @mhanss

In response to this:

When OVE UI uses the downloads/credentials endpoint the API handler generates the InstallConfig for the agent-based installer in order to make the credentials available in the Ready state. In order to prevent overwriting the kubeadmin-password, the generation of the InstallConfig the second time was bypassed (#7546). This inadvertently prevented the operator manifests from also being generated, and since the OVE UI configures the operators after it retrieves the credentials, the operators are not correctly installed.

This fix removes the bypass of the GenerateInstallConfig.

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • [] No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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 openshift-eng/jira-lifecycle-plugin repository.

@bfournie bfournie changed the title WIP OCPBUGS-55300: For agent-installer skip upload of kubeadmin files WIP OCPBUGS-55300: For agent-installer remove bypass of manifest generation Apr 24, 2025
@openshift-ci-robot
Copy link

@bfournie: This pull request references Jira Issue OCPBUGS-55300, which is valid.

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

Requesting review from QA contact:
/cc @mhanss

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

In response to this:

When OVE UI uses the downloads/credentials endpoint the API handler generates the InstallConfig for the agent-based installer in order to make the credentials available in the Ready state. In order to prevent overwriting the kubeadmin-password, the generation of the InstallConfig the second time was bypassed (#7546). This inadvertently prevented the operator manifests from also being generated, and since the OVE UI configures the operators after it retrieves the credentials, the operators are not correctly installed.

This fix removes the bypass of the GenerateInstallConfig. To prevent the kubeadmin-password overwrite a installer change has been made openshift/installer#9679

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • [] No tests needed

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

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 openshift-eng/jira-lifecycle-plugin repository.

Copy link

openshift-ci bot commented Apr 25, 2025

@bfournie: 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/edge-subsystem-aws 60ead81 link true /test edge-subsystem-aws
ci/prow/e2e-agent-compact-ipv4 60ead81 link true /test e2e-agent-compact-ipv4
ci/prow/edge-e2e-ai-operator-ztp 60ead81 link true /test edge-e2e-ai-operator-ztp
ci/prow/okd-scos-e2e-aws-ovn 60ead81 link false /test okd-scos-e2e-aws-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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants