Bug 1777208

Summary: After upgrade, run the "imgbase rollback" command failed to switch between the latest layer and the previous layer
Product: Red Hat Enterprise Virtualization Manager Reporter: peyu
Component: redhat-virtualization-hostAssignee: Yuval Turgeman <yturgema>
Status: CLOSED NOTABUG QA Contact: peyu
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.7CC: cshao, lsvaty, mavital, nlevy, peyu, qiyuan, sbonazzo, shlei, weiwang, yaniwang, yturgema, yuvalt
Target Milestone: ---Keywords: Regression
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: 2019-11-28 01:12:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
/var/log none

Description peyu 2019-11-27 07:12:43 UTC
Created attachment 1640020 [details]
/var/log

Description of problem:
Upgrade RHVH from old build to latest rhvh-4.3.7.0-0.20191126.0, after upgrade, run the "imgbase rollback" command. After rebooting, it can roll back to the previous layer, but run "imgbase rollback" again to roll back to the latest layer, it didn't work.


Version-Release number of selected component (if applicable):
rhvh-4.3.7.0-0.20191126.0

How reproducible:
100%

Steps to Reproduce:
1. Install redhat-virtualization-host-4.2-20191022.0.el7_6
2. Setup local repo in RHVH and point to "redhat-virtualization-host-image-update-4.3.7-20191126.0.el7_7.noarch.rpm"
3. Upgrade to the latest build rhvh-4.3.7.0-0.20191126.0
   # yum update
4. Reboot, login to the default boot entry and check:
   # imgbase w
   # imgbase layout
   # nodectl info
5. Roll back to the previous layer
   # imgbase rollback
6. Reboot and focus on boot entry and check:
   # imgbase w   
   # imgbase layout
   # nodectl info
7. Repeat step 5 and 6 to roll back to the latest layer
  


Actual results:
1. Setp 5 and 6 succeed, it can roll back to the previous layer.
2. Setp 7 failed, it can not roll back to the latest layer.

Expected results:
Run the "imgbase rollback" command, it can switch between the latest layer and the previous layer.

Additional info:

Comment 5 Yuval Turgeman 2019-11-27 07:35:16 UTC
imgbase rollback searches backwards for layers, so if you have layers: A -> B and you're on B, it will take you to A, but being on A will not move you forward to B.  In theory you can have more than 2 layers like A -> B -> C, so rollback from C will take you to B, and from B to A, but rollback from A will not take you anywhere

Comment 12 peyu 2019-11-27 08:53:30 UTC
(In reply to Yuval Turgeman from comment #5)
> imgbase rollback searches backwards for layers, so if you have layers: A ->
> B and you're on B, it will take you to A, but being on A will not move you
> forward to B.  In theory you can have more than 2 layers like A -> B -> C,
> so rollback from C will take you to B, and from B to A, but rollback from A
> will not take you anywhere

When I verify Bug 1764534 on redhat-virtualization-host-image-update-4.3.7-20191113.0.el7_7.noarch.rpm, I tried "imgbase rollback" to switch between the latest layer and the previous layer, it can work.
So if this is not a bug, I will close it.