ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Fernandez" <afernan...@hortonworks.com>
Subject Re: Review Request 36437: RU - multiple repos should not be created using same build version
Date Sun, 12 Jul 2015 20:16:49 GMT

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

(Updated July 12, 2015, 8:16 p.m.)


Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.


Bugs: AMBARI-12392
    https://issues.apache.org/jira/browse/AMBARI-12392


Repository: ambari


Description
-------

STR:
- Install HDP 2.2
- Register repo for HDP 2.3, such as 2.3.0.0 and do not provide a build number
- Install the package
- Stop all components
- SSH onto one host and begin a manual upgrade by calling "hdp-select set <comp> 2.3.0.0-####"
- Start the component that was switched
- This will create another Repo Version, whose display name and version are "2.3.0.0-####"

This happens because the build version, e.g, 2.3.0.0-2546, can be repeated multiple times
in the repo_version table, even for the same stack. 

To fix this, we should enforce it to be unique.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/checks/ConfigurationMergeCheck.java
c648434 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PreUpgradeCheckResourceProvider.java
66a8db3 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java
7e9a5d3 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
97f224a 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RepositoryVersionDAO.java 45626fb

  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RepositoryVersionEntity.java
9f597a2 
  ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
1e757f6 
  ambari-server/src/test/java/org/apache/ambari/server/checks/ConfigurationMergeCheckTest.java
d9f70e2 
  ambari-server/src/test/java/org/apache/ambari/server/orm/dao/RepositoryVersionDAOTest.java
9a4ee5c 

Diff: https://reviews.apache.org/r/36437/diff/


Testing
-------

Verified that the fix worked by reproducing the scenario.
The culprit was actually RepositoryVersionResourceProvider.java

Unit tests in progress.


Thanks,

Alejandro Fernandez


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message