Opened 51 years ago

Last modified 10 years ago

#900 new task

IZ594: sdmadm add_resource command does not allow -r parameter with host list

Reported by: torsten Owned by:
Priority: low Milestone:
Component: hedeby Version: 1.0u1
Severity: Keywords: Sun cli


[Imported from gridengine issuezilla]

        Issue #:      594          Platform:     Sun         Reporter: torsten (torsten)
       Component:     hedeby          OS:        All
     Subcomponent:    cli          Version:      1.0u1          CC:    None defined
        Status:       NEW          Priority:     P4
      Resolution:                 Issue type:    TASK
                               Target milestone: 1.0u5next
      Assigned to:    adoerr (adoerr)
      QA Contact:     adoerr
       * Summary:     sdmadm add_resource command does not allow -r parameter with host list
   Status whiteboard:

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

   Opened: Wed Nov 5 04:49:00 -0700 2008 

   The add_resource command allows to add resources to a sdm system. When
   specifying a file (-f option) multiple hosts can be specified in one file.
   However, when using the -r option, then only one resource can be added. This
   behavior is additionally inconsistent with the behavior of the complement
   command remove_resource which accepts multiple resources for the -r parameter:

   % sdmadm remove_resource -r hostA,hostB,hostD
   resource message
   hostA    Resource remove triggered.
   hostB    Resource remove triggered.
   hostD    Resource remove triggered.

   % sdmadm add_resource -r hostA,hostB
   WARNING: Host hostA,hostB is not resolvable
   Error: Id 'hostA,hostB' is an invalid resource id (host is not resolvable)

   The problem is rated as p4 task. It is not a bug but it is not consistent
   behavior (compared to remove_resource and the other options of add_resource).

   Suggested fix:
   The -r option should accept multiple resources. If necessary, an editor should
   be opened for each resource if mandatory properties could not be determined

   Work around:
   Add the resources either from a file or with multiple add_resource commands.

   Extend the code in AddResourceCliCommand#createCommand() to deal with multiple
   resource ids given for the -r parameter. Basically the section labeled
   "interactive use case" has to be wrapped in a loop over all resource ids with
   special treatment for the case that no -r AND no -f parameter is given.

   How to test:
   A TS test should be written to test the adding of (multiple) resources including
   checking the case with NO -r and -f parameter.

   1.5 PD
               ------- Additional comments from torsten Wed Nov 5 05:13:29 -0700 2008 -------
   sdmadm move_resource -r hostA,hostB -s service
   also works, underlining the consistency problem here.
               ------- Additional comments from torsten Thu Nov 6 00:26:31 -0700 2008 -------
   fixed typo in summary
               ------- 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.