Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-451

Daemonization of all components

    XMLWordPrintable

    Details

      Description

      Currently we start all components in an endless loop that traps sigtem/sigint for stopping the component along with using a sentinel file for automatic restart. With the momentum of upstart and similar init replacements for Linux distributions, this should be revisited.

      I purpose that a rework of our init system would be a key enhancement that can allow cleaner adoption of our platform into many distributions.

      To achieve this, we would need to make a set of modifications to all components allowing them to run as a proper double forked daemon.

      Here are a couple things that I see as needed in order to do this.

      1. All components need to log all output to a log file with an option to turn off all stdout and stderr output.
      2. A debug option is needed for all components on startup allowing console based output/operation.
      3. Changing of all command line options for components allowing for a debug flag.
      4. Addition of daemonizing code to allow for standard double fork along with pid creations.
      (Example class interface to do this can be seen at https://github.com/pschwartz/hpccd, This is my code from spare time).

      The start process would need to be changed for this to work. Usage of start-stop-daemon to start the daemon along with it starting as root in order to create dirs and set dir perms before doing a change of uid/gid.

      It would also in the long run be beneficial to have the components passed either the dir with their config files or for them to be passed the environment.xml directly and use the configgen api to create their config files in the correct location.

      @richardkchapman @jakesmith @ghalliday @RussWhitehead Please look over this and discuss options pertaining to this topic.

        Attachments

          Issue Links

          There are no Sub-Tasks for this issue.

            Activity

              People

              • Assignee:
                Michael-Gardner Michael Gardner
                Reporter:
                pschwartz Philip Schwartz (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: