Add a note about force_hosts only ever having a single value
The fact force_hosts and force_nodes are lists in the
scheduler filter properties and RequestSpec object is really
confusing when you actually look at what populates those lists,
which is a single value from the API when specifying an
availability zone during server create:
nova boot .. --availability-zone ZONE:HOST:NODE
You can only have at most one host or node to force the
server build. It appears the confusion was originally
introduced way back in Essex with this change:
16ea348a16
Maybe that was for future proofing, or maybe it was
somehow related to pre-Essex features, or simply a typo,
we don't really know. But what's clear is you can't
provide a list of hosts to force the server build onto
via the compute REST API, at least not with vanilla
unmodified Nova.
This change just adds some comments to the RequestSpec
object so that future generations trying to sort this
out don't have to stumble along as much as I did.
Change-Id: I5d17fb04de22f680fe9a6cbc1e06e946abfc5aff
This commit is contained in:
parent
e611116e58
commit
f5d0acfa67
|
@ -55,7 +55,13 @@ class RequestSpec(base.NovaObject):
|
|||
'flavor': fields.ObjectField('Flavor', nullable=False),
|
||||
'num_instances': fields.IntegerField(default=1),
|
||||
'ignore_hosts': fields.ListOfStringsField(nullable=True),
|
||||
# NOTE(mriedem): In reality, you can only ever have one
|
||||
# host in the force_hosts list. The fact this is a list
|
||||
# is a mistake perpetuated over time.
|
||||
'force_hosts': fields.ListOfStringsField(nullable=True),
|
||||
# NOTE(mriedem): In reality, you can only ever have one
|
||||
# node in the force_nodes list. The fact this is a list
|
||||
# is a mistake perpetuated over time.
|
||||
'force_nodes': fields.ListOfStringsField(nullable=True),
|
||||
'requested_destination': fields.ObjectField('Destination',
|
||||
nullable=True,
|
||||
|
|
Loading…
Reference in New Issue