Question regarding Git config management

Arran Cudbard-Bell a.cudbardb at freeradius.org
Thu May 28 17:56:41 CEST 2015


> On May 28, 2015, at 11:52 AM, Arran Cudbard-Bell <a.cudbardb at freeradius.org> wrote:
> 
> 
>> On May 28, 2015, at 11:13 AM, Sebastian Hagedorn <Hagedorn at uni-koeln.de> wrote:
>> 
>> --On 27. Mai 2015 11:25:52 -0400 Alan DeKok <aland at deployingradius.com> wrote:
>> 
>>>> The "radmin -e hup" command did not throw an error. Consequently the
>>>> commit was tagged as "stable". When I tried to manually restart
>>>> Freeradius on the remote server, it didn't start anymore (as expected).
>>>> At that point I wasn't even able to push a fix, because radmin doesn't
>>>> work when the server isn't running, and so the post-receive hook
>>>> reverted back to the "stable" version! I had to fix the error manually
>>>> on the remote server to get things working again.
>>> 
>>> That's a bit of a different issue.  If the server isn't running, then
>>> you should be able to push updates.  Please send a patch.
>> 
>> For that particular problem I have come up with this, which seems to work:
> 
> I thought about that when I was writing the script. The issue is you don't know when the server has come up fully, so you may run into race conditions.
> 
> At the time, I think there was still the issue where the child process wasn't signalling the parent that an error had occurred, so even if the child exited with an error, the parent would exit with 0.
> 
> In later versions of v2 and v3 the parent waits until the child process signals that initialisation has completed successfully, so the parent should exit with a code that signals whether the server as a whole came up correctly.
> 
> The proper way to achieve what you're trying to do, is to ensure that the init script passes back the exit code of the parent process, and use that to determine if the server has come up.
> 
> When you check the status of the process using the init script, you're just checking whether the process still exists immediately after its created. There's no guarantee it'll still exist five seconds after its been created. Module initialization delays opening sockets, so whilst your patched script may work for you, it wouldn't work well for an instance of the server where several hundred connections are opened to a database, even in the same scenario, with the conflicting listen sections.

Also adding full paths to the binaries is annoying. The server isn't always installed in the same location.

Set PATH at the top of the script.

-Arran
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20150528/77b656d6/attachment-0001.sig>


More information about the Freeradius-Users mailing list