The result of 'nova migration-list' command is disorderly

Bug #1748694 reported by tangxing
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Opinion
Wishlist
tangxing

Bug Description

Description
===========
The result of 'nova migration-list' command is disorderly.It is inconvenient to find migration information of vm

Steps to reproduce
==================
[root@nail-5300-1 ~(keystone_admin)]# nova migration-list

Expected result
===============
Expect result order by id or Create_at

Actual result
=============
+----+-------------+-------------+----------------+--------------+--------------+-----------+--------------------------------------+------------+------------+----------------------------+----------------------------+----------------+
| Id | Source Node | Dest Node | Source Compute | Dest Compute | Dest Host | Status | Instance UUID | Old Flavor | New Flavor | Created At | Updated At | Type |
+----+-------------+-------------+----------------+--------------+--------------+-----------+--------------------------------------+------------+------------+----------------------------+----------------------------+----------------+
| 62 | - | nail-5300-2 | nail-5300-1 | nail-5300-2 | 10.43.202.88 | completed | 9fc7f971-9635-4314-8032-0adb7dc59649 | 27 | 27 | 2018-02-08T11:38:12.000000 | 2018-02-08T11:38:29.000000 | live-migration |
| 63 | - | nail-5300-2 | nail-5300-1 | nail-5300-2 | 10.43.202.88 | completed | a90afe68-9c81-4f67-9a04-be6ec741f1c8 | 25 | 25 | 2018-02-08T11:38:17.000000 | 2018-02-08T11:38:51.000000 | live-migration |
| 64 | - | nail-5300-2 | nail-5300-1 | nail-5300-2 | 10.43.202.88 | completed | 52ad4bb1-d990-4a5e-a21d-7f831e60d1a3 | 28 | 28 | 2018-02-08T11:38:21.000000 | 2018-02-08T11:39:11.000000 | live-migration |
| 55 | nail-5300-1 | nail-5300-2 | nail-5300-1 | nail-5300-2 | 10.43.202.88 | confirmed | 9fc7f971-9635-4314-8032-0adb7dc59649 | 27 | 27 | 2018-02-08T08:22:50.000000 | 2018-02-08T08:23:42.000000 | migration |
| 53 | - | nail-5300-1 | nail-5300-2 | nail-5300-1 | 10.43.203.85 | completed | 9fc7f971-9635-4314-8032-0adb7dc59649 | 27 | 27 | 2018-02-08T04:01:48.000000 | 2018-02-08T04:02:04.000000 | live-migration |
| 54 | - | nail-5300-1 | nail-5300-2 | nail-5300-1 | 10.43.203.85 | completed | a90afe68-9c81-4f67-9a04-be6ec741f1c8 | 25 | 25 | 2018-02-08T06:21:52.000000 | 2018-02-08T06:22:07.000000 | live-migration |
| 61 | - | nail-5300-1 | nail-5300-2 | nail-5300-1 | 10.43.203.85 | completed | 52ad4bb1-d990-4a5e-a21d-7f831e60d1a3 | 28 | 28 | 2018-02-08T09:39:30.000000 | 2018-02-08T09:39:45.000000 | live-migration |
| 57 | - | nail-5300-1 | nail-5300-2 | nail-5300-1 | 10.43.203.85 | error | 52ad4bb1-d990-4a5e-a21d-7f831e60d1a3 | 28 | 28 | 2018-02-08T09:17:24.000000 | 2018-02-08T09:17:27.000000 | live-migration |
| 58 | - | nail-5300-1 | nail-5300-2 | nail-5300-1 | 10.43.203.85 | error | 52ad4bb1-d990-4a5e-a21d-7f831e60d1a3 | 28 | 28 | 2018-02-08T09:26:13.000000 | 2018-02-08T09:26:15.000000 | live-migration |
| 59 | - | nail-5300-1 | nail-5300-2 | nail-5300-1 | 10.43.203.85 | error | 52ad4bb1-d990-4a5e-a21d-7f831e60d1a3 | 28 | 28 | 2018-02-08T09:28:21.000000 | 2018-02-08T09:28:25.000000 | live-migration |
| 60 | - | nail-5300-1 | nail-5300-2 | nail-5300-1 | 10.43.203.85 | error | 52ad4bb1-d990-4a5e-a21d-7f831e60d1a3 | 28 | 28 | 2018-02-08T09:30:32.000000 | 2018-02-08T09:30:35.000000 | live-migration |
| 56 | nail-5300-2 | nail-5300-1 | nail-5300-2 | nail-5300-1 | 10.43.203.85 | confirmed | 9fc7f971-9635-4314-8032-0adb7dc59649 | 27 | 27 | 2018-02-08T08:27:37.000000 | 2018-02-08T08:28:08.000000 | migration |
| 65 | nail-5300-2 | nail-5300-1 | nail-5300-2 | nail-5300-1 | 10.43.203.85 | confirmed | 9fc7f971-9635-4314-8032-0adb7dc59649 | 27 | 27 | 2018-02-08T11:42:35.000000 | 2018-02-08T11:43:40.000000 | migration |
| 66 | nail-5300-2 | nail-5300-1 | nail-5300-2 | nail-5300-1 | 10.43.203.85 | confirmed | a90afe68-9c81-4f67-9a04-be6ec741f1c8 | 25 | 25 | 2018-02-08T11:42:39.000000 | 2018-02-08T11:43:43.000000 | migration |
| 67 | nail-5300-2 | nail-5300-1 | nail-5300-2 | nail-5300-1 | 10.43.203.85 | confirmed | 52ad4bb1-d990-4a5e-a21d-7f831e60d1a3 | 28 | 28 | 2018-02-08T11:42:42.000000 | 2018-02-08T11:43:46.000000 | migration |
+----+-------------+-------------+----------------+--------------+--------------+-----------+--------------------------------------+------------+------------+----------------------------+----------------------------+----------------+

tangxing (tang-xing)
Changed in nova:
assignee: nobody → tangxing (tang-xing)
Revision history for this message
Yikun Jiang (yikunkero) wrote :

I'm not sure which the api version you are using, we set sort dir/key to ['created_at', 'id']/['desc', 'desc'] by default in v2.59, see [1].

[1] https://github.com/openstack/nova/blob/7db20191206be454175e069cab08107a8c4fbe6f/nova/api/openstack/compute/migrations.py#L140

jichenjc (jichenjc)
affects: nova → python-novaclient
Revision history for this message
Takashi Natsume (natsume-takashi) wrote :

Needs python-novaclient and nova version.

Changed in python-novaclient:
status: New → Incomplete
Revision history for this message
tangxing (tang-xing) wrote :

nova version: Pike

tangxing (tang-xing)
Changed in python-novaclient:
status: Incomplete → New
Revision history for this message
tangxing (tang-xing) wrote :

api_version:V2.53
X-OpenStack-Nova-API-Version: 2.53
Do not have to consider the problem below the 2.59 version?

Revision history for this message
Takashi Natsume (natsume-takashi) wrote :

If fixing the issue before API microversion 2.59, it is required to modify python-novaclient (pass 'sortby_index' argument to 'print_list' method.).

https://github.com/openstack/python-novaclient/blob/d4df771868de9ba78baf94ed41b107ae3c1f7b2c/novaclient/v2/shell.py#L5013-L5038
https://github.com/openstack/python-novaclient/blob/d4df771868de9ba78baf94ed41b107ae3c1f7b2c/novaclient/utils.py#L158

But the issue has already been fixed in the latest version,
so I'm not sure that it is worth fixing it.

Set the status to 'Opinion' and set the importance to 'Wishlist'.

Changed in python-novaclient:
status: New → Opinion
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.