On Fri, Nov 09, 2012 at 05:06:05AM -0500, Eli Mesika wrote:
>
>
> ----- Original Message -----
>> From: "Itamar Heim" <iheim(a)redhat.com>
>> To: "Eli Mesika" <emesika(a)redhat.com>
>> Cc: "engine-devel" <engine-devel(a)ovirt.org>, "Michael
Pasternak" <mpastern(a)redhat.com>, "Simon Grinberg"
>> <sgrinber(a)redhat.com>, "Dan Kenigsberg"
<danken(a)redhat.com>
>> Sent: Friday, November 9, 2012 12:02:37 PM
>> Subject: Re: [Engine-devel] [Design for 3.2 RFE] Improving proxy selection
algorithm for Power Management operations
>>
>> On 11/09/2012 10:52 AM, Eli Mesika wrote:
>>
>>>>>
>>>>> > FenceWrapper
>>>>>
>>>>> i understand danken suggested going this way, rather than than
>>>>> another
>>>>> instance of vdsm.
>>>>> is vdsm only calling these scripts today and all logic is in
>>>>> engine,
>>>>> or
>>>>> does vdsm has any logic in wrapping these scripts (not a blocker
>>>>> to
>>>>> doing FenceWrapper, just worth extracting that logic from vdsm to
>>>>> such a
>>>>> script, then using it in both. i hope answer is 'no
logic'...)
>>> vdsm has some logic that maps between the call passed to it from
>>> engine and the actual parameters generated for the script.
>>> AFAIK, this logic only "builds" the correct arguments for the
>>> command according to the agent type
>>>
>>
>> can we extract it to an external wrapper?
>> I'd hate to fix bugs/changes twice for this.
>
> I'll check it with danken on SUN
Saggi has had a nascent attempt to factor the little logic we have out
http://gerrit.ovirt.org/#/c/7190/7/vdsm/API.py
AFAIR there's nothing there beyond:
- log everything but passwords,
- build the input stream,
- run the script
- convert its return code
and there's also killing dormant scripts on vdsm exist (which I find not
important at all).
if the wrapping isn't doing anything but calling the scripts, then doing
it again from java isn't an issue.
it's only an issue if there is any business logic in the wrapping.