Ensure node is rebooted before enabling DPDK
In the PreNetworkConfig, the order of resources sent to os-collect-config
changed after introducing vhost user resource. The current order is
1. HostParametersDeployment
2. DpdkVhostGroupDeployment
3. RebootDeployment and EnableDpdkDeployment
Here the expectation is that RebootDeployment should be completed
before enabling DPDK, but since both are provided at the same time to
os-collect-config, DPDK is enabled first. The reson is RebootDepolyment
is having signal transport as NONE and EnableDpdkDeployment is moved
after reboot because of ovs2.7 change of restart vswitchd, when DPDK is
enabled. This is causing the a failure.
This patch modifies the order as below:
1. HostParametersDeployment and DpdkVhostGroupDeployment
2. RebootDeployment and RebootEnsureDeployment
3. EnableDpdkDeployment
Related-Bug: #1780014
Change-Id: I5db52d5dd833833c989532931baea8fac03f9cb7
(cherry picked from commit f9e099f218
)
This commit is contained in:
parent
af4661905b
commit
6953852295
@ -175,7 +175,6 @@ resources:
|
|||||||
# before starting with DPDK initialization.
|
# before starting with DPDK initialization.
|
||||||
DpdkVhostGroupConfig:
|
DpdkVhostGroupConfig:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::SoftwareConfig
|
||||||
depends_on: HostParametersDeployment
|
|
||||||
condition: is_dpdk_config_required
|
condition: is_dpdk_config_required
|
||||||
properties:
|
properties:
|
||||||
group: ansible
|
group: ansible
|
||||||
@ -193,7 +192,6 @@ resources:
|
|||||||
|
|
||||||
DpdkVhostGroupDeployment:
|
DpdkVhostGroupDeployment:
|
||||||
type: OS::Heat::SoftwareDeployment
|
type: OS::Heat::SoftwareDeployment
|
||||||
depends_on: HostParametersDeployment
|
|
||||||
condition: is_dpdk_config_required
|
condition: is_dpdk_config_required
|
||||||
properties:
|
properties:
|
||||||
name: DpdkVhostGroupDeployment
|
name: DpdkVhostGroupDeployment
|
||||||
@ -207,7 +205,6 @@ resources:
|
|||||||
|
|
||||||
RebootConfig:
|
RebootConfig:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::SoftwareConfig
|
||||||
depends_on: DpdkVhostGroupDeployment
|
|
||||||
condition: is_reboot_config_required
|
condition: is_reboot_config_required
|
||||||
properties:
|
properties:
|
||||||
group: script
|
group: script
|
||||||
@ -220,7 +217,7 @@ resources:
|
|||||||
|
|
||||||
RebootDeployment:
|
RebootDeployment:
|
||||||
type: OS::Heat::SoftwareDeployment
|
type: OS::Heat::SoftwareDeployment
|
||||||
depends_on: DpdkVhostGroupDeployment
|
depends_on: [HostParametersDeployment, DpdkVhostGroupDeployment]
|
||||||
condition: is_reboot_config_required
|
condition: is_reboot_config_required
|
||||||
properties:
|
properties:
|
||||||
name: RebootDeployment
|
name: RebootDeployment
|
||||||
@ -233,6 +230,38 @@ resources:
|
|||||||
- ['CREATE'] # Only do this on CREATE
|
- ['CREATE'] # Only do this on CREATE
|
||||||
signal_transport: NO_SIGNAL
|
signal_transport: NO_SIGNAL
|
||||||
|
|
||||||
|
# For successful RebootDeployment, the signal_transport should be NO_SIGNAL,
|
||||||
|
# which will make the resource as COMPLETE immediately. If the
|
||||||
|
# RebootDeployment is the last resource of the tree, then it will be
|
||||||
|
# synchronized, else the next resource (EnableDpdkDeployment), is also sent
|
||||||
|
# along with RebootDeployment. Because of which sometimes, EnableDpdkDeployment
|
||||||
|
# is executed before rebooting. As hugepages are not set to bootargs (waiting
|
||||||
|
# for reboot), EnableDpdkDeployment will fail. To ensure synchronization,
|
||||||
|
# a dummpy deployment RebootEnsureDeployment has been introduced to wait
|
||||||
|
# for reboot to enable DPDK.
|
||||||
|
RebootEnsureConfig:
|
||||||
|
type: OS::Heat::SoftwareConfig
|
||||||
|
condition: is_reboot_config_required
|
||||||
|
properties:
|
||||||
|
group: script
|
||||||
|
config: |
|
||||||
|
#!/bin/bash
|
||||||
|
echo "Reboot completed"
|
||||||
|
|
||||||
|
RebootEnsureDeployment:
|
||||||
|
type: OS::Heat::SoftwareDeployment
|
||||||
|
depends_on: RebootDeployment
|
||||||
|
condition: is_reboot_config_required
|
||||||
|
properties:
|
||||||
|
name: RebootEnsureDeployment
|
||||||
|
server: {get_param: server}
|
||||||
|
config: {get_resource: RebootEnsureConfig}
|
||||||
|
actions:
|
||||||
|
if:
|
||||||
|
- deployment_actions_empty
|
||||||
|
- []
|
||||||
|
- ['CREATE'] # Only do this on CREATE
|
||||||
|
|
||||||
# With OvS2.7 (which is default with pike), ovs-vswitchd will start dpdk
|
# With OvS2.7 (which is default with pike), ovs-vswitchd will start dpdk
|
||||||
# immediately after setting dpdk-init (behaviour change from ovs2.6).
|
# immediately after setting dpdk-init (behaviour change from ovs2.6).
|
||||||
# Starting of DPDK require the huge page configuration to be enabled. So
|
# Starting of DPDK require the huge page configuration to be enabled. So
|
||||||
@ -242,7 +271,6 @@ resources:
|
|||||||
# maintained, restart of ovs is required.
|
# maintained, restart of ovs is required.
|
||||||
EnableDpdkConfig:
|
EnableDpdkConfig:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::SoftwareConfig
|
||||||
depends_on: RebootDeployment
|
|
||||||
condition: is_dpdk_config_required
|
condition: is_dpdk_config_required
|
||||||
properties:
|
properties:
|
||||||
group: script
|
group: script
|
||||||
@ -299,7 +327,7 @@ resources:
|
|||||||
EnableDpdkDeployment:
|
EnableDpdkDeployment:
|
||||||
type: OS::Heat::SoftwareDeployment
|
type: OS::Heat::SoftwareDeployment
|
||||||
condition: is_dpdk_config_required
|
condition: is_dpdk_config_required
|
||||||
depends_on: RebootDeployment
|
depends_on: RebootEnsureDeployment
|
||||||
properties:
|
properties:
|
||||||
name: EnableDpdkDeployment
|
name: EnableDpdkDeployment
|
||||||
server: {get_param: server}
|
server: {get_param: server}
|
||||||
|
Loading…
Reference in New Issue
Block a user