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 new annotation behavior on storage network #1596

Conversation

albinsun
Copy link
Contributor

@albinsun albinsun commented Oct 15, 2024

Which issue(s) this PR fixes

Issue #1566

Why we need it

  1. Compare to longhorn-v1.6.2, longhorn-v1.7.1 behaves a bit different about the instance-manager's annotation when storage-network is disabled.
  2. This behavior change breaks some test cases includes:
    • test_0_storage_network.py::test_storage_network
    • TestImageWithStorageNetwork::test_delete_image::teardown
    • TestVMWithStorageNetwork::test_enable_storage_network_with_api_stopped_vm::teardown
    • TestVMWithStorageNetwork::test_enable_storage_network_with_cli_stopped_vm::teardown
  3. Longhorn mainly controls k8s.v1.cni.cncf.io/networks but not k8s.v1.cni.cncf.io/network-status. However we still need to check the latter for address.

What this PR does

  1. Add checking on k8s.v1.cni.cncf.io/networks annotation for storage-network enable/disable status.
  2. Keep existed checking on k8s.v1.cni.cncf.io/network-status but only for address and name validation when enabling storage-network.
  3. This fix is compatible with longhorn-v1.6.2 (harvester-v1.3.2).

Special notes for your reviewer

Validation

  • harvester-install-and-test/72

    3 fails are due to single node cluster does not support VM migration.

    image

  • local ipxe-example
    image

Additional documentation or context

n/a

@albinsun albinsun changed the title Support new longhorn behavior on storage network Support new annotation behavior on storage network Oct 15, 2024
@albinsun albinsun marked this pull request as ready for review October 15, 2024 12:30
@lanfon72
Copy link
Member

@albinsun please test this on v1.2 and v1.3 accordingly.

@albinsun
Copy link
Contributor Author

@albinsun please test this on v1.2 and v1.3 accordingly.

  • v1.3.2 (harvester-install-and-test/73)
    image

  • v1.2.2 (harvester-install-and-test/74)
    image

Copy link
Member

@lanfon72 lanfon72 left a comment

Choose a reason for hiding this comment

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

LGTM

@khushboo-rancher khushboo-rancher merged commit 506325c into harvester:main Oct 16, 2024
4 checks passed
@albinsun albinsun deleted the update_storage_network_target_annotation branch October 17, 2024 02:01
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