Bigtop
  1. Bigtop
  2. BIGTOP-792

org.apache.bigtop.itest.posix.Service needs to be updated to accomodate upstart/systemd

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.5.0
    • Fix Version/s: backlog
    • Component/s: Tests
    • Labels:
      None

      Description

      With the output and return valued drastically different on latest Linux distros it seems that the Service implementation needs to be updated to accommodate upstart/systemd.

        Activity

        Hide
        Johnny Zhang added a comment -

        Roman Shaposhnik, I think Bigtop right now is using sysvinit to manage service daemon : we use "service <SERVICE_DAMON> start/stop/restart/status" to manage and monitor daemon.

        If the Linux distro changed to system/upstart, are we still able to use "service <SERVICE_DAMON> start/stop/restart/status" to do what we used to do ? How can I try it if I install Hadoop from Bigtop trunk? Thanks!

        Show
        Johnny Zhang added a comment - Roman Shaposhnik , I think Bigtop right now is using sysvinit to manage service daemon : we use "service <SERVICE_DAMON> start/stop/restart/status" to manage and monitor daemon. If the Linux distro changed to system/upstart, are we still able to use "service <SERVICE_DAMON> start/stop/restart/status" to do what we used to do ? How can I try it if I install Hadoop from Bigtop trunk? Thanks!
        Hide
        Bruno Mahé added a comment -

        Most GNU/Linux distributions provide a "service"-like implementation for backward compatibility.
        For instance systemd provides a service implementation on my Fedora 17

        Show
        Bruno Mahé added a comment - Most GNU/Linux distributions provide a "service"-like implementation for backward compatibility. For instance systemd provides a service implementation on my Fedora 17
        Hide
        Roman Shaposhnik added a comment -

        Johnny, I think Bruno answered most of you questions. Basically, the service command is still there (in emulation mode) but its output has changed on systemd-enabled systems. Which means that the org.apache.bigtop.itest.posix.Service can't determine the status of the service, etc. This needs to be fixed.

        Show
        Roman Shaposhnik added a comment - Johnny, I think Bruno answered most of you questions. Basically, the service command is still there (in emulation mode) but its output has changed on systemd-enabled systems. Which means that the org.apache.bigtop.itest.posix.Service can't determine the status of the service, etc. This needs to be fixed.
        Show
        Roman Shaposhnik added a comment - Johnny, here's how the output is now different. E.g.: http://bigtop01.cloudera.org:8080/view/Bigtop-trunk/job/Bigtop-trunk-packagetest/label=opensuse12-slave/lastCompletedBuild/testReport/org.apache.bigtop.itest.packagesmoke/TestPackagesPseudoDistributedServices/testPackageServices_hive_metastore_/ Hence the tests are failing
        Hide
        Johnny Zhang added a comment -

        @Roman, the link you give is OpenSuse 12 using systemd. Can we update the Service class to handle systemd first? In the future, when the platforms we support using upstart, we can reopen this jira to support upstart then.

        Show
        Johnny Zhang added a comment - @Roman, the link you give is OpenSuse 12 using systemd. Can we update the Service class to handle systemd first? In the future, when the platforms we support using upstart, we can reopen this jira to support upstart then.
        Hide
        Roman Shaposhnik added a comment -

        @Johnny – sure thing – for now just update it to the point where it can handle OpenSUSE12

        Show
        Roman Shaposhnik added a comment - @Johnny – sure thing – for now just update it to the point where it can handle OpenSUSE12
        Hide
        Johnny Zhang added a comment -

        in systemd, only "service <SERVICE_NAME> status" output is different.

        there are some examples of output of "service <SERVICE_NAME> status" in opensuse12

        serviced stopped

        hive-server.service - LSB: Starts a Hive server
        	  Loaded: loaded (/etc/init.d/hive-server)
        	  Active: failed (Result: exit-code) since Sat, 01 Dec 2012 03:19:48 -0500; 13min ago
        	 Process: 11473 ExecStop=/etc/init.d/hive-server stop (code=exited, status=0/SUCCESS)
        	 Process: 11377 ExecStart=/etc/init.d/hive-server start (code=exited, status=0/SUCCESS)
        	Main PID: 11388 (code=exited, status=143)
        	  CGroup: name=systemd:/system/hive-server.service
        
        Dec 01 03:19:42 opensuse12livecd hive-server[11377]: Starting  (hive-server): ..done
        Dec 01 03:19:42 opensuse12livecd hive-server[11377]: nohup: failed to run command ' ': No such fi...ry
        Dec 01 03:19:43 opensuse12livecd hive-server[11377]: ...killed.
        Dec 01 03:19:47 opensuse12livecd hive-server[11473]: Stopping  (hive-server): ..done
        

        service stopped

        solr-server.service - LSB: Solr server
        	  Loaded: loaded (/etc/init.d/solr-server)
        	  Active: inactive (dead) since Sat, 01 Dec 2012 03:36:39 -0500; 1s ago
        	 Process: 11902 ExecStop=/etc/init.d/solr-server stop (code=exited, status=0/SUCCESS)
        	 Process: 11861 ExecStart=/etc/init.d/solr-server start (code=exited, status=0/SUCCESS)
        	  CGroup: name=systemd:/system/solr-server.service
        
        Dec 01 03:35:05 opensuse12livecd solr-server[11861]: Solr server daemon agent is not running..failed
        Dec 01 03:35:05 opensuse12livecd solr-server[11861]: Starting Solr server daemon: ..done
        Dec 01 03:35:05 opensuse12livecd su[11868]: (to solr) root on none
        Dec 01 03:35:07 opensuse12livecd solr-server[11861]: ...killed.
        Dec 01 03:36:35 opensuse12livecd solr-server[11902]: Stopping Solr server daemon: ..done
        Dec 01 03:36:35 opensuse12livecd su[11908]: (to solr) root on none
        Dec 01 03:36:39 opensuse12livecd solr-server[11902]: ...killed.
        

        service started

        solr-server.service - LSB: Solr server
        	  Loaded: loaded (/etc/init.d/solr-server)
        	  Active: active (exited) since Sat, 01 Dec 2012 03:35:07 -0500; 5s ago
        	 Process: 10495 ExecStop=/etc/init.d/solr-server stop (code=exited, status=0/SUCCESS)
        	 Process: 11861 ExecStart=/etc/init.d/solr-server start (code=exited, status=0/SUCCESS)
        	  CGroup: name=systemd:/system/solr-server.service
        
        Dec 01 03:35:05 opensuse12livecd solr-server[11861]: Solr server daemon agent is not running..failed
        Dec 01 03:35:05 opensuse12livecd solr-server[11861]: Starting Solr server daemon: ..done
        Dec 01 03:35:05 opensuse12livecd su[11868]: (to solr) root on none
        Dec 01 03:35:07 opensuse12livecd solr-server[11861]: ...killed.
        

        So, identify substring "Active: active", "Active: inactive", "Active: failed" is sufficient to identify service status.

        Show
        Johnny Zhang added a comment - in systemd, only "service <SERVICE_NAME> status" output is different. there are some examples of output of "service <SERVICE_NAME> status" in opensuse12 serviced stopped hive-server.service - LSB: Starts a Hive server Loaded: loaded (/etc/init.d/hive-server) Active: failed (Result: exit-code) since Sat, 01 Dec 2012 03:19:48 -0500; 13min ago Process: 11473 ExecStop=/etc/init.d/hive-server stop (code=exited, status=0/SUCCESS) Process: 11377 ExecStart=/etc/init.d/hive-server start (code=exited, status=0/SUCCESS) Main PID: 11388 (code=exited, status=143) CGroup: name=systemd:/system/hive-server.service Dec 01 03:19:42 opensuse12livecd hive-server[11377]: Starting (hive-server): ..done Dec 01 03:19:42 opensuse12livecd hive-server[11377]: nohup: failed to run command ' ': No such fi...ry Dec 01 03:19:43 opensuse12livecd hive-server[11377]: ...killed. Dec 01 03:19:47 opensuse12livecd hive-server[11473]: Stopping (hive-server): ..done service stopped solr-server.service - LSB: Solr server Loaded: loaded (/etc/init.d/solr-server) Active: inactive (dead) since Sat, 01 Dec 2012 03:36:39 -0500; 1s ago Process: 11902 ExecStop=/etc/init.d/solr-server stop (code=exited, status=0/SUCCESS) Process: 11861 ExecStart=/etc/init.d/solr-server start (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/solr-server.service Dec 01 03:35:05 opensuse12livecd solr-server[11861]: Solr server daemon agent is not running..failed Dec 01 03:35:05 opensuse12livecd solr-server[11861]: Starting Solr server daemon: ..done Dec 01 03:35:05 opensuse12livecd su[11868]: (to solr) root on none Dec 01 03:35:07 opensuse12livecd solr-server[11861]: ...killed. Dec 01 03:36:35 opensuse12livecd solr-server[11902]: Stopping Solr server daemon: ..done Dec 01 03:36:35 opensuse12livecd su[11908]: (to solr) root on none Dec 01 03:36:39 opensuse12livecd solr-server[11902]: ...killed. service started solr-server.service - LSB: Solr server Loaded: loaded (/etc/init.d/solr-server) Active: active (exited) since Sat, 01 Dec 2012 03:35:07 -0500; 5s ago Process: 10495 ExecStop=/etc/init.d/solr-server stop (code=exited, status=0/SUCCESS) Process: 11861 ExecStart=/etc/init.d/solr-server start (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/solr-server.service Dec 01 03:35:05 opensuse12livecd solr-server[11861]: Solr server daemon agent is not running..failed Dec 01 03:35:05 opensuse12livecd solr-server[11861]: Starting Solr server daemon: ..done Dec 01 03:35:05 opensuse12livecd su[11868]: (to solr) root on none Dec 01 03:35:07 opensuse12livecd solr-server[11861]: ...killed. So, identify substring "Active: active", "Active: inactive", "Active: failed" is sufficient to identify service status.
        Hide
        Johnny Zhang added a comment -

        this is git format-patch, I have tested it with a few services in opensuse12.

        Show
        Johnny Zhang added a comment - this is git format-patch, I have tested it with a few services in opensuse12.
        Hide
        Konstantin Boudnik added a comment -

        This ticket has never been reviews/committed. Is this still an actual one?

        Show
        Konstantin Boudnik added a comment - This ticket has never been reviews/committed. Is this still an actual one?

          People

          • Assignee:
            Johnny Zhang
            Reporter:
            Roman Shaposhnik
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:

              Development