> On June 30, 2017, 8:20 a.m., Jonathan Hurley wrote: > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java > > Lines 537 (patched) > > <https://reviews.apache.org/r/60535/diff/2/?file=1767470#file1767470line537> > > > > Any reason you converted it to a boolean then back to a string? Also - > > what happens if this isn't specified - should it default to null/false? It > > should be an optional property. > > Attila Doroszlai wrote: > Conversion to boolean is for "validation": anything else than > case-insensitive "true" is treated as false. > > Conversion back to String is necessary because > `ActionExecutionContext.parameters` is a `String => String` map. > > The property is optional in the request, defaults to false (see my 2nd > test case).
Thanks! - Jonathan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/60535/#review179347 ----------------------------------------------------------- On June 30, 2017, 3:43 a.m., Attila Doroszlai wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/60535/ > ----------------------------------------------------------- > > (Updated June 30, 2017, 3:43 a.m.) > > > Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Sumit > Mohanty, and Sid Wagle. > > > Bugs: AMBARI-21372 > https://issues.apache.org/jira/browse/AMBARI-21372 > > > Repository: ambari > > > Description > ------- > > Introduce `ignore_package_dependencies` flag for `ClusterStackVersions` > request. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java > edf12514a2966d4f29877e93c702f107ed83f37a > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java > 621d71e9391200be057d1efd6657dd3562d459bb > ambari-server/src/main/resources/custom_actions/scripts/install_packages.py > 3a93389957e36686848217fd7f69b8af0101d174 > > > Diff: https://reviews.apache.org/r/60535/diff/2/ > > > Testing > ------- > > Manual test on CentOS7. > > With `ignore_package_dependencies: true`: > > ``` > $ curl -X POST -d '{ "ClusterStackVersions": { "stack": "HDP", "version": > "2.6", "repository_version": "2.6.3.0-11", "ignore_package_dependencies": > "true" } }' http://localhost:8080/api/v1/clusters/TEST/stack_versions > > output-52.txt: > ... > 2017-06-30 07:28:48,142 - Will install packages for repository version > 2.6.3.0-11 > ... > 2017-06-30 07:28:48,234 - Installing package hdp-select ('/usr/bin/yum -d 0 > -e 0 -y install hdp-select') > ... > 2017-06-30 07:30:14,042 - Installing package zookeeper_2_6_3_0_11-server > ('/usr/bin/yum -d 0 -e 0 -y install zookeeper_2_6_3_0_11-server') > 2017-06-30 07:30:48,709 - Ignoring package dependencies > ... > 2017-06-30 07:30:48,732 - Configuration symlinks are not needed for 2.6.3.0-11 > ``` > > Defaults to `false` if flag is omitted: > > ``` > $ curl -X POST -d '{ "ClusterStackVersions": { "stack": "HDP", "version": > "2.6", "repository_version": "2.6.3.0-11" } }' > http://localhost:8080/api/v1/clusters/TEST/stack_versions > > output-52.txt: > ... > 2017-06-29 12:03:02,930 - Will install packages for repository version > 2.6.3.0-11 > ... > 2017-06-29 12:03:02,999 - Installing package hdp-select ('/usr/bin/yum -d 0 > -e 0 -y install hdp-select') > ... > 2017-06-29 12:04:29,980 - Installing package zookeeper_2_6_3_0_11-server > ('/usr/bin/yum -d 0 -e 0 -y install zookeeper_2_6_3_0_11-server') > 2017-06-29 12:05:08,189 - checked_call[['/usr/bin/yum', '-d', '0', '-e', '0', > 'check', 'dependencies']] {'sudo': True} > 2017-06-29 12:05:08,953 - Could not install packages. Error: Execution of > '/usr/bin/yum -d 0 -e 0 check dependencies' returned 1. Error: check > ['dependencies'] > ... > ``` > > > Unit tests (same as on `branch-feature-AMBARI-21348`): > > ``` > Failed tests: > UpgradeActionTest.testFinalizeDowngrade:515 expected:<CURRENT> but > was:<INSTALLED> > UpgradeActionTest.testFinalizeDowngradeAcrossStacks:813 expected:<4> but > was:<8> > UpgradeActionTest.testFinalizeUpgrade:606->verifyBaseRepoURL:674 > expected:<1> but was:<0> > ConfigUpgradeValidityTest.testValidateConfigUpgradePacks:225 File > ambari-server/src/main/resources/stacks/BigInsights/4.2/upgrades/config-upgrade.xml > appears to be a config upgrade pack, but does not define > 'upgrade-config.xsd' as its schema > Tests in error: > > UpgradeActionTest.testFinalizeDowngradeWhenDidNotFinalizePreviousUpgrade:541->makeTwoUpgradesWhereLastDidNotComplete:254 > » Ambari > ServicePropertiesTest.validatePropertySchemaOfServiceXMLs:50 » Ambari File > /Us... > > Tests run: 4993, Failures: 4, Errors: 2, Skipped: 39 > ``` > > > Thanks, > > Attila Doroszlai > >