Project: mesos
Issue MESOS-3044: Slaves are not deactivated upon reaching a maintenance window
After a maintenance window is reached, the slave should be deactivated to prevent further tasks from utilizing it. * For slaves that have completely drained, simply deactivate the slave. See Master::deactivate(Slave*). * For tasks which have not explicitly declined the InverseOffers (i.e. they've accepted them or do not understand InverseOffers), send kill signals. See Master::killTask * If a slave has tasks that have declined the InverseOffers, do not deactivate the slave. Possible test(s): * SlaveDrainedTest ** Start master, slave. ** Set maintenance to now. ** Check that slave gets deactivated * InverseOfferAgnosticTest ** Start master, slave, framework. ** Have a task run on the slave (ignores InverseOffers). ** Set maintenance to now. ** Check that task gets killed. ** Check that slave gets deactivated. * InverseOfferAcceptanceTest ** Start master, slave, framework. ** Run a task on the slave. ** Set maintenance to future. ** Have task accept InverseOffer. ** Check task gets killed, slave gets deactivated. * InverseOfferDeclinedTest ** Start master, slave, framework. ** Run task on slave. ** Set maintenance to future. ** Have task decline maintenance with reason. ** Check task lives, slave still active.
Story points: 8