Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Check spawned worker version vs node version before PVF preparation #6861

Merged
merged 20 commits into from
Mar 29, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
df6c683
Check spawned worker version vs node version before PVF preparation
s0me0ne-unkn0wn Mar 12, 2023
335495b
Address discussions
s0me0ne-unkn0wn Mar 12, 2023
b96cc31
Propagate errors and shutdown preparation and execution pipelines pro…
s0me0ne-unkn0wn Mar 13, 2023
54b11c6
Add logs; Fix execution worker checks
s0me0ne-unkn0wn Mar 14, 2023
3cd790f
Revert "Propagate errors and shutdown preparation and execution pipel…
s0me0ne-unkn0wn Mar 14, 2023
acc94f7
Don't try to shut down; report the condition and exit worker
s0me0ne-unkn0wn Mar 15, 2023
0db3ed3
Merge branch 's0me0ne/worker-version-v2' into s0me0ne/worker-version
s0me0ne-unkn0wn Mar 15, 2023
89c7897
Get rid of `VersionMismatch` preparation error
s0me0ne-unkn0wn Mar 15, 2023
fb5ccc9
Merge master
s0me0ne-unkn0wn Mar 15, 2023
db26c64
Add docs; Fix tests
s0me0ne-unkn0wn Mar 15, 2023
5a344de
Merge branch 'master' into s0me0ne/worker-version
s0me0ne-unkn0wn Mar 15, 2023
b696baa
Update Cargo.lock
s0me0ne-unkn0wn Mar 15, 2023
501d4be
Kill again, but only the main node process
s0me0ne-unkn0wn Mar 18, 2023
a42d0a5
Merge branch 'master' into s0me0ne/worker-version
s0me0ne-unkn0wn Mar 20, 2023
1b4678b
Move unsafe code to a common safe function
s0me0ne-unkn0wn Mar 20, 2023
ec9c4ca
Fix libc dependency error on MacOS
mrcnski Mar 20, 2023
0bd760f
pvf spawning: Add some logging, add a small integration test
mrcnski Mar 22, 2023
a9562c3
Merge branch 'master' into s0me0ne/worker-version
s0me0ne-unkn0wn Mar 29, 2023
0ecce2e
Minor fixes
s0me0ne-unkn0wn Mar 29, 2023
456314c
Restart CI
s0me0ne-unkn0wn Mar 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion node/core/pvf/src/execute/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,15 @@ pub fn worker_entrypoint(socket_path: &str, node_version: Option<&str>) {
gum::error!(
target: LOG_TARGET,
%worker_pid,
"Node and worker version mismatch, node needs restarting",
"Node and worker version mismatch, node needs restarting, forcing shutdown",
);
unsafe {
// SAFETY: Neither `getppid()` nor `kill()` never fails
let ppid = libc::getppid();
if ppid > 1 {
libc::kill(ppid, libc::SIGKILL);
}
}
return Err(io::Error::new(io::ErrorKind::Unsupported, "Version mismatch"))
}
}
Expand Down
9 changes: 8 additions & 1 deletion node/core/pvf/src/prepare/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,15 @@ pub fn worker_entrypoint(socket_path: &str, node_version: Option<&str>) {
gum::error!(
target: LOG_TARGET,
%worker_pid,
"Node and worker version mismatch, node needs restarting",
"Node and worker version mismatch, node needs restarting, forcing shutdown",
);
unsafe {
// SAFETY: Neither `getppid()` nor `kill()` never fails
let ppid = libc::getppid();
if ppid > 1 {
libc::kill(ppid, libc::SIGKILL);
}
}
s0me0ne-unkn0wn marked this conversation as resolved.
Show resolved Hide resolved
return Err(io::Error::new(io::ErrorKind::Unsupported, "Version mismatch"))
}
}
Expand Down