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(CNV-52011): create objects with random names #560

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

codingben
Copy link
Member

@codingben codingben commented Nov 27, 2024

What this PR does / why we need it:

When running disk-uploader it creates
VMExport object and VMExport secret
to store a token that required by the
Export API endpoints.

Currently the name of VMExport object
and VMExport secret is not random
generated and will fail to be created
again if the disk-uploader (as a Tekton
Task) will run twice. As a result, it
throws a panic error that causes the
failure of the execution.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):

Fixes #542.

Release note:

Generate random name of objects

@kubevirt-bot kubevirt-bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Nov 27, 2024
@kubevirt-bot kubevirt-bot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label Nov 27, 2024
@openshift-ci openshift-ci bot requested a review from jcanocan November 27, 2024 11:33
@codingben
Copy link
Member Author

/cc @ksimon1

@openshift-ci openshift-ci bot requested a review from ksimon1 November 27, 2024 11:33
@kubevirt-bot kubevirt-bot requested a review from ksimon1 November 27, 2024 11:33
@codingben
Copy link
Member Author

Adding more reviewers because @ksimon1 is not available today.

/cc @lyarwood @akrejcir

@codingben
Copy link
Member Author

/hold

@kubevirt-bot kubevirt-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 28, 2024
@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 28, 2024
@codingben codingben marked this pull request as draft November 28, 2024 08:45
@kubevirt-bot kubevirt-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 28, 2024
@codingben
Copy link
Member Author

It also requires to generate the name of the VMExport, basically all the deployed Kubernetes objects by the disk-uploader.

@codingben codingben changed the title fix(CNV-52011): generate random VMExport secret name fix(CNV-52011): create objects with random names Nov 28, 2024
@codingben
Copy link
Member Author

/unhold

@ksimon1 @0xFelix I've modified the PR, can you please review it again?

@kubevirt-bot kubevirt-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 28, 2024
@codingben codingben marked this pull request as ready for review November 28, 2024 10:20
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 28, 2024
@ksimon1
Copy link
Member

ksimon1 commented Nov 28, 2024

/retest

When running disk-uploader it creates
VMExport object and VMExport secret
to store a token that required by the
Export API endpoints.

Currently the name of VMExport object
and VMExport secret is not random
generated and will fail to be created
again if the disk-uploader (as a Tekton
Task) will run twice. As a result, it
throws a panic error that causes the
failure of the execution.

Signed-off-by: Ben Oukhanov <[email protected]>
@codingben
Copy link
Member Author

@ksimon1 @0xFelix Can you please review it again?

@ksimon1
Copy link
Member

ksimon1 commented Dec 2, 2024

/retest

Copy link
Member

@0xFelix 0xFelix left a comment

Choose a reason for hiding this comment

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

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 2, 2024
Copy link

openshift-ci bot commented Dec 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 0xFelix, codingben

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 2, 2024
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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

The pull request process is described 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

@kubevirt-bot kubevirt-bot merged commit 3b66d54 into kubevirt:main Dec 2, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

disk uploader task panics when secret already exists
4 participants