Re: Review Request 45598: Stack Upgrade did not ABORT in-progress upgrade, need to relax 'suspended' property and keep API backward compatible

2016-04-01 Thread Jonathan Hurley


> On April 1, 2016, 4:23 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java,
> >  lines 479-496
> > 
> >
> > If the UI is passing in the wrong properties, then the fix should be 
> > there and not in commenting this out. 
> > 
> > I don't see what the actual issue here is.
> 
> Alejandro Fernandez wrote:
> UI is currently passing status=ABORTED and suspended=false, which is 
> technically wrong since it should set suspended=true.
> I spoke with Yusaku about this and the system test also has to change. 
> Both params almost mean the same thing, so I'm using status=ABORTED to imply 
> also setting suspended=1 in the DB.
> 
> Either API or UI has to make the change.

UI should make the change. An aborted upgrade in preparation for a downgrade is 
_not_ a suspended upgraded.


- Jonathan


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


On April 1, 2016, 3:06 p.m., Alejandro Fernandez wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45598/
> ---
> 
> (Updated April 1, 2016, 3:06 p.m.)
> 
> 
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan 
> Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-15673
> https://issues.apache.org/jira/browse/AMBARI-15673
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> STR:
> 
> * Installed Ambari ambari-server-2.2.2.0-354.x86_64
> * HDP 2.3.0.0-2557
> * Installed bits for HDP 2.4.0.0-169
> * Performed EU
> * It failed on waiting to leave HDFS Safemode, but you can do this on any 
> manual stage, such as Pre-Finalize; click the "Downgrade" button
> Notice that the current Upgrade did not get ABORTED.
> 
> I had to manually run,
> ```update host_role_command set status = 'ABORTED' WHERE  request_id = ? and 
> status IN ('PENDING', 'HOLDING_FAILED');```
> 
> Root cause is that UpgradeResourceProvider was expecting both these 
> properties to be passed as "status=ABORTED" & "suspended=true".
> However, the UI was passing "status=ABORTED" & "suspended=false". In order to 
> keep the UI and system tests working, will make the API backward compatible 
> so that "suspended" can have any value.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
>  b3bf345 
> 
> Diff: https://reviews.apache.org/r/45598/diff/
> 
> 
> Testing
> ---
> 
> Verified manually, waiting for unit test results.
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>



Re: Review Request 45598: Stack Upgrade did not ABORT in-progress upgrade, need to relax 'suspended' property and keep API backward compatible

2016-04-01 Thread Alejandro Fernandez


> On April 1, 2016, 8:23 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java,
> >  lines 479-496
> > 
> >
> > If the UI is passing in the wrong properties, then the fix should be 
> > there and not in commenting this out. 
> > 
> > I don't see what the actual issue here is.

UI is currently passing status=ABORTED and suspended=false, which is 
technically wrong since it should set suspended=true.
I spoke with Yusaku about this and the system test also has to change. Both 
params almost mean the same thing, so I'm using status=ABORTED to imply also 
setting suspended=1 in the DB.

Either API or UI has to make the change.


- Alejandro


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


On April 1, 2016, 7:06 p.m., Alejandro Fernandez wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45598/
> ---
> 
> (Updated April 1, 2016, 7:06 p.m.)
> 
> 
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan 
> Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-15673
> https://issues.apache.org/jira/browse/AMBARI-15673
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> STR:
> 
> * Installed Ambari ambari-server-2.2.2.0-354.x86_64
> * HDP 2.3.0.0-2557
> * Installed bits for HDP 2.4.0.0-169
> * Performed EU
> * It failed on waiting to leave HDFS Safemode, but you can do this on any 
> manual stage, such as Pre-Finalize; click the "Downgrade" button
> Notice that the current Upgrade did not get ABORTED.
> 
> I had to manually run,
> ```update host_role_command set status = 'ABORTED' WHERE  request_id = ? and 
> status IN ('PENDING', 'HOLDING_FAILED');```
> 
> Root cause is that UpgradeResourceProvider was expecting both these 
> properties to be passed as "status=ABORTED" & "suspended=true".
> However, the UI was passing "status=ABORTED" & "suspended=false". In order to 
> keep the UI and system tests working, will make the API backward compatible 
> so that "suspended" can have any value.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
>  b3bf345 
> 
> Diff: https://reviews.apache.org/r/45598/diff/
> 
> 
> Testing
> ---
> 
> Verified manually, waiting for unit test results.
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>



Re: Review Request 45598: Stack Upgrade did not ABORT in-progress upgrade, need to relax 'suspended' property and keep API backward compatible

2016-04-01 Thread Jayush Luniya

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


Ship it!




Ship It!

- Jayush Luniya


On April 1, 2016, 7:06 p.m., Alejandro Fernandez wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45598/
> ---
> 
> (Updated April 1, 2016, 7:06 p.m.)
> 
> 
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan 
> Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-15673
> https://issues.apache.org/jira/browse/AMBARI-15673
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> STR:
> 
> * Installed Ambari ambari-server-2.2.2.0-354.x86_64
> * HDP 2.3.0.0-2557
> * Installed bits for HDP 2.4.0.0-169
> * Performed EU
> * It failed on waiting to leave HDFS Safemode, but you can do this on any 
> manual stage, such as Pre-Finalize; click the "Downgrade" button
> Notice that the current Upgrade did not get ABORTED.
> 
> I had to manually run,
> ```update host_role_command set status = 'ABORTED' WHERE  request_id = ? and 
> status IN ('PENDING', 'HOLDING_FAILED');```
> 
> Root cause is that UpgradeResourceProvider was expecting both these 
> properties to be passed as "status=ABORTED" & "suspended=true".
> However, the UI was passing "status=ABORTED" & "suspended=false". In order to 
> keep the UI and system tests working, will make the API backward compatible 
> so that "suspended" can have any value.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
>  b3bf345 
> 
> Diff: https://reviews.apache.org/r/45598/diff/
> 
> 
> Testing
> ---
> 
> Verified manually, waiting for unit test results.
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>



Re: Review Request 45598: Stack Upgrade did not ABORT in-progress upgrade, need to relax 'suspended' property and keep API backward compatible

2016-04-01 Thread Swapan Shridhar

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


Ship it!




Ship It!

- Swapan Shridhar


On April 1, 2016, 7:06 p.m., Alejandro Fernandez wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45598/
> ---
> 
> (Updated April 1, 2016, 7:06 p.m.)
> 
> 
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan 
> Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-15673
> https://issues.apache.org/jira/browse/AMBARI-15673
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> STR:
> 
> * Installed Ambari ambari-server-2.2.2.0-354.x86_64
> * HDP 2.3.0.0-2557
> * Installed bits for HDP 2.4.0.0-169
> * Performed EU
> * It failed on waiting to leave HDFS Safemode, but you can do this on any 
> manual stage, such as Pre-Finalize; click the "Downgrade" button
> Notice that the current Upgrade did not get ABORTED.
> 
> I had to manually run,
> ```update host_role_command set status = 'ABORTED' WHERE  request_id = ? and 
> status IN ('PENDING', 'HOLDING_FAILED');```
> 
> Root cause is that UpgradeResourceProvider was expecting both these 
> properties to be passed as "status=ABORTED" & "suspended=true".
> However, the UI was passing "status=ABORTED" & "suspended=false". In order to 
> keep the UI and system tests working, will make the API backward compatible 
> so that "suspended" can have any value.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
>  b3bf345 
> 
> Diff: https://reviews.apache.org/r/45598/diff/
> 
> 
> Testing
> ---
> 
> Verified manually, waiting for unit test results.
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>



Re: Review Request 45598: Stack Upgrade did not ABORT in-progress upgrade, need to relax 'suspended' property and keep API backward compatible

2016-04-01 Thread Alejandro Fernandez

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




ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 (line 481)


We may want this in the future once the UI and system test start passing 
suspended=true.


- Alejandro Fernandez


On April 1, 2016, 7:06 p.m., Alejandro Fernandez wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45598/
> ---
> 
> (Updated April 1, 2016, 7:06 p.m.)
> 
> 
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan 
> Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-15673
> https://issues.apache.org/jira/browse/AMBARI-15673
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> STR:
> 
> * Installed Ambari ambari-server-2.2.2.0-354.x86_64
> * HDP 2.3.0.0-2557
> * Installed bits for HDP 2.4.0.0-169
> * Performed EU
> * It failed on waiting to leave HDFS Safemode, but you can do this on any 
> manual stage, such as Pre-Finalize; click the "Downgrade" button
> Notice that the current Upgrade did not get ABORTED.
> 
> I had to manually run,
> ```update host_role_command set status = 'ABORTED' WHERE  request_id = ? and 
> status IN ('PENDING', 'HOLDING_FAILED');```
> 
> Root cause is that UpgradeResourceProvider was expecting both these 
> properties to be passed as "status=ABORTED" & "suspended=true".
> However, the UI was passing "status=ABORTED" & "suspended=false". In order to 
> keep the UI and system tests working, will make the API backward compatible 
> so that "suspended" can have any value.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
>  b3bf345 
> 
> Diff: https://reviews.apache.org/r/45598/diff/
> 
> 
> Testing
> ---
> 
> Verified manually, waiting for unit test results.
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>