[ 
https://issues.apache.org/jira/browse/AMBARI-17796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15385108#comment-15385108
 ] 

Hudson commented on AMBARI-17796:
---------------------------------

FAILURE: Integrated in Ambari-trunk-Commit #5343 (See 
[https://builds.apache.org/job/Ambari-trunk-Commit/5343/])
AMBARI-17796 - Ranger Admin Fails To Stop Or Start During Downgrade From 
(jhurley: 
[http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=1d6caa8740b0e4766e00f58d369144562a1e023f])
* ambari-server/src/test/python/TestStackFeature.py
* 
ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
* 
ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/params.py
* 
ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py
* 
ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
* 
ambari-server/src/main/resources/common-services/STORM/0.9.1/package/scripts/params_linux.py
* 
ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
* 
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
* 
ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
* 
ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
* 
ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
* 
ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py


> Ranger Admin Fails To Stop Or Start During Downgrade From HDP 2.5 to HDP 2.4
> ----------------------------------------------------------------------------
>
>                 Key: AMBARI-17796
>                 URL: https://issues.apache.org/jira/browse/AMBARI-17796
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.4.0
>            Reporter: Jonathan Hurley
>            Assignee: Jonathan Hurley
>            Priority: Blocker
>             Fix For: 2.4.0
>
>         Attachments: AMBARI-17796.patch
>
>
> *Steps*
> # Deploy HDP-2.4.
> # Perform EU to 2.5.0.0-995 (or 2.5.0.0-1016) until finalize step
> # Downgrade back to 2.4.2
> Observed below errors while stopping all components
> {code}
> Traceback (most recent call last):
>   File 
> \"/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py\",
>  line 199, in <module>
>     RangerAdmin().execute()
>   File 
> \"/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py\",
>  line 280, in execute
>     method(env)
>   File 
> \"/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py\",
>  line 60, in stop
>     import params
>   File 
> \"/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/params.py\",
>  line 176, in <module>
>     audit_jdbc_url = 
> format('jdbc:postgresql://{db_host}/{ranger_auditdb_name}') if 
> stack_supports_ranger_audit_db else None
>   File 
> \"/usr/lib/python2.6/site-packages/resource_management/libraries/functions/format.py\",
>  line 95, in format
>     return ConfigurationFormatter().format(format_string, args, **result)
>   File 
> \"/usr/lib/python2.6/site-packages/resource_management/libraries/functions/format.py\",
>  line 59, in format
>     result_protected = self.vformat(format_string, args, all_params)
>   File \"/usr/lib/python2.7/string.py\", line 549, in vformat
>     result = self._vformat(format_string, args, kwargs, used_args, 2)
>   File \"/usr/lib/python2.7/string.py\", line 582, in _vformat
>     result.append(self.format_field(obj, format_spec))
>   File \"/usr/lib/python2.7/string.py\", line 599, in format_field
>     return format(value, format_spec)
>   File 
> \"/usr/lib/python2.6/site-packages/resource_management/libraries/script/config_dictionary.py\",
>  line 73, in __getattr__
>     raise Fail(\"Configuration parameter '\" + self.name + \"' was not found 
> in configurations dictionary!\")
> resource_management.core.exceptions.Fail: Configuration parameter 
> 'audit_db_name' was not found in configurations dictionary!
> {code}
> Other components fail as well in a similar manner (if they use Ranger).
> This is a specific issues on an EU downgrade from 2.5 to 2.4. Here's the 
> scenario:
> - Ranger supported "Audit to DB" up to HDP 2.5. It was removed in HDP 2.5. 
> Along with it, the properties in {{admin-properties}} were removed as well.
> - The Ranger {{params.py}} uses the {{check_stack_feature}} to determine if 
> "Audit to DB" is supported and if it is, tries to extract the properties it 
> needs.
> All is well and good at this point. The problem comes when a downgrade 
> happens.
> - When downgrading from 2.5 to 2.4 the 2.4 configurations should be restored. 
> However, this doesn't happen on an EU until after the {{STOP}} command is 
> issued for upgraded services. It's during this {{STOP}} command that we run 
> into an issue. Ranger is running on 2.5, so the 2.5 configurations are sent 
> to stop it. However, the version that we're downgrading to is 2.4, so it 
> thinks that it needs to extract the audit properties.
> - On the {{RESTART}} of Ranger on the downgrade, it should be extracting the 
> audit properties since the 2.4 configurations are sent. But the {{STOP}} 
> command is for 2.5 and doesn't have them. 
> So, this means that {{STOP}} and {{RESTART}} are using different 
> configurations on an EU downgrade. We basically need to create a way to 
> reliably determine which stack version should be used for feature checks.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to