3 Commits

Author SHA1 Message Date
abuckit 735fabc2d8 packaging: disable XFS retry-on-error on Buckit data drives
Buckit handles XFS errors itself, so the kernel default (retry-on-error
forever) only adds latency. Ship a systemd timer that periodically sets
max_retries=0 for the EIO, ENOSPC, and default error classes on the block
devices backing MINIO_VOLUMES.

The values reset on every mount, so the timer (re-)applies them after boot
and after a restart-free drive hot-swap. The script reads MINIO_VOLUMES from
the running server's process environment, scopes writes to only the mounted
Buckit data drives (never the root fs or unrelated XFS volumes), and exits
cleanly when the server is down or no XFS is present. Genuine write failures
are logged and surface the unit as failed.

postinstall enables the timer (idempotent across upgrades); postremove
disables it only on full removal.
2026-06-23 23:51:30 -04:00
abuckit 359e4edef9 fix: resolve CI failures in shfmt and decom tests
- packaging/scripts: convert 4-space indentation to tabs (shfmt)
- docs/distributed/decom*.sh: add consistent trailing slashes to
  mc ls bucket paths so before/after diffs compare identical formats
2026-05-19 11:30:13 -04:00
abuckit 343c2876d6 build: replace pkger with nfpm to ship a real systemd unit
The previous packaging step used minio/pkger, which is hardcoded for
MinIO's portfolio: its nfpm template only attaches a systemd unit when
the binary name matches "minio", "aistor", or "sidekick". Invoking it
with --appName buckit silently dropped the unit (and the maintainer/
homepage fields stayed MinIO-branded) — the published .rpm/.deb shipped
only /usr/local/bin/buckit with no service definition.

Switch to nfpm directly, driven by a config in packaging/nfpm.yaml that
we own. The packages now contain:

  /usr/local/bin/buckit
  /lib/systemd/system/buckit.service   (Type=notify, LimitNOFILE=1048576,
                                        OOMScoreAdjust=-1000, etc.)

A postinstall script creates the buckit system user/group idempotently;
preremove stops the service; postremove reloads systemd but deliberately
leaves the user in place to avoid orphaning data on attached storage.

The unit is modeled on MinIO's production unit but reads
EnvironmentFile=-/etc/default/minio (leading - = optional), keeping
fresh buckit nodes byte-compatible with the env file MinIO already
ships, so the manager's in-place migration story works without any
config translation.

Verified locally by building rpm/deb/apk against the published
RELEASE.2026-05-11T17-20-40Z binary and inspecting the output.
2026-05-11 15:21:58 -04:00