Skip to content

Commit f72c9a3

Browse files
committed
port: document potential hostID drift when bound to a server
Add a note to the hostID field documentation warning that OpenStack may rebind the port to the server's actual compute host, which may differ from the specified hostID if no matching scheduler hint is used.
1 parent 69a16e6 commit f72c9a3

4 files changed

Lines changed: 14 additions & 4 deletions

File tree

api/v1alpha1/port_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,11 @@ type PortResourceSpec struct {
202202
MACAddress string `json:"macAddress,omitempty"`
203203

204204
// hostID specifies the host where the port will be bound.
205+
// Note that when the port is attached to a server, OpenStack may
206+
// rebind the port to the server's actual compute host, which may
207+
// differ from the specified hostID if no matching scheduler hint
208+
// is used. In this case the port's status will reflect the actual
209+
// binding host, not the value specified here.
205210
// +optional
206211
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="hostID is immutable"
207212
HostID *HostID `json:"hostID,omitempty"`

cmd/models-schema/zz_generated.openapi.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/openstack.k-orc.cloud_ports.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,13 @@ spec:
300300
minLength: 1
301301
type: string
302302
hostID:
303-
description: hostID specifies the host where the port will be
304-
bound.
303+
description: |-
304+
hostID specifies the host where the port will be bound.
305+
Note that when the port is attached to a server, OpenStack may
306+
rebind the port to the server's actual compute host, which may
307+
differ from the specified hostID if no matching scheduler hint
308+
is used. In this case the port's status will reflect the actual
309+
binding host, not the value specified here.
305310
maxProperties: 1
306311
minProperties: 1
307312
properties:

website/docs/crd-reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2207,7 +2207,7 @@ _Appears in:_
22072207
| `portSecurity` _[PortSecurityState](#portsecuritystate)_ | portSecurity controls port security for this port.<br />When set to Enabled, port security is enabled.<br />When set to Disabled, port security is disabled and SecurityGroupRefs must be empty.<br />When set to Inherit (default), it takes the value from the network level. | Inherit | Enum: [Enabled Disabled Inherit] <br /> |
22082208
| `projectRef` _[KubernetesNameRef](#kubernetesnameref)_ | projectRef is a reference to the ORC Project this resource is associated with.<br />Typically, only used by admin. | | MaxLength: 253 <br />MinLength: 1 <br /> |
22092209
| `macAddress` _string_ | macAddress is the MAC address of the port. | | MaxLength: 32 <br /> |
2210-
| `hostID` _[HostID](#hostid)_ | hostID specifies the host where the port will be bound. | | MaxProperties: 1 <br />MinProperties: 1 <br /> |
2210+
| `hostID` _[HostID](#hostid)_ | hostID specifies the host where the port will be bound.<br />Note that when the port is attached to a server, OpenStack may<br />rebind the port to the server's actual compute host, which may<br />differ from the specified hostID if no matching scheduler hint<br />is used. In this case the port's status will reflect the actual<br />binding host, not the value specified here. | | MaxProperties: 1 <br />MinProperties: 1 <br /> |
22112211

22122212

22132213
#### PortResourceStatus

0 commit comments

Comments
 (0)