Nate Cole created AMBARI-19527: ---------------------------------- Summary: Downgrade executes <pre-upgrade> section if <pre-downgrade> is not defined Key: AMBARI-19527 URL: https://issues.apache.org/jira/browse/AMBARI-19527 Project: Ambari Issue Type: Bug Components: ambari-server Reporter: Nate Cole Assignee: Nate Cole Priority: Critical Fix For: 2.5.0
When creating the initial upgrade packs, an effort was made to make them as least-verbose as possible. In that, we assumed that all tasks that occurred during an Upgrade would also occur on a Downgrade. That assumption led to some sneaky bugs that are difficult to troubleshoot. The real fix is to make the XSD enforce "sibling" elements, such that when PRE-UPGRADE tasks are defined, you can enforce that a PRE-DOWNGRADE element exist. Unfortunately, the JDK (even 1.8) doesn't support that version of XSD in JAXB. The interim solution was to use the afterUnmarshal secret sauce to validate that the elements exist. Allow a pre-downgrade or post-downgrade element to indicate that it can reuse the (pre-post)upgrade element definitions. Many of the changes here are in upgrade packs to add the new required elements, and the unit test that parses all upgrade packs passes. -- This message was sent by Atlassian JIRA (v6.3.4#6332)