Opened 51 years ago

Last modified 10 years ago

#935 new defect

IZ708: sdmadm mvr -r res -s service to non-existing service does not return with error

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


[Imported from gridengine issuezilla]

        Issue #:      708           Platform:     Sun          Reporter: zwierzak (zwierzak)
       Component:     hedeby           OS:        All
     Subcomponent:    cli           Version:      1.0u5_Beta      CC:    None defined
        Status:       STARTED       Priority:     P3
      Resolution:                  Issue type:    DEFECT
                                Target milestone: 1.0u5next
      Assigned to:    adoerr (adoerr)
      QA Contact:     adoerr
       * Summary:     sdmadm mvr -r res -s service to non-existing service does not return with error
   Status whiteboard:

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

   Opened: Mon Dec 7 04:10:00 -0700 2009 


   -->./sdmadm mvr -r res#1 -s sge4
   resource message
   res#1    Resource move triggered

   Even when sge4 does not exist in system. As a result resource res#1 will be
   unassigned from the current service and it will end up in RP. Once any request
   for resource comes to RP this resource is moved.


   -->./sdmadm -s shist -r res#1
   time_stamp              type                        service_name   resource
   12/02/2009 12:31:17.282 RESOURCE_ADD                sge1           myhost(res#1)
   Autodiscovered at service startup
   12/02/2009 12:31:17.334 RESOURCE_PROPERTIES_CHANGED sge1           myhost(res#1)
   12/02/2009 12:31:20.594 RESOURCE_ADDED              sge1           myhost(res#1)
   Got execd update event
   12/02/2009 12:31:20.605 RESOURCE_PROPERTIES_CHANGED sge1           myhost(res#1)
   [[I:totalVirtualMemory=4.2953867264E10], [I:hardwareTotalMemory=8.588886016E9],
   [I:hardwareCpuArchitecture=amd64], [I:totalSwap=3.4364981248E10],
   [I:operatingSystemName=Solaris], [I:hardwareCpuCount=4], [U:annotation=Got execd
   update event]]
   12/07/2009 11:02:07.56  RESOURCE_REMOVE             sge1           myhost(res#1)
   Uninstalling execd
   12/07/2009 11:02:15.861 RESOURCE_REMOVED            sge1           myhost(res#1)
   Execd is not running
   12/07/2009 11:02:15.876 RESOURCE_ADD                resource_provider myhost(res#1)
   12/07/2009 11:02:15.895 RESOURCE_ADDED              resource_provider myhost(res#1)
   12/07/2009 11:02:15.930 RESOURCE_REMOVE             resource_provider myhost(res#1)
                           RESOURCE_REMOVED            resource_provider myhost(res#1)
   12/07/2009 11:02:15.953 RESOURCE_ADD                resource_provider myhost(res#1)
   12/07/2009 11:02:15.957 RESOURCE_ADDED              resource_provider myhost(res#1)
   12/07/2009 11:02:55.472 RESOURCE_REMOVE             resource_provider myhost(res#1)
                           RESOURCE_REMOVED            resource_provider myhost(res#1)
   12/07/2009 11:02:55.484 RESOURCE_ADD                spare_pool     myhost(res#1)
   12/07/2009 11:02:55.493 RESOURCE_ADDED              spare_pool     myhost(res#1)
   12/07/2009 11:02:55.501 RESOURCE_PROPERTIES_CHANGED spare_pool     myhost(res#1)

   The same behavior can be observed when target service of sdmadm mvr exists but
   is not active.


   P3. No major impact on system. Resource is still in system and shist command
   explains what happened to resource, however administrator is not aware of
   problem until he issues sdmadm shist command.


   Use sdmadm mvr command to move resource back to initial service.


   The check should be done if target service is active before "move" operation is

   Analysis: >> method  void moveResource(String targetServiceName,
   ResourceId resourceId,
               boolean isForced, boolean isStatic)
               throws UnknownResourceException, UnknownServiceException,
               ServiceNotActiveException, InvalidResourceException,
   InvalidServiceException; is resposible for triggering this operation.

   Inside this method we have check if owner of resource is active but the target
   service is not active. The check should be put in line 502. If target service is
   not active exception should be thrown.


   Ts test containing 2 checks:
   1) shutdown existing service, and try to move some resource to that service,
   command should return error
   2) try to move resource to non-existing service (generate so tmp service name),
   the operation should return error

   ETC: 2PD
               ------- Additional comments from zwierzak Mon Dec 7 04:10:28 -0700 2009 -------
               ------- Additional comments from afisch Tue Jan 19 05:20:36 -0700 2010 -------
   take it

Change History (0)

Note: See TracTickets for help on using tickets.