Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2295411

Summary: Switch running image to new image in wrapper script
Product: Red Hat OpenStack Reporter: Kenny Tordeurs <ktordeur>
Component: openstack-tripleo-heat-templatesAssignee: OSP Team <rhos-maint>
Status: CLOSED DUPLICATE QA Contact: Joe H. Rahme <jhakimra>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17.1 (Wallaby)CC: jelle.hoylaerts.ext, lbezdick, mburns, ramishra
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-07-17 13:40:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kenny Tordeurs 2024-07-03 12:57:32 UTC
Description of problem:
Switch running image to new image in wrapper script results in an error

Version-Release number of selected component (if applicable):
16.2 > 17.1

How reproducible:
100%

Steps to Reproduce:
1. # openstack overcloud upgrade run --yes --tags system_upgrade --stack openstack05 --limit openstack086
2.
3.

Actual results:
FATAL | Switch running image to new image in wrapper script | openstack086 | error={"changed": true, "cmd": "sed -i -e 's||satellite.example.com/content_view_le

ainers-nova-libvirt:17.1|' /var/lib/container-config-scripts/virtlogd_wrapper\n", "delta": "0:00:00.008230", "end": "2024-06-16 16:58:47.879673", "msg": "non-zero return code", "rc": 1, "start": "2024-06-16 16:58:47.871443", "stderr": "sed: -e expression #1, char 0: no previous regular expression", "stderr_lines": [

"sed: -e expression #1, char 0: no previous regular expression"], "stdout": "", "stdout_lines": []}

Expected results:
no errors

Additional info:
Restart all nova containers fixed this:
# podman restart nova_compute

Comment 1 Lukas Bezdicka 2024-07-17 13:26:27 UTC
                  - name: Get running image version
                    shell: |
                      podman ps --filter name=^nova_virtlogd$ --format "{% raw %}{{ .Image }}{% endraw %}"
                    register: old_virtlogd_image
                  - name: Switch running image to new image in wrapper script
                    shell: |
                      set -o pipefail
                      sed -i -e 's|{{ old_virtlogd_image.stdout }}|{{ virtlogd_image }}|' /var/lib/container-config-scripts/virtlogd_wrapper
                    when:
                      - old_virtlogd_image.stdout != virtlogd_image
                      - old_virtlogd_image.stdout != ''


Code checks for old_virtlogd_image.stdout being empty so I don't understand why you got this error as it called - sed -i -e 's||satellite.example.com/content_view_leainers-nova-libvirt:17.1|'

Comment 2 Lukas Bezdicka 2024-07-17 13:26:58 UTC
Tempted to close as user error as the virtlogd was down before system upgrade.

Comment 3 Lukas Bezdicka 2024-07-17 13:40:36 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=2283506

*** This bug has been marked as a duplicate of bug 2283506 ***