Skip to content

Commit

Permalink
api: wait for the routing system while migrating VPS between OS nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
aither64 committed Feb 8, 2020
1 parent 7229081 commit 7dfc766
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/models/transaction_chains/vps/migrate/os_to_os.rb
Expand Up @@ -86,6 +86,9 @@ def link_chain(vps, dst_node, opts = {})
mounts.datasets = datasets
mounts.remount_mine

# Wait for routing to remove routes from the original system
append(Transactions::Utils::NoOp, args: [find_node_id, sleep: 20], urgent: true)

# Restore VPS state
call_hooks_for(:pre_start, self, args: [dst_vps, was_running?])
use_chain(Vps::Start, args: dst_vps, urgent: true) if was_running?
Expand Down

0 comments on commit 7dfc766

Please sign in to comment.