ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Fernandez" <>
Subject Review Request 38543: RU: Knox to use versioned data dir starting in HDP
Date Mon, 21 Sep 2015 05:16:17 GMT

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

Review request for Ambari, Jonathan Hurley, Jayush Luniya, Nate Cole, Srimanth Gunturi, and
Sid Wagle.

Bugs: AMBARI-13164

Repository: ambari


Starting in HDP, Knox will version its data directory.

HDP is meant to support Debian & Ubuntu.
A customer installing HDP would receive the following for knox:
/usr/hdp/current/knox/data is a symlink to /var/lib/knox/data_$

Hence, all of the data directories in /var/lib/knox/ would be versioned. This is because the
Debian installer fails if it tries to create the /var/lib/knox/data folder and it already
exists (since it belongs to a previous version); further, you would get data loss if you tried
to uninstall the newer version, since it would wipe out the folder that was used by the previous

So the problem doesn't arise on the initial install, but rather on installing an additional
version for Rolling Upgrade.

This means that any customer planning to upgrade Knox must first upgrade Ambari to 2.1.2.

There are 3 scenarios:

1. Ambari 2.1.2 with HDP
Ambari must continue to use the non-versioned data directory.

2. Ambari 2.1.2 with HDP
A brand new install will use the versioned data directory out-of-the-box.

3. Ambari 2.1.0 with HDP
Technically, this allows registering bits for HDP and performing an RU to it. However,
because HDP uses a versioned data dir, it means that any customer with Knox that plans
to perform an RU must first upgrade Ambari to 2.1.2, which is equivalent to starting with
case #1.

Because RU allows the following paths, (non-versioned data dir) -> (versioned data dir) (versioned data dir) -> 2.3.3.- (versioned data dir, once it is available)

It means that it must always copy any contents from 
previous_data_dir to  /usr/hdp/{new-version}/knox/data

In the case of -> 2.3.+, previous_data_dir is /var/lib/knox/data/
In the case of 2.3.+ -> 2.3.+, previous_data_dir is /usr/hdp/{prev-version}/knox/data


  ambari-common/src/main/python/resource_management/libraries/script/ e0a7877 
  ambari-server/src/test/python/stacks/2.2/KNOX/ 3ae42a0 



Ran python unit tests, which passed.
Verified during RU in several scenarios.
1. Fresh install of HDP and RU to with Knox. Before Finalizing, Downgraded.
2. Fresh install of HDP and RU to with Knox. Finalized.
3. Steps from #2, and then perform an RU to a higher build in HDP


Alejandro Fernandez

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