Skip to content

Conversation

jcpowermac
Copy link
Contributor

@jcpowermac jcpowermac commented Aug 14, 2025

What this PR does / why we need it:

This commit sets failureDomain string defaulting to
machine.Spec.FailureDomain. If failureDomain
is an empty string then vsphereMachine.Spec.FailureDomain is
checked for nil, if defined failureDomain is set
to vsphereMachine.Spec.FailureDomain.

This resolves an issue where virtual machines are not placed
within vm-host groups in a timely
manner causing misplacement in the topology.

Fixes #3575

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 14, 2025
@k8s-ci-robot
Copy link
Contributor

Welcome @jcpowermac!

It looks like this is your first PR to kubernetes-sigs/cluster-api-provider-vsphere 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/cluster-api-provider-vsphere has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 14, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @jcpowermac. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 14, 2025
@jcpowermac jcpowermac changed the title fix: use vsphereMachine instead of machine for fd 🐛 fix: use vsphereMachine instead of machine for fd Aug 14, 2025
@rvanderp3
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 14, 2025
@rvanderp3
Copy link
Contributor

/lgtm

/assign @sbueringer

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 14, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 29283286600b1e3b812f33127e495556fc7d4a05

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 15, 2025
@jcpowermac jcpowermac changed the title 🐛 fix: use vsphereMachine instead of machine for fd 🐛 fix: set machine spec failuredomain string if not defined Aug 15, 2025
This commit sets failureDomain string defaulting to
`machine.Spec.FailureDomain`. If failureDomain
is an empty string then `vsphereMachine.Spec.FailureDomain` is
checked for nil, if defined `failureDomain` is set
to `vsphereMachine.Spec.FailureDomain`.

This resolves an issue where virtual machines are not placed
within vm-host groups in a timely
manner causing misplacement in the topology.
@jcpowermac
Copy link
Contributor Author

@chrischdi @sbueringer updated per comments ptal, thanks!

Copy link
Member

@chrischdi chrischdi 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

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 21, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 703f4d802e96bfb1b8c05d1eae9d5e9398b4156d

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrischdi

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 21, 2025
@chrischdi
Copy link
Member

Thanks for bringing this up 🎉

@sbueringer
Copy link
Member

/lgtm

@sbueringer
Copy link
Member

/cherry-pick release-1.14

@k8s-infra-cherrypick-robot

@sbueringer: once the present PR merges, I will cherry-pick it on top of release-1.14 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.14

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.

@k8s-ci-robot k8s-ci-robot merged commit aaf2163 into kubernetes-sigs:main Aug 21, 2025
21 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.15 milestone Aug 21, 2025
@k8s-infra-cherrypick-robot

@sbueringer: new pull request created: #3587

In response to this:

/cherry-pick release-1.14

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.

@chrischdi
Copy link
Member

/retitle 🐛 fix: use machine's .spec.failureDomain with fallback to vspheremachine's .spec.failureDomain if not defined

@k8s-ci-robot k8s-ci-robot changed the title 🐛 fix: set machine spec failuredomain string if not defined 🐛 fix: use machine's .spec.failureDomain with fallback to vspheremachine's .spec.failureDomain if not defined Aug 21, 2025
@chrischdi
Copy link
Member

/cherry-pick release-1.13

@chrischdi
Copy link
Member

/cherry-pick release-1.12

@k8s-infra-cherrypick-robot

@chrischdi: #3576 failed to apply on top of branch "release-1.13":

Applying: fix: use vspheremachine fd if machine is empty
Using index info to reconstruct a base tree...
M	controllers/vspherevm_controller.go
Falling back to patching base and 3-way merge...
Auto-merging controllers/vspherevm_controller.go
CONFLICT (content): Merge conflict in controllers/vspherevm_controller.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 fix: use vspheremachine fd if machine is empty

In response to this:

/cherry-pick release-1.13

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.

@k8s-infra-cherrypick-robot

@chrischdi: #3576 failed to apply on top of branch "release-1.12":

Applying: fix: use vspheremachine fd if machine is empty
Using index info to reconstruct a base tree...
M	controllers/vspherevm_controller.go
Falling back to patching base and 3-way merge...
Auto-merging controllers/vspherevm_controller.go
CONFLICT (content): Merge conflict in controllers/vspherevm_controller.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 fix: use vspheremachine fd if machine is empty

In response to this:

/cherry-pick release-1.12

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
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding a VM to a vm-host group is racy
6 participants