-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29190/
-----------------------------------------------------------
(Updated Dec. 18, 2014, 2:37 p.m.)
Review request for Ambari, Jonathan Hurley and Nate Cole.
Changes
-------
Updated patch. The first patch fixed the main problem but I found that request
id was not being used during the status update. The update only worked if
there was one request. Also the parent resource types of upgrade and upgrade
item needed to be set for the task resource.
Please re-review. Thanks!
Bugs: AMBARI-8784
https://issues.apache.org/jira/browse/AMBARI-8784
Repository: ambari
Description
-------
Create a manual upgrade task via the upgrade pack, the result stage/task
combination that's created in the database cannot be updated via the
upgrade_items endpoint.
{noformat}
GET
http://localhost:8080/api/v1/clusters/c1/upgrades/26/upgrade_groups/19/upgrade_items/1/tasks/614
{
"href" :
"http://localhost:8080/api/v1/clusters/c1/upgrades/26/upgrade_groups/19/upgrade_items/1/tasks/614",
"Tasks" : {
"attempt_cnt" : 1,
"cluster_name" : "c1",
"command" : "EXECUTE",
"command_detail" : "AMBARI_SERVER_ACTION EXECUTE",
"end_time" : -1,
"error_log" : "/var/lib/ambari-agent/data/errors-614.txt",
"exit_code" : 0,
"host_name" : "c6403.ambari.apache.org",
"id" : 614,
"output_log" : "/var/lib/ambari-agent/data/output-614.txt",
"request_id" : 26,
"role" : "AMBARI_SERVER_ACTION",
"stage_id" : 1,
"start_time" : 1418838183777,
"status" : "HOLDING",
"stderr" : "",
"stdout" : "",
"structured_out" : { }
}
}
{noformat}
{noformat}
PUT
http://localhost:8080/api/v1/clusters/c1/upgrades/26/upgrade_groups/19/upgrade_items/1/tasks/614
{
"UpgradeItem" : {
"status" : "COMPLETED"
}
}
404 Method Not Allowed
PUT
http://localhost:8080/api/v1/clusters/c1/upgrades/26/upgrade_groups/19/upgrade_items/1
{
"UpgradeItem" : {
"status" : "COMPLETED"
}
}
404 Method Not Allowed
PUT http://localhost:8080/api/v1/clusters/c1/requests/26/stages/1
{
"Stage" : {
"status" : "COMPLETED"
}
}
HTTP 200
{noformat}
Diffs (updated)
-----
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java
24d7b2c
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeItemResourceProvider.java
ad6ae1f
ambari-server/src/main/resources/key_properties.json 5b8947f
Diff: https://reviews.apache.org/r/29190/diff/
Testing
-------
All tests pass ...
Results :
Tests run: 2431, Failures: 0, Errors: 0, Skipped: 13
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26:54 min
[INFO] Finished at: 2014-12-17T23:41:23-05:00
[INFO] Final Memory: 34M/418M
[INFO] ------------------------------------------------------------------------
Thanks,
Tom Beerbower