[Asterisk-code-review] app_reload: New Reload application (asterisk[16])

Kevin Harwell asteriskteam at digium.com
Tue Jun 8 15:39:37 CDT 2021


Attention is currently required from: N A, Joshua Colp.
Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/15962 )

Change subject: app_reload: New Reload application
......................................................................


Patch Set 3:

(1 comment)

File apps/app_reload.c:

https://gerrit.asterisk.org/c/asterisk/+/15962/comment/f3f7558e_6374787b 
PS3, Line 88: 	if (!ast_strlen_zero(target)) {
> Wait, so I should document the common hardcoded things and then keep the aliases or remove them? Wit […]
A few ways maybe to handle this. I'm not sure if any are really that great, or a "clean" way of doing things:

1) Add a public API call that executes a cli alias, and then call it from reload

2) Move this functionality to res_clialiases.c unless that's what Josh meant by not moving to core.

2) Similar to the above but instead assume a list of hard-coded alias names. Attempt to execute them via the ast_cli_command call. If it fails output a warning stating an alias of name "abx xyz" needs to be defined in clialiases.conf to do what you want. In this case this would be less a "reload" app at this point and more an "alias execute" app.

3) Leave mostly as is, remove all "aliases", and force the dialplan creator to pass in all modules they want to reload. So now in the pjsip case they'd have to pass in Reload(chan_pjsip,res_pjsip,res_pjsip_ etc...).

4) Similar to 3, but add wildcards to alleviate some typing. So now can do Reload(chan_*) -> reloads all channel drivers, Reload(chan_pjsip, res_pjsip_*) -> reload all pjsip reloadable items, etc...

5) Something else?

All these have good and bad to them, so not sure which I'd choose. If I had to put an order maybe 2,3,1,2,4? Thoughts?



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15962
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ic8ab025d8b38dd525b872b41c465c999c5810774
Gerrit-Change-Number: 15962
Gerrit-PatchSet: 3
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Attention: N A <mail at interlinked.x10host.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Comment-Date: Tue, 08 Jun 2021 20:39:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Comment-In-Reply-To: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210608/7fef1c98/attachment.html>


More information about the asterisk-code-review mailing list