Skip to content

Commit

Permalink
Hop to the correct label when reboot is requested.
Browse files Browse the repository at this point in the history
In #674 we changed the label which initiated reboot from `reboot` to
`prep_reboot`. We do reboot in 2 cases:

1. When setting up host
2. On VmHost.incr_reboot

We had updated the label to be hopped at for case #1, but we had missed
updating the label for case #2. This PR fixes that.
  • Loading branch information
pykello committed Oct 20, 2023
1 parent df9f166 commit d91b827
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion prog/vm/host_nexus.rb
Expand Up @@ -182,7 +182,7 @@ def before_run

label def wait
when_reboot_set? do
hop_reboot
hop_prep_reboot
end

nap 30
Expand Down
4 changes: 2 additions & 2 deletions spec/prog/vm/host_nexus_spec.rb
Expand Up @@ -218,9 +218,9 @@
expect { nx.wait }.to nap(30)
end

it "hops to reboot when needed" do
it "hops to prep_reboot when needed" do
expect(nx).to receive(:when_reboot_set?).and_yield
expect { nx.wait }.to hop("reboot")
expect { nx.wait }.to hop("prep_reboot")
end
end

Expand Down

0 comments on commit d91b827

Please sign in to comment.