Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1408841

Summary: [RFE] Add an API for identifying HSM selection with new Task infrastructure without Master File system Persistency
Product: [oVirt] ovirt-engine Reporter: Kevin Alon Goldblatt <kgoldbla>
Component: RFEsAssignee: Liron Aravot <laravot>
Status: CLOSED CURRENTRELEASE QA Contact: Raz Tamir <ratamir>
Severity: high Docs Contact:
Priority: high    
Version: 4.1.0CC: bugs, frolland, gklein, ratamir, tnisan, ylavi
Target Milestone: ovirt-4.1.0-betaKeywords: Automation, FutureFeature
Target Release: 4.1.0.2Flags: rule-engine: ovirt-4.1+
gklein: testing_plan_complete-
ylavi: planning_ack+
rule-engine: devel_ack+
ratamir: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-01 14:58:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kevin Alon Goldblatt 2016-12-27 16:19:22 UTC
Description of problem:
Need API for identifying the Randomly selected HSM selected by the engine to perform the SDM_Copy_Data operation with new Task infrastructure without Master File system Persistency
Connected to the new Task Infrastructure without Master File System Persistence

Comment 1 Yaniv Lavi 2017-01-02 12:13:27 UTC
This is a blocker on HSM automation, which could be a major risk to the version.
We need this to be possible urgently. Please provide workaround or fix.

Comment 2 Yaniv Kaul 2017-01-02 12:25:26 UTC
(In reply to Yaniv Dary from comment #1)
> This is a blocker on HSM automation, which could be a major risk to the
> version.
> We need this to be possible urgently. Please provide workaround or fix.

It is by no means not a blocker. They can use the JSON-RPC client of VDSM and queries all hosts in parallel to quickly and swiftly get an answer for where the task is.

Comment 3 Fred Rolland 2017-01-02 12:48:12 UTC
The engine log also specify the host where the command run :

CopyVolumeDataVDSCommand(HostName = 10.35.1.102, CopyVolumeDataVDSCommandParameters:{runAsync='true', hostId='99d26a0b-acaa-40e7-829b-c7153d55c83f', storageDomainId='null', jobId='e52a03af-bab1-4dfa-97c1-5d4e7829cb5c', srcInfo='VdsmImageLocationInfo [storageDomainId=0b86fe39-423d-4682-b263-bb0f06dd0594, imageGroupId=efc453ff-8c49-42d4-92ba-ed971cf7ccbd, imageId=e2d51152-abea-40ed-a2d0-05199429b6a5, generation=null]', dstInfo='VdsmImageLocationInfo [storageDomainId=51871a7a-75cf-4e50-a223-8f95f4107274, imageGroupId=efc453ff-8c49-42d4-92ba-ed971cf7ccbd, imageId=e2d51152-abea-40ed-a2d0-05199429b6a5, generation=0]', collapse='false'}), log id: 4781252c


We can add additional logs as a first phase if it will help.

Comment 4 Yaniv Lavi 2017-01-02 14:32:27 UTC
Raz, please review and lower severity, if you think this is a valid workaround.

Comment 5 Raz Tamir 2017-01-03 10:14:16 UTC
As a start, let's add additional logs as a first phase like Fred suggested.  It will make it much easier for us (QE) to test

Comment 6 Yaniv Lavi 2017-01-05 07:54:21 UTC
Can you please open a bug on the enhancement you decided on to the logs?

Comment 7 Raz Tamir 2017-01-08 08:44:08 UTC
We decided to get the relevant information via REST API /api/jobs/{job_id}/steps
and in the steps collection, each step will include the executor hsm as part of the step object.

Fred, Is that correct?

Comment 8 Fred Rolland 2017-01-09 08:29:55 UTC
Yes.
It will need infra approval. Liron will talk with them.

Comment 9 Liron Aravot 2017-01-17 15:27:18 UTC
Usage of the api - 
1. Have a 4.1 DC in status up with one host and two storage domains
2. Create an image disk
3. Move the disk

issuing GET request to /ovirt-engine/api/jobs/JOB_ID/steps/ and to
/ovirt-engine/api/jobs/JOB_IDsteps/STEP_ID will allow to see the host performing the step for SPDM steps (if exists) under<step><execution_host>


<step href= "">
<actions>
<link href= "/ovirt-engine/api/jobs/f3bce79c-3a39-468f-8ec9-b31758af9ff5/steps/066907c6-99d4-4803-b295-b9dd82602062/end" rel="end"/>
</actions>
<description>Copying Volume</description>
rel="statistics"/>
<status>finished</status>
<type>unknown</type>
<execution_host href= "/ovirt-engine/api/hosts/c717ea8e-e839-471a-ab24-df19aa4bca33" id="c717ea8e-e839-471a-ab24-df19aa4bca33"/>
<job href= />
<parent_step "/>
</step>

Comment 10 Raz Tamir 2017-01-24 22:20:40 UTC
Verified on ovirt-engine-4.1.0.2-0.2.el7.noarch

The execution host in the API compared to the HostName in engine.log is the same.