Bug 1168304

Summary: ERROR shown for trying to stop a vm not running versus DEBUG or INFO message
Product: [Retired] oVirt Reporter: Omer Frenkel <ofrenkel>
Component: ovirt-engine-coreAssignee: Omer Frenkel <ofrenkel>
Status: CLOSED CURRENTRELEASE QA Contact: meital avital <mavital>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.5CC: ecohen, gklein, iheim, lsurette, michal.skrivanek, rbalakri, yeylon
Target Milestone: ---   
Target Release: 3.5.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: ovirt-3.5.1_rc1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1133561 Environment:
Last Closed: 2015-01-21 16:02:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Omer Frenkel 2014-11-26 15:55:31 UTC
Description of problem:
requesting to stop vm that is in down state generate and error:

2014-08-18 18:10:05,606 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (ajp-/127.0.0.1:8702-46) Operation Failed: [Cannot stop VM. VM is not running.]
2014-08-18 18:10:05,439 WARN  [org.ovirt.engine.core.bll.StopVmCommand] (ajp-/127.0.0.1:8702-46) [d452d96] CanDoAction of action StopVm failed. Reasons:VAR__ACTION__STOP,VAR__TYPE__VM,ACTION_TYPE_FAILED_VM_IS_NOT_RUNNING

although the vm is already down, and this is not a real error for the user,
its better to just return a message that the vm is already stopped,
as for some users, that monitor the log, it may seem there is some issue in the system.

Version-Release number of selected component (if applicable):
3.5

How reproducible:
always

Steps to Reproduce:
1.using rest-api, stop a vm that is Down


Actual results:
Error in engine.log

Expected results:
just an 'normal' (green mark) audit log, saying vm is already down, no error.

Comment 1 Sandro Bonazzola 2015-01-15 14:14:59 UTC
This is an automated message: 
This bug should be fixed in oVirt 3.5.1 RC1, moving to QA

Comment 2 Sandro Bonazzola 2015-01-21 16:02:58 UTC
oVirt 3.5.1 has been released. If problems still persist, please make note of it in this bug report.