Bug 1395056 - Layers are displayed out of order after upgrading twice in cockpit
Summary: Layers are displayed out of order after upgrading twice in cockpit
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-node
Classification: oVirt
Component: UI
Version: 4.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.1.0-rc
: 4.1
Assignee: Ryan Barry
QA Contact: Wei Wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-15 03:28 UTC by Wei Wang
Modified: 2017-02-15 15:04 UTC (History)
9 users (show)

Fixed In Version: cockpit-ovirt-0.10.6-1.4.3.el7ev
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-15 15:04:19 UTC
oVirt Team: Node
Embargoed:
rule-engine: ovirt-4.1+
rule-engine: planning_ack+
fdeutsch: devel_ack+
cshao: testing_ack+


Attachments (Terms of Use)
picture (16.59 KB, image/png)
2016-11-15 03:28 UTC, Wei Wang
no flags Details
log files (368.92 KB, application/x-gzip)
2016-11-15 03:29 UTC, Wei Wang
no flags Details
ks file (1012 bytes, text/plain)
2016-11-15 03:30 UTC, Wei Wang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 68560 0 master ABANDONED changed nodectl to display layers in the same order as imgbase 2017-01-04 09:37:59 UTC
oVirt gerrit 68752 0 master MERGED dashboard: sort JSON objects before returning them 2016-12-20 15:28:29 UTC
oVirt gerrit 68834 0 ovirt-4.1 MERGED dashboard: sort JSON objects before returning them 2016-12-20 15:29:18 UTC

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


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