majorwiki/05-troubleshooting
MajorLinux 155651c373 wiki: ssh.socket wait-ready gate + mastodon post-install hardening
Two related additions covering the 2026-05-31 cutover-night incidents on
majorlinux and majortoot-hetzner.

ssh-socket-tailscale-race-condition.md (update Race 1 fix):
- After=tailscaled.service Requires=tailscaled.service orders against the
  service becoming active, not against tailscale0 having an IPv4 — hosts
  kept losing SSH intermittently after reboots (incident: majorlinux +
  majortoot-hetzner 2026-05-31, during cutover-night Ansible reboot).
- Canonical fix: a oneshot tailscale-wait-ready.service that polls
  `ip -4 -o addr show tailscale0` until an address is present, with
  ssh.socket After=/Requires= that service. Document the full evolution
  (2026-05-19 BindsTo → 2026-05-23 Requires → 2026-05-31 wait-ready) so
  future readers don't try the half-fixes thinking they're sufficient.
- Add majortoot-hetzner to affected hosts.

mastodon-post-install-hardening.md (new):
Four upstream-install gaps that bit during the majortoot-hetzner cutover:
1. /home/mastodon at 0750 (useradd default) → nginx www-data can't
   traverse → every static asset 403s → unstyled "purple screen" in the
   browser while API/HTML still work through the puma proxy.
2. .env.production at 0644 (mastodon-setup default) → DB_PASS,
   SECRET_KEY_BASE, OTP_SECRET world-readable once gap (1) is fixed.
3. mastodon user shell at /usr/sbin/nologin → `su - mastodon` blocked.
4. rbenv init in .bashrc only → login shells don't source .bashrc; even
   when chained, Ubuntu's .bashrc returns early for non-interactive
   shells. Fix: .bash_profile sets up rbenv BEFORE sourcing .profile +
   .bashrc, so it works for both interactive and non-interactive logins.

All four codified in MajorAnsible configure_mastodon_permissions.yml
with self-asserting verification steps.

02-selfhosting/index.md + SUMMARY.md:
Add a "Services" section to the selfhosting index linking the
mastodon-post-install-hardening article (and the other orphaned
services/ entries while there). SUMMARY.md gains one new entry.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-31 11:08:24 -04:00
..
boot-system wiki: add .keep files for 04-streaming and 05-troubleshooting subdirs 2026-05-02 17:50:22 -04:00
docker Add 5 wiki articles from 2026-04-17/18 work 2026-04-18 11:13:39 -04:00
gpu-display wiki: update fail2ban digest + netdata docker health + 3 new articles 2026-05-02 14:58:07 -04:00
networking wiki: ssh.socket wait-ready gate + mastodon post-install hardening 2026-05-31 11:08:24 -04:00
performance wiki: add .keep files for 04-streaming and 05-troubleshooting subdirs 2026-05-02 17:50:22 -04:00
security Add troubleshooting articles: Netdata apps-group FD false-positive + OBS stale script paths 2026-05-15 03:22:12 -04:00
storage wiki: audit fixes — broken links, wikilinks, frontmatter, stale content (66 files) 2026-04-02 11:16:29 -04:00
systemd wiki: audit fixes — broken links, wikilinks, frontmatter, stale content (66 files) 2026-04-02 11:16:29 -04:00
ansible-check-mode-false-positives.md wiki: update fail2ban digest + netdata docker health + 3 new articles 2026-05-02 14:58:07 -04:00
ansible-regex-search-set-fact-capture-group.md wiki: add troubleshooting article — Ansible regex_search capture group fails in set_fact 2026-05-06 08:28:21 -04:00
ansible-ssh-host-alias-bypass.md wiki: add Ansible SSH Host Alias Bypass troubleshooting article 2026-04-21 09:15:22 -04:00
ansible-ssh-timeout-dnf-upgrade.md Add Ansible SSH timeout troubleshooting article 2026-03-28 11:22:48 -04:00
ansible-ubuntu-reboot-detection-kernel-mismatch.md wiki: batch update — 4 new articles + 4 updates 2026-05-25 13:55:10 -04:00
ansible-vault-password-file-missing.md wiki: audit fixes — broken links, wikilinks, frontmatter, stale content (66 files) 2026-04-02 11:16:29 -04:00
ansible-wsl2-world-writable-mount-ignores-cfg.md wiki: add WSL OpenSSH default shell + Ansible world-writable mount articles 2026-04-03 10:23:02 -04:00
claude-desktop-mcp-mass-disconnect-blocking-reboot.md Add troubleshooting article: Claude Desktop MCP mass-disconnect from blocking SSH reboot 2026-05-10 01:28:11 -04:00
claude-mem-setting-sources-empty-arg.md wiki: add claude-mem troubleshooting article for Claude Code 2.1 arg mismatch 2026-04-17 10:21:21 -04:00
cron-heartbeat-tmpfs-reboot-false-alarm.md wiki: add troubleshooting article on /var/run heartbeat reboot false alarm 2026-04-13 10:11:24 -04:00
docker-caddy-selinux-post-reboot-recovery.md wiki: audit fixes — broken links, wikilinks, frontmatter, stale content (66 files) 2026-04-02 11:16:29 -04:00
fantastical-google-phantom-calendar-syncselect.md Add 7 articles; update nav and existing articles (2026-04-25) 2026-04-25 17:52:48 +00:00
fantastical-mcp-permission-denied.md Add 3 articles; update nav and index (2026-04-29) 2026-04-29 22:45:17 -04:00
fedora-networking-kernel-recovery.md wiki: audit fixes — broken links, wikilinks, frontmatter, stale content (66 files) 2026-04-02 11:16:29 -04:00
gemini-cli-manual-update.md wiki: audit fixes — broken links, wikilinks, frontmatter, stale content (66 files) 2026-04-02 11:16:29 -04:00
ghost-emailanalytics-lag-warning.md Add 5 wiki articles from 2026-04-17/18 work 2026-04-18 11:13:39 -04:00
gitea-runner-boot-race-network-target.md wiki: audit fixes — broken links, wikilinks, frontmatter, stale content (66 files) 2026-04-02 11:16:29 -04:00
index.md wiki: add troubleshooting article — Ansible regex_search capture group fails in set_fact 2026-05-06 08:28:21 -04:00
isp-sni-filtering-caddy.md wiki: update fail2ban digest + netdata docker health + 3 new articles 2026-05-02 14:58:07 -04:00
macos-mirrored-notification-alert-loop.md wiki: audit fixes — broken links, wikilinks, frontmatter, stale content (66 files) 2026-04-02 11:16:29 -04:00
majwiki-setup-and-pipeline.md wiki: fix article count to 73, update frontmatter timestamps 2026-04-07 10:51:23 -04:00
obs-stale-script-paths-after-windows-profile-rename.md Add troubleshooting articles: Netdata apps-group FD false-positive + OBS stale script paths 2026-05-15 03:22:12 -04:00
obsidian-cache-hang-recovery.md wiki: audit fixes — broken links, wikilinks, frontmatter, stale content (66 files) 2026-04-02 11:16:29 -04:00
ollama-chat-template-pipe-stdin-bypass.md Add 7 articles; update nav and existing articles (2026-04-25) 2026-04-25 17:52:48 +00:00
ollama-macos-sleep-tailscale-disconnect.md wiki: audit fixes — broken links, wikilinks, frontmatter, stale content (66 files) 2026-04-02 11:16:29 -04:00
php-84-vendor-implicit-nullable-patch.md Add troubleshooting article: PHP 8.4 implicit-nullable vendor patch 2026-05-10 12:52:25 -04:00
python-smtplib-missing-rfc-headers.md Add 3 articles; update nav and index (2026-04-29) 2026-04-29 22:45:17 -04:00
selinux-dovecot-vmail-context.md wiki: audit fixes — broken links, wikilinks, frontmatter, stale content (66 files) 2026-04-02 11:16:29 -04:00
ubuntu-dist-upgrade-repo-quarantine.md Add 3 articles; update nav and index (2026-04-29) 2026-04-29 22:45:17 -04:00
wget-url-special-characters.md Add troubleshooting article: wget/curl URLs with special characters 2026-04-08 10:18:34 -04:00
wsl2-pytorch-checkpoint-windows-filesystem-deadlock.md wiki: batch update — 4 new articles + 4 updates 2026-05-25 13:55:10 -04:00
yt-dlp-fedora-js-challenge.md wiki: update fail2ban digest + netdata docker health + 3 new articles 2026-05-02 14:58:07 -04:00