Skip to content

Commit

Permalink
Merge remote-tracking branch 'gh/next'
Browse files Browse the repository at this point in the history
Conflicts:
	PendingReleaseNotes
  • Loading branch information
Sage Weil committed Jul 23, 2013
2 parents 2dbb273 + 9626f77 commit 2c5b68c
Show file tree
Hide file tree
Showing 33 changed files with 344 additions and 96 deletions.
9 changes: 8 additions & 1 deletion PendingReleaseNotes
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,11 @@ v0.67
* The radosgw caps were inconsistently documented to be either 'mon =
allow r' or 'mon = allow rw'. The 'mon = allow rw' is required for
radosgw to create its own pools. All documentation has been updated
accordingly.
accordingly.

* rgw copy object operation may return extra progress info during the
operation. At this point it will only happen when doing cross zone
copy operations. The S3 response will now return extra <Progress>
field under the <CopyResult> container. The Swift response will
now send the progress as a json array.

7 changes: 7 additions & 0 deletions src/ceph.in
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ def parse_cmdargs(args=None, target=''):

parser.add_argument('--admin-daemon', dest='admin_socket',
help='submit admin-socket commands (\"help\" for help')
parser.add_argument('--admin-socket', dest='admin_socket_nope',
help='you probably mean --admin-daemon')

parser.add_argument('-s', '--status', action='store_true',
help='show cluster status')
Expand Down Expand Up @@ -489,6 +491,11 @@ def main():
global verbose
verbose = parsed_args.verbose

if parsed_args.admin_socket_nope:
print >> sys.stderr, '--admin-socket is used by daemons; '\
'you probably mean --admin-daemon/daemon'
return 1

# pass on --id, --name, --conf
name = 'client.admin'
if parsed_args.client_id:
Expand Down
27 changes: 16 additions & 11 deletions src/ceph_mds.cc
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,6 @@ int main(int argc, const char **argv)

messenger->start();

// set up signal handlers, now that we've daemonized/forked.
init_async_signal_handler();
register_async_signal_handler(SIGHUP, sighup_handler);
register_async_signal_handler_oneshot(SIGINT, handle_mds_signal);
register_async_signal_handler_oneshot(SIGTERM, handle_mds_signal);

// start mds
mds = new MDS(g_conf->name.get_id().c_str(), messenger, &mc);

Expand All @@ -291,16 +285,26 @@ int main(int argc, const char **argv)
r = mds->init(shadow);
else
r = mds->init();
if (r < 0)
goto shutdown;

if (r >= 0) {
messenger->wait();
}
// set up signal handlers, now that we've daemonized/forked.
init_async_signal_handler();
register_async_signal_handler(SIGHUP, sighup_handler);
register_async_signal_handler_oneshot(SIGINT, handle_mds_signal);
register_async_signal_handler_oneshot(SIGTERM, handle_mds_signal);

if (g_conf->inject_early_sigterm)
kill(getpid(), SIGTERM);

messenger->wait();

unregister_async_signal_handler(SIGHUP, sighup_handler);
unregister_async_signal_handler(SIGINT, handle_mds_signal);
unregister_async_signal_handler(SIGTERM, handle_mds_signal);
shutdown_async_signal_handler();

shutdown:
// yuck: grab the mds lock, so we can be sure that whoever in *mds
// called shutdown finishes what they were doing.
mds->mds_lock.Lock();
Expand All @@ -313,14 +317,15 @@ int main(int argc, const char **argv)
if (mds->is_stopped())
delete mds;

g_ceph_context->put();

// cd on exit, so that gmon.out (if any) goes into a separate directory for each node.
char s[20];
snprintf(s, sizeof(s), "gmon/%d", getpid());
if ((mkdir(s, 0755) == 0) && (chdir(s) == 0)) {
dout(0) << "ceph-mds: gmon.out should be in " << s << dendl;
cerr << "ceph-mds: gmon.out should be in " << s << std::endl;
}

generic_dout(0) << "stopped." << dendl;
return 0;
}

9 changes: 6 additions & 3 deletions src/ceph_mon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -542,15 +542,18 @@ int main(int argc, const char **argv)
if (g_conf->daemonize)
prefork.daemonize();

messenger->start();

mon->init();

// set up signal handlers, now that we've daemonized/forked.
init_async_signal_handler();
register_async_signal_handler(SIGHUP, sighup_handler);
register_async_signal_handler_oneshot(SIGINT, handle_mon_signal);
register_async_signal_handler_oneshot(SIGTERM, handle_mon_signal);

messenger->start();

mon->init();
if (g_conf->inject_early_sigterm)
kill(getpid(), SIGTERM);

messenger->wait();

Expand Down
15 changes: 9 additions & 6 deletions src/ceph_osd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -451,12 +451,6 @@ int main(int argc, const char **argv)
messenger_hb_back_server->start();
cluster_messenger->start();

// install signal handlers
init_async_signal_handler();
register_async_signal_handler(SIGHUP, sighup_handler);
register_async_signal_handler_oneshot(SIGINT, handle_osd_signal);
register_async_signal_handler_oneshot(SIGTERM, handle_osd_signal);

// start osd
err = osd->init();
if (err < 0) {
Expand All @@ -465,6 +459,15 @@ int main(int argc, const char **argv)
return 1;
}

// install signal handlers
init_async_signal_handler();
register_async_signal_handler(SIGHUP, sighup_handler);
register_async_signal_handler_oneshot(SIGINT, handle_osd_signal);
register_async_signal_handler_oneshot(SIGTERM, handle_osd_signal);

if (g_conf->inject_early_sigterm)
kill(getpid(), SIGTERM);

client_messenger->wait();
messenger_hbclient->wait();
messenger_hb_front_server->wait();
Expand Down
5 changes: 5 additions & 0 deletions src/common/config_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ OPTION(ms_inject_delay_max, OPT_DOUBLE, 1) // seconds
OPTION(ms_inject_delay_probability, OPT_DOUBLE, 0) // range [0, 1]
OPTION(ms_inject_internal_delays, OPT_DOUBLE, 0) // seconds

OPTION(inject_early_sigterm, OPT_BOOL, false)

OPTION(mon_data, OPT_STR, "/var/lib/ceph/mon/$cluster-$id")
OPTION(mon_initial_members, OPT_STR, "") // list of initial cluster mon ids; if specified, need majority to form initial quorum and create new cluster
OPTION(mon_sync_fs_threshold, OPT_INT, 5) // sync() when writing this many objects; 0 to disable.
Expand Down Expand Up @@ -207,6 +209,7 @@ OPTION(paxos_trim_min, OPT_INT, 250) // number of extra proposals tolerated bef
OPTION(paxos_trim_max, OPT_INT, 500) // max number of extra proposals to trim at a time
OPTION(paxos_service_trim_min, OPT_INT, 250) // minimum amount of versions to trigger a trim (0 disables it)
OPTION(paxos_service_trim_max, OPT_INT, 500) // maximum amount of versions to trim during a single proposal (0 disables it)
OPTION(paxos_kill_at, OPT_INT, 0)
OPTION(clock_offset, OPT_DOUBLE, 0) // how much to offset the system clock in Clock.cc
OPTION(auth_cluster_required, OPT_STR, "cephx") // required of mon, mds, osd daemons
OPTION(auth_service_required, OPT_STR, "cephx") // required by daemons of clients
Expand Down Expand Up @@ -675,6 +678,8 @@ OPTION(rgw_md_log_max_shards, OPT_INT, 64) // max shards for metadata log
OPTION(rgw_num_zone_opstate_shards, OPT_INT, 128) // max shards for keeping inter-region copy progress info
OPTION(rgw_opstate_ratelimit_sec, OPT_INT, 30) // min time between opstate updates on a single upload (0 for disabling ratelimit)
OPTION(rgw_curl_wait_timeout_ms, OPT_INT, 1000) // timeout for certain curl calls
OPTION(rgw_copy_obj_progress, OPT_BOOL, true) // should dump progress during long copy operations?
OPTION(rgw_copy_obj_progress_every_bytes, OPT_INT, 1024 * 1024) // min bytes between copy progress output

OPTION(rgw_data_log_window, OPT_INT, 30) // data log entries window (in seconds)
OPTION(rgw_data_log_changes_size, OPT_INT, 1000) // number of in-memory entries to hold for data changes log
Expand Down
7 changes: 3 additions & 4 deletions src/mds/MDS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1628,19 +1628,18 @@ void MDS::suicide()
}
timer.cancel_all_events();
//timer.join();
timer.shutdown();

// shut down cache
mdcache->shutdown();

if (objecter->initialized)
objecter->shutdown_locked();

// shut down messenger
messenger->shutdown();

monc->shutdown();

timer.shutdown();
// shut down messenger
messenger->shutdown();
}

void MDS::respawn()
Expand Down
4 changes: 2 additions & 2 deletions src/mon/Monitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -605,13 +605,13 @@ void Monitor::shutdown()
finish_contexts(g_ceph_context, waitfor_quorum, -ECANCELED);
finish_contexts(g_ceph_context, maybe_wait_for_quorum, -ECANCELED);


timer.shutdown();

remove_all_sessions();

// unlock before msgr shutdown...
lock.Unlock();

remove_all_sessions();
messenger->shutdown(); // last thing! ceph_mon.cc will delete mon.
}

Expand Down
Loading

0 comments on commit 2c5b68c

Please sign in to comment.