Bug 246775 - www/minio: Update to RELEASE.2020-05-16T01-33-21Z
Summary: www/minio: Update to RELEASE.2020-05-16T01-33-21Z
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Steve Wills
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2020-05-27 11:22 UTC by Dmitry Wagin
Modified: 2020-07-08 15:36 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (swills)


Attachments
minio.diff (16.85 KB, patch)
2020-05-27 11:22 UTC, Dmitry Wagin
no flags Details | Diff
new-rc.diff (4.58 KB, patch)
2020-05-27 21:57 UTC, Dmitry Wagin
no flags Details | Diff
new-rc.diff (4.58 KB, patch)
2020-05-27 23:02 UTC, Dmitry Wagin
no flags Details | Diff
new-rc.diff (4.57 KB, patch)
2020-05-27 23:14 UTC, Dmitry Wagin
no flags Details | Diff
proposed rc patch (3.19 KB, patch)
2020-05-28 01:18 UTC, Steve Wills
no flags Details | Diff
new-rc.diff (4.89 KB, patch)
2020-06-01 18:52 UTC, Dmitry Wagin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Wagin 2020-05-27 11:22:50 UTC
Created attachment 214911 [details]
minio.diff

* update to RELEASE.2020-05-16T01-33-21Z
* fix inconsistency with minio-client (api changed)
* improvement rc script
Comment 1 commit-hook freebsd_committer 2020-05-27 20:56:05 UTC
A commit references this bug:

Author: swills
Date: Wed May 27 20:55:55 UTC 2020
New revision: 536719
URL: https://svnweb.freebsd.org/changeset/ports/536719

Log:
  www/minio: update to 2020.05.16.01.33.21

  While here, improve the rc script to support sending logs to syslog

  PR:		246775
  Submitted by:	Dmitry Wagin <dmitry.wagin@ya.ru>

Changes:
  head/www/minio/Makefile
  head/www/minio/distinfo
  head/www/minio/files/minio.in
Comment 2 Steve Wills freebsd_committer 2020-05-27 20:59:36 UTC
Committed, thanks. Didn't commit all the rc script changes, will do the user/group ones next time. Not sure the other changes make sense. The cert/config ones maybe, but the pid/command ones I don't think make sense. Thanks for the patch!
Comment 3 Dmitry Wagin 2020-05-27 21:57:31 UTC
Created attachment 214936 [details]
new-rc.diff

(In reply to Steve Wills from comment #2)

Your version rc.script not workable in MinIO distributed mode.
Comment 4 Steve Wills freebsd_committer 2020-05-27 22:29:05 UTC
(In reply to Dmitry Wagin from comment #3)
I disagree about the pidfile and command_args changes. They cause daemon to be run as root which is not necessary or as secure and also I think changing from -p to -P causes "service status minio" to report the pid of daemon rather than minio, which is not correct. Please resubmit the patch without those changes.

Can you please explain the issue with distributed mode?
Comment 5 Dmitry Wagin 2020-05-27 23:02:30 UTC
Created attachment 214938 [details]
new-rc.diff

(In reply to Steve Wills from comment #4)

>They cause daemon to be run as root

That's not true.

-P allows you to use flags -r and -R, but this is not very relevant for minio.
-p = LGFM.

In distributed mode minio disks looks like http://host{1...n}/export{1...m}.

-    for disk in "${minio_disks}"; do
-        if [ ! -d "${disk}" ]; then
-            install -d -o "${minio_user}" -g "${minio_group}" "${disk}"
-        fi
-    done

this code doesn't work.
Comment 6 Dmitry Wagin 2020-05-27 23:14:29 UTC
Created attachment 214939 [details]
new-rc.diff

added procname for redundancy
Comment 7 Steve Wills freebsd_committer 2020-05-28 00:18:50 UTC
(In reply to Dmitry Wagin from comment #5)
Sorry, you're right, I was thinking of something else there. But why change command_args beyond what is needed? Why have minio_main? Why move the pid file to a subdir rather than a simple file? Why rename the syslog variables? Why the white-space changes? Why remove minio_args?
Comment 8 Steve Wills freebsd_committer 2020-05-28 01:18:13 UTC
Created attachment 214942 [details]
proposed rc patch

Can you check this solves the issue with distributed mode?
Comment 9 Dmitry Wagin 2020-06-01 07:09:15 UTC
(In reply to Steve Wills from comment #7)
Sorry for delay.

> But why change command_args beyond what is needed? Why have minio_main?
Separate minio options from daemon.

> Why move the pid file to a subdir rather than a simple file?
There were some problems, I don't remember now. Tested now, everything seems to work.

> Why rename the syslog variables?
Because it's not only syslog variable, it's log variable


> Why the white-space changes?
FreeBSD rc.scripts use tabs not spaces (code style, maybe not official)


> Why remove minio_args?
my mistake


> Can you check this solves the issue with distributed mode?
Today I will test different modes.
Comment 10 Dmitry Wagin 2020-06-01 18:52:15 UTC
Created attachment 215140 [details]
new-rc.diff

workable version in distributed mode
Comment 11 Steve Wills freebsd_committer 2020-06-01 21:07:20 UTC
(In reply to Dmitry Wagin from comment #10)
How is this different from my version?
Comment 12 Dmitry Wagin 2020-06-01 21:26:16 UTC
(In reply to Steve Wills from comment #11)

fixed creating disk dir
Comment 13 Steve Wills freebsd_committer 2020-06-02 12:41:38 UTC
(In reply to Dmitry Wagin from comment #12)
Hmm, I think creating the dir was a mistake in the first place, the dir should exist when the user specifies it. Did my version work for you if the dir exists?
Comment 14 Dmitry Wagin 2020-06-02 12:47:48 UTC
(In reply to Steve Wills from comment #13)

> Hmm, I think creating the dir was a mistake in the first place, the dir should exist when the user specifies it.

This is user frendly.


Also don't need to create config dir because it is deprecated.
Comment 15 Steve Wills freebsd_committer 2020-06-02 19:27:44 UTC
(In reply to Dmitry Wagin from comment #14)
Did my version work for you if the dir exists?
Comment 16 Dmitry Wagin 2020-06-03 13:15:41 UTC
(In reply to Steve Wills from comment #15)

In your version, the creation of the disk directory is completely removed, of course it will work.
Comment 17 commit-hook freebsd_committer 2020-07-08 15:32:48 UTC
A commit references this bug:

Author: swills
Date: Wed Jul  8 15:32:01 UTC 2020
New revision: 541501
URL: https://svnweb.freebsd.org/changeset/ports/541501

Log:
  www/minio: update to 2020.07.02.00.15.09

  While here, pull in some rc script improvements [1]

  PR:		246775 [1]
  Submitted by:	Dmitry Wagin <dmitry.wagin@ya.ru> [1] (with changes)

Changes:
  head/www/minio/Makefile
  head/www/minio/distinfo
  head/www/minio/files/minio.in