HomeClusterLabs Projects

Fix: services: Correctly determine if operations are in-flight

Description

Fix: services: Correctly determine if operations are in-flight

Previously, we kind of abused the return codes of upstart_job_exec(),
systemd_unit_exec() and services_os_action_execute(). For an
asynchronous operation, the return code is supposed to tell whether the
'op' should be freed by the caller. It doesn't exactly indicate whether
the 'op' is in-flight.

For instance, in services_os_action_execute(), if stat() or fork() fail,
operation_finalize() will be called for an asynchronous operation, which
will free the operation and return TRUE if the operation is
non-recurring. But in action_async_helper(), the freed operation
would be considered in-flight and added into inflight_ops list.

Details

Provenance
gao-yanAuthored on Oct 29 2015, 7:33 AM
Parents
rP4e6f6d6e62d9: Merge pull request #821 from kgaillot/doc
Branches
Unknown
Tags
Unknown

Event Timeline