Opened 50 years ago

Last modified 9 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
Cc:

Description

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

        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
          URL:
       * Summary:     sdmadm mvr -r res -s service to non-existing service does not return with error
   Status whiteboard:
      Attachments:


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


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


   Description:

   -->./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.

   Example:

   -->./sdmadm -s shist -r res#1
   time_stamp              type                        service_name   resource
           description
   ------------------------------------------------------------------------------------------------------------------------------------------
   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)
   [[U:usage=inf->50]]
   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)
   [[U:usage=inf->1]]

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

   Evaluation:

   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.

   Workaround:

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

   Fix:

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

   Analysis:

   ResourceManagerImpl.java >> 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.

   Test:

   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 -------
   milestone
               ------- 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.