ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hurley (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMBARI-17796) Ranger Admin Fails To Stop Or Start During Downgrade From HDP 2.5 to HDP 2.4
Date Tue, 19 Jul 2016 21:09:21 GMT

     [ https://issues.apache.org/jira/browse/AMBARI-17796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jonathan Hurley updated AMBARI-17796:
-------------------------------------
    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

> 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)

Mime
View raw message