Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-4456

queryserver script doesn't perform as expected.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.13.0, 5.0.0-alpha
    • 5.0.0-alpha, 4.14.0
    • None
    • None

    Description

      Our queryserver.py is using a copy of daemon module. It has several flows:
      1. it forks first, exit the parent process and after that create the pid file. So there is a gap between the queryserver.py finished and the pid file created.
      2. The check for existing pid is happening in forked process, so if we start queryserver when there is already running one we wouldn't see the message that process is already running/started

      I've checked the more recent version from python 3.5 and it's still using the same logic.
      for (2) I think we may add an additinal check to PidFile._init_, so it will happen before we fork the daemon. For (1) there is an option to wait until pid file appears and only after exit the parent process.

      FYI elserj

      Attachments

        1. PHOENIX-4456.patch
          2 kB
          Sergey Soldatov

        Activity

          People

            sergey.soldatov Sergey Soldatov
            sergey.soldatov Sergey Soldatov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: