Bug 270538

Summary: www/minio upgrade to 2023 version requires an involved reinstall
Product: Ports & Packages Reporter: freebsd
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Many People CC: bofh, info, tom
Priority: --- Flags: bugzilla: maintainer-feedback? (swills)
Version: Latest   
Hardware: Any   
OS: Any   

Description freebsd 2023-03-30 09:31:39 UTC
https://min.io/docs/minio/linux/operations/install-deploy-manage/migrate-fs-gateway.html

This really should be in UPDATING. 

Upgrading the package without further ado gives you the "ERROR Unable to use the drive /data/minio: Drive /data/minio: found backend type fs, expected xl or xl-single - to migrate to a supported backend visit https://min.io/docs/minio/linux/operations/install-deploy-manage/migrate-fs-gateway.html: Invalid arguments specified" error.

Backend fs is pretty typical and default here, so many Minio installations will halt after a service restart
Comment 1 freebsd 2023-03-30 10:26:57 UTC
For those bitten by this who need to backtrack IMMEDIATELY (on FreeBSD 13 amd64):

Get the previous package at 

https://pkg.freebsd.org/FreeBSD:13:amd64/latest/All/minio-2021.12.27.07.23.18_11.pkg

and simply `pkg install` it. 

Minio is basically just a self-contained binary, so no involved library backtracking is needed.

Then `pkg lock -y www/minio` to stick with this version until you're ready to do the (quite awful) upgrade, or to build a whole new Minio (probably easier).

Minio-client does not need to be reversed, the 2023 version works just fine. If you want to keep minio and minio-client on the same version, basically do the same for minio-client.
Comment 2 freebsd 2023-03-30 13:18:01 UTC
Also: this will install and run fine on a CLUSTER, this is a single-node-single-disk issue only.

If you run Minio on a cluster with a load balancer (Nginx), add these lines to your location blocks:

    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";

Without them, you can no longer browse buckets through the load balancer, only on individual hosts. This concerns web browsers, S3 browsers appear to do fine - but the lines should be there anyway.

https://github.com/minio/minio/discussions/16337
https://www.nginx.com/blog/websocket-nginx/

Note: in the second article, 

     "proxy_set_header Host $host;"

should be 

     "proxy_set_header Host $http_host;"
Comment 3 Rene Ladan freebsd_committer freebsd_triage 2023-04-11 20:20:31 UTC
Maintainer reset.
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-04-25 17:31:47 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=da345ab023cb1924f8d305341592dd41b1b2927a

commit da345ab023cb1924f8d305341592dd41b1b2927a
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-04-25 15:40:40 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-04-25 17:30:46 +0000

    www/minio: Update version 2023-03-22T06-36-24Z=>2023-04-20T17-56-55Z

    - Update pkg-descr to point about migration [1]

    Changelog:
    https://github.com/minio/minio/releases/tag/RELEASE.2023-04-20T17-56-55Z

    PR:             270538 [1]
    Reported by:    freebsd@bengrimm.net [1]

 www/minio/Makefile    | 23 +++++++++++------------
 www/minio/distinfo    | 10 +++++-----
 www/minio/pkg-message |  8 ++++++++
 3 files changed, 24 insertions(+), 17 deletions(-)
Comment 5 Daniel Maslowski 2023-12-08 22:09:26 UTC
Anyone running into this, and cannot really figure out how to migrate in the near term either (I am still a bit puzzled, running a tiny MinIO instance for private use...), I have a ports patch to downgrade:
https://gist.github.com/orangecms/735c6dae22e19515ddfdab0af5701c96