Skip to content

Commit

Permalink
Dont attempt node evacuation with new local network driver
Browse files Browse the repository at this point in the history
  • Loading branch information
kwatson committed Jan 29, 2024
1 parent 6ff1779 commit 43be1f4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.1.1
9.1.2
5 changes: 5 additions & 0 deletions app/services/node_services/evacuate_node_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
4 changes: 4 additions & 0 deletions app/workers/node_workers/evacuate_node_worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit 43be1f4

Please sign in to comment.