You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Jonathan Hurley <jh...@hortonworks.com> on 2016/04/13 19:17:56 UTC

Review Request 46155: Re-Upgrade from 2.2 to 2.3+ Fails Due To Circular Symlink

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46155/
-----------------------------------------------------------

Review request for Ambari, Alejandro Fernandez and Nate Cole.


Bugs: AMBARI-15864
    https://issues.apache.org/jira/browse/AMBARI-15864


Repository: ambari


Description
-------

STR:
With Ambari 2.2.2.0-408 build, install 2.2.9.0 cluster (HA cluster)
Perform EU to 2.4.2.0-178 till finalize step
Downgrade back to 2.2.9
Again run EU to 2.4.2.0

The problem is that the downgrade unlinks configurations, getting rid of {{conf.backup}} and makes {{/etc/<component>/conf}} a directory again. However, the only code which bootstraps {{conf.backup}} is executed on installation of the stack. That action does not happen again between U->D->U.

As a way to catch this scenario, {{conf_select.select()}} tries to be smart and checks for {{/etc/<component>/conf}} as a directory and if it finds that it is, it will create {{conf.backup}}. 

**The bug here is that the new {{/etc/<component</conf}} link points to {{/usr/hdp/current/<component>/conf}} which is a link back to {{/etc/<component>/conf}}. It should be linked to {{/etc/<component>/conf.backup}} instead.**


Diffs
-----

  ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py b5de69d 
  ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py 9f52b57 
  ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py caf1430 
  ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_server.py 2bd9944 

Diff: https://reviews.apache.org/r/46155/diff/


Testing
-------

OK
----------------------------------------------------------------------
Total run:959
Total errors:0
Total failures:0
OK


Thanks,

Jonathan Hurley


Re: Review Request 46155: Re-Upgrade from 2.2 to 2.3+ Fails Due To Circular Symlink

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46155/#review128713
-----------------------------------------------------------


Ship it!




Ship It!

- Alejandro Fernandez


On April 13, 2016, 5:17 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46155/
> -----------------------------------------------------------
> 
> (Updated April 13, 2016, 5:17 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Nate Cole.
> 
> 
> Bugs: AMBARI-15864
>     https://issues.apache.org/jira/browse/AMBARI-15864
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> STR:
> With Ambari 2.2.2.0-408 build, install 2.2.9.0 cluster (HA cluster)
> Perform EU to 2.4.2.0-178 till finalize step
> Downgrade back to 2.2.9
> Again run EU to 2.4.2.0
> 
> The problem is that the downgrade unlinks configurations, getting rid of {{conf.backup}} and makes {{/etc/<component>/conf}} a directory again. However, the only code which bootstraps {{conf.backup}} is executed on installation of the stack. That action does not happen again between U->D->U.
> 
> As a way to catch this scenario, {{conf_select.select()}} tries to be smart and checks for {{/etc/<component>/conf}} as a directory and if it finds that it is, it will create {{conf.backup}}. 
> 
> **The bug here is that the new {{/etc/<component</conf}} link points to {{/usr/hdp/current/<component>/conf}} which is a link back to {{/etc/<component>/conf}}. It should be linked to {{/etc/<component>/conf.backup}} instead.**
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py b5de69d 
>   ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py 9f52b57 
>   ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py caf1430 
>   ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_server.py 2bd9944 
> 
> Diff: https://reviews.apache.org/r/46155/diff/
> 
> 
> Testing
> -------
> 
> OK
> ----------------------------------------------------------------------
> Total run:959
> Total errors:0
> Total failures:0
> OK
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Re: Review Request 46155: Re-Upgrade from 2.2 to 2.3+ Fails Due To Circular Symlink

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46155/#review128710
-----------------------------------------------------------




ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py (lines 313 - 317)
<https://reviews.apache.org/r/46155/#comment192178>

    This is the real meat of the change; after creating conf.backup, we need to link to it and not `current`
    
    Only if the symlink is totally missing should we link it to `current`


- Jonathan Hurley


On April 13, 2016, 1:17 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46155/
> -----------------------------------------------------------
> 
> (Updated April 13, 2016, 1:17 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Nate Cole.
> 
> 
> Bugs: AMBARI-15864
>     https://issues.apache.org/jira/browse/AMBARI-15864
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> STR:
> With Ambari 2.2.2.0-408 build, install 2.2.9.0 cluster (HA cluster)
> Perform EU to 2.4.2.0-178 till finalize step
> Downgrade back to 2.2.9
> Again run EU to 2.4.2.0
> 
> The problem is that the downgrade unlinks configurations, getting rid of {{conf.backup}} and makes {{/etc/<component>/conf}} a directory again. However, the only code which bootstraps {{conf.backup}} is executed on installation of the stack. That action does not happen again between U->D->U.
> 
> As a way to catch this scenario, {{conf_select.select()}} tries to be smart and checks for {{/etc/<component>/conf}} as a directory and if it finds that it is, it will create {{conf.backup}}. 
> 
> **The bug here is that the new {{/etc/<component</conf}} link points to {{/usr/hdp/current/<component>/conf}} which is a link back to {{/etc/<component>/conf}}. It should be linked to {{/etc/<component>/conf.backup}} instead.**
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py b5de69d 
>   ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py 9f52b57 
>   ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py caf1430 
>   ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_server.py 2bd9944 
> 
> Diff: https://reviews.apache.org/r/46155/diff/
> 
> 
> Testing
> -------
> 
> OK
> ----------------------------------------------------------------------
> Total run:959
> Total errors:0
> Total failures:0
> OK
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Re: Review Request 46155: Re-Upgrade from 2.2 to 2.3+ Fails Due To Circular Symlink

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46155/#review128726
-----------------------------------------------------------


Ship it!




Ship It!

- Nate Cole


On April 13, 2016, 1:17 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46155/
> -----------------------------------------------------------
> 
> (Updated April 13, 2016, 1:17 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Nate Cole.
> 
> 
> Bugs: AMBARI-15864
>     https://issues.apache.org/jira/browse/AMBARI-15864
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> STR:
> With Ambari 2.2.2.0-408 build, install 2.2.9.0 cluster (HA cluster)
> Perform EU to 2.4.2.0-178 till finalize step
> Downgrade back to 2.2.9
> Again run EU to 2.4.2.0
> 
> The problem is that the downgrade unlinks configurations, getting rid of {{conf.backup}} and makes {{/etc/<component>/conf}} a directory again. However, the only code which bootstraps {{conf.backup}} is executed on installation of the stack. That action does not happen again between U->D->U.
> 
> As a way to catch this scenario, {{conf_select.select()}} tries to be smart and checks for {{/etc/<component>/conf}} as a directory and if it finds that it is, it will create {{conf.backup}}. 
> 
> **The bug here is that the new {{/etc/<component</conf}} link points to {{/usr/hdp/current/<component>/conf}} which is a link back to {{/etc/<component>/conf}}. It should be linked to {{/etc/<component>/conf.backup}} instead.**
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py b5de69d 
>   ambari-server/src/test/python/stacks/2.0.6/HBASE/test_phoenix_queryserver.py 9f52b57 
>   ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py caf1430 
>   ambari-server/src/test/python/stacks/2.0.6/ZOOKEEPER/test_zookeeper_server.py 2bd9944 
> 
> Diff: https://reviews.apache.org/r/46155/diff/
> 
> 
> Testing
> -------
> 
> OK
> ----------------------------------------------------------------------
> Total run:959
> Total errors:0
> Total failures:0
> OK
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>