Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-5150

Duplicate agents (or daemons) MUST be avoided

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.0-Ducc
    • Component/s: DUCC
    • Labels:
      None

      Description

      Very strange things happen if a 2nd agent is started on a node.

      • Should we include the pid in the agent id?
      • Keep a registry of legal agents?
      • Make each agent check for others at startup?
      • ???

        Activity

        Hide
        burn Burn Lewis added a comment -

        Attempts to start a duplicate daemon (with ducc.py) now fail.

        Show
        burn Burn Lewis added a comment - Attempts to start a duplicate daemon (with ducc.py) now fail.
        Hide
        cwiklik Jerry Cwiklik added a comment -

        Modified common code to detect duplicate ducc daemons (WS, OR, PM, SM, RM, Agent). The new code was added to DuccService (java main) which is shared by all ducc daemons. The check is made right after process starts to fail fast in case a duplicate is detected.

        First, on a daemon startup, the ps command is launched and output scrapped to collect currently running processes on a node. Next, the process list is filtered excluding those that are not owned by the daemon process owner uid. Next, each process in the list is checked to see if its a ducc daemon. If so, a final check is made to see if its a duplicate. Duplicate daemon process exits immediately.

        Show
        cwiklik Jerry Cwiklik added a comment - Modified common code to detect duplicate ducc daemons (WS, OR, PM, SM, RM, Agent). The new code was added to DuccService (java main) which is shared by all ducc daemons. The check is made right after process starts to fail fast in case a duplicate is detected. First, on a daemon startup, the ps command is launched and output scrapped to collect currently running processes on a node. Next, the process list is filtered excluding those that are not owned by the daemon process owner uid. Next, each process in the list is checked to see if its a ducc daemon. If so, a final check is made to see if its a duplicate. Duplicate daemon process exits immediately.
        Hide
        burn Burn Lewis added a comment -

        When checking for an already-running agent the code (unnecessarily) ssh's to localhost, and if that fails duplicate agents will be started.

        Show
        burn Burn Lewis added a comment - When checking for an already-running agent the code (unnecessarily) ssh's to localhost, and if that fails duplicate agents will be started.
        Hide
        burn Burn Lewis added a comment -

        Consensus is #3 ... agent should use ps to verify that it is the only agent running sometime before opening its log file.

        Show
        burn Burn Lewis added a comment - Consensus is #3 ... agent should use ps to verify that it is the only agent running sometime before opening its log file.

          People

          • Assignee:
            cwiklik Jerry Cwiklik
            Reporter:
            burn Burn Lewis
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development