File tree Expand file tree Collapse file tree 8 files changed +22
-5
lines changed
comp/api/api/apiimpl/listener Expand file tree Collapse file tree 8 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,7 @@ func TestLinuxGetIPCServerPath(t *testing.T) {
2323
2424 path , enabled := GetIPCServerPath ()
2525 require .True (t , enabled )
26- // Default run path is {InstallPath}/run for container compatibility
27- // (containers mount volumes at /opt/datadog-agent/run, not /var/run/datadog)
26+ // Default run path is {InstallPath}/run for consistency with other runtime files
2827 require .Equal (t , "/opt/datadog-agent/run/agent_ipc.socket" , path )
2928 })
3029}
Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ case "$1" in
2121 rm -rf $LOG_DIR
2222 rm -rf $CONFIG_DIR
2323 ;;
24+ remove)
25+ # Clean up runtime-created directories (sockets, pid files, etc.)
26+ rm -rf " $INSTALL_DIR /run" || true
27+ ;;
2428 * )
2529 ;;
2630esac
Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ case "$1" in
2424 rm -rf $LOG_DIR
2525 rm -rf $CONFIG_DIR
2626 ;;
27+ remove)
28+ # Clean up runtime-created directories (sockets, pid files, etc.)
29+ rm -rf " $INSTALL_DIR /run" || true
30+ ;;
2731 * )
2832 ;;
2933esac
Original file line number Diff line number Diff line change 77# Remove the symlink to the binary.
88rm -f " /usr/bin/datadog-dogstatsd"
99
10+ INSTALL_DIR=/opt/datadog-dogstatsd
11+
1012case " $* " in
1113 0)
1214 # We're uninstalling.
1315 # We don't delete the dd-agent user/group (see https://fedoraproject.org/wiki/Packaging:UsersAndGroups#Allocation_Strategies)
16+ # Clean up runtime-created directories (sockets, pid files, etc.)
17+ rm -rf " $INSTALL_DIR /run" || true
1418 ;;
1519 1)
1620 # We're upgrading.
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ case "$1" in
2626 ;;
2727 remove)
2828 rm " $CONFIG_DIR /install_info" || true
29+ # Clean up runtime-created directories (sockets, pid files, etc.)
30+ rm -rf " $INSTALL_DIR /run" || true
2931 ;;
3032 * )
3133 ;;
Original file line number Diff line number Diff line change @@ -9,11 +9,15 @@ CONFIG_DIR=/etc/datadog-agent
99# Remove the symlink to the binary.
1010rm -f " /usr/bin/datadog-agent"
1111
12+ INSTALL_DIR=/opt/datadog-agent
13+
1214case " $* " in
1315 0)
1416 # We're uninstalling.
1517 # We don't delete the dd-agent user/group (see https://fedoraproject.org/wiki/Packaging:UsersAndGroups#Allocation_Strategies)
1618 rm " $CONFIG_DIR /install_info" || true
19+ # Clean up runtime-created directories (sockets, pid files, etc.)
20+ rm -rf " $INSTALL_DIR /run" || true
1721 ;;
1822 1)
1923 # We're upgrading.
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ require (
1414 github.com/DataDog/datadog-agent/pkg/template v0.64.1 // indirect
1515 github.com/DataDog/datadog-agent/pkg/util/scrubber v0.64.1 // indirect
1616 github.com/DataDog/datadog-agent/pkg/version v0.62.3 // indirect
17+ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
18+ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
1719 go.uber.org/atomic v1.11.0 // indirect
1820 golang.org/x/time v0.14.0 // indirect
1921 gopkg.in/yaml.v3 v3.0.1 // indirect
Original file line number Diff line number Diff line change @@ -43,9 +43,7 @@ const (
4343 checkFlareDirectory = "/var/log/datadog/checks/"
4444 jmxFlareDirectory = "/var/log/datadog/jmxinfo/"
4545
46- // Socket paths - these constants are used for config registration defaults.
47- // The actual runtime paths derive from GetRunPath() which uses {InstallPath}/run.
48- // Containers mount volumes at /opt/datadog-agent/run, not /var/run/datadog.
46+ // Socket paths - use {InstallPath}/run for consistency with other runtime files
4947 defaultStatsdSocket = "/opt/datadog-agent/run/dsd.socket"
5048 defaultReceiverSocket = "/opt/datadog-agent/run/apm.socket"
5149
You can’t perform that action at this time.
0 commit comments