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

Support to set a specify hostName for a CloneVM #10834

Closed
wants to merge 1 commit into from

Conversation

matthewei
Copy link
Contributor

@matthewei matthewei commented Dec 5, 2023

What this PR does / why we need it:

Sometimes we want to set hostname for CloneVM just as the VM which can be set hostname.

we can realize this function based on the following

kind: VirtualMachineClone
apiVersion: "clone.kubevirt.io/v1alpha1"
metadata:
  name: testclone
spec:
  # target definitions hostname
  hostname: vmclone

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 #10742

Special notes for your reviewer:

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

Release note:

Add the possibility to specify vm target hostname during clone

@kubevirt-bot kubevirt-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: no Indicates the PR's author has not DCO signed all their commits. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Dec 5, 2023
@kubevirt-bot kubevirt-bot added size/M needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 5, 2023
@kubevirt-bot
Copy link
Contributor

Hi @matthewei. Thanks for your PR.

I'm waiting for a kubevirt member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@kubevirt-bot
Copy link
Contributor

[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 assign alonakaplan for approval. 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

@matthewei
Copy link
Contributor Author

I forget to add e2e test and unit-test. I will add it soon.

@matthewei matthewei force-pushed the CloneVMSupportSetHostname branch from 776e88c to d00e7bc Compare December 5, 2023 12:29
@kubevirt-bot kubevirt-bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. and removed dco-signoff: no Indicates the PR's author has not DCO signed all their commits. labels Dec 5, 2023
@alaypatel07
Copy link
Contributor

/cc for api change review

@kubevirt-bot
Copy link
Contributor

@alaypatel07: GitHub didn't allow me to request PR reviews from the following users: change, review, for.

Note that only kubevirt members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc for api change review

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.

@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 7, 2023
@xpivarc
Copy link
Member

xpivarc commented Dec 7, 2023

/cc @alaypatel07

Copy link
Contributor

@alaypatel07 alaypatel07 left a comment

Choose a reason for hiding this comment

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

In terms of API, the changes look good, added couple of nits. Pending tests, this would be a good add to vmclone, thanks @matthewei

api/openapi-spec/swagger.json Outdated Show resolved Hide resolved
@matthewei matthewei force-pushed the CloneVMSupportSetHostname branch from d00e7bc to d296f54 Compare December 26, 2023 04:39
@kubevirt-bot kubevirt-bot added dco-signoff: no Indicates the PR's author has not DCO signed all their commits. size/L and removed dco-signoff: yes Indicates the PR's author has DCO signed all their commits. size/M labels Dec 26, 2023
@matthewei matthewei force-pushed the CloneVMSupportSetHostname branch 2 times, most recently from 543a3a7 to 157119d Compare December 26, 2023 04:43
@iholder101
Copy link
Contributor

@matthewei There are lane failures. For example, the unit tests lane says:

pkg/virt-api/webhooks/validating-webhook/admitters/vmclone-admitter_test.go:409:28: cannot use "test" (untyped string constant) as *string value in assignment
pkg/virt-api/webhooks/validating-webhook/admitters/vmclone-admitter_test.go:414:28: cannot use "test+bad" (untyped string constant) as *string value in assignment

Can you please to build and test locally? To do so:

  • Run make
  • Run make test
  • Optional: change Describe to FDescribe here and run make cluster-up && make cluster-sync && make functest
    var _ = Describe("[Serial]VirtualMachineClone Tests", Serial, func() {

@matthewei
Copy link
Contributor Author

@matthewei There are lane failures. For example, the unit tests lane says:

pkg/virt-api/webhooks/validating-webhook/admitters/vmclone-admitter_test.go:409:28: cannot use "test" (untyped string constant) as *string value in assignment
pkg/virt-api/webhooks/validating-webhook/admitters/vmclone-admitter_test.go:414:28: cannot use "test+bad" (untyped string constant) as *string value in assignment

Can you please to build and test locally? To do so:

  • Run make
  • Run make test
  • Optional: change Describe to FDescribe here and run make cluster-up && make cluster-sync && make functest
    var _ = Describe("[Serial]VirtualMachineClone Tests", Serial, func() {

OK, will do it

@matthewei
Copy link
Contributor Author

@matthewei There are lane failures. For example, the unit tests lane says:

pkg/virt-api/webhooks/validating-webhook/admitters/vmclone-admitter_test.go:409:28: cannot use "test" (untyped string constant) as *string value in assignment
pkg/virt-api/webhooks/validating-webhook/admitters/vmclone-admitter_test.go:414:28: cannot use "test+bad" (untyped string constant) as *string value in assignment

Can you please to build and test locally? To do so:

  • Run make
  • Run make test
  • Optional: change Describe to FDescribe here and run make cluster-up && make cluster-sync && make functest
    var _ = Describe("[Serial]VirtualMachineClone Tests", Serial, func() {

Hi, I got the following errors,Could you give me a hand?
image

@iholder101
Copy link
Contributor

@matthewei you probably need to deploy storage to the cluster. Try:

> export KUBEVIRT_STORAGE=rook-ceph-default
> make cluster-up && make cluster-sync

@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 28, 2024
@matthewei
Copy link
Contributor Author

make cluster-up && make cluster-sync

ok , Come back and ready going on it

@matthewei matthewei force-pushed the CloneVMSupportSetHostname branch from 6c960f4 to 969c17d Compare June 5, 2024 06:44
@kubevirt-bot kubevirt-bot added size/M and removed size/L needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 5, 2024
@matthewei matthewei force-pushed the CloneVMSupportSetHostname branch 2 times, most recently from 0a6da2b to 58afafd Compare June 5, 2024 07:21
@kubevirt-bot kubevirt-bot added size/L and removed size/M labels Jun 5, 2024
Signed-off-by: shenwei <shenwei_yewu@cmss.chinamobile.com>
@matthewei matthewei force-pushed the CloneVMSupportSetHostname branch from 58afafd to 1aad167 Compare June 5, 2024 07:43
@matthewei
Copy link
Contributor Author

@iholder101 If I want to exec the command test all. How can i realize it?

@iholder101
Copy link
Contributor

iholder101 commented Jun 9, 2024

@iholder101 If I want to exec the command test all. How can i realize it?

In order to do so you need to be a community member.
Let me help you with that.

/test pull-kubevirt-build
/test pull-kubevirt-unit-test
/test pull-kubevirt-e2e-k8s-1.30-sig-compute
/test pull-kubevirt-e2e-k8s-1.30-sig-compute

I also suggest to try and building, running unit tests, and preferably running some functional tests locally before triggering CI.

@kubevirt-bot
Copy link
Contributor

@matthewei: 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
pull-kubevirt-e2e-k8s-1.29-sig-compute 4a1d770 link true /test pull-kubevirt-e2e-k8s-1.29-sig-compute
pull-kubevirt-unit-test-arm64 6c960f4 link false /test pull-kubevirt-unit-test-arm64
pull-kubevirt-code-lint 6c960f4 link true /test pull-kubevirt-code-lint
pull-kubevirt-goveralls 6c960f4 link false /test pull-kubevirt-goveralls
pull-kubevirt-unit-test 1aad167 link true /test pull-kubevirt-unit-test

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.

@kubevirt-bot
Copy link
Contributor

PR needs rebase.

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.

@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 31, 2024
@kubevirt-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@kubevirt-bot kubevirt-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 29, 2024
@kubevirt-bot
Copy link
Contributor

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten

@kubevirt-bot kubevirt-bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Nov 28, 2024
@iholder101
Copy link
Contributor

Are you still interested in pushing this forward? @matthewei

@kubevirt-bot
Copy link
Contributor

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

@kubevirt-bot
Copy link
Contributor

@kubevirt-bot: Closed this PR.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/buildsystem Denotes an issue or PR that relates to changes in the build system. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support to set a specify hostName for a CloneVM
8 participants