> On Dec. 10, 2014, 4:01 p.m., Nate Cole wrote: > > ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py, > > lines 36-38 > > <https://reviews.apache.org/r/28905/diff/1/?file=788210#file788210line36> > > > > Do you need an len(use_repos) as well? If the argument is not passed, > > will this check be true with an empty array?
Empty list (a default value) is false in python - Dmitro ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28905/#review64552 ----------------------------------------------------------- On Dec. 10, 2014, 3:51 p.m., Dmitro Lisnichenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/28905/ > ----------------------------------------------------------- > > (Updated Dec. 10, 2014, 3:51 p.m.) > > > Review request for Ambari, Alejandro Fernandez, Nate Cole, and Yurii Shylov. > > > Bugs: AMBARI-8639 > https://issues.apache.org/jira/browse/AMBARI-8639 > > > Repository: ambari > > > Description > ------- > > As of Dec 9. > Installed a brand new cluster from trunk. > Installed initial repository with no issue of 2.2.0.0-2041. > This created repo files HDP.repo and HDP-UTILS.repo on each host. > All green. > Then, attempted creation of a new version. Custom Action invoked > successfully, but the result failed. > 1. For HDP, ended up with two files: HDP.repo and HDP-2.2.repo. Each file > contained a repo named "HDP-2.2". The output of the yum invokation contains: > 2014-12-09 19:19:54,929 - Package['zookeeper_2_2_*'] {} > 2014-12-09 19:19:55,300 - Skipping installing existent package zookeeper_2_2_* > which should definitely NOT happen. > 2. The name of the repository file should be a little more specific. There > may be several "HDP-2.2" that a cluster is upgraded to. > 3. The installation should use ONLY the repo designated that it just created, > such that we know that the version installed is from the correct repo. The > command should be something like: yum install --disablerepo=* > --enablerepo="HDP-2.2.0.0-1234" zookeeper_2_2_* > > > Diffs > ----- > > ambari-agent/src/test/python/resource_management/TestPackageResource.py > 140dda9 > > ambari-common/src/main/python/resource_management/core/providers/package/__init__.py > 5ab2b27 > > ambari-common/src/main/python/resource_management/core/providers/package/apt.py > c683be5 > > ambari-common/src/main/python/resource_management/core/providers/package/yumrpm.py > 7d868b0 > > ambari-common/src/main/python/resource_management/core/providers/package/zypper.py > 764da73 > > ambari-common/src/main/python/resource_management/core/resources/packaging.py > c2ff20e > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java > 1c2297b > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java > b278177 > ambari-server/src/main/resources/custom_actions/scripts/install_packages.py > 3e8113a > ambari-server/src/test/python/custom_actions/TestInstallPackages.py bbb96e7 > > ambari-server/src/test/python/custom_actions/configs/install_packages_config.json > 9ea9f47 > > Diff: https://reviews.apache.org/r/28905/diff/ > > > Testing > ------- > > [INFO] Reactor Summary: > [INFO] > [INFO] Ambari Views ...................................... SUCCESS [2.972s] > [INFO] Ambari Server ..................................... SUCCESS > [28:44.868s] > [INFO] Ambari Agent ...................................... SUCCESS [7.521s] > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 28:55.959s > [INFO] Finished at: Wed Dec 10 18:48:11 FET 2014 > [INFO] Final Memory: 35M/196M > [INFO] > ------------------------------------------------------------------------ > > > Thanks, > > Dmitro Lisnichenko > >