Bug 1455659 - imgbased metadata check breaks updates in locales which do not use periods for decimal separators
Summary: imgbased metadata check breaks updates in locales which do not use periods fo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: imgbased
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.1.3
: ---
Assignee: Yuval Turgeman
QA Contact: Huijuan Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-25 17:33 UTC by Pawan kumar Vilayatkar
Modified: 2020-08-13 09:16 UTC (History)
14 users (show)

Fixed In Version: imgbased-0.9.33-0
Doc Type: Bug Fix
Doc Text:
Previously, upgrades failed if the imgbased package tried to parse output from locales that used commas as the decimal separator. Now, when performing upgrades, the locale is set to POSIX, which ensures that the decimal separator is a period.
Clone Of:
Environment:
Last Closed: 2017-07-11 08:41:19 UTC
oVirt Team: Node
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Comment 11: All logs in /var/log, /tmp and sosreport from host after upgrade (6.73 MB, application/x-gzip)
2017-06-26 07:21 UTC, Huijuan Zhao
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1714 0 normal SHIPPED_LIVE redhat-virtualization-host bug fix, and enhancement update 2017-07-11 12:40:41 UTC
oVirt gerrit 78616 0 'None' 'MERGED' 'Using POSIX locale for all imgbased commands' 2019-11-22 11:21:28 UTC
oVirt gerrit 78704 0 'None' 'MERGED' 'Using POSIX locale for all imgbased commands' 2019-11-22 11:21:28 UTC

Description Pawan kumar Vilayatkar 2017-05-25 17:33:46 UTC
Description of problem:

As per bug 1427088 the miss boot entry of RHVH 4.1 after upgrade with "yum install *update*.rpm" resolved in imgbased-0.9.14-0.1.el7ev package.

But the package does not show in rhel-7-server-rhvh-4-rpms repository instead it is in rhel-7-server-rhvh-4-build-rpms channel. 

To upgrade the host RHV 4.0 to 4.1 we need to enable the repo rhel-7-server-rhvh-4-build-rpms to get imgbased-0.9.14-0.1.el7ev package ?

Comment 1 Wei Wang 2017-05-27 05:14:34 UTC
Retest with redhat-virtualization-host-4.0-20160919.0

Steps:
1. Clean install redhat-virtualization-host-4.0-20160919.0
2. Register system to RHSM, then auto-attach to RHVH
3. Enable "rhel-7-server-rhvh-4-rpms" repo
4. yum install redhat-virtualization-host-image-update.noarch

Host is upgraded to redhat-virtualization-host-4.1-20170522.0 successfully. After rebooting host, the boot entries displays rightly. The new boot entry can be accessed well.

So please use the latest imgbased package: imgbased-0.9.27-0.1.el7ev.noarch, and QE suggest to close this bug.

Comment 5 Ryan Barry 2017-06-20 10:11:34 UTC
imgbased should not be available.

RHV-H updates as a single image, with imgbased included in that image. The new version of imgbased from the update RPM is always used when updating. Installing it manually is not necessary.

Can you please get /tmp/imgbased.log from a system which installed the update and failed to add a new bootloader entry?

Can the customer also check:

imgbase layout
lvs -o lv_name,tags

Comment 8 Ryan Barry 2017-06-22 12:13:28 UTC
Yuval -

It looks like python's float() doesn't work nicely with , as a separator in decimals instead of . 

We should probably use a try/except block to try to re-parse this (by substituting (\d+?),(\d+) with \1.\2, or otherwise converting it. I don't know of any regions which use something other than a comma, but haven't looked in depth.

Comment 9 Huijuan Zhao 2017-06-23 08:15:40 UTC
QE did not reproduce this issue, as there is no imgbased-0.9.14-0.1.el7ev in RHSM currently, there is latest imgbased-0.9.27-0.1.el7ev.noarch(rhvh-4.1-0.20170616.0) in RHSM.

Test version:
From: rhvh-4.0-0.20161012.0
To:   rhvh-4.1-0.20170616.0
      imgbased-0.9.27-0.1.el7ev.noarch


Test steps:
1. Installed rhvh-4.0-0.20161012.0
2. Login rhvh-4.0, subscribed to our Satellite server -> Content view containing newly updated Repository 'rhel-7-server-rhvh-4-rpms'
   # subscription-manager register
   # subscription-manager attach --pool=pool_id
   # subscription-manager repos --disable=*
   # subscription-manager repos --enable=rhel-7-server-rhvh-4-rpms
3. Did 'yum update install redhat-virtualization-host-image-update.noarch' .
4. Rebooted the Server


Test results:
After step 4, there are both new and old build boot entries, can access new build rhvh-4.1-20170616 successful.

Boot entries shows like:
---------------
rhvh-4.1-0.20170616.0
rhvh-4.0-0.20161012.0
tboot 1.8.1
---------------

When access new build rhvh-4.1-20170616:
# lvs -o lv_name,tags
  LV                      LV Tags       
  pool00                  imgbased:pool 
  rhvh-4.0-0.20161012.0   imgbased:layer
  rhvh-4.0-0.20161012.0+1 imgbased:layer
  rhvh-4.1-0.20170616.0   imgbased:base 
  rhvh-4.1-0.20170616.0+1 imgbased:layer
  root                    imgbased:init 
  swap                                  
  var

Comment 10 Yuval Turgeman 2017-06-25 14:18:19 UTC
(In reply to Huijuan Zhao from comment #9)
> QE did not reproduce this issue, as there is no imgbased-0.9.14-0.1.el7ev in
> RHSM currently, there is latest
> imgbased-0.9.27-0.1.el7ev.noarch(rhvh-4.1-0.20170616.0) in RHSM.
> 
> Test version:
> From: rhvh-4.0-0.20161012.0
> To:   rhvh-4.1-0.20170616.0
>       imgbased-0.9.27-0.1.el7ev.noarch
> 
> 
> Test steps:
> 1. Installed rhvh-4.0-0.20161012.0
> 2. Login rhvh-4.0, subscribed to our Satellite server -> Content view
> containing newly updated Repository 'rhel-7-server-rhvh-4-rpms'
>    # subscription-manager register
>    # subscription-manager attach --pool=pool_id
>    # subscription-manager repos --disable=*
>    # subscription-manager repos --enable=rhel-7-server-rhvh-4-rpms
> 3. Did 'yum update install redhat-virtualization-host-image-update.noarch' .
> 4. Rebooted the Server
> 
> 
> Test results:
> After step 4, there are both new and old build boot entries, can access new
> build rhvh-4.1-20170616 successful.
> 
> Boot entries shows like:
> ---------------
> rhvh-4.1-0.20170616.0
> rhvh-4.0-0.20161012.0
> tboot 1.8.1
> ---------------
> 
> When access new build rhvh-4.1-20170616:
> # lvs -o lv_name,tags
>   LV                      LV Tags       
>   pool00                  imgbased:pool 
>   rhvh-4.0-0.20161012.0   imgbased:layer
>   rhvh-4.0-0.20161012.0+1 imgbased:layer
>   rhvh-4.1-0.20170616.0   imgbased:base 
>   rhvh-4.1-0.20170616.0+1 imgbased:layer
>   root                    imgbased:init 
>   swap                                  
>   var

To reproduce this, you need to set your system to a locale that uses commas for decimals, try before installing the update rpm something like:

export LC_ALL=fr_FR

Comment 11 Huijuan Zhao 2017-06-26 07:01:00 UTC
(In reply to Yuval Turgeman from comment #10) 
> To reproduce this, you need to set your system to a locale that uses commas
> for decimals, try before installing the update rpm something like:
> 
> export LC_ALL=fr_FR

Thanks Yuval.

QE reproduced this bug.


Test version:
From: rhvh-4.0-0.20161012.0
To:   rhvh-4.1-0.20170616.0
      imgbased-0.9.27-0.1.el7ev.noarch


Test steps:
1. Installed rhvh-4.0-0.20161012.0
2. Login rhvh-4.0, subscribed to our Satellite server -> Content view containing newly updated Repository 'rhel-7-server-rhvh-4-rpms'
   # subscription-manager register
   # subscription-manager attach --pool=pool_id
   # subscription-manager repos --disable=*
   # subscription-manager repos --enable=rhel-7-server-rhvh-4-rpms
3. Set host to a locale that uses commas for decimals:
   # export LC_ALL=fr_FR
4. Did 'yum update install redhat-virtualization-host-image-update.noarch' 


Actual results:
After step 4, upgrade encountered issue:

# yum update install redhat-virtualization-host-image-update.noarch
Modules compl�mentaires charg�s�: imgbased-warning, product-id, search-disabled-repos, subscription-manager
Warning: yum operations are not persisted across upgrades!
rhel-7-server-rhvh-4-rpms                                                                                                                      | 4.0 kB  00:00:00     
(1/3): rhel-7-server-rhvh-4-rpms/x86_64/group                                                                                                  |  104 B  00:00:01     
(2/3): rhel-7-server-rhvh-4-rpms/x86_64/updateinfo                                                                                             |  15 kB  00:00:02     
(3/3): rhel-7-server-rhvh-4-rpms/x86_64/primary_db                                                                                             |  32 kB  00:00:01     
Aucune correspondance pour l'argument�: install
Aucun paquet install disponible.
R�solution des d�pendances
--> Lancement de la transaction de test
---> Le paquet redhat-virtualization-host-image-update.noarch 0:4.1-20170616.0.el7_3 sera obsol�te
---> Le paquet redhat-virtualization-host-image-update-placeholder.noarch 0:4.0-4.2.el7 sera obsol�te
--> R�solution des d�pendances termin�e

D�pendances r�solues

======================================================================================================================================================================
 Package                                                 Architecture           Version                               D�p�t                                     Taille
======================================================================================================================================================================
Installation :
 redhat-virtualization-host-image-update                 noarch                 4.1-20170616.0.el7_3                  rhel-7-server-rhvh-4-rpms                 542 M
     remplacement de  redhat-virtualization-host-image-update-placeholder.noarch 4.0-4.2.el7

R�sum� de la transaction
======================================================================================================================================================================
Installation   1 Paquet

Taille totale des t�l�chargements�: 542 M
Is this ok [y/d/N]: y
Downloading packages:
attention�: /var/cache/yum/x86_64/7RedHatVirtualizationHost/rhel-7-server-rhvh-4-rpms/packages/redhat-virtualization-host-image-update-4.1-20170616.0.el7_3.noarch.rpm: Ent�te V3 RSA/SHA256 Signature, cl� ID fd431d51: NOKEY
La cl� publique pour redhat-virtualization-host-image-update-4.1-20170616.0.el7_3.noarch.rpm n'est pas install�e
redhat-virtualization-host-image-update-4.1-20170616.0.el7_3.noarch.rpm                                                                        | 542 MB  00:14:15     
R�cup�ration de la cl� � partir de file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Importation de la clef GPG 0xFD431D51�:
ID utilisateur�: ��Red Hat, Inc. (release key 2) <security>��
Empreinte     �: 567e 347a d004 4ade 55ba 8a5f 199e 2f91 fd43 1d51
Paquet        �: redhat-release-virtualization-host-4.0-4.3.el7.x86_64 (installed)
Provient de   �: /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Est-ce correct [o/N]�: y
Importation de la clef GPG 0x2FA658E0�:
ID utilisateur�: ��Red Hat, Inc. (auxiliary key) <security>��
Empreinte     �: 43a6 e49c 4a38 f4be 9abf 2a53 4568 9c88 2fa6 58e0
Paquet        �: redhat-release-virtualization-host-4.0-4.3.el7.x86_64 (installed)
Provient de   �: /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Est-ce correct [o/N]�: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installation : redhat-virtualization-host-image-update-4.1-20170616.0.el7_3.noarch                                                                              1/2 
  Suppression  : redhat-virtualization-host-image-update-placeholder-4.0-4.2.el7.noarch                                                                           2/2 
rhel-7-server-rhvh-4-rpms/x86_64/productid                                                                                                     | 2.1 kB  00:00:00     
  V�rification : redhat-virtualization-host-image-update-4.1-20170616.0.el7_3.noarch                                                                              1/2 
  V�rification : redhat-virtualization-host-image-update-placeholder-4.0-4.2.el7.noarch                                                                           2/2 

Install��:
  redhat-virtualization-host-image-update.noarch 0:4.1-20170616.0.el7_3                                                                                               

Remplac��:
  redhat-virtualization-host-image-update-placeholder.noarch 0:4.0-4.2.el7                                                                                            

Termin��!



# imgbase layout
rhvh-4.0-0.20161012.0
 +- rhvh-4.0-0.20161012.0+1
rhvh-4.1-0.20170616.0


# lvs -o lv_name,tags
  LV                      LV Tags       
  pool00                  imgbased:pool 
  rhvh-4.0-0.20161012.0   imgbased:layer
  rhvh-4.0-0.20161012.0+1 imgbased:layer
  rhvh-4.1-0.20170616.0   imgbased:base 
  root                    imgbased:init 
  swap                                  
  var



Expected results:
After step 4, upgrade should be successful.

Comment 12 Huijuan Zhao 2017-06-26 07:21:46 UTC
Created attachment 1291878 [details]
Comment 11: All logs in /var/log, /tmp and sosreport from host after upgrade

Comment 13 Emma Heftman 2017-06-28 08:44:38 UTC
Hi Yuval. Pls. set the requires_doc_text flag and add text if relevant.

Comment 14 Yuval Turgeman 2017-06-28 08:53:13 UTC
Done

Comment 18 Huijuan Zhao 2017-07-03 14:24:59 UTC
Test version:
From: rhvh-4.0-0.20161012.0
To:   rhvh-4.1-0.20170629.0
      imgbased-0.9.33-0.1.el7ev.noarch

Test steps:
1. Install rhvh-4.0-0.20161012.0
2. Login rhvh-4.0, subscribed to RHSM stage server -> Content view containing newly updated Repository 'rhel-7-server-rhvh-4-rpms'

   #  grep -e '^hostname' -e '^baseurl' /etc/rhsm/rhsm.conf
      hostname = subscription.rhsm.stage.redhat.com
      baseurl= https://cdn.stage.redhat.com

   # grep '^serverURL=' /etc/sysconfig/rhn/up2date
     serverURL=https://xmlrpc.rhn.code.stage.redhat.com/XMLRPC

   # subscription-manager register --username=xxx --password=xxx --serverurl=subscription.rhsm.stage.redhat.com
   # subscription-manager subscribe 
   # subscription-manager repos --enable=rhel-7-server-rhvh-4-rpms

3. Set host to a locale that uses commas for decimals:
   # export LC_ALL=fr_FR
4. Did 'yum update install redhat-virtualization-host-image-update.noarch' 
5. Reboot rhvh, enter to rhvh-4.1-20170629


Test results:
1. After step4,

[root@dhcp-10-16 ~]# imgbase layout
rhvh-4.0-0.20161012.0
 +- rhvh-4.0-0.20161012.0+1
rhvh-4.1-0.20170629.0
 +- rhvh-4.1-0.20170629.0+1

[root@dhcp-10-16 ~]# lvs -o lv_name,tags
  LV                      LV Tags        
  home                    imgbased:volume
  pool00                  imgbased:pool  
  rhvh-4.0-0.20161012.0   imgbased:layer 
  rhvh-4.0-0.20161012.0+1 imgbased:layer 
  rhvh-4.1-0.20170629.0   imgbased:base  
  rhvh-4.1-0.20170629.0+1 imgbased:layer 
  root                    imgbased:init  
  swap                                   
  tmp                     imgbased:volume
  var                                    
  var-log                 imgbased:volume
  var-log-audit           imgbased:volume

2. After step5, can enter to rhvh-4.1-20170629 successful.


So this bug is fixed in imgbased-0.9.33-0.1.el7ev.noarch, change the status to VERIFIED.

Comment 22 Huijuan Zhao 2017-07-06 02:55:46 UTC
According to comment 18, the bug is fixed in  imgbased-0.9.33-0.1.el7ev.noarch,  change the status to VERIFIED.

Comment 24 errata-xmlrpc 2017-07-11 08:41:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1714


Note You need to log in before you can comment on or make changes to this bug.