feat(config-upgrade-snapshot): restore host admin-state frame safely (create-if-missing)
Adds restore_host_state(cluster_t*, const char*, uint32_t admin_status) to worker.c: OR's admin bits into an existing worker's status on hit; on miss, creates a minimal XCE_WORKER_UNAVAIL placeholder via makeWorker (mirroring the lost_and_found sentinel host precedent), with a valid non-NULL hostattrs_t so the host's later real join routes through rejoin_worker (not init_worker) and preserves the restored admin status. Idempotent under retry (find first, create only if missing). Standalone -- not yet wired into load_snapshot (task 4). Requirements: 1.10, 1.11, 5.8
This commit is contained in:
parent
387ea35c9f
commit
5b1600a8b2
6 changed files with 467 additions and 1 deletions
|
|
@ -88,6 +88,7 @@ extern void test_apply_pump_integration(void);
|
|||
extern void test_job_array_apply(void);
|
||||
extern void test_job_array_fence(void);
|
||||
extern void test_job_array_replay_fence(void);
|
||||
extern void test_upgrade_snapshot_restore(void);
|
||||
|
||||
void setUp(void) { return; }
|
||||
|
||||
|
|
@ -245,6 +246,7 @@ int main(int argc, char* argv[])
|
|||
TEST(test_job_array_apply);
|
||||
TEST(test_job_array_fence);
|
||||
TEST(test_job_array_replay_fence);
|
||||
TEST(test_upgrade_snapshot_restore);
|
||||
|
||||
return UNITY_END();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue