From 108942079bacd6ebaa5fa5c7ace99c05faa883a8 Mon Sep 17 00:00:00 2001 From: James Slagle Date: Mon, 17 Sep 2018 13:51:31 -0400 Subject: [PATCH] Don't fail tripleo-bootstrap on package installs This changes the package install task to not fail if there is a problem installing the bootstrap packages. This is inline with existing expectations that we don't require a working package manager with enabled repos on initial images. A followup task is added which will cause an error if any of the required bootstrap packages are not already installed. This patch also fixes the image yaml files that were not using the parent package openstack-heat-agents which uncovered this issue. Change-Id: I5df6193a0d72e8b52a2d95e1827173fc74885d37 Closes-Bug: #1792994 --- image-yaml/overcloud-hardened-images-uefi.yaml | 7 +------ image-yaml/overcloud-hardened-images.yaml | 7 +------ image-yaml/overcloud-odl-rhel7.yaml | 7 +------ ...leo-bootstrap-on-package-install-a00cd921b0af7168.yaml | 8 ++++++++ roles/tripleo-bootstrap/tasks/main.yml | 7 +++++++ 5 files changed, 18 insertions(+), 18 deletions(-) create mode 100644 releasenotes/notes/dont-fail-tripleo-bootstrap-on-package-install-a00cd921b0af7168.yaml diff --git a/image-yaml/overcloud-hardened-images-uefi.yaml b/image-yaml/overcloud-hardened-images-uefi.yaml index ffc799537..026741b7a 100644 --- a/image-yaml/overcloud-hardened-images-uefi.yaml +++ b/image-yaml/overcloud-hardened-images-uefi.yaml @@ -32,12 +32,7 @@ disk_images: - plotnetcfg - sos - device-mapper-multipath - - python-heat-agent-puppet - - python-heat-agent-hiera - - python-heat-agent-apply-config - - python-heat-agent-ansible - - python-heat-agent-docker-cmd - - python-heat-agent-json-file + - openstack-heat-agents - screen - os-net-config - jq diff --git a/image-yaml/overcloud-hardened-images.yaml b/image-yaml/overcloud-hardened-images.yaml index ae29644f5..a2243f8f6 100644 --- a/image-yaml/overcloud-hardened-images.yaml +++ b/image-yaml/overcloud-hardened-images.yaml @@ -32,12 +32,7 @@ disk_images: - plotnetcfg - sos - device-mapper-multipath - - python-heat-agent-puppet - - python-heat-agent-hiera - - python-heat-agent-apply-config - - python-heat-agent-ansible - - python-heat-agent-docker-cmd - - python-heat-agent-json-file + - openstack-heat-agents - screen - os-net-config - jq diff --git a/image-yaml/overcloud-odl-rhel7.yaml b/image-yaml/overcloud-odl-rhel7.yaml index efaaad17b..935408a59 100644 --- a/image-yaml/overcloud-odl-rhel7.yaml +++ b/image-yaml/overcloud-odl-rhel7.yaml @@ -17,12 +17,7 @@ disk_images: - java-1.8.0-openjdk - ntp - opendaylight - - python-heat-agent-puppet - - python-heat-agent-hiera - - python-heat-agent-apply-config - - python-heat-agent-ansible - - python-heat-agent-docker-cmd - - python-heat-agent-json-file + - openstack-heat-agents - os-net-config - jq options: diff --git a/releasenotes/notes/dont-fail-tripleo-bootstrap-on-package-install-a00cd921b0af7168.yaml b/releasenotes/notes/dont-fail-tripleo-bootstrap-on-package-install-a00cd921b0af7168.yaml new file mode 100644 index 000000000..9278cfb29 --- /dev/null +++ b/releasenotes/notes/dont-fail-tripleo-bootstrap-on-package-install-a00cd921b0af7168.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - The tripleo-bootstrap ansible role will no longer fail if yum fails to + install the required packages. This fixed behavior aligns with previous + requirements where enabled package repositories and a working package + manager are not required on the initially deployed images. Errors are + ignored on the package install task, and then a subsequent task will cause + a failure indicating the required packages are not present. diff --git a/roles/tripleo-bootstrap/tasks/main.yml b/roles/tripleo-bootstrap/tasks/main.yml index 349b6bd3e..24221b928 100644 --- a/roles/tripleo-bootstrap/tasks/main.yml +++ b/roles/tripleo-bootstrap/tasks/main.yml @@ -4,6 +4,13 @@ package: name: "{{ packages_bootstrap }}" become: true + ignore_errors: true + +- name: Check required packages are installed + command: + rpm -q {{ item }} + with_items: "{{ packages_bootstrap }}" + - name: Create /var/lib/heat-config/tripleo-config-download directory for deployment data file: