You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Nate Cole <nc...@hortonworks.com> on 2015/10/27 22:08:43 UTC

Review Request 39700: RU & EU: Allow set-current to force a version into the db

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

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


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


Repository: ambari


Description
-------

{{ambari-server --set-current}} should have an additional option to set a version to current.  Existing functionality takes the information passed in and calls the Finalize action.  This attempts to go through the framework and "cleanly" make sure all the versions are correct by applying the same logic as finalize.

Add a {{--force}} option to do the db work directly without going through the finalize action, modeled after what the RU magician does.  If work is small enough, possible backport to 2.1.3.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java 2a1431d 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterVersionDAO.java 8d4c5ee 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java 2620c8c 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java d5707be 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostVersionDAO.java ad617af 
  ambari-server/src/main/python/ambari-server.py 2fae1ee 
  ambari-server/src/main/python/ambari_server/serverUpgrade.py 7048812 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java 1819ef9 
  ambari-server/src/test/python/TestServerUpgrade.py 7ef74b2 

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


Testing
-------

Manual verification.  Automated pending.


Thanks,

Nate Cole


Re: Review Request 39700: RU & EU: Allow set-current to force a version into the db

Posted by Nate Cole <nc...@hortonworks.com>.

> On Oct. 27, 2015, 5:37 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostVersionDAO.java, line 224
> > <https://reviews.apache.org/r/39700/diff/1/?file=1109778#file1109778line224>
> >
> >     Doc it?

ok


> On Oct. 27, 2015, 5:37 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java, line 211
> > <https://reviews.apache.org/r/39700/diff/1/?file=1109777#file1109777line211>
> >
> >     Doc it?

ok


> On Oct. 27, 2015, 5:37 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterVersionDAO.java, line 210
> > <https://reviews.apache.org/r/39700/diff/1/?file=1109775#file1109775line210>
> >
> >     Document this in the javadoc

ok


> On Oct. 27, 2015, 5:37 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterVersionDAO.java, lines 201-204
> > <https://reviews.apache.org/r/39700/diff/1/?file=1109775#file1109775line201>
> >
> >     I prefer named parameters like :clusterId because then you know that you're explictely setting it right on the query object. But this works the same, too.

For named queries where the "source" isn't right there I agree, but since this was all "local" - meh :)


> On Oct. 27, 2015, 5:37 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterVersionDAO.java, line 196
> > <https://reviews.apache.org/r/39700/diff/1/?file=1109775#file1109775line196>
> >
> >     You can probably just get the EM once and reuse it. It should be the same since it's a thread local, but might as well hold onto it.

will do


> On Oct. 27, 2015, 5:37 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java, lines 776-780
> > <https://reviews.apache.org/r/39700/diff/1/?file=1109774#file1109774line776>
> >
> >     Should this be in reverse order for any reason (thinking about transactions). Should it be host components, hosts, and finally cluster?

Not sure - logically that seems sound.  I'll make the change.


- Nate


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


On Oct. 27, 2015, 5:08 p.m., Nate Cole wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39700/
> -----------------------------------------------------------
> 
> (Updated Oct. 27, 2015, 5:08 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-13591
>     https://issues.apache.org/jira/browse/AMBARI-13591
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> {{ambari-server --set-current}} should have an additional option to set a version to current.  Existing functionality takes the information passed in and calls the Finalize action.  This attempts to go through the framework and "cleanly" make sure all the versions are correct by applying the same logic as finalize.
> 
> Add a {{--force}} option to do the db work directly without going through the finalize action, modeled after what the RU magician does.  If work is small enough, possible backport to 2.1.3.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java 2a1431d 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterVersionDAO.java 8d4c5ee 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java 2620c8c 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java d5707be 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostVersionDAO.java ad617af 
>   ambari-server/src/main/python/ambari-server.py 2fae1ee 
>   ambari-server/src/main/python/ambari_server/serverUpgrade.py 7048812 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java 1819ef9 
>   ambari-server/src/test/python/TestServerUpgrade.py 7ef74b2 
> 
> Diff: https://reviews.apache.org/r/39700/diff/
> 
> 
> Testing
> -------
> 
> Manual verification.  Automated pending.
> 
> 
> Thanks,
> 
> Nate Cole
> 
>


Re: Review Request 39700: RU & EU: Allow set-current to force a version into the db

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

Ship it!



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java (lines 770 - 774)
<https://reviews.apache.org/r/39700/#comment162499>

    Should this be in reverse order for any reason (thinking about transactions). Should it be host components, hosts, and finally cluster?



ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterVersionDAO.java (line 195)
<https://reviews.apache.org/r/39700/#comment162500>

    You can probably just get the EM once and reuse it. It should be the same since it's a thread local, but might as well hold onto it.



ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterVersionDAO.java (lines 200 - 203)
<https://reviews.apache.org/r/39700/#comment162502>

    I prefer named parameters like :clusterId because then you know that you're explictely setting it right on the query object. But this works the same, too.



ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterVersionDAO.java (line 209)
<https://reviews.apache.org/r/39700/#comment162501>

    Document this in the javadoc



ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java (line 211)
<https://reviews.apache.org/r/39700/#comment162504>

    Doc it?



ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostVersionDAO.java (line 224)
<https://reviews.apache.org/r/39700/#comment162503>

    Doc it?


- Jonathan Hurley


On Oct. 27, 2015, 5:08 p.m., Nate Cole wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39700/
> -----------------------------------------------------------
> 
> (Updated Oct. 27, 2015, 5:08 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-13591
>     https://issues.apache.org/jira/browse/AMBARI-13591
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> {{ambari-server --set-current}} should have an additional option to set a version to current.  Existing functionality takes the information passed in and calls the Finalize action.  This attempts to go through the framework and "cleanly" make sure all the versions are correct by applying the same logic as finalize.
> 
> Add a {{--force}} option to do the db work directly without going through the finalize action, modeled after what the RU magician does.  If work is small enough, possible backport to 2.1.3.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java 2a1431d 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterVersionDAO.java 8d4c5ee 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java 2620c8c 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java d5707be 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostVersionDAO.java ad617af 
>   ambari-server/src/main/python/ambari-server.py 2fae1ee 
>   ambari-server/src/main/python/ambari_server/serverUpgrade.py 7048812 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java 1819ef9 
>   ambari-server/src/test/python/TestServerUpgrade.py 7ef74b2 
> 
> Diff: https://reviews.apache.org/r/39700/diff/
> 
> 
> Testing
> -------
> 
> Manual verification.  Automated pending.
> 
> 
> Thanks,
> 
> Nate Cole
> 
>


Re: Review Request 39700: RU & EU: Allow set-current to force a version into the db

Posted by Nate Cole <nc...@hortonworks.com>.

> On Oct. 27, 2015, 5:54 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java, lines 776-780
> > <https://reviews.apache.org/r/39700/diff/1/?file=1109774#file1109774line776>
> >
> >     My preference is not to use the transition logic and directly update the entities.
> >     For instance, assume one host is still in INSTALLED and never went to UPGRADING because no components on it were ever upgraded.
> >     
> >     In this scenario, it's safer to directly change the record to CURRENT.
> >     
> >     And also, update the previously CURRENT record to INSTALLED.

The code within updateVersions() does the CURRENT->INSTALLED and desired target to CURRENT.  These work without invoking transition logic.


- Nate


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


On Oct. 27, 2015, 5:08 p.m., Nate Cole wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39700/
> -----------------------------------------------------------
> 
> (Updated Oct. 27, 2015, 5:08 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-13591
>     https://issues.apache.org/jira/browse/AMBARI-13591
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> {{ambari-server --set-current}} should have an additional option to set a version to current.  Existing functionality takes the information passed in and calls the Finalize action.  This attempts to go through the framework and "cleanly" make sure all the versions are correct by applying the same logic as finalize.
> 
> Add a {{--force}} option to do the db work directly without going through the finalize action, modeled after what the RU magician does.  If work is small enough, possible backport to 2.1.3.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java 2a1431d 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterVersionDAO.java 8d4c5ee 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java 2620c8c 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java d5707be 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostVersionDAO.java ad617af 
>   ambari-server/src/main/python/ambari-server.py 2fae1ee 
>   ambari-server/src/main/python/ambari_server/serverUpgrade.py 7048812 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java 1819ef9 
>   ambari-server/src/test/python/TestServerUpgrade.py 7ef74b2 
> 
> Diff: https://reviews.apache.org/r/39700/diff/
> 
> 
> Testing
> -------
> 
> Manual verification.  Automated pending.
> 
> 
> Thanks,
> 
> Nate Cole
> 
>


Re: Review Request 39700: RU & EU: Allow set-current to force a version into the db

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



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java (lines 770 - 774)
<https://reviews.apache.org/r/39700/#comment162505>

    My preference is not to use the transition logic and directly update the entities.
    For instance, assume one host is still in INSTALLED and never went to UPGRADING because no components on it were ever upgraded.
    
    In this scenario, it's safer to directly change the record to CURRENT.
    
    And also, update the previously CURRENT record to INSTALLED.


- Alejandro Fernandez


On Oct. 27, 2015, 9:08 p.m., Nate Cole wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39700/
> -----------------------------------------------------------
> 
> (Updated Oct. 27, 2015, 9:08 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-13591
>     https://issues.apache.org/jira/browse/AMBARI-13591
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> {{ambari-server --set-current}} should have an additional option to set a version to current.  Existing functionality takes the information passed in and calls the Finalize action.  This attempts to go through the framework and "cleanly" make sure all the versions are correct by applying the same logic as finalize.
> 
> Add a {{--force}} option to do the db work directly without going through the finalize action, modeled after what the RU magician does.  If work is small enough, possible backport to 2.1.3.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java 2a1431d 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterVersionDAO.java 8d4c5ee 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java 2620c8c 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java d5707be 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostVersionDAO.java ad617af 
>   ambari-server/src/main/python/ambari-server.py 2fae1ee 
>   ambari-server/src/main/python/ambari_server/serverUpgrade.py 7048812 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java 1819ef9 
>   ambari-server/src/test/python/TestServerUpgrade.py 7ef74b2 
> 
> Diff: https://reviews.apache.org/r/39700/diff/
> 
> 
> Testing
> -------
> 
> Manual verification.  Automated pending.
> 
> 
> Thanks,
> 
> Nate Cole
> 
>


Re: Review Request 39700: RU & EU: Allow set-current to force a version into the db

Posted by Nate Cole <nc...@hortonworks.com>.

> On Oct. 28, 2015, 5:04 a.m., Dmitro Lisnichenko wrote:
> > ambari-server/src/main/python/ambari_server/serverUpgrade.py, line 415
> > <https://reviews.apache.org/r/39700/diff/1/?file=1109780#file1109780line415>
> >
> >     I think in python we may use boolean type directly instead of strings here

I had actually written the server side first, and that was giving me strings no matter what I provided for the API call.  I'll make it boolean for clarity hoping one day the API does it right :)


- Nate


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


On Oct. 27, 2015, 5:08 p.m., Nate Cole wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39700/
> -----------------------------------------------------------
> 
> (Updated Oct. 27, 2015, 5:08 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-13591
>     https://issues.apache.org/jira/browse/AMBARI-13591
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> {{ambari-server --set-current}} should have an additional option to set a version to current.  Existing functionality takes the information passed in and calls the Finalize action.  This attempts to go through the framework and "cleanly" make sure all the versions are correct by applying the same logic as finalize.
> 
> Add a {{--force}} option to do the db work directly without going through the finalize action, modeled after what the RU magician does.  If work is small enough, possible backport to 2.1.3.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java 2a1431d 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterVersionDAO.java 8d4c5ee 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java 2620c8c 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java d5707be 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostVersionDAO.java ad617af 
>   ambari-server/src/main/python/ambari-server.py 2fae1ee 
>   ambari-server/src/main/python/ambari_server/serverUpgrade.py 7048812 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java 1819ef9 
>   ambari-server/src/test/python/TestServerUpgrade.py 7ef74b2 
> 
> Diff: https://reviews.apache.org/r/39700/diff/
> 
> 
> Testing
> -------
> 
> Manual verification.  Automated pending.
> 
> 
> Thanks,
> 
> Nate Cole
> 
>


Re: Review Request 39700: RU & EU: Allow set-current to force a version into the db

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

Ship it!



ambari-server/src/main/python/ambari_server/serverUpgrade.py (line 415)
<https://reviews.apache.org/r/39700/#comment162535>

    I think in python we may use boolean type directly instead of strings here


- Dmitro Lisnichenko


On Oct. 27, 2015, 11:08 p.m., Nate Cole wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39700/
> -----------------------------------------------------------
> 
> (Updated Oct. 27, 2015, 11:08 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-13591
>     https://issues.apache.org/jira/browse/AMBARI-13591
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> {{ambari-server --set-current}} should have an additional option to set a version to current.  Existing functionality takes the information passed in and calls the Finalize action.  This attempts to go through the framework and "cleanly" make sure all the versions are correct by applying the same logic as finalize.
> 
> Add a {{--force}} option to do the db work directly without going through the finalize action, modeled after what the RU magician does.  If work is small enough, possible backport to 2.1.3.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java 2a1431d 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterVersionDAO.java 8d4c5ee 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java 2620c8c 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java d5707be 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostVersionDAO.java ad617af 
>   ambari-server/src/main/python/ambari-server.py 2fae1ee 
>   ambari-server/src/main/python/ambari_server/serverUpgrade.py 7048812 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java 1819ef9 
>   ambari-server/src/test/python/TestServerUpgrade.py 7ef74b2 
> 
> Diff: https://reviews.apache.org/r/39700/diff/
> 
> 
> Testing
> -------
> 
> Manual verification.  Automated pending.
> 
> 
> Thanks,
> 
> Nate Cole
> 
>


Re: Review Request 39700: RU & EU: Allow set-current to force a version into the db

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

Ship it!


Ship It!

- Jonathan Hurley


On Oct. 28, 2015, 8:37 a.m., Nate Cole wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39700/
> -----------------------------------------------------------
> 
> (Updated Oct. 28, 2015, 8:37 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-13591
>     https://issues.apache.org/jira/browse/AMBARI-13591
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> {{ambari-server --set-current}} should have an additional option to set a version to current.  Existing functionality takes the information passed in and calls the Finalize action.  This attempts to go through the framework and "cleanly" make sure all the versions are correct by applying the same logic as finalize.
> 
> Add a {{--force}} option to do the db work directly without going through the finalize action, modeled after what the RU magician does.  If work is small enough, possible backport to 2.1.3.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java 2a1431d 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterVersionDAO.java 8d4c5ee 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java 2620c8c 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java d5707be 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostVersionDAO.java ad617af 
>   ambari-server/src/main/python/ambari-server.py 2fae1ee 
>   ambari-server/src/main/python/ambari_server/serverUpgrade.py 7048812 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java 1819ef9 
>   ambari-server/src/test/python/TestServerUpgrade.py 7ef74b2 
> 
> Diff: https://reviews.apache.org/r/39700/diff/
> 
> 
> Testing
> -------
> 
> Manual verification.
> 
> Tests run: 3290, Failures: 0, Errors: 0, Skipped: 33
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 26:41.474s
> [INFO] Finished at: Tue Oct 27 17:35:19 EDT 2015
> [INFO] Final Memory: 33M/1568M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Nate Cole
> 
>


Re: Review Request 39700: RU & EU: Allow set-current to force a version into the db

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

Ship it!


Ship It!

- Dmitro Lisnichenko


On Oct. 28, 2015, 2:37 p.m., Nate Cole wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39700/
> -----------------------------------------------------------
> 
> (Updated Oct. 28, 2015, 2:37 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmitro Lisnichenko, and Jonathan Hurley.
> 
> 
> Bugs: AMBARI-13591
>     https://issues.apache.org/jira/browse/AMBARI-13591
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> {{ambari-server --set-current}} should have an additional option to set a version to current.  Existing functionality takes the information passed in and calls the Finalize action.  This attempts to go through the framework and "cleanly" make sure all the versions are correct by applying the same logic as finalize.
> 
> Add a {{--force}} option to do the db work directly without going through the finalize action, modeled after what the RU magician does.  If work is small enough, possible backport to 2.1.3.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java 2a1431d 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterVersionDAO.java 8d4c5ee 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java 2620c8c 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java d5707be 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostVersionDAO.java ad617af 
>   ambari-server/src/main/python/ambari-server.py 2fae1ee 
>   ambari-server/src/main/python/ambari_server/serverUpgrade.py 7048812 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java 1819ef9 
>   ambari-server/src/test/python/TestServerUpgrade.py 7ef74b2 
> 
> Diff: https://reviews.apache.org/r/39700/diff/
> 
> 
> Testing
> -------
> 
> Manual verification.
> 
> Tests run: 3290, Failures: 0, Errors: 0, Skipped: 33
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 26:41.474s
> [INFO] Finished at: Tue Oct 27 17:35:19 EDT 2015
> [INFO] Final Memory: 33M/1568M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Nate Cole
> 
>


Re: Review Request 39700: RU & EU: Allow set-current to force a version into the db

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39700/
-----------------------------------------------------------

(Updated Oct. 28, 2015, 8:37 a.m.)


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


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


Repository: ambari


Description
-------

{{ambari-server --set-current}} should have an additional option to set a version to current.  Existing functionality takes the information passed in and calls the Finalize action.  This attempts to go through the framework and "cleanly" make sure all the versions are correct by applying the same logic as finalize.

Add a {{--force}} option to do the db work directly without going through the finalize action, modeled after what the RU magician does.  If work is small enough, possible backport to 2.1.3.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java 2a1431d 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterVersionDAO.java 8d4c5ee 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java 2620c8c 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java d5707be 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostVersionDAO.java ad617af 
  ambari-server/src/main/python/ambari-server.py 2fae1ee 
  ambari-server/src/main/python/ambari_server/serverUpgrade.py 7048812 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java 1819ef9 
  ambari-server/src/test/python/TestServerUpgrade.py 7ef74b2 

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


Testing
-------

Manual verification.

Tests run: 3290, Failures: 0, Errors: 0, Skipped: 33

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26:41.474s
[INFO] Finished at: Tue Oct 27 17:35:19 EDT 2015
[INFO] Final Memory: 33M/1568M
[INFO] ------------------------------------------------------------------------


Thanks,

Nate Cole


Re: Review Request 39700: RU & EU: Allow set-current to force a version into the db

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39700/
-----------------------------------------------------------

(Updated Oct. 28, 2015, 8:35 a.m.)


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


Changes
-------

Diff + test results


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


Repository: ambari


Description
-------

{{ambari-server --set-current}} should have an additional option to set a version to current.  Existing functionality takes the information passed in and calls the Finalize action.  This attempts to go through the framework and "cleanly" make sure all the versions are correct by applying the same logic as finalize.

Add a {{--force}} option to do the db work directly without going through the finalize action, modeled after what the RU magician does.  If work is small enough, possible backport to 2.1.3.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java 2a1431d 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterVersionDAO.java 8d4c5ee 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java 2620c8c 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java d5707be 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostVersionDAO.java ad617af 
  ambari-server/src/main/python/ambari-server.py 2fae1ee 
  ambari-server/src/main/python/ambari_server/serverUpgrade.py 7048812 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java 1819ef9 
  ambari-server/src/test/python/TestServerUpgrade.py 7ef74b2 

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


Testing (updated)
-------

Manual verification.

Tests run: 3290, Failures: 0, Errors: 0, Skipped: 33

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26:41.474s
[INFO] Finished at: Tue Oct 27 17:35:19 EDT 2015
[INFO] Final Memory: 33M/1568M
[INFO] ------------------------------------------------------------------------


Thanks,

Nate Cole