On 10/19/2011 08:30 AM, Radek Novacek wrote:
The following patch introduces systemd support for Resources API in
services agent. To be honest, I'm not quite satisfied with the resources interface. I
think we should define the difference between services and resources API more clearly.
As far as I understand it, services API should provide basic access to system services
using preferred way on given system (upstart for Fedora< 15, systemd for Fedora>=
15, sysvinit, windows services, etc.). Current list of methods seems OK.
But I'm not sure about resources API. What is the purpose for having it this way? It
partially overlaps with services API, but doesn't provide some functions like
'status'. It should have at least defined concepts like standard/provider/agent
somewhere. The requirements comes from other project (pacemaker?), right? Do we have it
written down somewhere? IMHO we should rethink the concept now, before it will be too
late. Or at least document it better, because now it's not clear how to use it.
Andrew may be able to better address your concerns, since he wrote it.
status is supported, through the invoke method and setting the action to
"status". The invoke method of the Resources API is kind of a catch-all
to perform any action. I'm not sure why it was built as a catch-all
like this. Maybe the list of possible actions is undefined for OCF
resource agents?
Some additional documentation that explains the Resources API would
probably help out the situation.
--
Russell Bryant