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

vm-import-controller enhancements #31

Merged
merged 3 commits into from
Aug 2, 2024

Conversation

ibrokethecloud
Copy link
Collaborator

@ibrokethecloud ibrokethecloud commented May 24, 2024

PR introduces changes to vm import controller to improve the following:

  • change behaviour of vm-import-controller to disable retry for failed vm-import-controller requests if export VM fails. This is to avoid triggering multiple exports on source environment
  • allow definition of custom storage classes when specifying virtualmachineimports
  • detect source virtual machine disk bus types and try and use similar bus on harvester
  • detect firmware settings and accordingly setup bios/uefi/secure boot/tpm in harvester
  • update govmomi to latest version
  • update gophercloud to latest version
  • update openstack snapshot readiness interval to 2hrs, as this can take longer for larger images
  • change how vmware client closes the export lease to ensure the export does not timeout

IMPORTANT: Please do not create a Pull Request without creating an issue first.

Problem:

Solution:

Related Issue:
harvester/harvester#5758

Test plan:

…xport from source fails to stop rather than keep trying

added more debug info

close lease earlier

stage vmware migration improvements

improve openstack migration to check uefi/tpm/secureboot from associated image

improve firmware lookup for openstack, and add ability to specify custom storage classes

fix storage class caching issue

drop need for sync

fix imports
fixed dapper builds and default bus type on vmware
Copy link

@Yu-Jack Yu-Jack left a comment

Choose a reason for hiding this comment

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

Thanks for bump the harvester to fix the honestbee issue.

pkg/controllers/migration/virtualmachine.go Show resolved Hide resolved
pkg/controllers/migration/virtualmachine.go Show resolved Hide resolved
pkg/source/openstack/client.go Show resolved Hide resolved
pkg/source/openstack/client.go Outdated Show resolved Hide resolved
pkg/source/openstack/client.go Outdated Show resolved Hide resolved
pkg/source/vmware/client.go Show resolved Hide resolved
pkg/source/openstack/client.go Show resolved Hide resolved
Copy link

@Yu-Jack Yu-Jack left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@starbops starbops left a comment

Choose a reason for hiding this comment

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

Generally LGTM, just need you to help fix some typos. Also, we need to update the chart as the controller complains about it cannot list & watch StorageClass:

W0801 07:41:36.080694       1 reflector.go:424] pkg/mod/k8s.io/client-go@v0.26.4/tools/cache/reflector.go:169: failed to list *v1.StorageClass: storageclasses.storage.k8s.io is forbidden: User "system:serviceaccount:harvester-system:harvester-vm-import-controller" cannot list resource "storageclasses" in API group "storage.k8s.io" at the cluster scope
E0801 07:41:36.080716       1 reflector.go:140] pkg/mod/k8s.io/client-go@v0.26.4/tools/cache/reflector.go:169: Failed to watch *v1.StorageClass: failed to list *v1.StorageClass: storageclasses.storage.k8s.io is forbidden: User "system:serviceaccount:harvester-system:harvester-vm-import-controller" cannot list resource "storageclasses" in API group "storage.k8s.io" at the cluster scope

Thank you!

pkg/controllers/controllers.go Outdated Show resolved Hide resolved
pkg/controllers/migration/virtualmachine.go Show resolved Hide resolved
@ibrokethecloud ibrokethecloud merged commit acd5fce into harvester:main Aug 2, 2024
3 checks passed
@ibrokethecloud
Copy link
Collaborator Author

@Mergifyio backport v1.3

1 similar comment
@ibrokethecloud
Copy link
Collaborator Author

@Mergifyio backport v1.3

Copy link

mergify bot commented Aug 7, 2024

backport v1.3

✅ Backports have been created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants