Skip to content
Back to skills

Reboot Nodes

ASecurity

Clear `ej-reboot-pending` and `ej-service-restart-pending`: what waits on each node, one command the operator runs to reboot them in order, then proof the alerts stop

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added December 1, 2026
developmentgonodekubernetesapidatabase

Works with

  • claude code
  • terminal
  • api

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add enorm-labs/event-junkie --skill reboot-nodes --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Reboot Nodes?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Reboot Nodes
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/enorm-labs-reboot-nodes/badge)](https://www.skillsdirectory.com/skills/enorm-labs-reboot-nodes)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: reboot-nodes
description: "Clear `ej-reboot-pending` and `ej-service-restart-pending`: what waits on each node, one command the operator runs to reboot them in order, then proof the alerts stop"
argument-hint: "[staging|production|all]"
disable-model-invocation: true
---

# Reboot Nodes

Clear `ej-reboot-pending` and `ej-service-restart-pending`: find out what waits on each node, hand the operator one command that reboots the nodes in order,
then prove the alerts stop. `scripts/node-reboot.sh` does the reboot and every check. This prompt is the part around it.

## Important

- **The operator runs the reboot, never the agent.** `scripts/node-reboot.sh reboot` runs `sudo systemctl reboot` over SSH, and the guard refuses that. Hand
  over the one command and wait for the output.
- **`check` is yours.** It only reads: needrestart, the reboot flag, the importer's sources. Run it before and after.
- **The production site is down for about 2 minutes** while the k3s node reboots. Say so when you hand over the command.
- **A tunnel or forward that is down is the operator's step** (`scripts/ej.sh up <env>` takes `sudo`). Say so and stop.

## Arguments

```text
/reboot-nodes [staging|production|all]
```

`all` is the default.

## Steps

1. **Read what waits.** `scripts/node-reboot.sh check <scope>`. Report each node in one line: nothing waits, or the services and the kernel.
   Nothing waits anywhere: say so and stop. The alert clears at its next evaluation.
2. **Hand over the command.** `scripts/node-reboot.sh reboot <scope>`, bare, for a paste into zsh in a terminal of its own. It lists the nodes, asks
   `Go? [y/N]`, waits for running imports, and stops at the first failed check. **Never offer it as a Claude Code `!` command**: a `!` command has no stdin,
   so the prompt reads an empty answer as _no_ and the script exits without a reboot.
3. **Read the output the operator pastes.** Every node ends with `Kubernetes events arrive` (k3s nodes) or `site and /api/events answer 200` (production
   database node), and the run with `done`. A `FAIL` line names the check. Read the logs and the node before you propose a next step. Do not rerun the
   reboot.
4. **Prove it.** `scripts/node-reboot.sh check <scope>` says nothing waits. The two node metrics read 0 in OpenObserve:

    ```sh
    scripts/o2-query.sh <env> promql 'max by (node) (node_service_restart_pending_age_seconds) + max by (node) (node_reboot_required_age_seconds)' --hours 1 --step 600
    ```

    The last value of each node is 0. The alert stops at its next evaluation.

5. **Report** each node, when it came back, and anything the run restarted, such as the gateway collector.

## Notes

- **A wait loop that never returns** after a reboot is an SSH session that hung while the node went down. The script sets `ServerAliveInterval`, so this
  does not happen in it. A hand-typed loop without it needs Ctrl-C.
- **An import that starts between the check and the reboot ends `FAILED`** ("stuck in RUNNING for >30 minutes"). It recovers at its next scheduled run.
- **The order is fixed**: the production database node, the production k3s node, staging. [CLUSTER_BOOTSTRAP.md](../../../docs/ops/CLUSTER_BOOTSTRAP.md#rebooting-a-node)
  § Rebooting a node says why.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.