Skip to content

Commit e49fa5d

Browse files
committed
MGMT-24243: Add option for a delay when applying static network config on minimal ISO
A delay can be used on hosts that need time to discover their NICs. The delay can be set per infra-env, to specify how many second to wait before mapping host MACs to interfaces. If it's not set then the delay will be the value of an environment variable with the default value being 0. MCE users can set that environment variable to configure a default delay.
1 parent 21da507 commit e49fa5d

28 files changed

Lines changed: 540 additions & 35 deletions

api/v1beta1/infraenv_types.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,13 @@ type InfraEnvSpec struct {
152152
// discovered by this InfraEnv.
153153
// +optional
154154
AgentApproval *AgentApproval `json:"agentApproval,omitempty"`
155+
156+
// NetworkDiscoveryDelaySeconds is the number of seconds to wait before mapping host MACs
157+
// to interfaces when applying static network config on minimal ISO.
158+
// This can be used on hosts that need time to discover their NICs.
159+
// +optional
160+
// +kubebuilder:validation:Minimum=0
161+
NetworkDiscoveryDelaySeconds *int64 `json:"networkDiscoveryDelaySeconds,omitempty"`
155162
}
156163

157164
// AgentApproval defines configuration for automatic approval of Agents

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/vendor/github.com/openshift/assisted-service/models/infra_env.go

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/vendor/github.com/openshift/assisted-service/models/infra_env_create_params.go

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/vendor/github.com/openshift/assisted-service/models/infra_env_update_params.go

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/vendor/github.com/openshift/assisted-service/models/infra_env.go

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/vendor/github.com/openshift/assisted-service/models/infra_env_create_params.go

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/vendor/github.com/openshift/assisted-service/models/infra_env_update_params.go

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/agent-install.openshift.io_infraenvs.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,14 @@ spec:
182182
- name
183183
- namespace
184184
type: object
185+
networkDiscoveryDelaySeconds:
186+
description: |-
187+
NetworkDiscoveryDelaySeconds is the number of seconds to wait before mapping host MACs
188+
to interfaces when applying static network config on minimal ISO.
189+
This can be used on hosts that need time to discover their NICs.
190+
format: int64
191+
minimum: 0
192+
type: integer
185193
nmStateConfigLabelSelector:
186194
description: |-
187195
NMStateConfigLabelSelector uses label matching to associate NMStateConfig resources with this InfraEnv.

config/crd/resources.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3357,6 +3357,14 @@ spec:
33573357
- name
33583358
- namespace
33593359
type: object
3360+
networkDiscoveryDelaySeconds:
3361+
description: |-
3362+
NetworkDiscoveryDelaySeconds is the number of seconds to wait before mapping host MACs
3363+
to interfaces when applying static network config on minimal ISO.
3364+
This can be used on hosts that need time to discover their NICs.
3365+
format: int64
3366+
minimum: 0
3367+
type: integer
33603368
nmStateConfigLabelSelector:
33613369
description: |-
33623370
NMStateConfigLabelSelector uses label matching to associate NMStateConfig resources with this InfraEnv.

0 commit comments

Comments
 (0)