From ad5dc5ca60b2b0bf72ec5415f330febed013f351 Mon Sep 17 00:00:00 2001 From: Saravanan KR Date: Wed, 20 Feb 2019 10:58:10 +0530 Subject: [PATCH] Remove unused resources of PreNetworkConfig for NFV With config-download as only supported mechanism, remove the stack based deployments (which are already replaced with ansible base service BootParams). Change-Id: I7ca8189432adf64922bd74dc0bceb84a5b297390 --- .../disable-config-download-environment.yaml | 5 - .../pre_network/host_config_and_reboot.yaml | 184 ------------------ overcloud-resource-registry-puppet.j2.yaml | 2 - 3 files changed, 191 deletions(-) diff --git a/environments/disable-config-download-environment.yaml b/environments/disable-config-download-environment.yaml index 283c17bb5f..06f52f2904 100644 --- a/environments/disable-config-download-environment.yaml +++ b/environments/disable-config-download-environment.yaml @@ -4,8 +4,3 @@ resource_registry: OS::TripleO::Ssh::HostPubKey: ../extraconfig/tasks/ssh/host_public_key.yaml OS::TripleO::Ssh::KnownHostsDeployment: OS::Heat::StructuredDeployments OS::TripleO::DeploymentSteps: OS::Heat::StructuredDeploymentGroup - - # Used only for config-download deployment, for non-config-download deployment, - # PreNetworkConfig (host-config-and-reboot.yaml) stack will handle it. - OS::TripleO::Services::BootParams: OS::Heat::None - OS::TripleO::Reboot::SoftwareDeployment: OS::TripleO::SoftwareDeployment diff --git a/extraconfig/pre_network/host_config_and_reboot.yaml b/extraconfig/pre_network/host_config_and_reboot.yaml index 06b138abf4..bd9687e3ea 100644 --- a/extraconfig/pre_network/host_config_and_reboot.yaml +++ b/extraconfig/pre_network/host_config_and_reboot.yaml @@ -1,7 +1,3 @@ -# DEPRECATED: The following template is deprecated in Queens in favor of -# extraconfig/pre_network/boot-params-service.yaml. This template does not work -# with config-download and will be removed during the Stein release. - heat_template_version: rocky description: > @@ -84,30 +80,8 @@ parameters: config during an upgrade. By default DPDK will be enabled during the CREATE action only. But on cases when it requires for certain migration, it may be required to run it for UPDATE action too. - KernelArgs: - default: "" - type: string - description: Kernel Args to apply to the host - tags: - - role_specific - TunedProfileName: - default: "" - type: string - description: Tuned Profile to apply to the host - tags: - - role_specific - IsolCpusList: - default: "" - type: string - description: > - List of logical CPU ids whic need to be isolated from the host processes. - This input is provided to the tuned profile cpu-partitioning to configure - systemd and repin interrupts (IRQ repinning). - tags: - - role_specific conditions: - is_host_config_required: {not: {equals: [{get_param: [RoleParameters, KernelArgs]}, ""]}} is_dpdk_config_required: or: - yaql: @@ -115,10 +89,6 @@ conditions: data: service_names: {get_param: ServiceNames} - {equals: [{get_param: [RoleParameters, OvsEnableDpdk]}, true]} - is_reboot_config_required: - or: - - is_host_config_required - - is_dpdk_config_required deployment_actions_empty: equals: - {get_param: deployment_actions} @@ -143,142 +113,6 @@ resources: OvsDpdkSocketMemory: {get_param: OvsDpdkSocketMemory} OvsPmdCoreList: {get_param: OvsPmdCoreList} - HostParametersConfig: - type: OS::Heat::SoftwareConfig - condition: is_host_config_required - properties: - group: ansible - inputs: - - name: _KERNEL_ARGS_ - - name: _TUNED_PROFILE_NAME_ - - name: _TUNED_CORES_ - outputs: - - name: result - config: - str_replace: - template: | - --- - - name: Configuration to be applied before rebooting the node - connection: local - hosts: localhost - tasks: - _HOST_CONFIG_TASKS_ - params: - _HOST_CONFIG_TASKS_: - get_file: boot_param_tasks.yaml - - HostParametersDeployment: - type: OS::TripleO::Reboot::SoftwareDeployment - condition: is_host_config_required - properties: - name: HostParametersDeployment - server: {get_param: server} - config: {get_resource: HostParametersConfig} - actions: - if: - - deployment_actions_empty - - [] - - ['CREATE'] # Only do this on CREATE - input_values: - _KERNEL_ARGS_: {get_param: [RoleParameters, KernelArgs]} - _TUNED_PROFILE_NAME_: {get_param: [RoleParameters, TunedProfileName]} - _TUNED_CORES_: {get_param: [RoleParameters, IsolCpusList]} - - # Details @https://bugzilla.redhat.com/show_bug.cgi?id=1515269 - # Ensure gid of hugetlbfs matching with kolla so that container deployment - # and baremetal (future migrating to container) deployment have same id. This - # is a new group created from ovs2.8 onwards. 42477 is the kolla hugetlbfs - # gid value. Ensure that it is applied and restart(ovs) or reboot(host) - # before starting with DPDK initialization. - DpdkVhostGroupConfig: - type: OS::Heat::SoftwareConfig - condition: is_dpdk_config_required - properties: - group: ansible - outputs: - - name: result - config: | - --- - - hosts: localhost - connection: local - gather_facts: False - tasks: - - group: - name: "hugetlbfs" - gid: 42477 - - DpdkVhostGroupDeployment: - type: OS::TripleO::Reboot::SoftwareDeployment - condition: is_dpdk_config_required - properties: - name: DpdkVhostGroupDeployment - server: {get_param: server} - config: {get_resource: DpdkVhostGroupConfig} - actions: - if: - - deployment_actions_empty - - [] - - ['CREATE'] # Only do this on CREATE - - RebootConfig: - type: OS::Heat::SoftwareConfig - condition: is_reboot_config_required - properties: - group: script - config: | - #!/bin/bash - # Stop os-collect-config to avoid any race collecting another - # deployment before reboot happens - systemctl stop os-collect-config.service - /sbin/reboot - - RebootDeployment: - type: OS::TripleO::Reboot::SoftwareDeployment - depends_on: [HostParametersDeployment, DpdkVhostGroupDeployment] - condition: is_reboot_config_required - properties: - name: RebootDeployment - server: {get_param: server} - config: {get_resource: RebootConfig} - actions: - if: - - deployment_actions_empty - - [] - - ['CREATE'] # Only do this on CREATE - 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::TripleO::Reboot::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 # immediately after setting dpdk-init (behaviour change from ovs2.6). # Starting of DPDK require the huge page configuration to be enabled. So @@ -317,7 +151,6 @@ resources: EnableDpdkDeployment: type: OS::Heat::SoftwareDeployment condition: is_dpdk_config_required - depends_on: RebootEnsureDeployment properties: name: EnableDpdkDeployment server: {get_param: server} @@ -328,20 +161,3 @@ resources: - [] - {get_param: EnableDpdkDeploymentActions} -outputs: - result: - condition: is_host_config_required - value: - get_attr: [HostParametersDeployment, result] - stdout: - condition: is_host_config_required - value: - get_attr: [HostParametersDeployment, deploy_stdout] - stderr: - condition: is_host_config_required - value: - get_attr: [HostParametersDeployment, deploy_stderr] - status_code: - condition: is_host_config_required - value: - get_attr: [HostParametersDeployment, deploy_status_code] diff --git a/overcloud-resource-registry-puppet.j2.yaml b/overcloud-resource-registry-puppet.j2.yaml index df8e0c9c11..a2dbe27f97 100644 --- a/overcloud-resource-registry-puppet.j2.yaml +++ b/overcloud-resource-registry-puppet.j2.yaml @@ -13,8 +13,6 @@ resource_registry: OS::TripleO::DefaultPasswords: default_passwords.yaml OS::TripleO::RandomString: OS::Heat::RandomString - OS::TripleO::Reboot::SoftwareDeployment: OS::Heat::None - {% for role in roles %} OS::TripleO::{{role.name}}::PreNetworkConfig: OS::Heat::None OS::TripleO::{{role.name}}PostDeploySteps: common/post.yaml