Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-14452

It should be possible to delete service components if all related host components are stopped

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.4.0
    • ambari-server
    • None

    Description

      It should be possible to delete a Service Component regardless of its state when all member host components are in DELETE friendly state (non-started).

      This is what happens today with

      • HDFS Secondary namenode deployed on c6402.ambari.apache.org
      • Host component SECONDARY_NAMENODE in INSTALLED state
         
        curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE http://c6401.ambari.apache.org:8080/api/v1/clusters/test/services/HDFS/components/SECONDARY_NAMENODE { "status" : 500, "message" : "org.apache.ambari.server.controller.spi.SystemException: An internal system exception occurred: Could not delete service component from cluster. To remove service component, it must be in DISABLED/INIT/INSTALLED/INSTALL_FAILED/UNKNOWN/UNINSTALLED/INSTALLING state., clusterName=test, serviceName=HDFS, componentName=SECONDARY_NAMENODE, current state=STARTED." 
        

        Direct delete of the host component succeeds.

         curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE delete http://c6401.ambari.apache.org:8080/api/v1/clusters/test/hosts/c6402.ambari.apache.org/host_components/SECONDARY_NAMENODE
         

        Even then the delete of the service component still fails. Ideally very first call to delete service component should have succeeded.

      Attachments

        1. AMBARI-14452.patch
          60 kB
          Ajit Kumar

        Issue Links

          Activity

            People

              ajit.kumar Ajit Kumar
              ajit.kumar Ajit Kumar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: