⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@eshulman2
Copy link
Contributor

Add schedulerHints field with support for:

  • serverGroupRef - schedule server in a server group
  • differentHostServerRefs / sameHostServerRefs - affinity/anti-affinity with other servers
  • query, targetCell, differentCell, buildNearHostIP - advanced placement options
  • additionalProperties - arbitrary scheduler hints

NOTE! this change MOVED the ServerGroupRef inside the ServerSchedulerHints

Copy link
Contributor

@winiciusallan winiciusallan 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 overall! Great job! Just a few comments. Let me know what you think.

@eshulman2 eshulman2 force-pushed the shints branch 10 times, most recently from 7b0df63 to bdf5e4f Compare January 15, 2026 15:10
// will be created in the server group.
// +optional
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="serverGroupRef is immutable"
ServerGroupRef *KubernetesNameRef `json:"serverGroupRef,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree this should move in the ServerSchedulerHints struct, however, have you considered making this change backward compatible? This would require leaving the field at this level, that we mark as deprecated, and add some glue code to copy its value if the field in ServerSchedulerHints is unset.

Perhaps it's also a good time to introduce more backward incompatible changes in preparation for the next major release 🤷

Copy link
Contributor

Choose a reason for hiding this comment

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

I was wondering that too. I think it makes sense. Also, we don't need to wait until the next major for get closer to CAPO parity.

We can create a issue so we don't lose the track.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TBH I wasn't sure what is the best approach myself, I mainly wanted to avoid having to consolidate situations where the field was set in both making it confusing to use those fields. I believe that if we are on the verge of a new major we should keep it non-backward compatible and note that on the release and docs. In case the next major release is further away maybe we should have backward compatibility but I suspect this might be confusing to use and might result in unexpected results for costumers. I tend to lean towards keeping it non-backward compatible but I don't have a strong objections for making it BC either.

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, I can't provide enough feedback here, because I don't know the planned ORC release schedule, but since there are few changes for a new major release, I believe it will take a little longer.

I'll leave it up to both of you.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's see what other potentially breaking changes we need to introduce for the CAPO feature parity work before making a decision.

// buildNearHostIP specifies a subnet of compute nodes to host the server.
// +kubebuilder:validation:MaxLength:=255
// +optional
BuildNearHostIP string `json:"buildNearHostIP,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

According to the docs, this must go together with os:scheduler_hints.cidr:

Schedule the server on a host in the network specified with this parameter and a cidr (os:scheduler_hints.cidr)

However we don't provide this option. Should we instead have a reference to a subnet?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually in Gopher cloud you provide it as 10.10.10.10/24 in one string and gophercloud split it on its own here , so I think in this case we don't require a separate cider field. the user should just provide it as ip/cider I will expend on it in the doc string above to make it clearer.

As this is a host subnet I believe we shouldn't use subnet ref.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Expended doc string let me know if thats ok now

Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think of:

buildNearHost:
  ip: 10.10.10.10
  prefixLength: 24

This allows easier validation, and PrefixLength could be marked as optional (according to the docs, it defauls to 24 if not specified).

Copy link
Contributor Author

@eshulman2 eshulman2 Jan 19, 2026

Choose a reason for hiding this comment

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

by validation you are referring to the prefix length min-max 1-32? or something additional?

To me the cider format feels more intuitive so I personally prefer the cider format. It also saves us from some additional string manipulation as this is how Gophercloud expects to receive it. I would prefer keeping it as it is now.

@eshulman2 eshulman2 force-pushed the shints branch 2 times, most recently from f6e8392 to 8894f8f Compare January 18, 2026 08:00
@eshulman2 eshulman2 requested a review from mandre January 18, 2026 09:12
@eshulman2 eshulman2 force-pushed the shints branch 6 times, most recently from 4bc925c to 54a3ad6 Compare January 19, 2026 10:11
@eshulman2 eshulman2 force-pushed the shints branch 2 times, most recently from ce7d860 to d979876 Compare January 19, 2026 10:55
Copy link
Contributor

@winiciusallan winiciusallan 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 your effort, @eshulman2!

To me, it is very close to a merge state, I just left a comment on the dependency that you added, let me know what you think.

- Add SchedulerHints to server controller
- enable required nova filters for testing hints

NOTE! this change MOVED the ServerGroupRef inside the ServerSchedulerHints
Copy link
Collaborator

@mandre mandre left a comment

Choose a reason for hiding this comment

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

I believe this is almost ready. I would still like to keep this for a little longer in the queue to make up my mind about the breaking/non-breaking change.

// buildNearHostIP specifies a subnet of compute nodes to host the server.
// +kubebuilder:validation:MaxLength:=255
// +optional
BuildNearHostIP string `json:"buildNearHostIP,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think of:

buildNearHost:
  ip: 10.10.10.10
  prefixLength: 24

This allows easier validation, and PrefixLength could be marked as optional (according to the docs, it defauls to 24 if not specified).

// will be created in the server group.
// +optional
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="serverGroupRef is immutable"
ServerGroupRef *KubernetesNameRef `json:"serverGroupRef,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's see what other potentially breaking changes we need to introduce for the CAPO feature parity work before making a decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:major Breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants