From e489e58db4a8ff53df6dff2598d29c2f304de57b Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Mon, 9 Jul 2018 11:13:52 +0300 Subject: [PATCH] Log more details for container images prepare Add a heat param to log tripleo container images prepare verbose details into a file. Depends-On: I1c72b5ef0d7acbc4eded422d569f1383d92ad3c2 Change-Id: I000ffeb9b111c4a2a8919fe448dcead922ef03c3 Signed-off-by: Bogdan Dobrelya --- environments/undercloud.yaml | 1 + puppet/services/docker-registry.j2.yaml | 7 ++++++- .../container-images-prepare-c446ed0b04c587f7.yaml | 14 ++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/container-images-prepare-c446ed0b04c587f7.yaml diff --git a/environments/undercloud.yaml b/environments/undercloud.yaml index a7f54c5159..9563e0440e 100644 --- a/environments/undercloud.yaml +++ b/environments/undercloud.yaml @@ -131,3 +131,4 @@ parameter_defaults: UndercloudCtlplaneLocalSubnet: 'ctlplane-subnet' MistralDockerGroup: true PasswordAuthentication: 'yes' + ContainerImagePrepareLogFile: ../install-undercloud.log diff --git a/puppet/services/docker-registry.j2.yaml b/puppet/services/docker-registry.j2.yaml index 83bf69faf1..bcc1e420b9 100644 --- a/puppet/services/docker-registry.j2.yaml +++ b/puppet/services/docker-registry.j2.yaml @@ -40,6 +40,10 @@ parameters: This is run after the registry is installed to populate the registry with images. type: json + ContainerImagePrepareLogFile: + default: 'tripleo-container-image-prepare.log' + type: string + description: Used to store outputs of "openstack tripleo container image prepare". conditions: local_container_registry_is_empty: {equals : [{get_param: LocalContainerRegistry}, '']} @@ -69,6 +73,7 @@ outputs: - {get_param: [EndpointMap, DockerRegistryInternal, host]} - {get_param: LocalContainerRegistry} container_registry_port: {get_param: [EndpointMap, DockerRegistryInternal, port]} + log_file: {get_param: ContainerImagePrepareLogFile} - include_role: name: container-registry tasks_from: docker-distribution @@ -93,7 +98,7 @@ outputs: dest: "{{ '{{' }} role_data.path {{ '}}' }}" content: {{ roles }} - name: Run openstack tripleo container image prepare - command: openstack tripleo container image prepare --roles-file {{ '{{' }} role_data.path {{ '}}' }} --environment-file {{ '{{' }} prepare_param.path {{ '}}' }} --cleanup partial --verbose + command: openstack tripleo container image prepare --log-file {{ '{{' }} log_file {{ '}}' }} --roles-file {{ '{{' }} role_data.path {{ '}}' }} --environment-file {{ '{{' }} prepare_param.path {{ '}}' }} --cleanup partial --verbose - name: Delete param file file: dest: "{{ '{{' }} prepare_param.path {{ '}}' }}" diff --git a/releasenotes/notes/container-images-prepare-c446ed0b04c587f7.yaml b/releasenotes/notes/container-images-prepare-c446ed0b04c587f7.yaml new file mode 100644 index 0000000000..584af83f4d --- /dev/null +++ b/releasenotes/notes/container-images-prepare-c446ed0b04c587f7.yaml @@ -0,0 +1,14 @@ +--- +other: + - | + Add the ``ContainerImagePrepareLogFile`` heat parameter, which points to + a log file to store outputs of the + ``openstack tripleo container image prepare`` commands + invoked by ansible for containers registry deployments. + As it takes quite a while to finish, and may be retrying intermittent + failures, make the command to log ``--verbose`` details as well. + + The default log file ``tripleo-container-image-prepare.log`` will + be placed in the directory containing downloaded ansible playbooks and + inventory files. For undercloud deployments, logs destination is shared + with the default ``install-undercloud.log`` file.