by samber on 3/24/24, 12:51 AM with 124 comments
by FridgeSeal on 3/24/24, 1:57 AM
> 4:07pm The package install has failed as it can't resolve the repositories. Something is wrong with the /etc/apt configuration…
Cloud definitely has downsides, and isn’t a fit for all scenarios but in my experience it’s great for situations like this. Instead of messing around trying to repair it, simply kill the machine, or take it out of the pool. Get a new one. New machine and app likely comes up clean. Incident resolves. Dig into machine off the hot path.
by devsda on 3/24/24, 4:08 AM
Unfortunately, many such tools in docker images will be flagged by automated security scanning tools in the "unnecessary tools that can aid an attacker in observing and modifying system behavior" category. Some of those ( like having gdb) are valid concerns but many are not.
To avoid that we have some of these tools in a separate volume as (preferably) static binaries or compile & install them with the mount path as the install prefix (for config files & libs). If there's need to debug, we ask operations to mount the volume temporarily as read-only.
Another challenge is if there's a debug tool that requires enabling a certain kernel feature, there are often questions/concerns about how that affects other containers running on the same host.
by infofarmer on 3/24/24, 9:09 AM
https://man.freebsd.org/cgi/man.cgi?rescue https://github.com/freebsd/freebsd-src/blob/main/rescue/resc...
by sargun on 3/24/24, 5:12 AM
These were a lifesaver multiple times.
by mmh0000 on 3/24/24, 2:09 AM
by donio on 3/24/24, 4:31 AM
by reilly3000 on 3/24/24, 2:07 AM
Build a container with a one-liner:
docker build -t tcpdump - <<EOF \nFROM ubuntu \nRUN apt-get update && apt-get install -y tcpdump \nCMD tcpdump -i eth0 \nEOF
Run attached to the host network:
docker run -dP --net=host moremagic/docker-netstat
Run system tools attached to read host processes:
for sysstat_tool in iostat sar vmstat mpstat pidstat; do alias "sysstat-${sysstat_tool}=docker run --rm -it -v /proc:/proc --privileged --net host --pid host ghcr.io/krishjainx/sysstat-docker:main /usr/bin/${sysstat_tool}" done unset -v sysstat_tool
Sure, yum install is preferred, but so long as docker is available this is a viable alternative if you can manage the extra mapping needed. It probably wouldn’t work with a rootless/podman setup.
by rr808 on 3/24/24, 3:20 AM
by kureikain on 3/24/24, 8:05 AM
by zer00eyz on 3/24/24, 3:40 AM
Network connectivity issues aren't always apparent in some apps.
by kunley on 3/24/24, 1:57 AM
by SamuelAdams on 3/24/24, 2:01 AM
Most dev teams I work with are actively reducing their actual managed server and replace it with either Lambda, or docker images running in K8. I wonder if these tools are still useful for containers and serverless?
by js4ever on 3/24/24, 10:52 AM
by pstuart on 3/24/24, 1:55 AM
by pjmlp on 3/24/24, 7:43 AM
Usually not even a shell is available in modern Kubernetes deployments that take a security first approach, with chiseled containers.
And by creating a debugging image, not only is the execution environment being changed, deploying it might require disabling security policies doing image scans.
by randomgiy3142 on 3/24/24, 2:41 AM
I imagine these problems described happen on big iron type hardware clusters that are extremely expensive and spare capacity isn’t possible. I might be wrong but especially with (sigh) AI setups with extremely expensive $30k GPUs and crazy bandwidth between planes you buy from IBM for crazy prices (hardware vendor on the line so quickly was a hint) you’re way past the commodity server cloud model. I have no idea what could go wrong with such equipment where nearly ever piece of hardware is close to custom built but I’m glad I don’t have to deal with that. The debugging on those things work hardware only a few huge pharma or research companies use has to come down to really strange things.
by sirwitti on 3/24/24, 7:18 AM
This probably would have prevented a stressful incident 3 weeks ago.
by anthk on 3/24/24, 11:05 AM
by logifail on 3/24/24, 6:55 AM
by prydt on 3/24/24, 2:42 AM
by michaelhoffman on 3/24/24, 2:42 PM
by josephcsible on 3/24/24, 3:16 AM
This is one of the reasons why I fight back as hard as I can against any "security" measures that restrict what root can do.
by ur-whale on 3/24/24, 8:03 AM
[EDIT]: typo
by SuperHeavy256 on 3/24/24, 2:23 AM