Skip to main content

MinIO operations

v0.1.21

Cluster + bucket + user introspection plus operator surface (user enable/disable, bucket heal, cluster service restart). Talks to mc CLI configured via MC_HOST_<alias> env var on the runner host.

7 allowed by default 5 need approval by default
Pack ID
minio
Vendor
emisar
OS
linux
Actions
12
Required binaries. Install these on the host before relying on the pack — an action that calls a missing one fails at run time.
mc

Install

emisar pack install fetches this pack, re-validates it, and verifies its content hash against the --hash below — the exact bytes this page was rendered against, so a tampered copy is rejected — before copying it into the runner's packs dir. The command reloads a running daemon itself; no manual restart.

on the runner host
sudo emisar pack install minio --hash sha256:3fa5f493a12e627d0ce4b3f198b140868bb2ab4f31de7bf573a460e92973f1a0

Setup

Actions run the mc client against an alias passed as an argument. mc reads that alias from an MC_HOST_<alias> env var of the form https://ACCESS:SECRET@endpoint on the runner host — no on-disk mc config needed.

Environment

Set these on the runner host, then add each name to execution.inherit_env so the value reaches the action.

  • MC_HOST_minio required

    Connection for the "minio" alias, as https://ACCESS_KEY:SECRET_KEY@endpoint. Rename the suffix to match the alias you pass.

Notes

  • Create the access/secret pair with mc admin user add <alias> <access-key> <secret-key>, or in the MinIO Console under Identity → Users; attach the readonly policy for the read actions and consoleAdmin for the admin-* ones.
  • The MC_HOST_<alias> you set (e.g. MC_HOST_minio ) must also be allowlisted in the runner's execution.inherit_env — the action env is scrubbed to PATH/LANG/LC_ALL/TERM by default, so an env present on the host but not allowlisted is silently dropped (the action falls back to its local default or fails auth).
  • The env var suffix must exactly match the alias argument: actions whose examples pass alias "minio" need MC_HOST_minio ; a different alias needs MC_HOST_<that-alias>.
  • The access/secret pair needs admin permissions for the admin-* actions (info, user list/enable/disable, heal, service restart); a plain user key can only list buckets and stat.

Verify it works

Runs minio.admin_info, a low-risk read that confirms the pack can reach its target. Run it on the host once the pack is installed; pack install runs it for you.

on the runner host
sudo emisar pack verify minio

Install and configure a pack walks through the whole sequence on a host.

Actions 12 total

View on GitHub
  • minio.admin_info exec low Low — read-only or trivially reversible

    mc admin info

    Show cluster info: nodes, storage, network, uptime.

    View source on GitHub
  • minio.admin_top_locks exec low Low — read-only or trivially reversible

    mc admin top locks

    List the top object locks held across the cluster — spots stuck operations.

    View source on GitHub
  • minio.admin_trace exec medium Medium — changes state, easily reversible

    mc admin trace (5s window)

    Trace S3 API calls hitting the cluster for 5 seconds. Returns the one-line request summary — method, path, status, timing — never request or response headers, which carry the caller's SigV4 credential and signature.

    View source on GitHub
  • minio.bucket_stat exec low Low — read-only or trivially reversible

    mc du (bucket)

    Show object count + size for one bucket.

    View source on GitHub
  • minio.heal_bucket exec high High — service-affecting

    mc admin heal -r <alias>/<bucket>

    Heal one bucket recursively. Scans every object, repairs inconsistent erasure-coded shards, restores missing replicas. CPU + I/O heavy; run during low-traffic windows.

    View source on GitHub
  • minio.heal_summary exec high High — service-affecting

    mc admin heal --recursive (cluster-wide)

    Trigger a cluster-wide healing scan that repairs objects (not a dry-run). Does NOT use --remove. May be IO-heavy.

    View source on GitHub
  • minio.list_policies exec low Low — read-only or trivially reversible

    mc admin policy ls

    List all IAM policy names.

    View source on GitHub
  • minio.list_users exec low Low — read-only or trivially reversible

    mc admin user list

    List all IAM users + their status + attached policies.

    View source on GitHub
  • minio.ls_buckets exec low Low — read-only or trivially reversible

    mc ls (root)

    List all buckets in one alias.

    View source on GitHub
  • minio.service_restart exec high High — service-affecting

    mc admin service restart <alias>

    Restart MinIO across the cluster. Coordinated rolling restart — one node at a time so the cluster stays available. Use after a config change that requires restart.

    View source on GitHub
  • minio.user_disable exec high High — service-affecting

    mc admin user disable

    Disable one IAM user. They can't authenticate until re-enabled.

    View source on GitHub
  • minio.user_enable exec high High — service-affecting

    mc admin user enable

    Re-enable one IAM user; their credentials work again immediately with every policy still attached — access cut during an incident comes back.

    View source on GitHub