ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rohit Choudhary" <>
Subject Review Request 37398: Ambari server upgrade does not re-extract the jar content of the views
Date Wed, 12 Aug 2015 15:47:41 GMT

This is an automatically generated e-mail. To reply, visit:

Review request for Ambari, Mahadev Konar and Srimanth Gunturi.

Bugs: AMBARI-12747

Repository: ambari


The issue of not extracting the jar is because of the following:

* ** has a method "upgrade", which deletes only the admin view directory for
upgrade between 1.7.0  & 2.0.0, 
admin_views_dirs = get_admin_views_dir(properties)
  for admin_views_dir in admin_views_dirs:

* **, has a method extract_views which internally calls the ViewExtractor -

VIEW_EXTRACT_CMD = "{0} -cp {"org.apache.ambari.server.view.ViewRegistry extract {2} ">
" + configDefaults.SERVER_OUT_FILE + " 2>&1"

The fix would require removing existing view directories and extracting the views by using
the extract_views in the upgrade script. The removal of directories is must because currently
the ViewExtractor skips, if the archive directory exists, as under:
// Skip if the archive has already been extracted
            if (!archiveDir.exists()) {

Therefore, the fix is done within the upgrade step, where a new method to delete the extracted
jars is added. The work directory therefore removes all the exploded view artifacts. At the
time of server restart the extract_view method calls the ViewExtractor, and since the directory
is not present, it explodes the jar into the work directory.


  ambari-server/src/main/python/ambari_server/ 8ad6c9c 
  ambari-server/src/main/python/ambari_server/ 2ab4c94 



Tested upgrade scripts on local VMs for:
- Dummy upgrade without changing repository artifact. Checked that the exploded artifacts
are getting deleted and recreated
- Upgraded Ambari server 2.0 to 2.1 version.


Rohit Choudhary

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message