Bigtop
  1. Bigtop
  2. BIGTOP-1006

Explicitly state the working directory to be used in init scripts instead of relying on user's home directories

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.6.0
    • Fix Version/s: 0.7.0
    • Component/s: debian, rpm
    • Labels:
      None

      Description

      Presently, the init script template cd's into a working directory when running the init script (reference: https://github.com/apache/bigtop/blob/master/bigtop-packages/src/templates/init.d.tmpl#L86)

      When no such variable (WORKING_DIR) is provided when building the init script, it will default to the user in question's home directory.

      This can lead to problems in upgrade scenarios. Say the user "mapred" already exists (say because the user had an old or existing installation of Bigtop) and that user has a different working directory for the user that no longer exists.

      When Bigtop package installation occurs, it doesn't create the user if it already exists. In such a case, the init script fails because it can't cd into the home directory.

        Activity

        Mark Grover created issue -
        Hide
        Mark Grover added a comment -

        One solution is to be explicit about which directory to cd into when running init scripts instead of simply relying on the home directory.

        Show
        Mark Grover added a comment - One solution is to be explicit about which directory to cd into when running init scripts instead of simply relying on the home directory.
        Mark Grover made changes -
        Field Original Value New Value
        Attachment BIGTOP-1006.1.patch [ 12587340 ]
        Hide
        Mark Grover added a comment -

        Attaching a patch that explicitly supplies the directories to cd into when starting the service instead of just relying on the home directory.

        Show
        Mark Grover added a comment - Attaching a patch that explicitly supplies the directories to cd into when starting the service instead of just relying on the home directory.
        Mark Grover made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Sean Mackrory added a comment -

        +1 (non-committer). I'm still a fan of trying to correct the user's home directory if they already exist - even if it won't always be effectual. But I think being explicit about the working directory is a good thing, even if it introduces some redundancy.

        Show
        Sean Mackrory added a comment - +1 (non-committer). I'm still a fan of trying to correct the user's home directory if they already exist - even if it won't always be effectual. But I think being explicit about the working directory is a good thing, even if it introduces some redundancy.
        Hide
        Roman Shaposhnik added a comment -

        +1 and committed!

        Show
        Roman Shaposhnik added a comment - +1 and committed!
        Roman Shaposhnik made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Roman Shaposhnik made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        15m 30s 1 Mark Grover 12/Jun/13 00:01
        Patch Available Patch Available Resolved Resolved
        10d 5h 58m 1 Roman Shaposhnik 22/Jun/13 06:00
        Resolved Resolved Closed Closed
        135d 16h 24m 1 Roman Shaposhnik 04/Nov/13 21:24

          People

          • Assignee:
            Mark Grover
            Reporter:
            Mark Grover
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development