Bug 782737

Summary: Engine: Failed to configure Power Management via REST API due to RuntimeException in engine
Product: [Retired] oVirt Reporter: Avi Tal <atal>
Component: ovirt-engine-apiAssignee: Michael Pasternak <mpastern>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: urgent    
Version: unspecifiedCC: acathrow, bazulay, iheim, oramraz, shavivi, srevivo, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-02 08:18:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
jboss server log
none
engine log none

Description Avi Tal 2012-01-18 10:24:07 UTC
Created attachment 555980 [details]
jboss server log

Description of problem:
2012-01-18 12:08:30,372 INFO  [org.ovirt.engine.core.bll.UpdateVdsCommand] (http--0.0.0.0-8080-3) Running command: UpdateVdsCommand internal: false. Entities affected :  ID: 5a430522-41b2-11e1-8de8-001a4a231223 Type: VDS
2012-01-18 12:08:30,379 ERROR [org.ovirt.engine.core.engineencryptutils.EncryptionUtils] (http--0.0.0.0-8080-3) Error doing the encryption: java.lang.RuntimeException: java.io.FileNotFoundException: .keystore (No such file or directory)

This exception is raised every time a sent PUT request via REST API to configure power management.
 

PUT http://blabla..:8080/api/hosts/<host-id...>

<host>
 <name>vulcan01.eng.lab.tlv.redhat.com</name>
 <address>10.35.99.2</address>
 <power_management type='bladecenter'>
  <enabled>true</enabled>
  <address>10.35.35.35</address>
  <username>user</username>
  <password>password</password>
  <options>
   <option value="1" name="slot" /> 
   <option value="false" name="secure" /> 
  </options>
 </power_management>
</host> 


Responses:
400 PUT .....
<fault>
 <reason>Operation Failed</reason>
 <detail>[]</detail>
</fault>

Comment 1 Avi Tal 2012-01-18 10:24:45 UTC
Created attachment 555981 [details]
engine log

Comment 2 Avi Tal 2012-01-18 14:32:32 UTC
changing component to rest api because i was able to add the same power management via webadmin, there for the exception occur only via rest api.

Comment 3 Shahar Havivi 2012-01-19 11:44:41 UTC
Avi,
I assume the test is with the same management server (the rest and UI)?

Comment 4 Oded Ramraz 2012-01-19 17:56:52 UTC
I think we need to configure something on our development environment in order to avoid this failure:
java.io.FileNotFoundException: .keystore (No such file or directory)

Comment 5 Itamar Heim 2012-01-21 04:30:40 UTC
(In reply to comment #2)
> changing component to rest api because i was able to add the same power
> management via webadmin, there for the exception occur only via rest api.

on the same system?
this is probably around trying to encrypt the host power management password

Comment 6 Shahar Havivi 2012-01-21 07:50:09 UTC
(In reply to comment #5)
> (In reply to comment #2)
> > changing component to rest api because i was able to add the same power
> > management via webadmin, there for the exception occur only via rest api.
> 
> on the same system?
> this is probably around trying to encrypt the host power management password

yes, but the exception is .keystore file not found, where the file exists because the UI was able to encrypt it.
after checking the logs its look like the REST is calling with different parameters or calling the wrong API.

Comment 7 Michael Pasternak 2012-02-02 08:18:17 UTC
environment configuration issue