[MacPorts] #60923: mail-server: possible improvements to wrapper script
MacPorts
noreply at macports.org
Fri Aug 7 03:25:43 UTC 2020
#60923: mail-server: possible improvements to wrapper script
--------------------------+-----------------------
Reporter: ryandesign | Owner: essandess
Type: enhancement | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.6.3
Resolution: | Keywords:
Port: mail-server |
--------------------------+-----------------------
Comment (by ryandesign):
Replying to [comment:1 essandess]:
> Why do you call port load / unload / reload for each port
individually? Why not all at once? If you are concerned that one of the
loads / unloads / reloads might fail and you want subsequent ones to be
attempted anyway, use the -p flag. (port -p load clamav-server apache-
solr8 redis dcc postfix dovecot rspamd)
>
> Good idea. Would you please modify https://github.com/macports/macports-
ports/pull/7893 to do this?
With `-p` or no?
I don't know how these wrapper scripts normally behave if one command
fails: do they proceed to run the subsequent commands or stop on the first
failed command?
Or are we not concerned about the case where `port load` and `port unload`
might fail?
> Why does Restart() manually reload postfix and dovecot by unloading,
then waiting a second, then loading? That is exactly what reload already
does so why not use that?
>
> This is a robustness hack I found that is necessary on my own systems to
make sure that {{{postfix}}}'s port 25 is available when the port is
reloaded. If the port system already is waiting a second,
It is: https://github.com/macports/macports-
base/blob/master/src/port1.0/portreload.tcl#L86-L89
> then perhaps it needs additional time for {{{postfix}}}. macOS launchd
timing is frankly a PITA, and I don't known of a general fix beyond just
waiting a little longer, or explicitly checking to make sure that port 25
isn't open before reloading. Same comment for {{{dovecot}}} ports.
According to comment:ticket:36054:8 we added the 1 second delay for redis
because it didn't release its tcp port in time. According to
comment:ticket:36054:9 this is considered a bug in redis.I don't know if
it was ever fixed. Should we also consider this a bug in postfix and
dovecot and ask them to fix it? Or can we make `port unload` and `port
reload` more robust so that they wait for the monitored program to
actually finish what it's doing before returning? I had assumed launchctl
was already guaranteeing that but I guess not.
--
Ticket URL: <https://trac.macports.org/ticket/60923#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list