Bigtop
  1. Bigtop
  2. BIGTOP-836

Hue status on SuSE doesn't work when run from outside of /usr/bin

    Details

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

      Description

      BIGTOP-829 added a "-L" flag in the status check for hue on SuSE 11. The flag was used to specify python as an argument instead of something like python2.7.

      However, that flag (to follow symlinks) doesn't quite work unless you are running the command from /usr/bin/ where there is a symlink called python pointing to python2.6. Moreover, it may lead to incorrect results if /usr/bin/python was not the python being used.

      Consequently, a better approach is needed. An idea is to parse the output of ps for the pid in question, ensure it's hue related and report the status. The benefit is that it's a clean process with no dependency on pidofproc or figuring out what version of python is being used.

      1. BIGTOP-836.1.patch
        2 kB
        Mark Grover
      2. BIGTOP-836.2.patch
        2 kB
        Mark Grover
      3. BIGTOP-836.3.patch
        2 kB
        Mark Grover
      4. BIGTOP-836.4.patch
        2 kB
        Mark Grover

        Activity

        Hide
        Roman Shaposhnik added a comment -

        +1

        Thanks for the patch – I'll commit it soon

        Show
        Roman Shaposhnik added a comment - +1 Thanks for the patch – I'll commit it soon
        Hide
        Mark Grover added a comment -

        Fixing minor whitespace issues in patch3

        Show
        Mark Grover added a comment - Fixing minor whitespace issues in patch3
        Hide
        Mark Grover added a comment -

        Updated patch with Roman's suggestions on reviewboard.

        Show
        Mark Grover added a comment - Updated patch with Roman's suggestions on reviewboard.
        Hide
        Mark Grover added a comment -

        Thanks for the review, Roman! Here is another patch with your suggested changes. Feedback welcome!

        Review at https://reviews.apache.org/r/9155/

        Show
        Mark Grover added a comment - Thanks for the review, Roman! Here is another patch with your suggested changes. Feedback welcome! Review at https://reviews.apache.org/r/9155/
        Hide
        Roman Shaposhnik added a comment -

        Looks reasonable, but is there any chance you can also implement STATUS_DEAD and STATUS_DEAD_AND_LOCK ? Would be really awesome if we could support those 2 cases as well and it probably shouldn't be that terribly difficult.

        Show
        Roman Shaposhnik added a comment - Looks reasonable, but is there any chance you can also implement STATUS_DEAD and STATUS_DEAD_AND_LOCK ? Would be really awesome if we could support those 2 cases as well and it probably shouldn't be that terribly difficult.
        Hide
        Mark Grover added a comment -

        Patch that uses output of ps to find out the status of Hue on SuSE.

        While I was on it, I fixed what looked like a minor stdout bug in stop() functionality.

        Show
        Mark Grover added a comment - Patch that uses output of ps to find out the status of Hue on SuSE. While I was on it, I fixed what looked like a minor stdout bug in stop() functionality.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development