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 41115: AMBARI-14281. EU/RU can fail if register a repo without a build number that already exists, add PreCheck
Date Wed, 09 Dec 2015 17:24:19 GMT


> On Dec. 9, 2015, 5:32 a.m., Dmytro Grinenko wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/checks/InstallPackagesCheck.java,
line 64
> > <https://reviews.apache.org/r/41115/diff/2/?file=1156722#file1156722line64>
> >
> >     but this doesn't check format x.x.x- (i.e. "-" is leading), or x.x-x.x.x, or
x.x-x-x-x
> >     
> >     Possibly we need to have some "central" place to verify/parse version input
like in python scripts or some class which will be able to initialize from different formats?
This should help to stop the hell with version formats available in the ambari, same like
the time when we change version convension

I can add regex here for \d+-\d+


- Alejandro


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


On Dec. 9, 2015, 2:27 a.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41115/
> -----------------------------------------------------------
> 
> (Updated Dec. 9, 2015, 2:27 a.m.)
> 
> 
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan Hurley, Nate
Cole, and Swapan Shridhar.
> 
> 
> Bugs: AMBARI-14281
>     https://issues.apache.org/jira/browse/AMBARI-14281
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> If a cluster has version x (e.g., HDP 2.3.2.0-2950) as CURRENT, and the user registers
a Repository Version such as 2.3.xx that uses different build URLs but results in the same
build number, then installing packages will be a no-op.
> This means that no new version will be detected using the "deltas" method and the repo_version
entity will keep the "version" field without a build number, and the Cluster Version entity
will transition into INSTALLED (since technically it is already installed).
> 
> This incorrect setup will allow the user to start a RU/EU, which will immediately fail
since the Repo Version has no build number, which is needed by hdp-select.
> 
> The fix is to add a PreCheck that ensures that all repos contain a build number.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/InstallPackagesCheck.java
15b6140 
>   ambari-server/src/test/java/org/apache/ambari/server/checks/InstallPackagesCheckTest.java
56aa1f3 
> 
> Diff: https://reviews.apache.org/r/41115/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> Tested that a build must contain a build number before starting RU/EU.
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


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