'Starts the server.
Any kwargs passed to this method will override the configuration
value in the conf file used in starting the servers.'

def start(self, expect_exit=True, expected_exitcode=0, **kwargs):

    self.write_conf(**kwargs)
    self.create_database()
    cmd = ('%(server_module)s    --config-file    %(conf_file_name)s' % {'server_module': self.server_module, 'conf_file_name': self.conf_file_name})
    cmd = ('%s    -m    %s' % (sys.executable, cmd))
    if self.exec_env:
        exec_env = self.exec_env.copy()
    else:
        exec_env = {}
    pass_fds = set()
    if self.sock:
        if (not self.fork_socket):
            self.sock.close()
            self.sock = None
        else:
            fd = os.dup(self.sock.fileno())
            exec_env[utils.GLANCE_TEST_SOCKET_FD_STR] = str(fd)
            pass_fds.add(fd)
            self.sock.close()
    self.process_pid = test_utils.fork_exec(cmd, logfile=os.devnull, exec_env=exec_env, pass_fds=pass_fds)
    self.stop_kill = (not expect_exit)
    if self.pid_file:
        pf = open(self.pid_file, 'w')
        pf.write(('%d\n' % self.process_pid))
        pf.close()
    if (not expect_exit):
        rc = 0
        try:
            os.kill(self.process_pid, 0)
        except OSError:
            raise RuntimeError('The    process    did    not    start')
    else:
        rc = test_utils.wait_for_fork(self.process_pid, expected_exitcode=expected_exitcode)
    if self.sock:
        os.close(fd)
        self.sock = None
    return (rc, '', '')
