> On Nov. 16, 2016, 3:12 p.m., Jonathan Hurley wrote: > > ambari-server/src/main/java/org/apache/ambari/server/events/MaintenanceModeEvent.java, > > line 71 > > <https://reviews.apache.org/r/53811/diff/1/?file=1565222#file1565222line71> > > > > When would this ever be -1? You always have a cluster, right? You > > should enforce that in the constructor.
Except for host, the cluster Id can be got from service or service component host. The fix is to use getClusterId() instead of -1. So no need to change the constructor for service and service component host. > On Nov. 16, 2016, 3:12 p.m., Jonathan Hurley wrote: > > ambari-server/src/main/java/org/apache/ambari/server/agent/RecoveryConfigHelper.java, > > line 187 > > <https://reviews.apache.org/r/53811/diff/1/?file=1565221#file1565221line187> > > > > Should you only be doing this in the event that the MM event is turning > > it on? We need this for both false and true. If the user turns on MM, then we've invalidated the host timestamp. If the MM is turned off, we still want to invalidate the host timestamp so that the configs can be refreshed. - Nahappan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53811/#review156139 ----------------------------------------------------------- On Nov. 16, 2016, 7:42 a.m., Nahappan Somasundaram wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/53811/ > ----------------------------------------------------------- > > (Updated Nov. 16, 2016, 7:42 a.m.) > > > Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Nate Cole, > and Sumit Mohanty. > > > Bugs: AMBARI-18907 > https://issues.apache.org/jira/browse/AMBARI-18907 > > > Repository: ambari > > > Description > ------- > > Auto-start should respect maintenance mode. If any host or service or > component is in maintenance mode, the auto-start directive should be ignored. > As of now, auto-start respects maintenance mode on component level alone. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/agent/RecoveryConfigHelper.java > 7d6a7f5 > > ambari-server/src/main/java/org/apache/ambari/server/events/MaintenanceModeEvent.java > 43b3f79 > > ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java > e66759e > > ambari-server/src/test/java/org/apache/ambari/server/events/listeners/upgrade/AlertMaintenanceModeListenerTest.java > 7757cdf > > Diff: https://reviews.apache.org/r/53811/diff/ > > > Testing > ------- > > ** 1. mvn clean install -DskipTests ** > > [INFO] > ------------------------------------------------------------------------ > [INFO] Reactor Summary: > [INFO] > [INFO] Ambari Main ....................................... SUCCESS [12.468s] > [INFO] Apache Ambari Project POM ......................... SUCCESS [0.037s] > [INFO] Ambari Web ........................................ SUCCESS [1:10.003s] > [INFO] Ambari Views ...................................... SUCCESS [1.196s] > [INFO] Ambari Admin View ................................. SUCCESS [7.672s] > [INFO] utility ........................................... SUCCESS [0.346s] > [INFO] ambari-metrics .................................... SUCCESS [0.616s] > [INFO] Ambari Metrics Common ............................. SUCCESS [6.297s] > [INFO] Ambari Metrics Hadoop Sink ........................ SUCCESS [2.425s] > [INFO] Ambari Metrics Flume Sink ......................... SUCCESS [1.257s] > [INFO] Ambari Metrics Kafka Sink ......................... SUCCESS [1.241s] > [INFO] Ambari Metrics Storm Sink ......................... SUCCESS [3.510s] > [INFO] Ambari Metrics Storm Sink (Legacy) ................ SUCCESS [1.569s] > [INFO] Ambari Metrics Collector .......................... SUCCESS [9.144s] > [INFO] Ambari Metrics Monitor ............................ SUCCESS [2.198s] > [INFO] Ambari Metrics Grafana ............................ SUCCESS [0.808s] > [INFO] Ambari Metrics Assembly ........................... SUCCESS [1:14.524s] > [INFO] Ambari Server ..................................... SUCCESS [2:33.241s] > [INFO] Ambari Functional Tests ........................... SUCCESS [1.945s] > [INFO] Ambari Agent ...................................... SUCCESS [24.723s] > [INFO] Ambari Client ..................................... SUCCESS [0.048s] > [INFO] Ambari Python Client .............................. SUCCESS [0.948s] > [INFO] Ambari Groovy Client .............................. SUCCESS [1.925s] > [INFO] Ambari Shell ...................................... SUCCESS [0.036s] > [INFO] Ambari Python Shell ............................... SUCCESS [0.669s] > [INFO] Ambari Groovy Shell ............................... SUCCESS [0.817s] > [INFO] ambari-logsearch .................................. SUCCESS [0.281s] > [INFO] Ambari Logsearch Appender ......................... SUCCESS [0.195s] > [INFO] Ambari Logsearch Solr Client ...................... SUCCESS [1.075s] > [INFO] Ambari Logsearch Portal ........................... SUCCESS [7.225s] > [INFO] Ambari Logsearch Log Feeder ....................... SUCCESS [3.661s] > [INFO] Ambari Logsearch Assembly ......................... SUCCESS [0.093s] > [INFO] Ambari Logsearch Integration Test ................. SUCCESS [0.356s] > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 6:53.483s > [INFO] Finished at: Wed Nov 16 07:35:15 PST 2016 > [INFO] Final Memory: 329M/1253M > [INFO] > ------------------------------------------------------------------------ > > ** 2. mvn test -DskipPythonTests -Dtest=*MaintenanceMode* ** > > Running org.apache.ambari.server.checks.ServicesMaintenanceModeCheckTest > Running org.apache.ambari.server.checks.HostMaintenanceModeCheckTest > Running > org.apache.ambari.server.events.listeners.upgrade.AlertMaintenanceModeListenerTest > Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.344 sec - > in org.apache.ambari.server.checks.HostMaintenanceModeCheckTest > Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.379 sec - > in org.apache.ambari.server.checks.ServicesMaintenanceModeCheckTest > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.539 sec - > in > org.apache.ambari.server.events.listeners.upgrade.AlertMaintenanceModeListenerTest > > Results : > > Tests run: 7, Failures: 0, Errors: 0, Skipped: 0 > > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 20.646s > [INFO] Finished at: Wed Nov 16 07:36:26 PST 2016 > [INFO] Final Memory: 45M/636M > [INFO] > ------------------------------------------------------------------------ > > ** 3. Manual Tests ** > > Tested the ambari-server JAR from the local build on a VM. Verified the > following scenarios: > 1. Turned on maintenance mode for a host. Observed that Recovery > Configuration on agent on that host was empty. > 2. Turned on maintenance mode for a service. Observed that on all hosts, the > Recovery Configuration did not contain the components for that service. > 3. Regression testing: Turn on maintenance mode for a specific component on a > host. Verified that it was not a part of the recovery configuration on the > agent on that host. > > > Thanks, > > Nahappan Somasundaram > >
