lib/chef/knife/cluster_stop.rb in cluster_chef-knife-3.0.12 vs lib/chef/knife/cluster_stop.rb in cluster_chef-knife-3.0.14
- old
+ new
@@ -13,19 +13,25 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
-
require File.expand_path(File.dirname(__FILE__)+"/generic_command.rb")
class Chef
class Knife
class ClusterStop < ClusterChef::Script
import_banner_and_options(ClusterChef::Script)
def relevant?(server)
server.running?
+ end
+
+ def perform_execution(target)
+ section("Stopping machines")
+ super(target)
+ section("Announcing Chef nodes as stopped")
+ target.send(:delegate_to_servers, :announce_as_stopped)
end
def confirm_execution(target)
ui.info " Unless these nodes are backed by EBS volumes, this will result in loss of all data"
ui.info " not saved elsewhere. Even if they are EBS backed, there may still be some data loss."