Bug 1395056

Summary: Layers are displayed out of order after upgrading twice in cockpit
Product: [oVirt] ovirt-node Reporter: Wei Wang <weiwang>
Component: UIAssignee: Ryan Barry <rbarry>
Status: CLOSED CURRENTRELEASE QA Contact: Wei Wang <weiwang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: bugs, cshao, huiwa, huzhao, leiwang, rbarry, weiwang, yaniwang, ycui
Target Milestone: ovirt-4.1.0-rcFlags: rule-engine: ovirt-4.1+
rule-engine: planning_ack+
fdeutsch: devel_ack+
cshao: testing_ack+
Target Release: 4.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cockpit-ovirt-0.10.6-1.4.3.el7ev Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-15 15:04:19 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:
Attachments:
Description Flags
picture
none
log files
none
ks file none

Description Wei Wang 2016-11-15 03:28:32 UTC
Created attachment 1220668 [details]
picture

Description of problem:
Layers are displayed out of order after upgrading twice  in cockpit

Version-Release number of selected component (if applicable):
the 3 builds are as followed:
redhat-virtualization-host-4.0-0.20161007.0
imgbased-0.8.5-0.1.el7ev.noarch
cockpit-ws-118-2.el7.x86_64
cockpit-ovirt-dashboard-0.10.6-1.4.0.el7ev.noarch

redhat-virtualization-host-4.0-0.20161107.0
imgbased-0.8.7-0.1.el7ev.noarch
cockpit-ws-118-2.el7.x86_64
cockpit-ovirt-dashboard-0.10.6-1.4.2.el7ev.noarch

redhat-virtualization-host-4.0-0.20161111.0
imgbased-0.8.9-0.1.el7ev.noarch
cockpit-ws-118-2.el7.x86_64
cockpit-ovirt-dashboard-0.10.6-1.4.2.el7ev.noarch


How reproducible:
100%
Not Regression bug
Keywords: UI

Steps to Reproduce:
1. Install RHVH with redhat-virtualization-host-4.0-0.20161111.0 with kickstart script (Attached)
2. Update host with command yum install xxxx.rpm
3. Create local repo file for rhvh
4. Update with command yum update
5. Reboot host
6. Login cockpit website hostIP:9090 with root account
7. Check the node status layers information
8. Check imgbase layout with command:
#imgbase layout


Actual results:
Layers are displayed out of order after upgrading twice, and different with output of command " imgbase layout"

Expected results:
Layers are displayed in order after upgrading twice, and same to output of command " imgbase layout"


Additional info:
The output of command "nodectl info" also has the disorder layers.

Comment 1 Wei Wang 2016-11-15 03:29:08 UTC
Created attachment 1220669 [details]
log files

Comment 2 Wei Wang 2016-11-15 03:30:06 UTC
Created attachment 1220670 [details]
ks file

Comment 3 Ryan Barry 2016-12-13 17:00:24 UTC
Note that cockpit pulls straight from `nodectl info --json`, so making nodectl sort may solve this without touching the Javascript.

Comment 4 Yuval Turgeman 2016-12-15 13:28:47 UTC
'imgbase layout' shows the layouts correctly while nodectl doesn't ?

Comment 5 Ryan Barry 2016-12-15 13:40:40 UTC
imgbase layout explicitly returns a sorted list (see imgbased/src/imgbased/naming.py:230)

`nodectl info` uses a dict by default (we could use a sorted dict here, but this should be a separate bug).

Cockpit uses `nodectl info --machine-readable`, which puts the layers out into something like:

{
 ...
 "layers": {
   //Parent
   "rhvh-4.0...": [
     "rhvh-4.0..+1"
   ],
 }
}

Since "layers" is a json object (and not array), ordering also won't be preserved here...

Comment 6 Wei Wang 2016-12-22 02:38:29 UTC
(In reply to Yuval Turgeman from comment #4)
> 'imgbase layout' shows the layouts correctly while nodectl doesn't ?

yes, "imgbase layout" show the layouts correctly, but nodectl show the different layout orders.

Comment 7 Wei Wang 2017-01-17 02:28:58 UTC
Test Version:
redhat-virtualization-host-4.0-0.20161116.0
imgbased-0.8.10-0.1.el7ev.noarch
cockpit-ws-118-2.el7.x86_64
cockpit-ovirt-dashboard-0.10.6-1.4.2.el7ev.noarch

redhat-virtualization-host-4.0-0.20161220.0
imgbased-0.8.10-0.1.el7ev.noarch
cockpit-ws-118-2.el7.x86_64
cockpit-ovirt-dashboard-0.10.6-1.4.2.el7ev.noarch

redhat-virtualization-host-4.0-0.20170104.0
cockpit-ovirt-dashboard-0.10.7-0.0.3.el7ev.noarch
cockpit-ws-126-1.el7.x86_64
imgbased-0.9.2-0.1.el7ev.noarch

Test Steps:

1. Install RHVH with redhat-virtualization-host-4.0-0.20161116.0
2. Update host with command yum install xxxx.rpm
3. Create local repo file for rhvh
4. Update with command yum update
5. Reboot host
6. Login cockpit website hostIP:9090 with root account
7. Check the node status layers information
8. Check imgbase layout with the command:
#imgbase layout


Results:
Layers are displayed out of order after upgrading twice, and different with output of command " imgbase layout"

The bug can be reproduced, change status to ASSIGNED

Comment 8 Ryan Barry 2017-01-22 15:46:55 UTC
I tested this with the last patch and was not able to reproduce. I'll try again with the versions from the last bug.

Comment 9 Ryan Barry 2017-01-22 17:29:38 UTC
After looking again, all of those versions are 4.0.

However, the version of cockpit-ovirt-dashboard listed for redhat-virtualization-host-4.0-0.20170104 is from 4.1 (redhat-virtualization-host-4.1-0.20170104).

Was this tested with redhat-virtualization-host-4.0-0.20170104 or redhat-virtualization-host-4.1-0.20170104 as the third version?

Comment 10 Wei Wang 2017-01-23 03:14:16 UTC
It is a typo. The third version should be corrected as this:
redhat-virtualization-host-4.1-0.20170104.0
cockpit-ovirt-dashboard-0.10.7-0.0.3.el7ev.noarch
cockpit-ws-126-1.el7.x86_64
imgbased-0.9.2-0.1.el7ev.noarch

I will do detail retest about it, and give the report later.

Comment 11 Wei Wang 2017-01-23 08:00:24 UTC
rbarry,
The test environment of comments7 has been destoried, so I setup them again and do some retest again.
1. Test with 4.1 version as below:
redhat-virtualization-host-4.1-0.20170104.0
cockpit-ovirt-dashboard-0.10.7-0.0.3.el7ev.noarch
cockpit-ws-126-1.el7.x86_64
imgbased-0.9.2-0.1.el7ev.noarch

redhat-virtualization-host-4.1-0.20170116.0
cockpit-ovirt-dashboard-0.10.7-0.0.3.el7ev.noarch
cockpit-ws-126-1.el7.x86_64
imgbased-0.9.4-0.1.el7ev.noarch

redhat-virtualization-host-4.1-0.20170120.0
cockpit-ovirt-dashboard-0.10.7-0.0.3.el7ev.noarch
cockpit-ws-126-1.el7.x86_64
imgbased-0.9.6-0.1.el7ev.noarch

Results: Layers are displayed right.

2. Test with 4.0 ~ 4.1 version as below:
redhat-virtualization-host-4.0-0.20161116.0
cockpit-ovirt-dashboard-0.10.6-1.4.2.el7ev.noarch
cockpit-ws-118-2.el7.x86_64
imgbased-0.8.10-0.1.el7ev.noarch

redhat-virtualization-host-4.0-0.20161220.0
cockpit-ovirt-dashboard-0.10.6-1.4.2.el7ev.noarch
cockpit-ws-118-2.el7.x86_64
imgbased-0.8.10-0.1.el7ev.noarch

redhat-virtualization-host-4.1-0.20170120
cockpit-ovirt-dashboard-0.10.7-0.0.3.el7ev.noarch
cockpit-ws-126-1.el7.x86_64
imgbased-0.9.6-0.1.el7ev.noarch

Results: Layers are displayed right.

According to 1 and 2, the bug is verified already.Please change the status to ON_QA, I will verify it soon.

Comment 12 Wei Wang 2017-01-24 05:15:00 UTC
According to comments 11, change status to VERIFIED