Skip to content

Allow managers to request host placement#14

Open
squaremo wants to merge 2 commits into
mainfrom
compute-pin-hosts
Open

Allow managers to request host placement#14
squaremo wants to merge 2 commits into
mainfrom
compute-pin-hosts

Conversation

@squaremo

@squaremo squaremo commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Project managers need to request a specific compute host while still letting Nova run scheduler filters. Nova checks the policy requested_destination when a server creation request specifies the host: this is how nscaledev/uni-region#488 gives the UNI region service the ability to boot specific machines.

Ordinary create (also checked by Nova) and start permissions remain covered by Nova defaults.

Project managers need to request a specific compute host while still
letting Nova run scheduler filters.

Grant only the requested-destination server create policy. Ordinary
create and start permissions remain covered by Nova defaults.
@squaremo

squaremo commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

@JohnGarbutt Heads up on this one 🙏

from oslo_policy import policy
from unikorn_openstack_policy import base

SERVER_CREATE_REQUESTED_DESTINATION = 'compute:servers:create:requested_destination'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@JohnGarbutt JohnGarbutt Jun 10, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ah, wait a second, this is a question, requested_destination would be better, what API call are we making?

@squaremo squaremo Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I asked the machine about that and it was very confident that requested_destination was the right way to do it 🤖
Shall I just do both :-)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The region service uses hypervisor_hostname in the compute create request -- should it do something different?

https://github.com/nscaledev/uni-region/pull/488/changes#diff-cfd630f8b6a979b722883511e487b1ed331856727ffc1c062c55907f75ff2303R282

Reservation needs project managers to use Nova's legacy forced-host create policy for the same scoped placement flow already allowed through requested_destination.

Granting that override keeps explicit host placement usable while preserving the inherited Nova admin behavior.
@squaremo squaremo requested a review from JohnGarbutt June 22, 2026 16:02
@squaremo

Copy link
Copy Markdown
Contributor Author

Apologues John, it's the "require rebasing; invalidate reviews when rebased" combo.

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.

2 participants