Open bensmrs opened 1 week ago
How to lock an instance to a specific node in a cluster, without creating a dedicated project attached to a dedicated group?
Easiest way to do this would be to use --target
during creation and then set cluster.evacuate
to stop
so it never gets migrated away during evacuation or recovery.
Could the instance placement scriptlet be modified so that it includes an optional parameter (or request property)
target
containing the requested migration target, allowing us to callfail
depending on different decision factors? (I can work on this one)
I think that starting with Incus 6.6 we call the scriptlet even with --target=NAME
so that should let you perform your check there.
As for failing, you should be able to either call the fail
function or do return "Placement rejected"
which will also be treated as an error.
Marking as incomplete as we may not have anything to add to Incus for that.
Instance placement scriptlets offer interesting ways to control how instances are placed on cluster nodes. While creation, relocation (due to a node being down), and evacuation are handled, there is to the best of my knowledge no way to block a migration to an unwanted cluster node. So I have two questions:
target
containing the requested migration target, allowing us to callfail
depending on different decision factors? (I can work on this one)