File tree Expand file tree Collapse file tree
apps/admin/src/app/api/servers/[serverId]/deploy-daemon Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,12 +30,10 @@ export async function POST(
3030 let kernelUrl : string
3131 let rootfsUrl : string
3232 try {
33- // Pin to the CI-verified commit to avoid R2 stale `latest` path
34- const imageVersion = '7afa25f2933022cc3ef8d457e0f2cd0dbfbc77fc'
3533 ; [ binaryUrl , kernelUrl , rootfsUrl ] = await Promise . all ( [
3634 presignDaemonBinary ( ) ,
3735 presignKernel ( ) ,
38- presignRootfs ( imageVersion ) ,
36+ presignRootfs ( ) ,
3937 ] )
4038 } catch ( err ) {
4139 return NextResponse . json (
@@ -77,8 +75,10 @@ export async function POST(
7775
7876 try {
7977 const commands = [
80- // Stop daemon before replacing binary + images
78+ // Stop daemon and unmount any stale rootfs loop mounts
8179 '(systemctl stop sandchest-node 2>/dev/null || true)' ,
80+ '(umount /tmp/sandchest-rootfs-patch 2>/dev/null || true)' ,
81+ '(umount /var/sandchest/images/ubuntu-22.04-base/rootfs.ext4 2>/dev/null || true)' ,
8282 // Download latest kernel + rootfs images
8383 'mkdir -p /var/sandchest/images/ubuntu-22.04-base' ,
8484 `curl -fsSL --retry 3 --retry-delay 5 '${ kernelUrl } ' -o /var/sandchest/images/ubuntu-22.04-base/vmlinux` ,
You can’t perform that action at this time.
0 commit comments