[MacPorts] #36054: Feature request: reload action
#36054: Feature request: reload action ----------------------------------+----------------------------------------- Reporter: mailtoarlo@… | Owner: macports-tickets@… Type: request | Status: new Priority: Low | Milestone: Component: base | Version: Keywords: | Port: ----------------------------------+----------------------------------------- When using ports that are started using launchd (e.g. apache2, mysql, php- fpm) the combination of {{{port unload}}} and {{{port load}}} is used to test configuration changes. Sadly typing this is long and cumbersome: {{{ sudo port unload apache2 && sudo port load apache2 }}} I suggest the {{{port reload}}} action that reduces the above to: {{{ sudo port reload apache2 }}} This is a common practice of "similar" commands like [http://manpages.ubuntu.com/manpages/hardy/en/man1/service.1.html service]. -- Ticket URL: <https://trac.macports.org/ticket/36054> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36054: Feature request: reload action ----------------------------------+----------------------------------------- Reporter: mailtoarlo@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: Keywords: | Port: ----------------------------------+----------------------------------------- Changes (by macsforever2000@…): * priority: Low => Normal * type: request => enhancement -- Ticket URL: <https://trac.macports.org/ticket/36054#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36054: Feature request: reload action ----------------------------------+----------------------------------------- Reporter: mailtoarlo@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: Keywords: | Port: ----------------------------------+----------------------------------------- Comment(by ryandesign@…): "sudo port load X" and "sudo port unload X" are only shortcuts for typing "sudo launchctl load -w /Library/LaunchDaemons/org.macports.X.plist" and "sudo launchctl unload -w /Library/LaunchDaemons/org.macports.X.plist" respectively. To my knowledge, launchctl does not provide a command for reloading or restarting something, therefore MacPorts does not provide such a shortcut. -- Ticket URL: <https://trac.macports.org/ticket/36054#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36054: Feature request: reload action ---------------------------+-------------------------------- Reporter: mailtoarlo@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: Resolution: | Keywords: Port: | ---------------------------+-------------------------------- Comment (by umassthrower@…): I'm not sure that a deficiency in launchctl is an appropriate reason to have a deficiency in port. To start, having the "port reload apache2" command be a shortcut for "launchctl load -w /Library/LaunchDaemons/org.macports.X.plist && launchctl unload -w /Library/LaunchDaemons/org.macports.X.plist" seems like it would sufficiently simulate the user's expected behavior. I for one was slightly shocked today when sudo port reload dnsmasq failed as the reload/restart common case optimization is supported in most analogous systems as it is by far the most common use case of the load/reload/unload or start/restart/stop paradigm. -- Ticket URL: <https://trac.macports.org/ticket/36054#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36054: Feature request: reload action ---------------------------+-------------------------------- Reporter: mailtoarlo@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: Resolution: | Keywords: Port: | ---------------------------+-------------------------------- Comment (by jmr@…): For any launchd service that has KeepAlive specified, you get an automatic restart when you stop it. So you can simply run `launchctl stop org.macports.apache2` or even `apachectl stop`. -- Ticket URL: <https://trac.macports.org/ticket/36054#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36054: Feature request: reload action ---------------------------+-------------------------------- Reporter: mailtoarlo@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: Resolution: | Keywords: Port: | ---------------------------+-------------------------------- Changes (by ryandesign@…): * cc: xeron.oskom@…, ryandesign@…, eborisch@…, egall@…, raimue@… (added) Comment: Duplicate #42487 has a patch. -- Ticket URL: <https://trac.macports.org/ticket/36054#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#36054: Feature request: reload action ---------------------------+-------------------------------- Reporter: mailtoarlo@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: Resolution: | Keywords: Port: | ---------------------------+-------------------------------- Comment (by xeron.oskom@…): Is there any reason for not applying patch from #42487? -- Ticket URL: <https://trac.macports.org/ticket/36054#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#36054: Feature request: reload action ---------------------------+-------------------------------- Reporter: mailtoarlo@… | Owner: macports-tickets@… Type: enhancement | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: Resolution: fixed | Keywords: Port: | ---------------------------+-------------------------------- Changes (by cal@…): * status: new => closed * resolution: => fixed * milestone: => MacPorts Future Comment: Committed your patch in r123673 with the following changes: - Removed the delay. I don't think that's necessary, especially since `port unload; port load` doesn't have the delay and worked before. - Added the `-w` flag to `unload` and `load` just as it is in `portload.tcl` and `portunload.tcl` - Switched to Tcl 8.5's `-ignorestderr` flag instead of redirecting stderr to itself - Removed the change of `src/port/port-help.tcl` because that file is gone in trunk now. If you have some time, please consider writing a manpage (possibly for `load`, `unload`, and `reload` combined); see #44530 and wiki:NewHelpSystem for more information. Thanks for the patch! -- Ticket URL: <https://trac.macports.org/ticket/36054#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#36054: Feature request: reload action ---------------------------+-------------------------------- Reporter: mailtoarlo@… | Owner: macports-tickets@… Type: enhancement | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: Resolution: fixed | Keywords: Port: | ---------------------------+-------------------------------- Comment (by xeron.oskom@…): I saw errors using "port unload; port load" with redis, it doesn't release tcp port in time. So sleep could be helpful here. -- Ticket URL: <https://trac.macports.org/ticket/36054#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
#36054: Feature request: reload action ---------------------------+-------------------------------- Reporter: mailtoarlo@… | Owner: macports-tickets@… Type: enhancement | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: Resolution: fixed | Keywords: Port: | ---------------------------+-------------------------------- Comment (by cal@…): A reasonable point. I'm not sure how much wait time is appropriate, though. One second seemed too long to me because most daemons start in well under a second. Also, this is a redis bug, IMO. -- Ticket URL: <https://trac.macports.org/ticket/36054#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
#36054: Feature request: reload action ---------------------------+-------------------------------- Reporter: mailtoarlo@… | Owner: macports-tickets@… Type: enhancement | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: Resolution: fixed | Keywords: Port: | ---------------------------+-------------------------------- Comment (by ryandesign@…): Since we use daemondo to handle all launch daemons, and since daemondo is documented to restart the process it's monitoring when it receives a `SIGHUP`, why don't we send that instead of unloading and loading again? -- Ticket URL: <https://trac.macports.org/ticket/36054#comment:10> MacPorts <http://www.macports.org/> Ports system for OS X
#36054: Feature request: reload action ---------------------------+-------------------------------- Reporter: mailtoarlo@… | Owner: macports-tickets@… Type: enhancement | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: Resolution: fixed | Keywords: Port: | ---------------------------+-------------------------------- Comment (by cal@…): Replying to [comment:10 ryandesign@…]:
Since we use daemondo to handle all launch daemons
We don't, see the `mpstats` and `certsync` ports, for example. -- Ticket URL: <https://trac.macports.org/ticket/36054#comment:11> MacPorts <http://www.macports.org/> Ports system for OS X
#36054: Feature request: reload action ---------------------------+-------------------------------- Reporter: mailtoarlo@… | Owner: macports-tickets@… Type: enhancement | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: Resolution: fixed | Keywords: Port: | ---------------------------+-------------------------------- Comment (by xeron.oskom@…): Replying to [comment:9 cal@…]:
A reasonable point. I'm not sure how much wait time is appropriate, though. One second seemed too long to me because most daemons start in well under a second.
Also, this is a redis bug, IMO.
There're lot of "sleep 1" in linux init scripts. -- Ticket URL: <https://trac.macports.org/ticket/36054#comment:12> MacPorts <http://www.macports.org/> Ports system for OS X
#36054: Feature request: reload action ---------------------------+-------------------------------- Reporter: mailtoarlo@… | Owner: macports-tickets@… Type: enhancement | Status: closed Priority: Normal | Milestone: MacPorts Future Component: base | Version: Resolution: fixed | Keywords: Port: | ---------------------------+-------------------------------- Comment (by cal@…): Oh well, better be safe than sorry then, I guess. r123716. -- Ticket URL: <https://trac.macports.org/ticket/36054#comment:13> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts