You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Madhuvanthi Radhakrishnan (JIRA)" <ji...@apache.org> on 2017/08/30 18:54:00 UTC

[jira] [Resolved] (AMBARI-21849) Clean up repo_version table during mpack delete, add create validation for mpacks

     [ https://issues.apache.org/jira/browse/AMBARI-21849?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Madhuvanthi Radhakrishnan resolved AMBARI-21849.
------------------------------------------------
    Resolution: Fixed

> Clean up repo_version table during mpack delete, add create validation for mpacks
> ---------------------------------------------------------------------------------
>
>                 Key: AMBARI-21849
>                 URL: https://issues.apache.org/jira/browse/AMBARI-21849
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>            Reporter: Madhuvanthi Radhakrishnan
>            Assignee: Madhuvanthi Radhakrishnan
>             Fix For: 3.0.0
>
>
> *Register Mpack API throws NPE when mpack defined in the registry is unavailable in mpack-repo.*
> 1. Register mpack registry with an invalid mpackUrl (which does not point to a Mpack) 
> 2. Try to create a Mpack using register Mpack API
> 3. API should fail with valid error message stating invalid/unreachable mpackUrl, but fails with 500 server error.
> *Delete Mpack API failing with 500 server error (foreign key constraint violation error) on a failed deploy cluster*
> Scenario
> Cluster is deployed but "Install, Test, Start" step fails.
> User issues DELETE /cluster using API
> Root Cause
> Since we are far ahead in the deployment process, entries are made to number of tables that references the stack namely
> -extensionlink
> -clusters
> -clusterconfig
> -serviceconfig
> -clusterstate
> -repo_version
> -blueprint
> Of these, the DELETE /cluster clears up entries from all the tables referencing stacks except for repo_version. 
> When user issues DELETE /mpacks after this, a call is made to remove the entry from the stack table but it still has a reference in the repo_version table due to which we get referential integrity error.
> Fix
> Before we delete an mpack we have the following checks - 
> -Whether any clusters are deployed (To be relaxed in future)
> -If there is a stack entry that has current_mpack_id = mpack_id (delete candidate)
> Based on this, we will delete the repo_version entry for the above stack_id safely.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)