|
From: | Aaron Scamehorn |
Subject: | Http/cervlet.c |
Date: | Wed, 29 Nov 2006 09:47:49 -0600 |
Hello,
First question: Is this the correct forum for reporting bugs? If not, please direct me to the proper forum. Thanks.
In http/cervlet.c:
handle_action() used to have the following check:
else if(IS(action, "stop")) {
if(s->stop) {
LOCK(s->mutex)
control_service(name, action);
END_LOCK;
} else {
send_error(res, SC_BAD_REQUEST,
"Stop method not defined for the service");
goto quit;
}
Now, monit just schedules a doaction, which gets blindly does the following:
if(Run.doaction) {
Run.doaction = 0;
for(s= servicelist; s; s= s->next) {
LOCK(s->mutex)
set_signal_block(&ns, &os);
if(s->doaction != ACTION_IGNORE) {
control_service(s->name, s->doaction);
s->doaction = ACTION_IGNORE;
}
unset_signal_block(&os);
END_LOCK;
}
}
This has introduced the following behavior:
Service setup as Device and/or System get terminated when a "Stop All" command is issued. Actually, any service that doesn't have a Stop Program directive will be stopped anyway.
Is this the desired behavior?
Perhaps when the new cervlet.c handle_action now does:
if((s->doaction = Util_getAction(action)) == ACTION_IGNORE) {
send_error(res, SC_BAD_REQUEST, "Invalid action");
return;
}
It should probably first check if
s->hasaction( action );
Thanks,
Aaron
[Prev in Thread] | Current Thread | [Next in Thread] |