ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Florian Barca" <fba...@hortonworks.com>
Subject Re: Review Request 29009: Refactor the OS-dependent Ambari Server Windows components - part 1
Date Thu, 18 Dec 2014 04:50:39 GMT


> On Dec. 16, 2014, 11:14 p.m., Nate Cole wrote:
> > ambari-server/src/main/python/ambari_server/setupSecurity.py, lines 730-739
> > <https://reviews.apache.org/r/29009/diff/1/?file=790718#file790718line730>
> >
> >     Would prefer the while statement contingent on os.path.exists or something instead
of "True"  While-true seems to be a recipe for and endless loop (even though I see that break
in there).

It would be tempting to fix that loop, but I will keep it like this for 2 reasons:
1. Its very existence is caused by bootstrap_dir potentially lingering around when about to
call makedirs on it. Causes may vary from OS cache lag to antivirus programs that keep the
dir opened. Thus, "while not os.path.exists(bootstrap_dir)" would skip the loop when we don't
want that.
2. Rewriting the loop with a decremented counter might seem like another way out, unfortunately
it is ineffective because of the way we handle exceptions in the loop. We want to raise the
original exception when we ran out of retries, and that is only possible from within the except
block. We cannot move the raise outside the loop, conditioned by "retry_makedirs == 0". In
the end, the break does the job of exiting the loop.


> On Dec. 16, 2014, 11:14 p.m., Nate Cole wrote:
> > ambari-server/conf/unix/ambari.properties, lines 28-36
> > <https://reviews.apache.org/r/29009/diff/1/?file=790701#file790701line28>
> >
> >     Why is jdk1.6-dest-file a bin, but jdk1.7 is an exe for (presumably) linux?

Carried it around for some time, fixing.


- Florian


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


On Dec. 12, 2014, 8:32 p.m., Florian Barca wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29009/
> -----------------------------------------------------------
> 
> (Updated Dec. 12, 2014, 8:32 p.m.)
> 
> 
> Review request for Ambari, Artem Baranchuk, Eugene Chekanskiy, Jonathan Hurley, Jayush
Luniya, Mahadev Konar, and Nate Cole.
> 
> 
> Bugs: AMBARI-8373
>     https://issues.apache.org/jira/browse/AMBARI-8373
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Refactored the Ambari Server setup+reset+update.
> 
> +Pervasively adopted the OS-independent factory-based object model
> +Unwired the setup-related code from ambari-server.py into separate files.
> +Fixed the unit tests
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/ambari_commons/firewall.py b73cc0cc15cb441b35c0db7ed449ee8f2440134f

>   ambari-common/src/main/python/ambari_commons/inet_utils.py 2a54cb6867aec65d6400451ab12e30c146193cfa

>   ambari-common/src/main/python/ambari_commons/os_family_impl.py f8a3379df35a7ff539ca67f213c8512c761b9c60

>   ambari-common/src/main/python/ambari_commons/os_linux.py 38f3fb9999d19056cca471ad7de64a4b62cb9723

>   ambari-common/src/main/python/ambari_commons/os_utils.py e648124df29dcbfc03307080ffd495d1723622b1

>   ambari-common/src/main/python/ambari_commons/os_windows.py 2fb98e49478640ebfbabb820683c83331b7ed510

>   ambari-common/src/main/python/resource_management/core/providers/windows/system.py
e7a98fc432003b7b818671b8c7fdcfc498f3ad84 
>   ambari-common/src/main/python/resource_management/libraries/functions/get_unique_id_and_date.py
afc82bb4905c806a16a6b67831fdf2fc02ed0875 
>   ambari-server/conf/unix/ambari.properties fd1818bcff6c450f84b0326f02189bfc091bdf35

>   ambari-server/conf/windows/ambari.properties 8939b7315374a4fba94a69d58b3877d2e39d27ed

>   ambari-server/pom.xml f1170c93d565b4d00bad15cc0f69131fb074f66e 
>   ambari-server/src/main/python/ambari-server-windows.py 6c4f894de0f6f4abb90b26ebb36a1825d19f9b0f

>   ambari-server/src/main/python/ambari-server.py 49f3f2ce2b37c9624a9362f54fadbc75e5f63126

>   ambari-server/src/main/python/ambari_server/dbConfiguration.py daa84abbfe507aafacb4f5e4f81be3864a2ea0e6

>   ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py ce47faec7023050adc451d6df5c9f6cac64ec9be

>   ambari-server/src/main/python/ambari_server/dbConfiguration_sqlServer.py PRE-CREATION

>   ambari-server/src/main/python/ambari_server/dbConfiguration_windows.py 647a940ae598e783194e7d0a00fe91f0e080ff48

>   ambari-server/src/main/python/ambari_server/properties.py 8e00762d8158d4351544d0a1a88350bdc722332f

>   ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py 9d138a192131dc79e2a028ea4b8aa10983c751c6

>   ambari-server/src/main/python/ambari_server/serverConfiguration.py aab116711219f633e3a1a6328d80e9ec68308d15

>   ambari-server/src/main/python/ambari_server/serverConfiguration_linux.py a21437a8372c6fdeef01bc9867dee601a029fc02

>   ambari-server/src/main/python/ambari_server/serverConfiguration_windows.py a0fa508353110afd7a921aa4156f3e2f897d48f8

>   ambari-server/src/main/python/ambari_server/serverSetup.py 37e46f5a480a6186a42a49ce64637da76b133b48

>   ambari-server/src/main/python/ambari_server/serverSetup_linux.py b5436e0c1263e52b1ac9b33a24f02e969c72cd70

>   ambari-server/src/main/python/ambari_server/serverSetup_windows.py a906ef50020e4eb0b9608bf8c1f43681029699ff

>   ambari-server/src/main/python/ambari_server/setupSecurity.py 57a323103d23f3d05450a94d9875694001544337

>   ambari-server/src/main/resources/custom_actions/scripts/check_host.py 7430ba1954f4efcb51873403bb8dd14a78ae4939

>   ambari-server/src/test/python/TestAmbariServer.py 0eae33b2c4a50695cca3fb33fd72065d7f57f4ee

>   ambari-server/src/test/python/custom_actions/TestCheckHost.py fd289fc0716a7e1cd76c32d841a719384287774e

> 
> Diff: https://reviews.apache.org/r/29009/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test on CentOS
> 
> 
> Thanks,
> 
> Florian Barca
> 
>


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