Forum Discussion
Ionut_Turturic1
Mar 05, 2010Historic F5 Account
System.Services.set_service not working with HTTPD
Any idea why the System.Services.set_service has absolutely no effect with SERVICE_HTTPD ? No exception is thrown, no error messages in logs.
It does work for mostly all other services!
...
Mar 05, 2010
I'm looking through the sources and it seems that any request for START, STOP, REINIT, AND RESTART for SERVICE_HTTPD is silently ignored. This should probably thrown an exception to let you know that it didn't work. I can understand the reasoning for disabling it though as a restart or reinit will break the current iControl request and the call will return a transport error.
In case you are interested, here's the code block with the developers comment
for (unsigned int i = 0; i < services.size(); i++)
{
// we will silently ignore request to start/stop/reinit/restart httpd
// since that would be BAD !
if (services[ i ] == System::Services::SERVICE_HTTPD &&
(action == System::Services::SERVICE_ACTION_START ||
action == System::Services::SERVICE_ACTION_STOP ||
action == System::Services::SERVICE_ACTION_REINIT ||
action == System::Services::SERVICE_ACTION_RESTART))
{
continue;
}
...
}
I guess the "since that would be BAD !" is the fact that it will break the current iControl request B-).
-Joe
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects