The Fix Is One Line in /etc. Just SSH In and Edit It?
Prod is degraded by one wrong sysctl value in /etc on an Ansible-managed fleet. A teammate wants to hand-edit each box now and codify it later. Defend the call.
Answer key reviewed by Branko Petric
Read first: Linux Process and Job Management
Your decision
Prod is degraded because of one wrong kernel/sysctl value in /etc, and a teammate says just SSH into the three boxes and fix the file by hand now, we'll put it in Ansible later. What do you do, and why?
The situation
A misconfigured value in /etc is causing dropped connections in production. It is something like a too-low net.core.somaxconn or an open-file limit that is starving the service under load, and the fix is genuinely a single line. A teammate wants to SSH into each of the three boxes, hand-edit the file, apply the value, and reconcile the config repo whenever the fire is out.
Context
The fleet is managed by Ansible. The value that needs changing lives in a file under /etc that the config source of truth owns. Nodes get replaced during deploys and can be added by autoscaling, and the Ansible play runs on a schedule as well as on demand. A teammate in chat says: just fix the file by hand on all three boxes now, we'll put it in Ansible later.
Worked interview answers
- Linux Troubleshooting Interview Questions: Triage Order, Commands and the Pushback
Linux troubleshooting interview questions, worked: disk full, high load, OOM kills, permission denied, a bad sysctl and a 502, with commands and the pushback.
- Terraform Scenario Based Interview Questions: Read the Plan, Then Answer
Terraform scenario based interview questions, worked: a destroy in the plan, state drift, import vs recreate, state in git and blast radius, with real commands.
Related challenges
- Disk Is at 100% and the App Is Down. rm -rf?
A server is out of disk and the app is down. A teammate wants to rm -rf the logs to free space fast. Defend what you actually do first.
- Deploy Fails with Permission Denied. chmod 777 Everything?
A deploy fails with permission errors and a teammate wants to chmod -R 777 the app directory so it never happens again. Defend fixing the actual ownership mismatch instead.
- The Box Keeps OOM-Killing. Just Add a Huge Swapfile?
A latency-sensitive service keeps getting OOM-killed and a teammate wants to add 16GB of swap and crank swappiness. Defend what you actually do instead.
- It Is Just a Config File. Push It to Every Region at Once?
A generated rules file reached every edge proxy in every region within seconds, crashed all of them at once, and now the team wants a fix. Defend how config should ship.