[PATCH 1/2] Fixes few coding style issues which I have found while digging the monitor code.
[PATCH 2/2] Solves https://fedorahosted.org/sssd/ticket/1357
The pid file is now created after all responders are running.
I have tested this by postponing responder initialization via sleep().
I also found out that if a provider failed to start then every responder will fail to start as well, so the SSSD cannot provide data even from the cache. Ticket for this issue: https://fedorahosted.org/sssd/ticket/1552
On Thu, Sep 27, 2012 at 09:16:38PM +0200, Pavel Březina wrote:
[PATCH 1/2] Fixes few coding style issues which I have found while digging the monitor code.
[PATCH 2/2] Solves https://fedorahosted.org/sssd/ticket/1357
The pid file is now created after all responders are running.
I have tested this by postponing responder initialization via sleep().
Yes, this works for me as well.
I also found out that if a provider failed to start then every responder will fail to start as well, so the SSSD cannot provide data even from the cache. Ticket for this issue: https://fedorahosted.org/sssd/ticket/1552
Ouch. Please let me know if you have enough cycles to fix that for 1.9.1 (due by Thursday). I think we should get the fix in.
Subject: [PATCH 1/2] Fix few coding style issues
Ack
Subject: [PATCH 2/2] monitor: create pid file after all responders are started
Ack as per functionality, but can you change the variable name from "alive_services" to "started_services" or something like that? alive_services implies periodical checking with pings rather than one-time startup check.
I wonder if the exit() is necessary? Would it be enough to just return the error code and perhaps also from client_registration() ?
On 10/01/2012 10:53 PM, Jakub Hrozek wrote:
On Thu, Sep 27, 2012 at 09:16:38PM +0200, Pavel Březina wrote:
[PATCH 1/2] Fixes few coding style issues which I have found while digging the monitor code.
[PATCH 2/2] Solves https://fedorahosted.org/sssd/ticket/1357
The pid file is now created after all responders are running.
I have tested this by postponing responder initialization via sleep().
Yes, this works for me as well.
I also found out that if a provider failed to start then every responder will fail to start as well, so the SSSD cannot provide data even from the cache. Ticket for this issue: https://fedorahosted.org/sssd/ticket/1552
Ouch. Please let me know if you have enough cycles to fix that for 1.9.1 (due by Thursday). I think we should get the fix in.
Subject: [PATCH 1/2] Fix few coding style issues
Ack
Subject: [PATCH 2/2] monitor: create pid file after all responders are started
Ack as per functionality, but can you change the variable name from "alive_services" to "started_services" or something like that? alive_services implies periodical checking with pings rather than one-time startup check.
Sure.
I wonder if the exit() is necessary? Would it be enough to just return the error code and perhaps also from client_registration() ?
When the pidfile was created in server_setup(), the monitor exited with 2, so I followed this scenario. But you are right. SSSD is fully functional at this point so we shouldn't exit it just because we where unable to create pidfile.
New patches are attached.
On Tue, Oct 02, 2012 at 11:05:19AM +0200, Pavel Březina wrote:
I wonder if the exit() is necessary? Would it be enough to just return the error code and perhaps also from client_registration() ?
When the pidfile was created in server_setup(), the monitor exited with 2, so I followed this scenario. But you are right. SSSD is fully functional at this point so we shouldn't exit it just because we where unable to create pidfile.
Sorry, I think I confused you. I would prefer aborting becuse the initscripts have no way to signal the SSSD to shut down, but in general I think that using exit() from outside main() is not very nice. Is there a way to pass the error code all the way up to the main loop and terminate the SSSD there?
On 10/02/2012 11:18 AM, Jakub Hrozek wrote:
On Tue, Oct 02, 2012 at 11:05:19AM +0200, Pavel Březina wrote:
I wonder if the exit() is necessary? Would it be enough to just return the error code and perhaps also from client_registration() ?
When the pidfile was created in server_setup(), the monitor exited with 2, so I followed this scenario. But you are right. SSSD is fully functional at this point so we shouldn't exit it just because we where unable to create pidfile.
Sorry, I think I confused you. I would prefer aborting becuse the initscripts have no way to signal the SSSD to shut down, but in general I think that using exit() from outside main() is not very nice. Is there a way to pass the error code all the way up to the main loop and terminate the SSSD there?
Ah, no, it is called via D-Bus so there is no such way afaik. Patches with exit() are attached.
On Tue, Oct 02, 2012 at 11:44:31AM +0200, Pavel Březina wrote:
On 10/02/2012 11:18 AM, Jakub Hrozek wrote:
On Tue, Oct 02, 2012 at 11:05:19AM +0200, Pavel Březina wrote:
I wonder if the exit() is necessary? Would it be enough to just return the error code and perhaps also from client_registration() ?
When the pidfile was created in server_setup(), the monitor exited with 2, so I followed this scenario. But you are right. SSSD is fully functional at this point so we shouldn't exit it just because we where unable to create pidfile.
Sorry, I think I confused you. I would prefer aborting becuse the initscripts have no way to signal the SSSD to shut down, but in general I think that using exit() from outside main() is not very nice. Is there a way to pass the error code all the way up to the main loop and terminate the SSSD there?
Ah, no, it is called via D-Bus so there is no such way afaik. Patches with exit() are attached.
What about sending a SIGTERM to itself with kill(getpid(), SIGTERM) ? I think it's used elsewhere in the code as well..
On 10/02/2012 11:56 AM, Jakub Hrozek wrote:
On Tue, Oct 02, 2012 at 11:44:31AM +0200, Pavel Březina wrote:
On 10/02/2012 11:18 AM, Jakub Hrozek wrote:
On Tue, Oct 02, 2012 at 11:05:19AM +0200, Pavel Březina wrote:
I wonder if the exit() is necessary? Would it be enough to just return the error code and perhaps also from client_registration() ?
When the pidfile was created in server_setup(), the monitor exited with 2, so I followed this scenario. But you are right. SSSD is fully functional at this point so we shouldn't exit it just because we where unable to create pidfile.
Sorry, I think I confused you. I would prefer aborting becuse the initscripts have no way to signal the SSSD to shut down, but in general I think that using exit() from outside main() is not very nice. Is there a way to pass the error code all the way up to the main loop and terminate the SSSD there?
Ah, no, it is called via D-Bus so there is no such way afaik. Patches with exit() are attached.
What about sending a SIGTERM to itself with kill(getpid(), SIGTERM) ? I think it's used elsewhere in the code as well..
Sounds good to me. Patches are attached.
On Tue, Oct 02, 2012 at 12:00:03PM +0200, Pavel Březina wrote:
On 10/02/2012 11:56 AM, Jakub Hrozek wrote:
On Tue, Oct 02, 2012 at 11:44:31AM +0200, Pavel Březina wrote:
On 10/02/2012 11:18 AM, Jakub Hrozek wrote:
On Tue, Oct 02, 2012 at 11:05:19AM +0200, Pavel Březina wrote:
I wonder if the exit() is necessary? Would it be enough to just return the error code and perhaps also from client_registration() ?
When the pidfile was created in server_setup(), the monitor exited with 2, so I followed this scenario. But you are right. SSSD is fully functional at this point so we shouldn't exit it just because we where unable to create pidfile.
Sorry, I think I confused you. I would prefer aborting becuse the initscripts have no way to signal the SSSD to shut down, but in general I think that using exit() from outside main() is not very nice. Is there a way to pass the error code all the way up to the main loop and terminate the SSSD there?
Ah, no, it is called via D-Bus so there is no such way afaik. Patches with exit() are attached.
What about sending a SIGTERM to itself with kill(getpid(), SIGTERM) ? I think it's used elsewhere in the code as well..
Sounds good to me. Patches are attached.
Ack
On Tue, Oct 02, 2012 at 04:16:06PM +0200, Jakub Hrozek wrote:
On Tue, Oct 02, 2012 at 12:00:03PM +0200, Pavel Březina wrote:
On 10/02/2012 11:56 AM, Jakub Hrozek wrote:
On Tue, Oct 02, 2012 at 11:44:31AM +0200, Pavel Březina wrote:
On 10/02/2012 11:18 AM, Jakub Hrozek wrote:
On Tue, Oct 02, 2012 at 11:05:19AM +0200, Pavel Březina wrote:
>I wonder if the exit() is necessary? Would it be enough to just return >the error code and perhaps also from client_registration() ?
When the pidfile was created in server_setup(), the monitor exited with 2, so I followed this scenario. But you are right. SSSD is fully functional at this point so we shouldn't exit it just because we where unable to create pidfile.
Sorry, I think I confused you. I would prefer aborting becuse the initscripts have no way to signal the SSSD to shut down, but in general I think that using exit() from outside main() is not very nice. Is there a way to pass the error code all the way up to the main loop and terminate the SSSD there?
Ah, no, it is called via D-Bus so there is no such way afaik. Patches with exit() are attached.
What about sending a SIGTERM to itself with kill(getpid(), SIGTERM) ? I think it's used elsewhere in the code as well..
Sounds good to me. Patches are attached.
Ack
Pushed to master.
sssd-devel@lists.fedorahosted.org