Commit 266bfcd6 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2617] added "exiting" log message to those that don't have it until now.

parent 666395ba
......@@ -312,6 +312,9 @@ been created and is initializing. The AUTH_SERVER_STARTED message will be
output when initialization has successfully completed and the server starts
accepting queries.
% AUTH_SERVER_EXITING exiting
The authoritative server is exiting.
% AUTH_SERVER_FAILED server failed: %1
The authoritative server has encountered a fatal error and is terminating. The
reason for the failure is included in the message.
......
......@@ -44,6 +44,7 @@
#include <server_common/socket_request.h>
#include <boost/bind.hpp>
#include <boost/scoped_ptr.hpp>
#include <sys/types.h>
#include <sys/socket.h>
......@@ -152,10 +153,11 @@ main(int argc, char* argv[]) {
int ret = 0;
// XXX: we should eventually pass io_service here.
Session* cc_session = NULL;
Session* xfrin_session = NULL;
boost::scoped_ptr<AuthSrv> auth_server_; // placeholder
boost::scoped_ptr<Session> cc_session;
boost::scoped_ptr<Session> xfrin_session;
bool xfrin_session_established = false; // XXX (see Trac #287)
ModuleCCSession* config_session = NULL;
boost::scoped_ptr<ModuleCCSession> config_session;
XfroutClient xfrout_client(getXfroutSocketPath());
SocketSessionForwarder ddns_forwarder(getDDNSSocketPath());
try {
......@@ -167,7 +169,8 @@ main(int argc, char* argv[]) {
specfile = string(AUTH_SPECFILE_LOCATION);
}
auth_server = new AuthSrv(xfrout_client, ddns_forwarder);
auth_server_.reset(new AuthSrv(xfrout_client, ddns_forwarder));
auth_server = auth_server_.get();
LOG_INFO(auth_logger, AUTH_SERVER_CREATED);
SimpleCallback* checkin = auth_server->getCheckinProvider();
......@@ -179,7 +182,7 @@ main(int argc, char* argv[]) {
auth_server->setDNSService(dns_service);
LOG_DEBUG(auth_logger, DBG_AUTH_START, AUTH_DNS_SERVICES_CREATED);
cc_session = new Session(io_service.get_io_service());
cc_session.reset(new Session(io_service.get_io_service()));
LOG_DEBUG(auth_logger, DBG_AUTH_START, AUTH_CONFIG_CHANNEL_CREATED);
// Initialize the Socket Requestor
isc::server_common::initSocketRequestor(*cc_session, AUTH_NAME);
......@@ -191,18 +194,18 @@ main(int argc, char* argv[]) {
// updateConfig() for listen_on and in initializing TSIG keys below).
// Until then all operations on the CC session will take place
// synchronously.
config_session = new ModuleCCSession(specfile, *cc_session,
my_config_handler,
my_command_handler, false);
config_session.reset(new ModuleCCSession(specfile, *cc_session,
my_config_handler,
my_command_handler, false));
LOG_DEBUG(auth_logger, DBG_AUTH_START, AUTH_CONFIG_CHANNEL_ESTABLISHED);
xfrin_session = new Session(io_service.get_io_service());
xfrin_session.reset(new Session(io_service.get_io_service()));
LOG_DEBUG(auth_logger, DBG_AUTH_START, AUTH_XFRIN_CHANNEL_CREATED);
xfrin_session->establish(NULL);
xfrin_session_established = true;
LOG_DEBUG(auth_logger, DBG_AUTH_START, AUTH_XFRIN_CHANNEL_ESTABLISHED);
auth_server->setXfrinSession(xfrin_session);
auth_server->setXfrinSession(xfrin_session.get());
// Configure the server. configureAuthServer() is expected to install
// all initial configurations, but as a short term workaround we
......@@ -210,7 +213,7 @@ main(int argc, char* argv[]) {
// updateConfig().
// if server load configure failed, we won't exit, give user second
// chance to correct the configure.
auth_server->setConfigSession(config_session);
auth_server->setConfigSession(config_session.get());
try {
configureAuthServer(*auth_server, config_session->getFullConfig());
auth_server->updateConfig(ElementPtr());
......@@ -228,7 +231,7 @@ main(int argc, char* argv[]) {
config_session->addRemoteConfig("data_sources",
boost::bind(datasrcConfigHandler,
auth_server, &first_time,
config_session,
config_session.get(),
_1, _2, _3),
false);
......@@ -260,10 +263,7 @@ main(int argc, char* argv[]) {
config_session->removeRemoteConfig("data_sources");
}
delete xfrin_session;
delete config_session;
delete cc_session;
delete auth_server;
LOG_INFO(auth_logger, AUTH_SERVER_EXITING);
return (ret);
}
......@@ -650,4 +650,6 @@ if __name__ == '__main__':
if httpd:
httpd.shutdown()
logger.info(CMDCTL_EXITING)
sys.exit(result)
......@@ -43,6 +43,9 @@ specific error is printed in the message.
This debug message indicates that the given command has been sent to
the given module.
% CMDCTL_EXITING exiting
The b10-cmdctl daemon is exiting.
% CMDCTL_NO_SUCH_USER username not found in user database: %1
A login attempt was made to b10-cmdctl, but the username was not known.
Users can be added with the tool b10-cmdctl-usermgr.
......
......@@ -815,3 +815,5 @@ if __name__ == "__main__":
pass
msgq.shutdown()
logger.info(MSGQ_EXITING)
......@@ -59,6 +59,9 @@ the message queue version and version of the module.
% MSGQ_CONFIG_DATA Received configuration update for the msgq: %1
Debug message. The message queue received a configuration update, handling it.
% MSGQ_EXITING exiting
The msgq daemon is exiting.
% MSGQ_HDR_DECODE_ERR Error decoding header received from socket %1: %2
The socket with mentioned file descriptor sent a packet. However, it was not
possible to decode the routing header of the packet. The packet is ignored.
......
......@@ -696,3 +696,5 @@ if __name__ == "__main__":
sys.exit(1)
except KeyboardInterrupt as kie:
logger.info(STATS_STOPPED_BY_KEYBOARD)
logger.info(STATS_EXITING)
......@@ -631,3 +631,5 @@ if __name__ == "__main__":
sys.exit(1)
except KeyboardInterrupt as kie:
logger.info(STATSHTTPD_STOPPED_BY_KEYBOARD)
logger.info(STATSHTTPD_EXITING)
......@@ -32,10 +32,19 @@ address and port number.
Debug message indicating that the stats-httpd module is disconnecting
from the command and control bus.
% STATSHTTPD_EXITING exiting
The stats HTTP server is exiting.
% STATSHTTPD_HANDLE_CONFIG reading configuration: %1
The stats-httpd daemon has received new configuration data and will now
process it. The (changed) data is printed.
% STATSHTTPD_HTTPLOG %1 %2
Debug HTTP log message. These are the messages logged by the http server
instance. For most logs, the message shows HTTP client and query
information like HTTP method, URI, and status code, but the http server
can also log other information, such as extended status reports.
% STATSHTTPD_RECEIVED_SHUTDOWN_COMMAND shutdown command received
A shutdown command was sent to the stats-httpd module, and it will
now shut down.
......@@ -96,9 +105,3 @@ configuration is unknown. The new configuration is ignored, and an
error is sent back. As possible cause is that there was an upgrade
problem, and the stats-httpd version is out of sync with the rest of
the system.
% STATSHTTPD_HTTPLOG %1 %2
Debug HTTP log message. These are the messages logged by the http server
instance. For most logs, the message shows HTTP client and query
information like HTTP method, URI, and status code, but the http server
can also log other information, such as extended status reports.
......@@ -24,6 +24,9 @@ The stats module was unable to connect to the BIND 10 command and
control bus. A likely problem is that the message bus daemon
(b10-msgq) is not running. The stats module will now shut down.
% STATS_EXITING exiting
The stats module process is exiting.
% STATS_RECEIVED_INVALID_STATISTICS_DATA received invalid statistics data from %1
Invalid statistics data has been received from the module while
polling and it has been discarded.
......
......@@ -1738,5 +1738,7 @@ def main(xfrin_class, use_signal=True):
if xfrind:
xfrind.shutdown()
logger.info(XFRIN_EXITING)
if __name__ == '__main__':
main(Xfrin)
......@@ -60,6 +60,9 @@ error is given in the log message.
There was an error opening a connection to the master. The error is
shown in the log message.
% XFRIN_EXITING exiting
The xfrin daemon is exiting.
% XFRIN_GOT_INCREMENTAL_RESP got incremental response for %1
In an attempt of IXFR processing, the beginning SOA of the first difference
(following the initial SOA that specified the final SOA for all the
......
......@@ -1274,7 +1274,7 @@ if '__main__' == __name__:
xfrout_server = XfroutServer()
xfrout_server.run()
except KeyboardInterrupt:
logger.INFO(XFROUT_STOPPED_BY_KEYBOARD)
logger.info(XFROUT_STOPPED_BY_KEYBOARD)
except SessionError as e:
logger.error(XFROUT_CC_SESSION_ERROR, str(e))
except ModuleCCSessionError as e:
......@@ -1287,3 +1287,4 @@ if '__main__' == __name__:
if xfrout_server:
xfrout_server.shutdown()
logger.info(XFROUT_EXITING)
......@@ -32,6 +32,9 @@ configuration manager b10-cfgmgr is not running.
The xfrout process encountered an error when installing the configuration at
startup time. Details of the error are included in the log message.
% XFROUT_EXITING exiting
The xfrout daemon is exiting.
% XFROUT_FETCH_REQUEST_ERROR socket error while fetching a request from the auth daemon
There was a socket error while contacting the b10-auth daemon to
fetch a transfer request. The auth daemon may have shutdown.
......
......@@ -714,4 +714,4 @@ if '__main__' == __name__:
if zonemgrd and zonemgrd.running:
zonemgrd.shutdown()
logger.debug(DBG_START_SHUT, ZONEMGR_SHUTDOWN)
logger.info(ZONEMGR_SHUTDOWN)
......@@ -114,7 +114,7 @@ connecting to the command channel daemon. The most usual cause of this
problem is that the daemon is not running.
% ZONEMGR_SHUTDOWN zone manager has shut down
A debug message, output when the zone manager has shut down completely.
The zone manager has shut down completely.
% ZONEMGR_STARTED zonemgr started
This informational message is output by zonemgr when all initialization
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment