Bigtop
  1. Bigtop
  2. BIGTOP-624

running start on a service already running should return success

    Details

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

      Description

      I am opening specifically this ticket for Apache Oozie but generally speaking, running start on a service already running should return success.
      See http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

      1. BIGTOP-624-1.patch
        5 kB
        Lewis Anderson
      2. BIGTOP-624.patch
        4 kB
        Lewis Anderson

        Activity

        Hide
        Bruno Mahé added a comment -

        +1
        Great!
        Thanks a lot

        Show
        Bruno Mahé added a comment - +1 Great! Thanks a lot
        Hide
        Lewis Anderson added a comment -

        fixes ozzie.init to return 0 on service start if service is already running

        Show
        Lewis Anderson added a comment - fixes ozzie.init to return 0 on service start if service is already running
        Hide
        Lewis Anderson added a comment -

        Checks if a service is already running before attempting to start it. If the service is running, immediately return success in order to comply with the spec.

        Show
        Lewis Anderson added a comment - Checks if a service is already running before attempting to start it. If the service is running, immediately return success in order to comply with the spec.
        Hide
        Lewis Anderson added a comment -

        attaching patch

        Show
        Lewis Anderson added a comment - attaching patch
        Hide
        Bruno Mahé added a comment -

        This has nothing to do with tests. This was run by hand on a VM.
        The issue is with our init scripts directly. If a service is running, calling "service <SERVICE_NAME> start" should exit with success.

        Show
        Bruno Mahé added a comment - This has nothing to do with tests. This was run by hand on a VM. The issue is with our init scripts directly. If a service is running, calling "service <SERVICE_NAME> start" should exit with success.
        Hide
        Johnny Zhang added a comment -

        @Bruno, could you please paste the error code in the log?

        I think it has to do with class org.apache.bigtop.itest.posix.Service, need to modify the function start(), which check the status of service before doing the 'service $svc_name start', if it is already started, just return success directly.

        Show
        Johnny Zhang added a comment - @Bruno, could you please paste the error code in the log? I think it has to do with class org.apache.bigtop.itest.posix.Service, need to modify the function start(), which check the status of service before doing the 'service $svc_name start', if it is already started, just return success directly.
        Hide
        Bruno Mahé added a comment -

        No, it returns an error code but still correctly says something along the lines of "Oozie already running"

        Show
        Bruno Mahé added a comment - No, it returns an error code but still correctly says something along the lines of "Oozie already running"
        Hide
        Johnny Zhang added a comment -

        @Bruno, does it return "can not start service Oozie" right now?

        Show
        Johnny Zhang added a comment - @Bruno, does it return "can not start service Oozie" right now?

          People

          • Assignee:
            Lewis Anderson
            Reporter:
            Bruno Mahé
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development