Opened 50 years ago

Last modified 9 years ago

#883 new task

IZ549: Error messages that are not helpful enough

Reported by: afisch Owned by:
Priority: normal Milestone:
Component: hedeby Version: 1.0
Severity: Keywords: cli
Cc:

Description

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

        Issue #:      549          Platform:     All         Reporter: afisch (afisch)
       Component:     hedeby          OS:        All
     Subcomponent:    cli          Version:      1.0            CC:    None defined
        Status:       NEW          Priority:     P3
      Resolution:                 Issue type:    TASK
                               Target milestone: 1.0u5next
      Assigned to:    adoerr (adoerr)
      QA Contact:     adoerr
          URL:
       * Summary:     Error messages that are not helpful enough
   Status whiteboard:
      Attachments:


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


   Opened: Tue Aug 5 02:30:00 -0700 2008 
------------------------


   Description:
   A set of errors that can occur while administering the SDM system do not report
   appropriate messages. They are ether only useful for the developers, not useful
   at all or even misleading. The set of error messages are listed below with the
   corresponding circumstances that led to the error:

   1.) If the add-GE-adapter command is executed, usually a vi window is presented
   to edit the configuration. If the editor is exited without saving the
   configuration (eg :q) the command finishes with:

   "Grid Engine service configuration not changed"

   2.) If a GE adapter is installed with the -start option and the targeted jvm is
   not started jet the following error is displayed:

   gally1% ./sdmadm -s sdmaf add_ge_service -h gally1 -j rp_vm -s geadapter -start
   Error: Configuration of GE service: geadapter has been added, but start of
   component failed.

   3.) Insufficient error message if a command that requires to be executed as SDM
   admin user is started as a non SDM admin user
   Two examples executed as a non administrative user:
   # ./sdmadm -s sdmaf sdj -all -h gally1
   Error: permission denied

   # ./sdmadm -s sdmaf mc -c spare_pool
   Error: permission denied


   4.) If a command is executed that needs the configuration service and the cs_vm
   is not running

   # ./sdmadm -s sdmaf mc -c spare_pool
   Error: Cannot connect to jvm cs_vm@gally1: Connection refused



   Evaluation:
   The task is considered to be p3 because these errors occur usually only if the
   system is used in an improper way (eg not as suggested in the documentation).

   Suggested Fix / Work Around:
   The user has to use the correct command / the command in the correct way.

   The error messages should be descriptive to make it as easy as possible for the
   user to find out what went wrong.

   1.) "The Grid Engine service configuration has not been saved. A command
   cancellation is assumed. No Service has been added." -- As an alternative the
   system can use the default configuration template to add the ge_adapter, as it
   can be edited later by the modify_component command. In this case the message
   should state: "GE adapter has been added with default configuration"

   2.) "Error: Configuration of GE service: geadapter has been added, but start of
   component failed. Please check that <vmname>@<hostname> is started and running.
   If not please start <vmname>@<hostname> manually.

   3.) "Error: Permission denied! User <user> is not an SDM admin user."

   4.) "Error: Cannot connect to jvm cs_vm@gally1: Connection refused. Please check
   if jvm cs_vm@gally1:<cs_port> is started and running.




   Analysis:

   1.) The corresponding code is in AddGEServiceCliCommand:execute:140-145

       geConf = XMLUtil.<GEServiceConfig>edit(env, geConf, "ge_config");
       if(geConf == null) {
           cli.out().println("AddGEServiceCliCommand.unchanged", getBundleName());

           return;
       }

   2.) The corresponding code is in AddGEServiceCliCommand:execute:166

       throw new GrmException("AddGEServiceCliCommand.failed.start", ex,
   getBundleName(), name);

   3.) This is most likely a wrapped java security exception where the message text
   is reused in a wrapping grm exception. This part of the task might become
   obsolete if it can be covered by issue 548. For issue 548 a checkAccessCommand
   has to be developed that explicitly checks the access rights and should report
   an appropriate message in the permission denied case.


   4.) The corresponding code is in ConnectionProxy:getConnection:422

       } catch(IOException ex)  {
           throw new GrmRemoteException("ConnectionPool.ex.io", ex, BUNDLE,
   jvmInfo.getIdentifier(), GrmRemoteException.findRealMessage(ex));
       }

   Be aware that especially the error message in 3.) is referred in some java doc
   related comments and in the documentation => these places have to be updated, too.



   How to test:

   The error messages should be tested in testsuit tests that covers the behavior
   of the corresponding commands anyway.
   As the error behavior is currently barely covered by the TS this might imply to
   write the corresponding tests from the scratch.

   ETC:
   4 PD
               ------- Additional comments from rhierlmeier Wed Nov 25 07:21:11 -0700 2009 -------
   Milestone changed

Change History (0)

Note: See TracTickets for help on using tickets.