ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukas Drbal (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-19653) Unable to specify condition function per package in custom service
Date Fri, 20 Jan 2017 16:43:26 GMT
Lukas Drbal created AMBARI-19653:
------------------------------------

             Summary: Unable to specify condition function per package in custom service
                 Key: AMBARI-19653
                 URL: https://issues.apache.org/jira/browse/AMBARI-19653
             Project: Ambari
          Issue Type: Bug
    Affects Versions: 2.4.2
            Reporter: Lukas Drbal
            Priority: Blocker


I have custom service which has more components. Each component is installed from separate
deb package.

In ambari 2.2 we was able to use param exclude_packages in calling method install_packages.

This behaviour was changed in 2.4 release - was replaced by condition tag in metainfo.xml
but there is hardcoded class for this condition functions [1].
For this all installation ends with error: "resource_management.core.exceptions.Fail: Condition
with name 'should_install_confluent_supervisor', when installing package supervisor. Please
check package_conditions.py."

Workaround is copy install_packages method into my component script and replace that hardcoded
class. Otherwise i must hack ambari source code.

Suggested solution:
1. remove static annotation from check_package_condition method
2. change that hardcoded Script to self
3. allow use self in searching for condition method

In this solution every component script can define own condition function. If you agree with
this, i'll prepare patch.   

[1] https://github.com/apache/ambari/blob/release-2.4.2/ambari-common/src/main/python/resource_management/libraries/script/script.py#L556



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

Mime
View raw message