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

Jayush Luniya updated AMBARI-18316:
-----------------------------------
    Priority: Blocker  (was: Major)

> Ambari upgrade to Ambari 2.4.0 failed during DB upgrade due to incorrect TEZ 
> view regex
> ---------------------------------------------------------------------------------------
>
>                 Key: AMBARI-18316
>                 URL: https://issues.apache.org/jira/browse/AMBARI-18316
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.4.0
>            Reporter: DIPAYAN BHOWMICK
>            Assignee: DIPAYAN BHOWMICK
>            Priority: Blocker
>             Fix For: 2.4.1
>
>         Attachments: AMBARI-18316.branch-2.4.patch
>
>
> Ambari upgrade to Ambari 2.4.0 failed during DB upgrade due to incorrect TEZ 
> view regular expression.  
> *Steps to Reproduce*
> # Install Ambari 2.2.0
> # Install cluster with TEZ
> # Change {{tez-site/tez.tez-ui.history-url.base}} from something like 
> {{http://c6501.ambari.apache.org:8080/#/main/views/TEZ/0.7.0.2.3.4.0-460/TEZ_CLUSTER_INSTANCE}}
>  to 
> {{http://c6501.ambari.apache.org:8080/#/main/views/TEZ/0.7.0.2.3.4.0-460/tezv1}}
>  
> ** Notice "TEZ_CLUSTER_INSTANCE" was changed to "tezv1"
> # Upgrade Ambari to 2.4.0.1
> # Execute {{ambari-server upgrade}}
> # See error
> {noformat}
> Using python /usr/bin/python 
> Upgrading ambari-server 
> Updating properties in ambari.properties ... 
> WARNING: Original file ambari-env.sh kept 
> Fixing database objects owner 
> Ambari Server configured for Embedded Postgres. Confirm you have made a 
> backup of the Ambari Server database [y/n] (y)? y 
> Upgrading database schema 
> Error output from schema upgrade command: 
> Exception in thread "main" org.apache.ambari.server.AmbariException: Cannot 
> prepare the new value for property: 'tez.tez-ui.history-url.base' using the 
> old value: 
> 'https://c6501.ambari.apache.org:8080/#/main/views/TEZ/0.7.0.2.3.4.0-460/tezv1'
>  
> at 
> org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:237)
>  
> at 
> org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:353)
>  
> Caused by: org.apache.ambari.server.AmbariException: Cannot prepare the new 
> value for property: 'tez.tez-ui.history-url.base' using the old value: 
> 'https://c6501.ambari.apache.org:8080/#/main/views/TEZ/0.7.0.2.3.4.0-460/tezv1'
>  
> at 
> org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.getUpdatedTezHistoryUrlBase(AbstractUpgradeCatalog.java:951)
>  
> at 
> org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.updateTezHistoryUrlBase(AbstractUpgradeCatalog.java:923)
>  
> at 
> org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(AbstractUpgradeCatalog.java:900)
>  
> at 
> org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:234)
>  
> ... 1 more 
> {noformat}
> *Cause*
> The cause for this error is in the regular expression below:
> {code:title=At or around 
> org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java:986}
>     String pattern = "(.*\\/TEZ\\/)(.*)(\\/TEZ_CLUSTER_INSTANCE)";
> {code}
> This pattern assumes the URL will end with "TEZ_CLUSTER_INSTANCE", however 
> this may be changed by the user causing a failure when matching and yielding 
> an exception being thrown.
> *Workaround*
> If the Ambari server package has not yet been upgraded
> # Edit the {{tez-site/tez.tez-ui.history-url.base}} config to match the 
> pattern
> # Perform the upgrade
> # Edit the {{tez-site/tez.tez-ui.history-url.base}} config to fix the URL as 
> needed
> If the Ambari server package has been upgraded
> # If {{ambari-server upgrade}} has been executed and failed, restore the 
> database
> # Using some database access utility (example, Toad), edit the  
> {{config_data}} column of the {{clusterconfig}} table for the record that 
> represents the _desired_ version of the {{tez-site}} config to match the 
> pattern
> # Perform the upgrade
> # Edit the {{tez-site/tez.tez-ui.history-url.base}} config to fix the URL as 
> needed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to