Bug 977566 - RHEVM-API: update vm --description doesn't work with virtual machines whose names begin with a number
RHEVM-API: update vm --description doesn't work with virtual machines whose n...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.2.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.4.0
Assigned To: Martin Betak
virt
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-24 19:10 EDT by Rich Jerrido
Modified: 2013-08-27 06:31 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-27 06:31:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 18595 None None None Never

  None (edit)
Description Rich Jerrido 2013-06-24 19:10:00 EDT
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 05:33:46 EDT
(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 06:10:45 EDT
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 05:48:45 EDT
don't see a reason why not, this should be fixed
Comment 4 Michael Pasternak 2013-08-27 06:31:01 EDT
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.