From 170cd2be9d7003789654f85d36a6b613670ebfb3 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Fri, 12 Apr 2019 12:08:31 -0400 Subject: [PATCH] Allow to disable Container Healthchecks A new parameter, ContainerHealthcheckDisabled allows an operator to disable the container healthcheck when Podman is enabled. Depends-On: Ic3dd492405b11ec482ff86e1513149c3eceb370f Change-Id: Id8d7e21d58cf5ab155404db597d96665b94d7c2a --- common/deploy-steps-tasks.yaml | 2 ++ common/deploy-steps.j2 | 20 +++++++++++++++++++ ...healthcheck_disabled-7e67b45cda9afb17.yaml | 5 +++++ 3 files changed, 27 insertions(+) create mode 100644 releasenotes/notes/healthcheck_disabled-7e67b45cda9afb17.yaml diff --git a/common/deploy-steps-tasks.yaml b/common/deploy-steps-tasks.yaml index 66a9fe7c22..e8f1efe4f1 100644 --- a/common/deploy-steps-tasks.yaml +++ b/common/deploy-steps-tasks.yaml @@ -436,6 +436,7 @@ STARTUP_CONFIG_PATTERN: '/var/lib/tripleo-config/{{ ansible_check_mode | ternary("check-mode/", "") }}container-startup-config-step_*.json' MOUNT_HOST_PUPPET: '{{docker_puppet_mount_host_puppet | default(true)}}' CONTAINER_LOG_STDOUT_PATH: "{{ container_log_stdout_path }}" + CONTAINER_HEALTHCHECK_DISABLED: "{{ container_healthcheck_disabled }}" when: step == "1" changed_when: false check_mode: no @@ -494,6 +495,7 @@ paunch {% if enable_debug|bool %}--debug{% else %}-v{% endif %} apply --default-runtime "{{ container_cli }}" --container-log-path "{{ container_log_stdout_path }}" + {% if container_healthcheck_disabled|bool and container_cli == 'podman' %}--healthcheck-disabled{% endif %} --file /var/lib/tripleo-config/hashed-container-startup-config-step_{{ step }}.json --config-id tripleo_step{{ step }} --managed-by tripleo-{{ tripleo_role_name }} changed_when: false diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index 4fd036a47d..2f5d5be143 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -94,6 +94,10 @@ parameters: type: string description: Absolute path for container stdout output (Podman only) default: /var/log/containers/stdouts + ContainerHealthcheckDisabled: + type: boolean + description: Whether or not we disable the container healthcheck. + default: false SELinuxMode: default: 'enforcing' description: Configures SELinux mode @@ -246,6 +250,7 @@ outputs: ENABLE_PUPPET: {get_param: EnablePuppet} CONTAINER_CLI: {get_param: ContainerCli} CONTAINER_LOG_STDOUT_PATH: {get_param: ContainerLogStdoutPath} + CONTAINER_HEALTHCHECK_DISABLED: {get_param: ContainerHealthcheckDisabled} DOCKER_PUPPET_DEBUG: {get_param: DockerPuppetDebug} DOCKER_PUPPET_PROCESS_COUNT: {get_param: DockerPuppetProcessCount} DOCKER_PUPPET_MOUNT_HOST_PUPPET: {get_param: DockerPuppetMountHostPuppet} @@ -303,6 +308,7 @@ outputs: enable_puppet: ENABLE_PUPPET container_cli: CONTAINER_CLI container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH + container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED docker_puppet_debug: DOCKER_PUPPET_DEBUG docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET @@ -346,6 +352,7 @@ outputs: enable_puppet: ENABLE_PUPPET container_cli: CONTAINER_CLI container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH + container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED docker_puppet_debug: DOCKER_PUPPET_DEBUG docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET @@ -373,6 +380,7 @@ outputs: enable_puppet: ENABLE_PUPPET container_cli: CONTAINER_CLI container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH + container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED docker_puppet_debug: DOCKER_PUPPET_DEBUG docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET @@ -398,6 +406,7 @@ outputs: enable_puppet: ENABLE_PUPPET container_cli: CONTAINER_CLI container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH + container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED docker_puppet_debug: DOCKER_PUPPET_DEBUG docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET @@ -423,6 +432,7 @@ outputs: enable_puppet: ENABLE_PUPPET container_cli: CONTAINER_CLI container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH + container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED docker_puppet_debug: DOCKER_PUPPET_DEBUG docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET @@ -465,6 +475,7 @@ outputs: enable_puppet: ENABLE_PUPPET container_cli: CONTAINER_CLI container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH + container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED docker_puppet_debug: DOCKER_PUPPET_DEBUG docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET @@ -489,6 +500,7 @@ outputs: DEPLOY_TARGET_HOST: {get_param: deployment_target_hosts} CONTAINER_CLI: {get_param: ContainerCli} CONTAINER_LOG_STDOUT_PATH: {get_param: ContainerLogStdoutPath} + CONTAINER_HEALTHCHECK_DISABLED: {get_param: ContainerHealthcheckDisabled} DEPLOY_IDENTIFIER: {get_param: DeployIdentifier} BOOTSTRAP_SERVER_ID: {get_attr: [BootstrapServerId, value]} ENABLE_DEBUG: {get_param: ConfigDebug} @@ -521,6 +533,7 @@ outputs: enable_puppet: ENABLE_PUPPET container_cli: CONTAINER_CLI container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH + container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED docker_puppet_debug: DOCKER_PUPPET_DEBUG docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET @@ -652,6 +665,7 @@ outputs: DEPLOY_TARGET_HOST: {get_param: deployment_target_hosts} CONTAINER_CLI: {get_param: ContainerCli} CONTAINER_LOG_STDOUT_PATH: {get_param: ContainerLogStdoutPath} + CONTAINER_HEALTHCHECK_DISABLED: {get_param: ContainerHealthcheckDisabled} DEPLOY_IDENTIFIER: {get_param: DeployIdentifier} BOOTSTRAP_SERVER_ID: {get_attr: [BootstrapServerId, value]} ENABLE_DEBUG: {get_param: ConfigDebug} @@ -672,6 +686,7 @@ outputs: enable_puppet: ENABLE_PUPPET container_cli: CONTAINER_CLI container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH + container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED docker_puppet_debug: DOCKER_PUPPET_DEBUG docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET @@ -690,6 +705,7 @@ outputs: DEPLOY_TARGET_HOST: {get_param: deployment_target_hosts} CONTAINER_CLI: {get_param: ContainerCli} CONTAINER_LOG_STDOUT_PATH: {get_param: ContainerLogStdoutPath} + CONTAINER_HEALTHCHECK_DISABLED: {get_param: ContainerHealthcheckDisabled} DEPLOY_IDENTIFIER: {get_param: DeployIdentifier} BOOTSTRAP_SERVER_ID: {get_attr: [BootstrapServerId, value]} ENABLE_DEBUG: {get_param: ConfigDebug} @@ -710,6 +726,7 @@ outputs: enable_puppet: ENABLE_PUPPET container_cli: CONTAINER_CLI container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH + container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED docker_puppet_debug: DOCKER_PUPPET_DEBUG docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET @@ -730,6 +747,7 @@ outputs: DOCKER_PUPPET_MOUNT_HOST_PUPPET: {get_param: DockerPuppetMountHostPuppet} CONTAINER_CLI: {get_param: ContainerCli} CONTAINER_LOG_STDOUT_PATH: {get_param: ContainerLogStdoutPath} + CONTAINER_HEALTHCHECK_DISABLED: {get_param: ContainerHealthcheckDisabled} template: | - hosts: DEPLOY_SOURCE_HOST name: Gather facts from undercloud @@ -764,6 +782,7 @@ outputs: enable_puppet: ENABLE_PUPPET container_cli: CONTAINER_CLI container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH + container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED docker_puppet_debug: DOCKER_PUPPET_DEBUG docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET @@ -791,6 +810,7 @@ outputs: enable_puppet: ENABLE_PUPPET container_cli: CONTAINER_CLI container_log_stdout_path: CONTAINER_LOG_STDOUT_PATH + container_healthcheck_disabled: CONTAINER_HEALTHCHECK_DISABLED docker_puppet_debug: DOCKER_PUPPET_DEBUG docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET diff --git a/releasenotes/notes/healthcheck_disabled-7e67b45cda9afb17.yaml b/releasenotes/notes/healthcheck_disabled-7e67b45cda9afb17.yaml new file mode 100644 index 0000000000..8734d691b0 --- /dev/null +++ b/releasenotes/notes/healthcheck_disabled-7e67b45cda9afb17.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + ContainerHealthcheckDisabled is a new parameter which allows to disable + the container healthcheck management in Paunch.