> On July 5, 2016, 5:20 p.m., Jayush Luniya wrote:
> > Ship It!

Sorry +1'ed too soon. Actually you need to update the mpacks unit tests at 
ambari/ambari-server/src/test/python/TestMpacks.py and 
ambari/ambari-server/src/test/python/mpacks/myservice-ambari-mpack-1.0.0.0/mpack.json.
 Also add additional unit tests for extensions. 

mvn clean test -DskipSurefireTests
----------------------------------------------------------------------
Ran 261 tests in 7.618s

FAILED (errors=4)
----------------------------------------------------------------------
Failed tests:
ERROR: test_install_addon_service_mpack (TestMpacks.TestMpacks)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-common/src/test/python/mock/mock.py",
 line 1199, in patched
    return func(*args, **keywargs)
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/test/python/TestMpacks.py",
 line 332, in test_install_addon_service_mpack
    install_mpack(options)
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/main/python/ambari_server/setupMpacks.py",
 line 770, in install_mpack
    (mpack_name, mpack_version, mpack_staging_dir, mpack_archive_path) = 
_install_mpack(options, replay_mode)
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/main/python/ambari_server/setupMpacks.py",
 line 670, in _install_mpack
    stack_location, extension_location, service_definitions_location, 
mpacks_staging_location = get_mpack_properties()
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/main/python/ambari_server/setupMpacks.py",
 line 153, in get_mpack_properties
    extension_location = get_extension_location(properties)
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/main/python/ambari_server/serverConfiguration.py",
 line 1390, in get_extension_location
    extension_location = properties[EXTENSION_PATH_PROPERTY]
KeyError: 'extensions.path'

ERROR: test_install_stack_mpack (TestMpacks.TestMpacks)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-common/src/test/python/mock/mock.py",
 line 1199, in patched
    return func(*args, **keywargs)
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/test/python/TestMpacks.py",
 line 222, in test_install_stack_mpack
    install_mpack(options)
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/main/python/ambari_server/setupMpacks.py",
 line 770, in install_mpack
    (mpack_name, mpack_version, mpack_staging_dir, mpack_archive_path) = 
_install_mpack(options, replay_mode)
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/main/python/ambari_server/setupMpacks.py",
 line 670, in _install_mpack
    stack_location, extension_location, service_definitions_location, 
mpacks_staging_location = get_mpack_properties()
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/main/python/ambari_server/setupMpacks.py",
 line 153, in get_mpack_properties
    extension_location = get_extension_location(properties)
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/main/python/ambari_server/serverConfiguration.py",
 line 1390, in get_extension_location
    extension_location = properties[EXTENSION_PATH_PROPERTY]
KeyError: 'extensions.path'

ERROR: test_purge_stacks_and_mpacks (TestMpacks.TestMpacks)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-common/src/test/python/mock/mock.py",
 line 1199, in patched
    return func(*args, **keywargs)
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/test/python/TestMpacks.py",
 line 107, in test_purge_stacks_and_mpacks
    purge_stacks_and_mpacks(None)
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/main/python/ambari_server/setupMpacks.py",
 line 227, in purge_stacks_and_mpacks
    stack_location, extension_location, service_definitions_location, 
mpacks_staging_location = get_mpack_properties()
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/main/python/ambari_server/setupMpacks.py",
 line 153, in get_mpack_properties
    extension_location = get_extension_location(properties)
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/main/python/ambari_server/serverConfiguration.py",
 line 1390, in get_extension_location
    extension_location = properties[EXTENSION_PATH_PROPERTY]
KeyError: 'extensions.path'

ERROR: test_upgrade_stack_mpack (TestMpacks.TestMpacks)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-common/src/test/python/mock/mock.py",
 line 1199, in patched
    return func(*args, **keywargs)
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/test/python/TestMpacks.py",
 line 415, in test_upgrade_stack_mpack
    upgrade_mpack(options)
  File "/UsINFO: AMBARI_SERVER_LIB is not set, using default 
/usr/lib/ambari-server
INFO: Return code from stack upgrade command, retcode = 0
StackAdvisor implementation for stack HDP1, version 2.0.6 was not found
Returning DefaultStackAdvisor implementation
StackAdvisor implementation for stack XYZ, version 1.0.0 was loaded
StackAdvisor implementation for stack XYZ, version 1.0.1 was loaded
Returning XYZ101StackAdvisor implementation
ers/jluniya/release/trunk2/ambari/ambari-server/src/main/python/ambari_server/setupMpacks.py",
 line 790, in upgrade_mpack
    results = search_mpacks(mpack_name, mpack_version)
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/main/python/ambari_server/setupMpacks.py",
 line 522, in search_mpacks
    stack_location, extension_location, service_definitions_location, 
mpacks_staging_location = get_mpack_properties()
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/main/python/ambari_server/setupMpacks.py",
 line 153, in get_mpack_properties
    extension_location = get_extension_location(properties)
  File 
"/Users/jluniya/release/trunk2/ambari/ambari-server/src/main/python/ambari_server/serverConfiguration.py",
 line 1390, in get_extension_location
    extension_location = properties[EXTENSION_PATH_PROPERTY]
KeyError: 'extensions.path'

----------------------------------------------------------------------
Total run:1095
Total errors:4
Total failures:0
ERROR
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:45.986s
[INFO] Finished at: Tue Jul 05 10:30:38 PDT 2016
[INFO] Final Memory: 62M/1117M
[INFO] ------------------------------------------------------------------------


- Jayush


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49328/#review140822
-----------------------------------------------------------


On June 30, 2016, 5:16 p.m., Tim Thorpe wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49328/
> -----------------------------------------------------------
> 
> (Updated June 30, 2016, 5:16 p.m.)
> 
> 
> Review request for Ambari, Jayush Luniya, Mahadev Konar, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-17465
>     https://issues.apache.org/jira/browse/AMBARI-17465
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Currently management packs (AMBARI-14854) can only add stacks and addon 
> services. Now that AMBARI-12885 has been resolved, the management packs 
> should be able to add extensions as well.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/python/ambari_server/serverConfiguration.py e868f96 
>   ambari-server/src/main/python/ambari_server/setupMpacks.py 98811f5 
> 
> Diff: https://reviews.apache.org/r/49328/diff/
> 
> 
> Testing
> -------
> 
> Manual testing
> 
> ambari-server install-mpack 
> --mpack=/root/mpacks/hdp-ambari-mpack-1.0.0.0.tar.gz --purge -v
> ambari-server install-mpack 
> --mpack=/root/mpacks/myservice-ambari-mpack-1.0.0.0.tar.gz -v
> ambari-server install-mpack 
> --mpack=/root/mpacks/myservice2-ambari-mpack-1.0.0.0.tar.gz -v
> ambari-server install-mpack --mpack=/root/mpacks/myextension-1.0.0.0.tar.gz -v
> 
> 
> Thanks,
> 
> Tim Thorpe
> 
>

Reply via email to