Continue node_erase even if prevent_discover fails

Even if prevent_discover fails we should continue node erasing.

Change-Id: Iacc68383ec5f694c5b4b6af8530d66f0f7d64cc7
Closes-Bug: #1496366
This commit is contained in:
Fedor Zhadaev 2015-10-08 12:40:36 +03:00
parent 0f753467a3
commit e99368bd77
1 changed files with 6 additions and 1 deletions

View File

@ -45,7 +45,12 @@ module MCollective
error_msg = []
reply[:status] = 0 # Shell exitcode behaviour
prevent_discover unless dry_run
begin
prevent_discover unless dry_run
rescue => e
msg = "Can't prevent discover. Reason: #{e.message}"
Log.warn(msg)
end
begin
reboot if !dry_run && request_reboot