Opened 51 years ago

Last modified 10 years ago

#928 new defect

IZ691: -sort and -oc switches fail after ui commands were executed when unknown column was given as parameter

Reported by: marcingoldyn Owned by:
Priority: normal Milestone:
Component: hedeby Version: 1.0u5_Beta
Severity: Keywords: cli


[Imported from gridengine issuezilla]

        Issue #:      691          Platform:     All          Reporter: marcingoldyn (marcingoldyn)
       Component:     hedeby          OS:        All
     Subcomponent:    cli          Version:      1.0u5_Beta      CC:    None defined
        Status:       NEW          Priority:     P3
      Resolution:                 Issue type:    DEFECT
                               Target milestone: 1.0u5next
      Assigned to:    adoerr (adoerr)
      QA Contact:     adoerr
       * Summary:     -sort and -oc switches fail after ui commands were executed when unknown column was given as parameter
   Status whiteboard:

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

   Opened: Thu Nov 5 01:34:00 -0700 2009 


   With our cli framework it can happen that when user will specify column names
   for -sort or -oc switch for table output, the evaluation of the column names
   will be done after the ui command will be executed. So there can be a situation
   where user will specify non existing column names. Command will execute. Some
   action will be done in the SDM. Results will return to the cli command. Table
   output is going to be built using results from the ui command. At this point
   evaluation of the column names is done and if there is a unknown column names
   detected, proper exception is thrown. Exception is thrown, but user will be not
   informed about the result of executing commands. The good thing is that he will
   not be informed about results that command was successfully executed. If the ui
   command failed. He will be notify about error cause the exception will be thrown
   before the table output is created.


   This issue is rated as P3 or should even be a P4. The problem occurs only when
   validation of the columns is done after we got results from ui command. So if ui
   command failed user will be notify about the problem. It can be just misleading
   for the user, that exception was thrown that column is unknown, but the wanted
   action was successfully executed.

   Work Around:

   There is no work around. User has to check using monitoring commands or Inspect
   what actually happend to the system after this problem.


   There are 2 solutions.

   1) Cli command should fail before ui command is executed. It can be done as
   static command of AbstractDefaultTableModel or implemented in each cli command
   table model. It will be executed before ui command is created and executed. This
   will require changes in each cli table model.

   2) Make this situation special and throw special exception type like f.i.
   OutputException with different exit code. As its written in description ui
   command was executed successfully. We have results. When table output will start
   to evaluate column names for -oc and -sort switches and sth will be wrong
   we will throw a special exception - OuputException with diffent exit code. But
   it doesnt stop us to print to the user default HumanReadableTable with all
   columns despite what was set in -oc switch. And also default column sort order
   despite of what column names were given to -sort switch. So at the end user will
   get an exception with different exit code and results what actually happen in
   the system.

   How to test:

   This can be tested via testsuite test. Depends on solution we will check proper
   output of the commands execution.

   3 PD
               ------- Additional comments from rhierlmeier Wed Nov 25 07:21:12 -0700 2009 -------
   Milestone changed

Change History (0)

Note: See TracTickets for help on using tickets.