This is an automated email from the ASF dual-hosted git repository.

dsen pushed a commit to branch branch-feature-AMBARI-14714
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-feature-AMBARI-14714 by 
this push:
     new b42008c  [AMBARI-23120] Create helper functions for using new instance 
manager library from the agent scripts (dsen) - import fix (#560)
b42008c is described below

commit b42008cc01d1a47e818358d6e7868e5d68ee9c81
Author: Dmitry Sen <d...@apache.org>
AuthorDate: Tue Mar 6 21:13:45 2018 +0200

    [AMBARI-23120] Create helper functions for using new instance manager 
library from the agent scripts (dsen) - import fix (#560)
---
 .../src/main/python/resource_management/libraries/script/script.py     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/ambari-common/src/main/python/resource_management/libraries/script/script.py 
b/ambari-common/src/main/python/resource_management/libraries/script/script.py
index 7c9c0b1..64f465b 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/script/script.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/script/script.py
@@ -61,7 +61,6 @@ from resource_management.libraries.functions.constants import 
StackFeature
 from resource_management.libraries.functions.show_logs import show_logs
 from resource_management.core.providers import get_provider
 from resource_management.libraries.functions.fcntl_based_process_lock import 
FcntlBasedProcessLock
-from resource_management.libraries.functions.mpack_manager_helper import 
create_component_instance
 from resource_management.libraries.functions.config_helper import 
get_mpack_name, get_mpack_version, \
   get_mpack_instance_name, get_module_name, get_component_type, 
get_component_instance_name
 
@@ -795,6 +794,8 @@ class Script(object):
       self.available_packages_in_repos = []
 
   def create_component_instance(self):
+    # should be used only when mpack-instance-manager is available
+    from resource_management.libraries.functions.mpack_manager_helper import 
create_component_instance
     config = self.get_config()
     mpack_name = get_mpack_name(config)
     mpack_version = get_mpack_version(config)

-- 
To stop receiving notification emails like this one, please contact
d...@apache.org.

Reply via email to