while executing ServerMigrationList use-case an extra call is made to nova-api for fetching server details.

Bug #1764372 reported by lucky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Invalid
Undecided
Unassigned

Bug Description

An extra call is made to nova-api for fetching server details to check it's existence.
Once existence of server is confirmed, after that "server migration list" call is made to nova-api.
In existing nova cli code flow, if server does not exist and "nova server-migration-list {server-id}" is invoked, it will display error to user and will not execute server migration list API call.
In contrary, if user directly execute curl command to fetch migration list for server which does not exists, then also same error message is displayed to user.
So, it seems extra call to check existence of server.

Solution:
Code should be improved to eliminate extra nova-api call to check server existence before executing concerned command.
Server migration list can directly be executed through curl to avoid extra call to check server existence before invoking server migration list.
curl -g -i -X GET http://{hostip}:8774/v2.1/{tenant_id}/servers/{server_id}/migrations -H "Accept: application/json" -H "X-OpenStack-Nova-API-Version: 2.23" -H "X-Auth-Token:{token_id}".

Revision history for this message
Matt Riedemann (mriedem) wrote :

First, this is a python-novaclient bug, not a nova bug.

Second, the call to get the server isn't for checking if the server exists, it's because the CLI allows passing in a server name or ID, and if it's a name, we have to look it up to get the ID to pass to the GET /servers/{server_id/migrations API:

https://github.com/openstack/python-novaclient/blob/10.1.0/novaclient/v2/shell.py#L3330

So I don't think this is a valid bug.

no longer affects: nova
Changed in python-novaclient:
status: New → Invalid
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.