File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2024-2025 Phala Network <dstack@phala.network>
2+ #
3+ # SPDX-License-Identifier: Apache-2.0
4+
5+ # Proxy service that forwards connections from /var/run/dstack.sock to /var/run/dstack/dstack.sock.
6+ # Used for backward compatibility with containers that mount the socket file directly.
7+
8+ [Unit]
9+ Description =dstack socket proxy for backward compatibility
10+ Requires =dstack-socket-compat.socket
11+ After =dstack-guest-agent.service
12+
13+ [Service]
14+ ExecStart =/usr/lib/systemd/systemd-socket-proxyd /var/run/dstack/dstack.sock
15+ Type =notify
Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2024-2025 Phala Network <dstack@phala.network>
2+ #
3+ # SPDX-License-Identifier: Apache-2.0
4+
5+ # Backward compatibility socket for containers that mount /var/run/dstack.sock directly.
6+ # The socket is owned by systemd, so it survives service restarts without inode changes.
7+
8+ [Unit]
9+ Description =dstack backward compatibility socket (dstack.sock)
10+
11+ [Socket]
12+ ListenStream =/var/run/dstack.sock
13+ SocketMode =0777
14+
15+ [Install]
16+ WantedBy =sockets.target
Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2024-2025 Phala Network <dstack@phala.network>
2+ #
3+ # SPDX-License-Identifier: Apache-2.0
4+
5+ # Proxy service that forwards connections from /var/run/tappd.sock to /var/run/dstack/tappd.sock.
6+ # Used for backward compatibility with containers that mount the socket file directly.
7+
8+ [Unit]
9+ Description =tappd socket proxy for backward compatibility
10+ Requires =tappd-socket-compat.socket
11+ After =dstack-guest-agent.service
12+
13+ [Service]
14+ ExecStart =/usr/lib/systemd/systemd-socket-proxyd /var/run/dstack/tappd.sock
15+ Type =notify
Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2024-2025 Phala Network <dstack@phala.network>
2+ #
3+ # SPDX-License-Identifier: Apache-2.0
4+
5+ # Backward compatibility socket for containers that mount /var/run/tappd.sock directly.
6+ # The socket is owned by systemd, so it survives service restarts without inode changes.
7+
8+ [Unit]
9+ Description =dstack backward compatibility socket (tappd.sock)
10+
11+ [Socket]
12+ ListenStream =/var/run/tappd.sock
13+ SocketMode =0777
14+
15+ [Install]
16+ WantedBy =sockets.target
Original file line number Diff line number Diff line change @@ -1465,17 +1465,11 @@ impl Stage1<'_> {
14651465 Ok ( ( ) )
14661466 }
14671467
1468- /// Setup socket directory and backward compatibility symlinks.
1469- /// Creates /var/run/dstack/ directory and symlinks for old socket paths.
1468+ /// Setup socket directory for dstack-guest-agent.
14701469 fn setup_socket_dir ( & self ) -> Result < ( ) > {
1471- info ! ( "Setting up socket directory and backward compatibility symlinks " ) ;
1470+ info ! ( "Setting up socket directory" ) ;
14721471 cmd ! {
1473- // Create the new socket directory
14741472 mkdir -p /var/run/dstack;
1475- // Create backward compatibility symlinks (old path -> new path)
1476- // These allow old containers that mount the file directly to still work
1477- ln -sf /var/run/dstack/dstack. sock /var/run/dstack. sock;
1478- ln -sf /var/run/dstack/tappd. sock /var/run/tappd. sock;
14791473 } ?;
14801474 Ok ( ( ) )
14811475 }
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ services:
1616 - /var/run/dstack:/var/run/dstack
1717` ` `
1818
19- > **Note:** The old path ` /var/run/tappd.sock` is still supported via symlink for backward compatibility.
19+ > **Note:** The old path ` /var/run/tappd.sock` is still supported via systemd socket proxy for backward compatibility.
2020
2121# # Endpoints
2222
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ services:
1616 - /var/run/dstack:/var/run/dstack
1717` ` `
1818
19- > **Note:** The old path ` /var/run/dstack.sock` is still supported via symlink for backward compatibility.
19+ > **Note:** The old path ` /var/run/dstack.sock` is still supported via systemd socket proxy for backward compatibility.
2020
2121# # Endpoints
2222
You can’t perform that action at this time.
0 commit comments