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

Jayush Luniya commented on AMBARI-20578:
----------------------------------------

This also causes python unit test failures

{code}
----------------------------------------------------------------------
Failed tests:
ERROR: test_hook_default (test_after_install.TestHookAfterInstall)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/test/python/mock/mock.py",
 line 1199, in patched
    return func(*args, **keywargs)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/2.0.6/hooks/after-INSTALL/test_after_install.py",
 line 34, in test_hook_default
    config_file="default.json"
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/RMFTestCase.py",
 line 155, in executeScript
    method(RMFTestCase.env, *command_args)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/hook.py",
 line 32, in hook
    setup_config()
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py",
 line 87, in setup_config
    content=Template(params.logsearch_config_file_path,extra_imports=[default])
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/resource_management/core/source.py",
 line 137, in __init__
    self.template = self.template_env.get_template(self.name)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py",
 line 716, in get_template
    return self._load_template(name, self.make_globals(globals))
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py",
 line 690, in _load_template
    template = self.loader.load(self, name, globals)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/loaders.py",
 line 115, in load
    source, filename, uptodate = self.get_source(environment, name)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/resource_management/core/source.py",
 line 118, in get_source
    mtime = os.path.getmtime(path)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/genericpath.py",
 line 62, in getmtime
    return os.stat(filename).st_mtime
OSError: [Errno 2] No such file or directory: 
'/var/lib/ambari-agent/cache/OOZIE/templates/input.config-hive.json.j2'

ERROR: test_hook_default_conf_select (test_after_install.TestHookAfterInstall)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/test/python/mock/mock.py",
 line 1199, in patched
    return func(*args, **keywargs)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/2.0.6/hooks/after-INSTALL/test_after_install.py",
 line 70, in test_hook_default_conf_select
    config_dict = json_content)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/RMFTestCase.py",
 line 155, in executeScript
    method(RMFTestCase.env, *command_args)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/hook.py",
 line 32, in hook
    setup_config()
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py",
 line 87, in setup_config
    content=Template(params.logsearch_config_file_path,extra_imports=[default])
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/resource_management/core/source.py",
 line 137, in __init__
    self.template = self.template_env.get_template(self.name)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py",
 line 716, in get_template
    return self._load_template(name, self.make_globals(globals))
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py",
 line 690, in _load_template
    template = self.loader.load(self, name, globals)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/loaders.py",
 line 115, in load
    source, filename, uptodate = self.get_source(environment, name)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/resource_management/core/source.py",
 line 118, in get_source
    mtime = os.path.getmtime(path)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/genericpath.py",
 line 62, in getmtime
    return os.stat(filename).st_mtime
OSError: [Errno 2] No such file or directory: 
'/var/lib/ambari-agent/cache/OOZIE/templates/input.config-hive.json.j2'

ERROR: test_hook_default_conf_select_suspended 
(test_after_install.TestHookAfterInstall)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/test/python/mock/mock.py",
 line 1199, in patched
    return func(*args, **keywargs)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/2.0.6/hooks/after-INSTALL/test_after_install.py",
 line 239, in test_hook_default_conf_select_suspended
    config_dict = json_content)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/RMFTestCase.py",
 line 155, in executeScript
    method(RMFTestCase.env, *command_args)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/hook.py",
 line 32, in hook
    setup_config()
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py",
 line 87, in setup_config
    content=Template(params.logsearch_config_file_path,extra_imports=[default])
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/resource_management/core/source.py",
 line 137, in __init__
    self.template = self.template_env.get_template(self.name)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py",
 line 716, in get_template
    return self._load_template(name, self.make_globals(globals))
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py",
 line 690, in _load_template
    template = self.loader.load(self, name, globals)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/loaders.py",
 line 115, in load
    source, filename, uptodate = self.get_source(environment, name)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/resource_management/core/source.py",
 line 118, in get_source
    mtime = os.path.getmtime(path)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/genericpath.py",
 line 62, in getmtime
    return os.stat(filename).st_mtime
OSError: [Errno 2] No such file or directory: 
'/var/lib/ambari-agent/cache/OOZIE/templates/input.config-hive.json.j2'

ERROR: test_hook_default_conf_select_with_error 
(test_after_install.TestHookAfterInstall)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/test/python/mock/mock.py",
 line 1199, in patched
    return func(*args, **keywargs)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/2.0.6/hooks/after-INSTALL/test_after_install.py",
 line 137, in test_hook_default_conf_select_with_error
    config_dict = json_content)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/RMFTestCase.py",
 line 155, in executeScript
    method(RMFTestCase.env, *command_args)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/hook.py",
 line 32, in hook
    setup_config()
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py",
 line 87, in setup_config
    content=Template(params.logsearch_config_file_path,extra_imports=[default])
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/resource_management/core/source.py",
 line 137, in __init__
    self.template = self.template_env.get_template(self.name)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py",
 line 716, in get_template
    return self._load_template(name, self.make_globals(globals))
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py",
 line 690, in _load_template
    template = self.loader.load(self, name, globals)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/loaders.py",
 line 115, in load
    source, filename, uptodate = self.get_source(environment, name)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/resource_management/core/source.py",
 line 118, in get_source
    mtime = os.path.getmtime(path)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/genericpath.py",
 line 62, in getmtime
    return os.stat(filename).st_mtime
OSError: [Errno 2] No such file or directory: 
'/var/lib/ambari-agent/cache/OOZIE/templates/input.config-hive.json.j2'

ERROR: test_hook_default_stack_select_specific_version 
(test_after_install.TestHookAfterInstall)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/test/python/mock/mock.py",
 line 1199, in patched
    return func(*args, **keywargs)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/2.0.6/hooks/after-INSTALL/test_after_install.py",
 line 210, in test_hook_default_stack_select_specific_version
    config_dict = json_content)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/RMFTestCase.py",
 line 155, in executeScript
    method(RMFTestCase.env, *command_args)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/hook.py",
 line 32, in hook
    setup_config()
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py",
 line 87, in setup_config
    content=Template(params.logsearch_config_file_path,extra_imports=[default])
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/resource_management/core/source.py",
 line 137, in __init__
    self.template = self.template_env.get_template(self.name)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py",
 line 716, in get_template
    return self._load_template(name, self.make_globals(globals))
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py",
 line 690, in _load_template
    template = self.loader.load(self, name, globals)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/loaders.py",
 line 115, in load
    source, filename, uptodate = self.get_source(environment, name)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/resource_management/core/source.py",
 line 118, in get_source
    mtime = os.path.getmtime(path)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/genericpath.py",
 line 62, in getmtime
    return os.stat(filename).st_mtime
OSError: [Errno 2] No such file or directory: 
'/var/lib/ambari-agent/cache/OOZIE/templates/input.config-hive.json.j2'

ERROR: test_hook_setup_stack_symlinks_skipped 
(test_after_install.TestHookAfterInstall)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/test/python/mock/mock.py",
 line 1199, in patched
    return func(*args, **keywargs)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/2.0.6/hooks/after-INSTALL/test_after_install.py",
 line 306, in test_hook_setup_stack_symlinks_skipped
    config_dict = json_content)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/RMFTestCase.py",
 line 155, in executeScript
    method(RMFTestCase.env, *command_args)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/hook.py",
 line 32, in hook
    setup_config()
  File 
"/Users/jluniya/release/trunk/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/stacks/HDP/2.0.6/hooks/after-INSTALL/scripts/shared_initialization.py",
 line 87, in setup_config
    content=Template(params.logsearch_config_file_path,extra_imports=[default])
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/resource_management/core/source.py",
 line 137, in __init__
    self.template = self.template_env.get_template(self.name)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py",
 line 716, in get_template
    return self._load_template(name, self.make_globals(globals))
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/environment.py",
 line 690, in _load_template
    template = self.loader.load(self, name, globals)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/loaders.py",
 line 115, in load
    source, filename, uptodate = self.get_source(environment, name)
  File 
"/Users/jluniya/release/trunk/ambari/ambari-common/src/main/python/resource_management/core/source.py",
 line 118, in get_source
    mtime = os.path.getmtime(path)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/genericpath.py",
 line 62, in getmtime
    return os.stat(filename).st_mtime
OSError: [Errno 2] No such file or directory: 
'/var/lib/ambari-agent/cache/OOZIE/templates/input.config-hive.json.j2'

----------------------------------------------------------------------
Total run:1192
Total errors:6
Total failures:0
ERROR
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
{code}

> Log Search Configuration API
> ----------------------------
>
>                 Key: AMBARI-20578
>                 URL: https://issues.apache.org/jira/browse/AMBARI-20578
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-logsearch
>    Affects Versions: 3.0.0
>            Reporter: Miklos Gergely
>            Assignee: Miklos Gergely
>             Fix For: 3.0.0
>
>
> Log Search should store it's configurations (inputs, filters) by using an 
> API, which the user may implement as well to use their own way of storing the 
> configurations. By default for now we offer to store everything in ZooKeeper.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to