> On March 29, 2016, 4:24 p.m., Jayush Luniya wrote:
> > ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py,
> >  line 58
> > <https://reviews.apache.org/r/45328/diff/1/?file=1314454#file1314454line58>
> >
> >     This should be 2.3.0.0 and not 2.3.0.1
> 
> Juanjo  Marron wrote:
>     I changed it to 2.3.0.1 in the new patch.
>     
>     
>     Initially I set the min_version for REMOVE_RANGER_HDFS_PLUGIN_ENV to 
> 2.3.0.1 because the original condition at setup_ranger_hdfs.py validates:
>     
>      # when upgrading to 2.3+, this env file must be removed
>           if compare_versions(stack_version, '2.3', format=True) > 0:
>         
>     while most of the other conditions are always >=. 
>         
>     So, version 2.3.0.0 will return False in this condition.
>     
>     Now, after the change: 
>     
>     if check_stack_feature(StackFeature.REMOVE_RANGER_HDFS_PLUGING_ENV, 
> stack_version):
>     
>     And with the current validation in stack_features.py
>     
>     if "min_version" in feature:
>             min_version = feature["min_version"]
>             if compare_versions(stack_version, min_version, format = True) < 
> 0:
>               return False
>     
>     If we set min-version to 2.3.0.0, a version 2.3 will return True instead 
> of False 
>     
>     What is expected when the version to upgrade is 2.3 and not 2.3+?
>     Are we sure min_version should be 2.3.0.0 and not 2.3.0.1?

Actually you are right, the check is HDP-2.3+. Let me dig into this a bit more 
and get back to you.


- Jayush


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


On March 29, 2016, 8:06 p.m., Juanjo  Marron wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45328/
> -----------------------------------------------------------
> 
> (Updated March 29, 2016, 8:06 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Jayush Luniya.
> 
> 
> Bugs: AMBARI-14451
>     https://issues.apache.org/jira/browse/AMBARI-14451
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Featurize HDP specific logic from HDFS service
> 
> 
> Diffs
> -----
> 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/constants.py
>  f766a82 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
>  2f0e6bf 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml
>  98f20e7 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/alerts/alert_ha_namenode_health.py
>  70b1970 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/alerts/alert_metrics_deviation.py
>  9a122fa 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/datanode.py
>  3cdfda9 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_client.py
>  c5ae35e 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/journalnode.py
>  6f26b40 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/journalnode_upgrade.py
>  d598840 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py
>  acd10e8 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/nfsgateway.py
>  c705fca 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
>  277536a 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/setup_ranger_hdfs.py
>  209ac91 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/snamenode.py
>  f96ac01 
>   
> ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
>  c626028 
>   
> ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json
>  97bd19c 
> 
> Diff: https://reviews.apache.org/r/45328/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test -DskipSurefireTests
> 
> Found 1 error. It seems related to PXF and not to the patch:
> 
> Failed tests:
> ERROR: test_get_pxf_protocol_version 
> (test_alerts_api_status.TestAlertsApiStatus)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/home/jmarron/git/ambari/ambari-common/src/test/python/mock/mock.py", 
> line 1199, in patched
>     return func(*args, **keywargs)
>   File 
> "/home/jmarron/git/ambari/ambari-server/src/test/python/stacks/2.3/PXF/test_alerts_api_status.py",
>  line 51, in test_get_pxf_protocol_version
>     version = api_status._get_pxf_protocol_version()
> TypeError: _get_pxf_protocol_version() takes exactly 1 argument (0 given)
> 
> ----------------------------------------------------------------------
> Total run:928
> Total errors:1
> Total failures:0
> 
> 
> Thanks,
> 
> Juanjo  Marron
> 
>

Reply via email to