Browse Source

Correctly match openvswitch package

The current regex will match more than one package if the
openvswitchX.YZ-test package is installed.

eg:
rpm -qa | awk -F- '/^(openvswitch[0-9]+\.[0-9]+-|openvswitch-2)/'
openvswitch2.11-test-2.11.0-35.el7fdp.noarch
openvswitch2.11-2.11.0-35.el7fdp.x86_64

The right package to find has the form: openvswitchA.BC-A.BC.D-

So we change the regex to only match if it has that form.

rhbz#1826367
Change-Id: I2f9456395b19c26d20917f8ca9183741566635c3
(cherry picked from commit 5b2daa4998)
changes/06/729906/1
Jesse Pretorius (odyssey4me) 1 month ago
parent
commit
4c85678fc5
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      docker/services/undercloud-upgrade.yaml
  2. +1
    -1
      puppet/services/tripleo-packages.yaml

+ 1
- 1
docker/services/undercloud-upgrade.yaml View File

@@ -92,7 +92,7 @@ outputs:
- name: Get current OpenvSwitch package name
register: ovs_pkg_out
shell:
rpm -qa | awk -F- '/^(openvswitch[0-9]+\.[0-9]+-|openvswitch-2)/{print $1}'
rpm -qa | awk -F- '/^(openvswitch[0-9]+\.[0-9]+-[0-9]+\.[0-9]+\.[-0]+-|openvswitch-2)/{print $1}'
- name: Get version from current OpenvSwitch package
register: ovs_version_out
shell:


+ 1
- 1
puppet/services/tripleo-packages.yaml View File

@@ -151,7 +151,7 @@ outputs:
- name: Get current OpenvSwitch package name
register: ovs_pkg_out
shell:
rpm -qa | awk -F- '/^(openvswitch[0-9]+\.[0-9]+-|openvswitch-2)/{print $1}'
rpm -qa | awk -F- '/^(openvswitch[0-9]+\.[0-9]+-[0-9]+\.[0-9]+\.[-0]+-|openvswitch-2)/{print $1}'
- name: Get version from current OpenvSwitch package
register: ovs_version_out
shell:


Loading…
Cancel
Save