Skip to content

Commit

Permalink
Merge pull request #205 from robur-coop/fix-restart
Browse files Browse the repository at this point in the history
Make restart command actually kill first
  • Loading branch information
hannesm authored Feb 4, 2025
2 parents 5b14787 + b0e78de commit d93daf3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/checkout@v2

- name: Use OCaml ${{ matrix.ocaml-version }}
uses: ocaml/setup-ocaml@v2
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-version }}

Expand Down
5 changes: 5 additions & 0 deletions src/vmm_vmmd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,11 @@ let handle_unikernel_cmd t id = function
match Vmm_resources.find_unikernel t.resources id with
| None -> stop_create t id
| Some unikernel ->
let* resources = Vmm_resources.remove_unikernel t.resources id in
let* () = Vmm_resources.check_unikernel resources id unikernel.Unikernel.config in
(match Vmm_unix.destroy unikernel with
| exception Unix.Unix_error _ -> ()
| () -> ());
Ok (t, `Wait_and_create (id, (id, unikernel.Unikernel.config)))
end
| `Unikernel_destroy ->
Expand Down

0 comments on commit d93daf3

Please sign in to comment.