Skip to content

Commit a3a5bb6

Browse files
committed
CA-234875: Remove old patch records after RPU completes.
When RPU completes, db_gc.detect_rolling_upgrade should invoke xapi_pool_update.resync_host to remove the old patch records. Signed-off-by: Hui Zhang <[email protected]>
1 parent 453869c commit a3a5bb6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ocaml/xapi/db_gc.ml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,10 @@ let detect_rolling_upgrade ~__context =
516516
rolling_upgrade_script_hook (String.concat " " args);
517517
ignore(Forkhelpers.execute_command_get_output rolling_upgrade_script_hook args)
518518
end;
519+
if not actually_in_progress then begin
520+
debug "Resync to remove the old patches or updates.";
521+
Helpers.call_api_functions ~__context (fun rpc session_id -> Xapi_pool_update.resync_host __context (Helpers.get_localhost ~__context))
522+
end;
519523
(* Call in to internal xapi upgrade code *)
520524
if actually_in_progress
521525
then Xapi_upgrade.start ()

0 commit comments

Comments
 (0)