-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42585/
-----------------------------------------------------------
Review request for Ambari, Andriy Babiichuk and Alexandr Antonenko.
Bugs: Ambari-13514
https://issues.apache.org/jira/browse/Ambari-13514
Repository: ambari
Description
-------
While deploying a service, if the browser session is lost, then on restarting
the browser and opening Ambari web console, the deploy wizard does not always
return to the correct state.
Specifically, in the following cases, an inconsistent state is reached.
1) When cluster deploy starts and user is on Install, Start and Test page of
the wizard (Step 7) and cluster state is either ADD_SERVICES_INSTALLING_3 or
SERVICE_STARTING_3 before session is lost.
In this case, services are either installing or being started. Hence, if
browser session is lost, the controller should return to the Step 7 and
processing should continue. Currently however, the state is being set to step 6
(Review).
case 'ADD_SERVICES_INSTALLING_3' :
case 'SERVICE_STARTING_3' :
addServiceController.setCurrentStep('6');
As a result, user might end up clicking next on the Review page under these
conditions and get an error like
org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException:
Attempted to create a host_component which already exists:
[clusterName=hdpcluster, hostName=myhost.mydomain.com componentName=HDFS_CLIENT]
2) When cluster has finished installing and user is on Summary page (Step 8) of
the wizard before session is lost.
In this case, the cluster status gets reset to CLUSTER_NOT_CREATED_1. In
add_service_routes, currently this case is not considered. As a result, the
addServiceController step is not set correctly and defaults to step 1 (Choose
Services). Since this state can happen either when you first open the Add
Service Wizard or at the end of service install and before user clicks on
Complete in the wizard, to fix this, the addServiceController's current step
should be set to the currentStep persisted in the
App.db.data.AddService.currentStep variable which contains the step that the
add service process is currently in.
Diffs
-----
ambari-web/app/routes/add_service_routes.js 30bdcbc
Diff: https://reviews.apache.org/r/42585/diff/
Testing
-------
Did manual testing.
23108 tests complete (24 seconds)
165 tests pending
Thanks,
Sangeeta Ravindran