You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Dmytro Grinenko <ha...@gmail.com> on 2015/08/31 13:00:05 UTC

Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

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

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


Repository: ambari


Description
-------

In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
  ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
  ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 

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


Testing
-------

tests passed


Thanks,

Dmytro Grinenko


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Dmytro Grinenko <ha...@gmail.com>.

> On Sept. 2, 2015, 1:37 p.m., Jonathan Hurley wrote:
> > I'm a bit confused as to why we need to verify that creation of a repository needs to have an upgrade pack. For things like patch upgrades, there won't be an upgrade pack, but a new repository will be created.
> 
> Alejandro Fernandez wrote:
>     This was mainly for RU and Stop-the-World, in which it doesn't make sense to register a repo for a version if no upgrade pack supports its.
>     However, you can also argue this case. Assume that the customer is on HDP 2.2, and HDP 2.4 is already out, and we only support upgrade packs for HDP 2.2->2.3, and 2.3->2.4. In this case, the user should perhaps be allowed to register both repos, and then perform 2 RUs, first from 2.2->2.3, and then 2.3->2.4
> 
> Alejandro Fernandez wrote:
>     I'm ok with keeping D.G.'s logic for now, at least until patch upgrades comes out.
> 
> Dmytro Grinenko wrote:
>     not realy uderstand, why "2.2->2.3, and then 2.3->2.4" it looks more risky and a lot more slow, than 2.2->2.4, isn't?
> 
> Alejandro Fernandez wrote:
>     The issue with supporting 2.2->2.4 in one shot is that it opens us to bugs and more complexity with maintaining config changes in deletes (and then a readd), renames, and transformations.
>     
>     Jumping ine one shot would mean that we have a file for 2.2->2.4, and another for 2.3->2.4 (since this is also valid for some customers).
>     
>     So if a property is deleted in 2.4, it has to be edited in both of those files, which is a small maintenance cost.
>     
>     What's riskier is the following: consider a property that is transformed with some function, say f(x) in HDP 2.2->2.3, and g(x) in HDP 2.3->2.4. This means that a customer that did HDP 2.2->2.3, and then after a couple of months did HDP 2.3->2.4, ended up with g(f(x)).
>     Now, if the customer wants to do HDP 2.2->2.4 in one shot, we need to have a transformation h(x) such that h(x) = g(f(x)), which may not be easy.
>     
>     Another risky one is deletes and re-adds. Assume that property x is deleted in HDP 2.2->2.3, and then the property name is added again in HDP 2.3->2.4.
>     A customer that did these two upgrades in seperate RUs would have the newer value coming from HDP 2.4 since it didn't exist in their last upgrade (which was from HDP 2.3).
>     But if did HDP 2.2->2.4 in one shot, and the user happened to edit the property in HDP 2.2, then we will preserve their changes and not update it with the value in HDP 2.4.
>     
>     My point is that no matter what steps the customer takes to get from x to y, the end result should be the same, and that is only accomplished with an intermediate step.

It's not necessarily to have separate 2.2->2.4, why we could'n perform chained RU in one shoot? Then no described problems above would be present. 

About properties transformation - with normal stack adviser realization and integration with RU, there would be no problems on such transitions. Just imagine, we can describe new properties(relations, etc.) for every stack in one place: SuperStackAdviser, as result this nice thing will generate for us configuration for new installations, changesheet for the upgrade and downgrade for any possible transition. No copy/paste to upgrade packs,meta information xml files,SA formulas, black boxed RU classes with copy of formulas from SA; ideally states of the properties would be the same as for new installation, same for the upgraded/downgraded cluster. But that functionality is only mine imagination :)


- Dmytro


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


On Aug. 31, 2015, 1:54 p.m., Dmytro Grinenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37946/
> -----------------------------------------------------------
> 
> (Updated Aug. 31, 2015, 1:54 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-12934
>     https://issues.apache.org/jira/browse/AMBARI-12934
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
> This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
> During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 
> 
> Diff: https://reviews.apache.org/r/37946/diff/
> 
> 
> Testing
> -------
> 
> tests passed
> 
> 
> Thanks,
> 
> Dmytro Grinenko
> 
>


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Dmytro Grinenko <ha...@gmail.com>.

> On Sept. 2, 2015, 1:37 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java, lines 424-426
> > <https://reviews.apache.org/r/37946/diff/1/?file=1060284#file1060284line424>
> >
> >     Why iterate over all clusters? You have the cluster name from the request.

No, not this time! Below is the full dump of the request

Request:, propertyIds=[ ], properties=[  { propertyName=operating_systems, propertyValue=[{repositories=[{Repositories/repo_id=HDP-2.3, Repositories/base_url=http://xxxxxx, Repositories/repo_name=HDP}, {Repositories/repo_id=xxxxxx, Repositories/base_url=xxxxxxxx, Repositories/repo_name=xxxxxx}], OperatingSystems/os_type=redhat6}] },  { propertyName=RepositoryVersions/stack_name, propertyValue=HDP },  { propertyName=RepositoryVersions/id, propertyValue=NULL },  { propertyName=RepositoryVersions/repository_version, propertyValue=xxxxxx },  { propertyName=RepositoryVersions/display_name, propertyValue=xxxxxx },  { propertyName=RepositoryVersions/stack_version, propertyValue=2.3 },  ], temporalInfo=[null ]


- Dmytro


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


On Aug. 31, 2015, 1:54 p.m., Dmytro Grinenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37946/
> -----------------------------------------------------------
> 
> (Updated Aug. 31, 2015, 1:54 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-12934
>     https://issues.apache.org/jira/browse/AMBARI-12934
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
> This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
> During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 
> 
> Diff: https://reviews.apache.org/r/37946/diff/
> 
> 
> Testing
> -------
> 
> tests passed
> 
> 
> Thanks,
> 
> Dmytro Grinenko
> 
>


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Dmytro Grinenko <ha...@gmail.com>.

> On Sept. 2, 2015, 1:37 p.m., Jonathan Hurley wrote:
> > I'm a bit confused as to why we need to verify that creation of a repository needs to have an upgrade pack. For things like patch upgrades, there won't be an upgrade pack, but a new repository will be created.
> 
> Alejandro Fernandez wrote:
>     This was mainly for RU and Stop-the-World, in which it doesn't make sense to register a repo for a version if no upgrade pack supports its.
>     However, you can also argue this case. Assume that the customer is on HDP 2.2, and HDP 2.4 is already out, and we only support upgrade packs for HDP 2.2->2.3, and 2.3->2.4. In this case, the user should perhaps be allowed to register both repos, and then perform 2 RUs, first from 2.2->2.3, and then 2.3->2.4
> 
> Alejandro Fernandez wrote:
>     I'm ok with keeping D.G.'s logic for now, at least until patch upgrades comes out.

not realy uderstand, why "2.2->2.3, and then 2.3->2.4" it looks more risky and a lot more slow, than 2.2->2.4, isn't?


- Dmytro


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


On Aug. 31, 2015, 1:54 p.m., Dmytro Grinenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37946/
> -----------------------------------------------------------
> 
> (Updated Aug. 31, 2015, 1:54 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-12934
>     https://issues.apache.org/jira/browse/AMBARI-12934
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
> This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
> During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 
> 
> Diff: https://reviews.apache.org/r/37946/diff/
> 
> 
> Testing
> -------
> 
> tests passed
> 
> 
> Thanks,
> 
> Dmytro Grinenko
> 
>


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Alejandro Fernandez <af...@hortonworks.com>.

> On Sept. 2, 2015, 1:37 p.m., Jonathan Hurley wrote:
> > I'm a bit confused as to why we need to verify that creation of a repository needs to have an upgrade pack. For things like patch upgrades, there won't be an upgrade pack, but a new repository will be created.

This was mainly for RU and Stop-the-World, in which it doesn't make sense to register a repo for a version if no upgrade pack supports its.
However, you can also argue this case. Assume that the customer is on HDP 2.2, and HDP 2.4 is already out, and we only support upgrade packs for HDP 2.2->2.3, and 2.3->2.4. In this case, the user should perhaps be allowed to register both repos, and then perform 2 RUs, first from 2.2->2.3, and then 2.3->2.4


- Alejandro


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


On Aug. 31, 2015, 1:54 p.m., Dmytro Grinenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37946/
> -----------------------------------------------------------
> 
> (Updated Aug. 31, 2015, 1:54 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-12934
>     https://issues.apache.org/jira/browse/AMBARI-12934
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
> This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
> During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 
> 
> Diff: https://reviews.apache.org/r/37946/diff/
> 
> 
> Testing
> -------
> 
> tests passed
> 
> 
> Thanks,
> 
> Dmytro Grinenko
> 
>


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Alejandro Fernandez <af...@hortonworks.com>.

> On Sept. 2, 2015, 1:37 p.m., Jonathan Hurley wrote:
> > I'm a bit confused as to why we need to verify that creation of a repository needs to have an upgrade pack. For things like patch upgrades, there won't be an upgrade pack, but a new repository will be created.
> 
> Alejandro Fernandez wrote:
>     This was mainly for RU and Stop-the-World, in which it doesn't make sense to register a repo for a version if no upgrade pack supports its.
>     However, you can also argue this case. Assume that the customer is on HDP 2.2, and HDP 2.4 is already out, and we only support upgrade packs for HDP 2.2->2.3, and 2.3->2.4. In this case, the user should perhaps be allowed to register both repos, and then perform 2 RUs, first from 2.2->2.3, and then 2.3->2.4

I'm ok with keeping D.G.'s logic for now, at least until patch upgrades comes out.


- Alejandro


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


On Aug. 31, 2015, 1:54 p.m., Dmytro Grinenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37946/
> -----------------------------------------------------------
> 
> (Updated Aug. 31, 2015, 1:54 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-12934
>     https://issues.apache.org/jira/browse/AMBARI-12934
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
> This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
> During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 
> 
> Diff: https://reviews.apache.org/r/37946/diff/
> 
> 
> Testing
> -------
> 
> tests passed
> 
> 
> Thanks,
> 
> Dmytro Grinenko
> 
>


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Dmytro Grinenko <ha...@gmail.com>.

> On Sept. 2, 2015, 1:37 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java, line 129
> > <https://reviews.apache.org/r/37946/diff/1/?file=1060284#file1060284line129>
> >
> >     Should not need this in this resource provider. (See comment below)

Sadly we need this.


- Dmytro


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


On Aug. 31, 2015, 1:54 p.m., Dmytro Grinenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37946/
> -----------------------------------------------------------
> 
> (Updated Aug. 31, 2015, 1:54 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-12934
>     https://issues.apache.org/jira/browse/AMBARI-12934
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
> This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
> During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 
> 
> Diff: https://reviews.apache.org/r/37946/diff/
> 
> 
> Testing
> -------
> 
> tests passed
> 
> 
> Thanks,
> 
> Dmytro Grinenko
> 
>


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Jonathan Hurley <jh...@hortonworks.com>.

> On Sept. 2, 2015, 9:37 a.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java, lines 424-426
> > <https://reviews.apache.org/r/37946/diff/1/?file=1060284#file1060284line424>
> >
> >     Why iterate over all clusters? You have the cluster name from the request.
> 
> Dmytro Grinenko wrote:
>     No, not this time! Below is the full dump of the request
>     
>     Request:, propertyIds=[ ], properties=[  { propertyName=operating_systems, propertyValue=[{repositories=[{Repositories/repo_id=HDP-2.3, Repositories/base_url=http://xxxxxx, Repositories/repo_name=HDP}, {Repositories/repo_id=xxxxxx, Repositories/base_url=xxxxxxxx, Repositories/repo_name=xxxxxx}], OperatingSystems/os_type=redhat6}] },  { propertyName=RepositoryVersions/stack_name, propertyValue=HDP },  { propertyName=RepositoryVersions/id, propertyValue=NULL },  { propertyName=RepositoryVersions/repository_version, propertyValue=xxxxxx },  { propertyName=RepositoryVersions/display_name, propertyValue=xxxxxx },  { propertyName=RepositoryVersions/stack_version, propertyValue=2.3 },  ], temporalInfo=[null ]

Ah, right! I forgot that we don't always have it here.


- Jonathan


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


On Sept. 3, 2015, 1:14 a.m., Dmytro Grinenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37946/
> -----------------------------------------------------------
> 
> (Updated Sept. 3, 2015, 1:14 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-12934
>     https://issues.apache.org/jira/browse/AMBARI-12934
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
> This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
> During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 
> 
> Diff: https://reviews.apache.org/r/37946/diff/
> 
> 
> Testing
> -------
> 
> tests passed
> 
> 
> Thanks,
> 
> Dmytro Grinenko
> 
>


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Alejandro Fernandez <af...@hortonworks.com>.

> On Sept. 2, 2015, 1:37 p.m., Jonathan Hurley wrote:
> > I'm a bit confused as to why we need to verify that creation of a repository needs to have an upgrade pack. For things like patch upgrades, there won't be an upgrade pack, but a new repository will be created.
> 
> Alejandro Fernandez wrote:
>     This was mainly for RU and Stop-the-World, in which it doesn't make sense to register a repo for a version if no upgrade pack supports its.
>     However, you can also argue this case. Assume that the customer is on HDP 2.2, and HDP 2.4 is already out, and we only support upgrade packs for HDP 2.2->2.3, and 2.3->2.4. In this case, the user should perhaps be allowed to register both repos, and then perform 2 RUs, first from 2.2->2.3, and then 2.3->2.4
> 
> Alejandro Fernandez wrote:
>     I'm ok with keeping D.G.'s logic for now, at least until patch upgrades comes out.
> 
> Dmytro Grinenko wrote:
>     not realy uderstand, why "2.2->2.3, and then 2.3->2.4" it looks more risky and a lot more slow, than 2.2->2.4, isn't?

The issue with supporting 2.2->2.4 in one shot is that it opens us to bugs and more complexity with maintaining config changes in deletes (and then a readd), renames, and transformations.

Jumping ine one shot would mean that we have a file for 2.2->2.4, and another for 2.3->2.4 (since this is also valid for some customers).

So if a property is deleted in 2.4, it has to be edited in both of those files, which is a small maintenance cost.

What's riskier is the following: consider a property that is transformed with some function, say f(x) in HDP 2.2->2.3, and g(x) in HDP 2.3->2.4. This means that a customer that did HDP 2.2->2.3, and then after a couple of months did HDP 2.3->2.4, ended up with g(f(x)).
Now, if the customer wants to do HDP 2.2->2.4 in one shot, we need to have a transformation h(x) such that h(x) = g(f(x)), which may not be easy.

Another risky one is deletes and re-adds. Assume that property x is deleted in HDP 2.2->2.3, and then the property name is added again in HDP 2.3->2.4.
A customer that did these two upgrades in seperate RUs would have the newer value coming from HDP 2.4 since it didn't exist in their last upgrade (which was from HDP 2.3).
But if did HDP 2.2->2.4 in one shot, and the user happened to edit the property in HDP 2.2, then we will preserve their changes and not update it with the value in HDP 2.4.

My point is that no matter what steps the customer takes to get from x to y, the end result should be the same, and that is only accomplished with an intermediate step.


- Alejandro


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


On Aug. 31, 2015, 1:54 p.m., Dmytro Grinenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37946/
> -----------------------------------------------------------
> 
> (Updated Aug. 31, 2015, 1:54 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-12934
>     https://issues.apache.org/jira/browse/AMBARI-12934
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
> This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
> During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 
> 
> Diff: https://reviews.apache.org/r/37946/diff/
> 
> 
> Testing
> -------
> 
> tests passed
> 
> 
> Thanks,
> 
> Dmytro Grinenko
> 
>


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37946/#review97443
-----------------------------------------------------------


I'm a bit confused as to why we need to verify that creation of a repository needs to have an upgrade pack. For things like patch upgrades, there won't be an upgrade pack, but a new repository will be created.


ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java (line 129)
<https://reviews.apache.org/r/37946/#comment153323>

    Should not need this in this resource provider. (See comment below)



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java (lines 158 - 163)
<https://reviews.apache.org/r/37946/#comment153319>

    Indentation fix.



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java (lines 359 - 360)
<https://reviews.apache.org/r/37946/#comment153320>

    StackStack?



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java (lines 423 - 425)
<https://reviews.apache.org/r/37946/#comment153322>

    Why iterate over all clusters? You have the cluster name from the request.


- Jonathan Hurley


On Aug. 31, 2015, 9:54 a.m., Dmytro Grinenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37946/
> -----------------------------------------------------------
> 
> (Updated Aug. 31, 2015, 9:54 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-12934
>     https://issues.apache.org/jira/browse/AMBARI-12934
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
> This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
> During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 
> 
> Diff: https://reviews.apache.org/r/37946/diff/
> 
> 
> Testing
> -------
> 
> tests passed
> 
> 
> Thanks,
> 
> Dmytro Grinenko
> 
>


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Dmytro Grinenko <ha...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37946/
-----------------------------------------------------------

(Updated Sept. 4, 2015, 10:15 a.m.)


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


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


Repository: ambari


Description
-------

In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java 1c2328d 
  ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java bd06ea8 
  ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 615029d 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java c01dcd2 

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


Testing
-------

tests passed


Thanks,

Dmytro Grinenko


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37946/#review97654
-----------------------------------------------------------

Ship it!



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java (lines 128 - 129)
<https://reviews.apache.org/r/37946/#comment153663>

    Why not just inject Provider<Clusters> instead since you're only using this to iterate over clusters.


- Jonathan Hurley


On Sept. 3, 2015, 1:14 a.m., Dmytro Grinenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37946/
> -----------------------------------------------------------
> 
> (Updated Sept. 3, 2015, 1:14 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-12934
>     https://issues.apache.org/jira/browse/AMBARI-12934
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
> This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
> During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 
> 
> Diff: https://reviews.apache.org/r/37946/diff/
> 
> 
> Testing
> -------
> 
> tests passed
> 
> 
> Thanks,
> 
> Dmytro Grinenko
> 
>


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37946/#review97662
-----------------------------------------------------------

Ship it!


Ship It!

- Alejandro Fernandez


On Sept. 3, 2015, 5:14 a.m., Dmytro Grinenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37946/
> -----------------------------------------------------------
> 
> (Updated Sept. 3, 2015, 5:14 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-12934
>     https://issues.apache.org/jira/browse/AMBARI-12934
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
> This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
> During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 
> 
> Diff: https://reviews.apache.org/r/37946/diff/
> 
> 
> Testing
> -------
> 
> tests passed
> 
> 
> Thanks,
> 
> Dmytro Grinenko
> 
>


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Dmytro Grinenko <ha...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37946/
-----------------------------------------------------------

(Updated Sept. 3, 2015, 5:14 a.m.)


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


Changes
-------

cleanup unused imports


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


Repository: ambari


Description
-------

In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
  ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
  ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 

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


Testing
-------

tests passed


Thanks,

Dmytro Grinenko


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Dmytro Grinenko <ha...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37946/
-----------------------------------------------------------

(Updated Sept. 3, 2015, 5:12 a.m.)


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


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


Repository: ambari


Description
-------

In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
  ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
  ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 

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


Testing
-------

tests passed


Thanks,

Dmytro Grinenko


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37946/#review97099
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java (line 430)
<https://reviews.apache.org/r/37946/#comment152845>

    Why are we checking the target stack?
    In the case of HDP 2.1->2.3, we only need the source to contain an upgrade pack for 2.3.


- Alejandro Fernandez


On Aug. 31, 2015, 1:54 p.m., Dmytro Grinenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37946/
> -----------------------------------------------------------
> 
> (Updated Aug. 31, 2015, 1:54 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-12934
>     https://issues.apache.org/jira/browse/AMBARI-12934
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
> This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
> During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 
> 
> Diff: https://reviews.apache.org/r/37946/diff/
> 
> 
> Testing
> -------
> 
> tests passed
> 
> 
> Thanks,
> 
> Dmytro Grinenko
> 
>


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Dmytro Grinenko <ha...@gmail.com>.

> On Aug. 31, 2015, 3:09 p.m., Dmitro Lisnichenko wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java, line 420
> > <https://reviews.apache.org/r/37946/diff/1/?file=1060284#file1060284line420>
> >
> >     maybe better upgradePackExists() ?

not sure, but ok


- Dmytro


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


On Aug. 31, 2015, 1:54 p.m., Dmytro Grinenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37946/
> -----------------------------------------------------------
> 
> (Updated Aug. 31, 2015, 1:54 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-12934
>     https://issues.apache.org/jira/browse/AMBARI-12934
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
> This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
> During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 
> 
> Diff: https://reviews.apache.org/r/37946/diff/
> 
> 
> Testing
> -------
> 
> tests passed
> 
> 
> Thanks,
> 
> Dmytro Grinenko
> 
>


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Dmitro Lisnichenko <dl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37946/#review97081
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java (line 419)
<https://reviews.apache.org/r/37946/#comment152816>

    maybe better upgradePackExists() ?


- Dmitro Lisnichenko


On Aug. 31, 2015, 1:54 p.m., Dmytro Grinenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37946/
> -----------------------------------------------------------
> 
> (Updated Aug. 31, 2015, 1:54 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-12934
>     https://issues.apache.org/jira/browse/AMBARI-12934
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
> This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
> During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 
> 
> Diff: https://reviews.apache.org/r/37946/diff/
> 
> 
> Testing
> -------
> 
> tests passed
> 
> 
> Thanks,
> 
> Dmytro Grinenko
> 
>


Re: Review Request 37946: Stop-and-Start Upgrade: If using HDP 2.x, can only register repo for HDP 2.y since need an upgrade pack to support it

Posted by Dmytro Grinenko <ha...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37946/
-----------------------------------------------------------

(Updated Aug. 31, 2015, 1:54 p.m.)


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


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


Repository: ambari


Description
-------

In Ambari 2.2.0, we'll need to support Stop-and-Start Upgrade from HDP 2.x -> 2.y.
This means that if the user is still on HDP 2.x, the only upgrade pack possible will be Stop-and-Start Upgrade to HDP 2.y, so it doesn't make sense to allow the user to register a repo for any version except HDP 2.y.
During repo_version creation, we need to ensure that the version being installed has an upgrade pack that will allow upgrading to it.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java f1fa3bf 
  ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java 79b8eb5 
  ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/RepositoryVersionHelper.java 2e17cf4 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProviderTest.java 442bcb2 

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


Testing
-------

tests passed


Thanks,

Dmytro Grinenko