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

Virtctl - Force Bind the PVC on WFFC storage #6513

Merged
merged 3 commits into from Oct 26, 2021

Conversation

brybacki
Copy link
Contributor

@brybacki brybacki commented Oct 4, 2021

What this PR does / why we need it:

A new option for imageupload is available - force-bind. This will force
the scheduling of a CDI worker pod and immediately bind the PVC
ignoring the WaitForFirstConsumer logic.

This is useful for use cases that do not require binding to a particular
node (like uploading a golden image to the cluster).

It uses the annotation added here: kubevirt/containerized-data-importer#1560

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 #

Special notes for your reviewer:

Release note:

Adds force-bind flag to virtctl imageupload 

A new option for imageupload is available - force-bind. This will force
the scheduling of a CDI worker pod and immediately bind the PVC
ignoring the WaitForFirstConsumer logic.

This is useful for use cases that do not require binding to a particular
 node (like uploading a golden image to the cluster).

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>
@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/M labels Oct 4, 2021
@ShellyKa13
Copy link
Contributor

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 4, 2021
@brybacki
Copy link
Contributor Author

brybacki commented Oct 5, 2021

/retest

Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>
@kubevirt-bot kubevirt-bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 5, 2021
@zcahana
Copy link
Contributor

zcahana commented Oct 5, 2021

/lgtm

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 5, 2021
@brybacki
Copy link
Contributor Author

brybacki commented Oct 5, 2021

looks like a new flake test:
Tests Suite: [sig-storage] Storage Starting a VirtualMachineInstance with error disk should pause VMI on IO error expand_more
/test pull-kubevirt-e2e-k8s-1.22-sig-storag

@kubevirt-bot
Copy link
Contributor

@brybacki: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test pull-kubevirt-e2e-k8s-1.21-sig-network
  • /test pull-kubevirt-e2e-k8s-1.21-sig-storage
  • /test pull-kubevirt-e2e-k8s-1.21-sig-compute
  • /test pull-kubevirt-e2e-k8s-1.21-operator
  • /test pull-kubevirt-e2e-k8s-1.20-sig-network
  • /test pull-kubevirt-e2e-k8s-1.20-sig-compute
  • /test pull-kubevirt-e2e-k8s-1.20-operator
  • /test pull-kubevirt-e2e-k8s-1.20-sig-compute-nonroot
  • /test pull-kubevirt-e2e-k8s-1.20-operator-nonroot
  • /test pull-kubevirt-e2e-k8s-1.19-sig-network
  • /test pull-kubevirt-e2e-k8s-1.19-sig-compute
  • /test pull-kubevirt-e2e-k8s-1.19-operator
  • /test pull-kubevirt-e2e-windows2016
  • /test pull-kubevirt-e2e-kind-1.19-sriov
  • /test pull-kubevirt-e2e-kind-1.19-vgpu
  • /test pull-kubevirt-generate
  • /test pull-kubevirt-build
  • /test pull-kubevirt-build-arm64
  • /test pull-kubevirt-unit-test
  • /test pull-kubevirt-apidocs
  • /test pull-kubevirt-client-python
  • /test pull-kubevirt-manifests
  • /test pull-kubevirt-prom-rules-verify
  • /test pull-kubevirt-check-unassigned-tests

The following commands are available to trigger optional jobs:

  • /test pull-kubevirt-e2e-k8s-1.21-rest-coverage
  • /test pull-kubevirt-e2e-k8s-1.20-sig-storage
  • /test pull-kubevirt-e2e-k8s-1.20-cgroupsv2
  • /test pull-kubevirt-e2e-k8s-1.20-sig-network-nonroot
  • /test pull-kubevirt-e2e-k8s-1.20-sig-storage-nonroot
  • /test pull-kubevirt-e2e-k8s-1.19-sig-storage
  • /test pull-kubevirt-e2e-kind-1.19-sriov-nonroot
  • /test pull-kubevirt-check-tests-for-flakes
  • /test pull-kubevirt-verify-rpms
  • /test pull-kubevirt-verify-go-mod
  • /test pull-kubevirt-gosec
  • /test pull-kubevirt-goveralls
  • /test pull-kubevirt-fossa
  • /test pull-kubevirt-e2e-k8s-1.22-sig-network
  • /test pull-kubevirt-e2e-k8s-1.22-sig-storage
  • /test pull-kubevirt-e2e-k8s-1.22-sig-compute
  • /test pull-kubevirt-e2e-k8s-1.22-operator
  • /test pull-kubevirt-e2e-k8s-1.22-sig-compute-realtime

Use /test all to run the following jobs that were automatically triggered:

  • pull-kubevirt-e2e-k8s-1.21-sig-network
  • pull-kubevirt-e2e-k8s-1.21-sig-storage
  • pull-kubevirt-e2e-k8s-1.21-sig-compute
  • pull-kubevirt-e2e-k8s-1.21-operator
  • pull-kubevirt-e2e-k8s-1.20-sig-network
  • pull-kubevirt-e2e-k8s-1.20-sig-compute
  • pull-kubevirt-e2e-k8s-1.20-operator
  • pull-kubevirt-e2e-k8s-1.20-sig-compute-nonroot
  • pull-kubevirt-e2e-k8s-1.20-operator-nonroot
  • pull-kubevirt-e2e-k8s-1.19-sig-network
  • pull-kubevirt-e2e-k8s-1.19-sig-compute
  • pull-kubevirt-e2e-k8s-1.19-operator
  • pull-kubevirt-e2e-windows2016
  • pull-kubevirt-e2e-kind-1.19-sriov
  • pull-kubevirt-e2e-kind-1.19-vgpu
  • pull-kubevirt-check-tests-for-flakes
  • pull-kubevirt-generate
  • pull-kubevirt-build
  • pull-kubevirt-build-arm64
  • pull-kubevirt-unit-test
  • pull-kubevirt-goveralls
  • pull-kubevirt-fossa
  • pull-kubevirt-apidocs
  • pull-kubevirt-client-python
  • pull-kubevirt-manifests
  • pull-kubevirt-prom-rules-verify
  • pull-kubevirt-check-unassigned-tests
  • pull-kubevirt-e2e-k8s-1.22-sig-network
  • pull-kubevirt-e2e-k8s-1.22-sig-storage
  • pull-kubevirt-e2e-k8s-1.22-sig-compute
  • pull-kubevirt-e2e-k8s-1.22-operator

In response to this:

looks like a new flake test:
Tests Suite: [sig-storage] Storage Starting a VirtualMachineInstance with error disk should pause VMI on IO error expand_more
/test pull-kubevirt-e2e-k8s-1.22-sig-storag

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.

@brybacki
Copy link
Contributor Author

brybacki commented Oct 5, 2021

/test pull-kubevirt-e2e-k8s-1.22-sig-storage

@brybacki
Copy link
Contributor Author

brybacki commented Oct 6, 2021

/retest

1 similar comment
@brybacki
Copy link
Contributor Author

brybacki commented Oct 6, 2021

/retest

Copy link
Member

@rmohr rmohr left a comment

Choose a reason for hiding this comment

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

Looks good content-weise but I would encourage to add more unit-tests and e2e tests in this area.

pkg/virtctl/imageupload/imageupload.go Show resolved Hide resolved
@kubevirt-bot kubevirt-bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 12, 2021
@brybacki
Copy link
Contributor Author

/retest

tests/storage/imageupload.go Outdated Show resolved Hide resolved
Signed-off-by: Bartosz Rybacki <brybacki@redhat.com>
Copy link
Member

@rmohr rmohr left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve


Context("Create upload volume with force-bind flag", func() {
DescribeTable("Should succeed", func(resource, targetName string, validateFunc func(string), deleteFunc func(string)) {
defer deleteFunc(targetName)
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if this defer is needed, but it does not hurt either.

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 26, 2021
@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rmohr

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 26, 2021
@kubevirt-bot
Copy link
Contributor

kubevirt-bot commented Oct 26, 2021

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

Test name Commit Details Required Rerun command
pull-kubevirt-e2e-arm64 4261682 link false /test pull-kubevirt-e2e-arm64

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. I understand the commands that are listed here.

@brybacki
Copy link
Contributor Author

/retest

@kubevirt-bot kubevirt-bot merged commit f3e648c into kubevirt:main Oct 26, 2021
@brybacki brybacki deleted the virtctl-force-bind branch October 27, 2021 08:15
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/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants