diff --git a/CHANGELOG.md b/CHANGELOG.md index e2fdfe0..0205952 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## v9.1.2 + +* [FIX] Don't attempt node evacuation with local networking. + ## v9.1.1 * [CHANGE] Add `make_primary` to container domains api. diff --git a/VERSION b/VERSION index 44931da..d6b7c4d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -9.1.1 +9.1.2 diff --git a/app/services/node_services/evacuate_node_service.rb b/app/services/node_services/evacuate_node_service.rb index f5e4cdb..a11268b 100644 --- a/app/services/node_services/evacuate_node_service.rb +++ b/app/services/node_services/evacuate_node_service.rb @@ -27,6 +27,11 @@ def perform event.start! return false unless valid? + unless node.region&.has_clustered_networking? + event.cancel! "Node not eligible for evacuation" + return false + end + # Quickly flag containers as migrating node.containers.update_all status: 'migrating' diff --git a/app/workers/node_workers/evacuate_node_worker.rb b/app/workers/node_workers/evacuate_node_worker.rb index 653459d..540ee19 100644 --- a/app/workers/node_workers/evacuate_node_worker.rb +++ b/app/workers/node_workers/evacuate_node_worker.rb @@ -4,7 +4,11 @@ class EvacuateNodeWorker sidekiq_options retry: false, queue: 'dep_critical' def perform(node_id, audit_id = nil) + node = GlobalID::Locator.locate node_id + return if node.nil? + return unless node.region&.has_clustered_networking? + audit = nil audit = GlobalID::Locator.locate(audit_id) if audit_id audit = Audit.create_from_object!(node, 'updated', '127.0.0.1') if audit.nil?