Question regarding Git config management

Sebastian Hagedorn Hagedorn at uni-koeln.de
Mon Jun 1 14:14:24 CEST 2015


--On 28. Mai 2015 11:52:05 -0400 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.

Now that the patch that allows changes to be pushed when the server isn't 
running has been pulled, I'm returning to the other issue. Alan wrote:

> The check should really be without radmin.  Just stop the server and
> re-start it.

Arran's post seems to contradict that. Please correct me if my 
understanding is wrong: Arran is saying that you cannot rely on the return 
value of the init script, because it returns before the server has fully 
initialized. Is that really true? If that's really the case, I guess the 
only way to make absolutely sure would be to sleep for, say, 30 seconds and 
to check that the server is still up ...

Sebastian Hagedorn
-- 
    .:.Sebastian Hagedorn - Weyertal 121 (Gebäude 133), Zimmer 2.02.:.
                 .:.Regionales Rechenzentrum (RRZK).:.
   .:.Universität zu Köln / Cologne University - ✆ +49-221-470-89578.:.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pkcs7-signature
Size: 5313 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20150601/b94e1c6b/attachment.bin>


More information about the Freeradius-Users mailing list