Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This problem can be resolved if we always fetched the daemon process ids, using _ get_pid() rather than relying on the internal cache ‘pid’. _ get_pid() gets pid from daemon's lock file. There is no need for the member ‘pid’ in the daemon objects. Infact it is better to remove this variable to avoid access to incorrect (not latest) pid. With this change there is no need for the function _update_pid() and it can be removed.

The other way of fixing this would be making PBSInitServices’ functions capable of updating the 'pid' in daemon objects. This requires PBSInitServices to contain all daemon objects. This isn’t a correct approach as it would make PBSInitServices class bulky and also change its real purpose. 

In fw/ptl/lib/pbs_testlib.py,

  • Interface: class PBSService(PBSObject)

  • Synopsis: Removed the member 'pid'
    Details:  This member is removed as it doesn't always hold the correct/lates pid of objects

...