diff options
author | unknown <anozdrin/alik@alik.> | 2006-10-20 22:26:40 +0400 |
---|---|---|
committer | unknown <anozdrin/alik@alik.> | 2006-10-20 22:26:40 +0400 |
commit | 8db4dc3f91dfbe03181e63ed45bdf35a5d65aeb0 (patch) | |
tree | a885956d2db57e78caa404748c123adca76d0642 /server-tools/instance-manager/instance.cc | |
parent | a6273e6d40c1ce2eda4c9d7f96ac12f86af89897 (diff) | |
download | mariadb-git-8db4dc3f91dfbe03181e63ed45bdf35a5d65aeb0.tar.gz |
Instance Manager polishing.
server-tools/instance-manager/guardian.cc:
1. Removed unused stop_instances_arg from request_shutdown() and
stop_instances() methods.
2. Changed log-output statements so that instance name is passed
correctly (char *, not LEX_STRING)
server-tools/instance-manager/guardian.h:
Removed unused stop_instances_arg from request_shutdown() and
stop_instances() methods.
server-tools/instance-manager/instance.cc:
Removed unused stop_instances_arg from request_shutdown() and
stop_instances() methods.
server-tools/instance-manager/listener.cc:
Be more verbose in log.
server-tools/instance-manager/manager.cc:
Removed unused stop_instances argument.
Diffstat (limited to 'server-tools/instance-manager/instance.cc')
-rw-r--r-- | server-tools/instance-manager/instance.cc | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/server-tools/instance-manager/instance.cc b/server-tools/instance-manager/instance.cc index b792d132da0..daa8082ef2f 100644 --- a/server-tools/instance-manager/instance.cc +++ b/server-tools/instance-manager/instance.cc @@ -156,8 +156,8 @@ static int start_process(Instance_options *instance_options, /* exec never returns */ exit(1); case -1: - log_info("cannot create a new process to start instance %s", - instance_options->instance_name); + log_info("cannot create a new process to start instance '%s'.", + (const char *) instance_options->instance_name); return 1; } return 0; @@ -252,7 +252,8 @@ static void start_and_monitor_instance(Instance_options *old_instance_options, MAX_INSTANCE_NAME_LEN - 1); instance_name_len= old_instance_options->instance_name_len; - log_info("starting instance %s", instance_name_buff); + log_info("starting instance '%s'...", + (const char *) instance_name_buff); if (start_process(old_instance_options, &process_info)) { @@ -286,9 +287,9 @@ void Instance::remove_pid() int pid; if ((pid= options.get_pid()) != 0) /* check the pidfile */ if (options.unlink_pidfile()) /* remove stalled pidfile */ - log_error("cannot remove pidfile for instance %i, this might be \ + log_error("cannot remove pidfile for instance '%s', this might be \ since IM lacks permmissions or hasn't found the pidifle", - options.instance_name); + (const char *) options.instance_name); } @@ -435,9 +436,9 @@ bool Instance::is_running() We have successfully connected to the server using fake username/password. Write a warning to the logfile. */ - log_info("The Instance Manager was able to log into you server \ - with faked compiled-in password while checking server status. \ - Looks like something is wrong."); + log_info("The Instance Manager was able to log into you server " + "with faked compiled-in password while checking server status. " + "Looks like something is wrong."); pthread_mutex_unlock(&LOCK_instance); return_val= TRUE; /* server is alive */ } @@ -577,10 +578,10 @@ void Instance::kill_instance(int signum) /* Kill suceeded */ if (signum == SIGKILL) /* really killed instance with SIGKILL */ { - log_error("The instance %s is being stopped forcibly. Normally" \ - "it should not happen. Probably the instance has been" \ + log_error("The instance '%s' is being stopped forcibly. Normally" + "it should not happen. Probably the instance has been" "hanging. You should also check your IM setup", - options.instance_name); + (const char *) options.instance_name); /* After sucessful hard kill the pidfile need to be removed */ options.unlink_pidfile(); } |