Skip to content

Commit 14a4bfb

Browse files
committed
CA-418227: Detect rolling upgrade after setting software_version
The `host.software_version` field is updated in dbsync_slave, and only after that has happened, the coordinator can detect whether rolling pool upgrade is in progress (by comparing versions across the pool from this DB field). Unfortunately, the `detect_rolling_upgrade` function is first called just before dbsync_slave runs, as part of `Db_gc.single_pass`, right after starting the DB engine on the coordinator. This will eventually get rectified once the DB thread is running, but unfortunately a function in dbsync_master (which sets the `host.allowed_operations` fields for all hosts) relies on the RPU state to be correct. Therefore, force the RPU detection immediately after dbsync_slave. This isn't a great solution... but any change to the startup sequence seems to break _something_ and this looks relatively safe. Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
1 parent 97687a3 commit 14a4bfb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ocaml/xapi/dbsync_master.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ let update_pool_recommendations_noexn ~__context =
354354
(* Update the database to reflect current state. Called for both start of day and after
355355
an agent restart. *)
356356
let update_env __context =
357+
Db_gc.detect_rolling_upgrade ~__context ;
357358
debug "creating root user" ;
358359
Create_misc.create_root_user ~__context ;
359360
debug "creating pool record" ;

0 commit comments

Comments
 (0)