Opened 50 years ago

Last modified 9 years ago

#893 new task

IZ581: Install and startup of two equal managed host install with diff. pref. types

Reported by: afisch Owned by:
Priority: normal Milestone:
Component: hedeby Version: 1.0u1
Severity: Keywords: Sun bootstrap
Cc:

Description

[Imported from gridengine issuezilla http://gridengine.sunsource.net/issues/show_bug.cgi?id=581]

        Issue #:      581             Platform:     Sun         Reporter: afisch (afisch)
       Component:     hedeby             OS:        All
     Subcomponent:    bootstrap       Version:      1.0u1          CC:    None defined
        Status:       NEW             Priority:     P3
      Resolution:                    Issue type:    TASK
                                  Target milestone: 1.0u5next
      Assigned to:    adoerr (adoerr)
      QA Contact:     adoerr
          URL:
       * Summary:     Install and startup of two equal managed host install with diff. pref. types
   Status whiteboard:
      Attachments:


     Issue 581 blocks:
   Votes for issue 581:     Vote for this issue


   Opened: Mon Oct 27 06:02:00 -0700 2008 
------------------------


   Description:

   It is possible to install a managed host two times for the same system on the
   same machine by using different preference settings.
   After succsessful install of a master host do the following steps as root:

   1) install + startup master host for system test on hostA with pref type "system".
   2) switch to managed host machine and become root
   3) install managed host as root user with user prefs:
         ./sdmadm -s test -p user -keystore ... -cacert..  install_managed_host -au
   some_user -l /spool_1 -cs_url hosta:some_port
   4) startup the system
         ./sdmadm -s test -p user suj

   after step 4) the system can communicate with this managed host instance.

   5) now a second managed host can be installed for the same master host by using
   system preferences:
         ./sdmadm -s test -p system -keystore ... -cacert..  install_managed_host
   -au some_user -l /spool_1 -cs_url hosta:some_port

   6) This second instance can be brought up without errors, too.
         ./sdmadm -s test -p system suj

   7) However this second instance is not listed in the system (eg. show component
   command), but the first one remains.

   Clearly, it should not be possible to START both systems simultaniously. However
   two additional points need to be discussed:

   1) Should it be allowed to install a managed host with a DIFFERENT pref type
   than the corresponding masterhost install?
   1) Should it be allowed to INSTALL a managed twice with different pref types as
   above?

   The remaining sections will be added and the correct issue level will be set
   after this issue is discussed in detail.
               ------- Additional comments from afisch Tue Nov 11 06:51:29 -0700 2008 -------
   Description (continued):
   The conclusion from a discussion with Richard was:
   1) Should it be allowed to install a managed host with a DIFFERENT pref type
   than the corresponding masterhost install?
   Yes: It is a wanted feature to use hosts with different preference types for a
   single SDM instance.
   2) Should it be allowed to INSTALL a managed twice with different pref types as
   above?
   Yes, because we can not easily prevent the user to INSTALL a managed host
   several times on the same host for the same system but under different
   preference types. We explicitly allow to have a user instance and a system
   instance with the same name. Although here the intention is to address different
   hedeby systems with this ambiguous name option we can not prevent that the user
   will install both for the same SDM instance. This is because the system
   bootstrap might be not visible to the user or vice versa.

   However, it should not be possible to START a managed host twice for the same
   SDM instance. So it is this behavior that will be addressed with the issue!

   Evaluation:
   The issue is rated as p3 defect. The double start of a managed host does not
   harm the SDM instance. However the cli does not prevent/comment the second
   startup. Thus the user might not be aware that the second startup is masked by
   the first one.


   Suggested Fix / Work Around:
   Suggested Fix: The second startup of a managed host should fail, if a managed
   host from the same host is already registered as running for the SDM instance,
   regardless of pref type.

   Work Around:
   The managed host that is started as second one can be shutted down via
   shutdown_java command. This is possible as the pid files for both JVMs are
   stored at different locations.


   Analysis:
   The current code prevents a double start of a jvm with the SAME pref type by
   checking if the corresponding pid file exists (ParentStartupService.start()).
   This mechanism can not prevent to start up two managed hosts with DIFFERENT pref
   types, as they spool into different directories.

   But the already running jvm could be contacted inside
   StartJVMCliCommand.execute() via ShowJvmsCliCommand (an show_jvm -h localhost
   equivalent). If the jvm to be started is running, the command should exit and
   report that the jvm are already running.


   How to test:
   Test:
   Additionally to an installed ts managed host that is installed per default as
   system/user another managed host should be installed with mutually different
   pref types.

   The system prefs instance should be started first. Then it should be started
   again to show that this second startup is not possible. Then the one with user
   prefs should be started to show that it fails, too. The error messages should be
   checked. Additionally it should be checked that no pid file exists in the
   corresponding spool dirs.

   After this the managed install with system prefs should shut down. And the one
   with the user pref type should be started. This should work! Now  start commands
   analog to the fist test case should be tried.

   The cleanup has to be done carefully as additional host installs are not usual
   for the TS.

   The TS test are complicated as the install command for an additional sdm
   instance has to be integrated. (If IZ:602 is fixed an example TS test might be
   available!)

   ETC
   4 PD {
   2 PD Fix
   2 PD TS test
   }
               ------- Additional comments from rhierlmeier Wed Nov 25 07:21:09 -0700 2009 -------
   Milestone changed

Change History (0)

Note: See TracTickets for help on using tickets.