> On March 20, 2017, 2:18 p.m., Robert Levas wrote:
> > ambari-agent/src/main/python/ambari_agent/HostInfo.py
> > Lines 293-298 (patched)
> > <https://reviews.apache.org/r/57771/diff/1/?file=1668296#file1668296line294>
> >
> > Would it be possible to use
> > `resource_management.core.resources.jcepolicyinfo.JcePolicyInfo#is_unlimited_key_jce_policy`?
> >
> >
> > If we keep the implementation for determining if the unlimited key JCE
> > policy contained to one location, maintenance will be easier.
This one uses Execute instead of shell.call and fails with this error:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/ambari_agent/HostInfo.py", line 296,
in checkUnlimitedJce
logoutput=True
File "/usr/lib/python2.6/site-packages/resource_management/core/base.py",
line 118, in __new__
env = env or Environment.get_instance()
File
"/usr/lib/python2.6/site-packages/resource_management/core/environment.py",
line 182, in get_instance
raise Exception("No Environment present for retrieving for thread %s" %
threading.current_thread())
Any insight why?
- Attila
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57771/#review169436
-----------------------------------------------------------
On March 20, 2017, 12:49 p.m., Attila Magyar wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57771/
> -----------------------------------------------------------
>
> (Updated March 20, 2017, 12:49 p.m.)
>
>
> Review request for Ambari, Attila Doroszlai, Jaimin Jetly, Robert Levas, and
> Sebastian Toader.
>
>
> Repository: ambari
>
>
> Description
> -------
>
> In many cases support engineers want to look at if Unlimited Strength Java
> Cryptography Extension is installed on all hosts quickly and easily.
>
> This information is now visible on the host summary page, and can be accessed
> via api call: /api/v1/hosts?fields=Hosts/last_agent_env.
>
>
> Diffs
> -----
>
> ambari-agent/src/main/python/ambari_agent/HostInfo.py 7f041eb
> ambari-agent/src/test/python/ambari_agent/TestHostInfo.py 67294e0
> ambari-server/src/main/java/org/apache/ambari/server/agent/AgentEnv.java
> 64d0865
>
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
> 20431f6
>
> ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java
> 3f62366
> ambari-web/app/controllers/global/update_controller.js 59eaf3e
> ambari-web/app/mappers/hosts_mapper.js e4dd08f
> ambari-web/app/messages.js c9926e6
> ambari-web/app/models/host.js 1b7b326
> ambari-web/app/templates/main/host/summary.hbs 5d0b09c
>
>
> Diff: https://reviews.apache.org/r/57771/diff/1/
>
>
> Testing
> -------
>
> added new unittests, tested the UI manually
>
> existing tests ran successfully with one irrelevant exception:
>
> ======================================================================
> FAIL: test_get_params_from_filesystem
> (TestSecurityCommons.TestSecurityCommons)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File
> "/Users/amagyar/development/ambari/ambari-common/src/test/python/mock/mock.py",
> line 1199, in patched
> return func(*args, **keywargs)
> File
> "/Users/amagyar/development/ambari/ambari-agent/src/test/python/resource_management/TestSecurityCommons.py",
> line 203, in test_get_params_from_filesystem
> et_parser_mock.assert_called_with(conf_dir + os.sep + "config.xml")
> File
> "/Users/amagyar/development/ambari/ambari-common/src/test/python/mock/mock.py",
> line 829, in assert_called_with
> raise AssertionError('Expected call: %s\nNot called' % (expected,))
> AssertionError: Expected call:
> parse('/var/folders/hp/5rnr2yx14q7csg8xbtp_mkr80000gn/T/config.xml')
> Not called
>
> ----------------------------------------------------------------------
> Ran 465 tests in 16.659s
>
>
> Thanks,
>
> Attila Magyar
>
>