Bug 977566 - RHEVM-API: update vm --description doesn't work with virtual machines whose names begin with a number
Summary: RHEVM-API: update vm --description doesn't work with virtual machines whose n...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.4.0
Assignee: Martin Betak
QA Contact:
URL:
Whiteboard: virt
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-24 23:10 UTC by Rich Jerrido
Modified: 2013-08-27 10:31 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-27 10:31:01 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 18595 0 None None None Never

Description Rich Jerrido 2013-06-24 23:10:00 UTC
Description of problem:

When updating a virtual machine whose name begins with a numerical value via rhevm-shell, rhevm reports that the virtual machine doesn't exist. 

Version-Release number of selected component (if applicable):
rhevm-cli-3.2.0.9-1.el6ev

How reproducible:
100%

Steps to Reproduce:
1. create a virtual machine whose name begins with a number. 

add vm --name '12345' --cluster-name 'SomeCluster' --template-name 'Blank' --os-type rhel_6x64 --type server

2. Attempt to update the virtual machine's description

update vm 12345 --description testdescription



Actual results:

rhevm-shell outputs:

error: vm "12345" does not exist.

Expected results:

rhevm-shell properly updates the virtual machines description. 

Additional info:

Comment 1 Michael Pasternak 2013-06-25 09:33:46 UTC
(In reply to Rich Jerrido from comment #0)
> Description of problem:
> 
> When updating a virtual machine whose name begins with a numerical value via
> rhevm-shell, rhevm reports that the virtual machine doesn't exist. 
> 
> Version-Release number of selected component (if applicable):
> rhevm-cli-3.2.0.9-1.el6ev
> 
> How reproducible:
> 100%
> 
> Steps to Reproduce:
> 1. create a virtual machine whose name begins with a number. 
> 
> add vm --name '12345' --cluster-name 'SomeCluster' --template-name 'Blank'
> --os-type rhel_6x64 --type server

i see a rest-api issue when creating vm with name of digits:

[RHEVM shell (connected)]# add vm --name 2222 --cluster-name Default --template-name Blank

error: 
status: 500
reason: Internal Server Error
detail: HTTP Status 500


[RHEVM shell (connected)]# list vms

error: 
status: 500
reason: Internal Server Error
detail: HTTP Status 500


> 
> 2. Attempt to update the virtual machine's description
> 
> update vm 12345 --description testdescription

if it's works on your build, you should be sending name as string as you did
during creation - '12345', e.g:

update vm '12345' --description testdescription

> 
> 
> 
> Actual results:
> 
> rhevm-shell outputs:
> 
> error: vm "12345" does not exist.
> 
> Expected results:
> 
> rhevm-shell properly updates the virtual machines description. 
> 
> Additional info:

Comment 2 Michael Pasternak 2013-06-25 10:10:45 UTC
more than this, i can't remove them from the UI, it's looking fro the SD
despite all vms have no disks:

3333:

    Cannot remove VM: Storage Domain cannot be accessed.
    -Please check that at least one Host is operational and Data Center state is up.

can't recall, does naming vm like this is legal at all?

Comment 3 Michal Skrivanek 2013-07-12 09:48:45 UTC
don't see a reason why not, this should be fixed

Comment 4 Michael Pasternak 2013-08-27 10:31:01 UTC
we have entities (such as events) in the system with id of type long, since the name of the entity is ambiguous in terms of id/name , one should use the id (UUID) of the vm for identification (when name is digits only) and not 
the name.


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