Commit Graph

39 Commits

Author SHA1 Message Date
Colin Patrick McCabe
7fe7a8165a common_init: Split common_init into multiple parts
Split common_init into several different parts which can be called
individually from libraries. Eliminate startup_flags.

Create ceph_argparse_pull and ceph_argparse_next.

Split off keyring_init from common_init.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-03-10 05:20:16 -08:00
Colin Patrick McCabe
e11bf6fe0b Replace g_conf.name and g_conf.id with entityname
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-03-08 08:38:57 -08:00
Colin Patrick McCabe
0f90d1564e Fold common_set_defaults into common_init
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-23 10:17:30 -08:00
Colin Patrick McCabe
431a5bf7c3 Rename config.h -> common/config.h
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-23 10:17:30 -08:00
Colin Patrick McCabe
2a59b2132f common: Split argument parsing into ceph_argparse
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-20 10:17:11 -08:00
Colin Patrick McCabe
2315759e1e common: combine set_fg_logging into common_init
Combine set_fg_logging into common_init. This eliminates the problem
where we briefly try to apply the logging settings from the config file
even in a program that needs to set foreground logging.

TestTimers, TestSignalHandlers, TestDoutStreambuf: don't initialize ceph
authentication. These applications don't need it.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-08 05:11:08 -08:00
Sage Weil
0797b538ba clock: remove tare function
This was used way back when to set a clock's relative "zero" time to
simplify stat collection when running performance benchmarks.  It has no
use in a real system.  If we need relative time for something, we can
subtract off the zero time in the output.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-02-05 13:50:02 -08:00
Colin Patrick McCabe
2faf6a09bf csyn: implement localize_reads cmdline option
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-02-02 03:56:45 -08:00
Colin Patrick McCabe
8adaa0478a common: make command-line programs log to stderr
command-line programs (as opposed to daemons) should send their logs to
stderr rather than to a log file, syslog, etc. This is especially
important because most users want to run the ceph command-line programs
as non-root, and often only root has permissions to add to the ceph
log directory.

Create a new function, set_foreground_logging, that overrides ceph.conf
settings to force all log output to stderr. For daemons, we still only
send the very highest priority messages to stderr, and only before they
daemonize().

Don't ever log to stdout because it interferes with scripts that parse
the output of stdout. Instead, log to stderr if the user gives the
--foreground or --nodaemon argument.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2011-01-05 15:53:36 -08:00
Sage Weil
2c7cd49bd9 common: break init into set_defaults and init steps
This will let us tweak the default daemon/non-daemon settings as needed,
e.g. in the case of cfuse.
2010-07-01 09:25:43 -07:00
Sage Weil
378ce41022 csyn: print something on mount failure 2010-02-11 10:03:25 -08:00
Greg Farnum
d2ddb9d6c8 csyn: properly use multiple clients 2010-01-08 13:42:46 -08:00
Greg Farnum
6c63428980 msgr: rank is just a bad name for local SimpleMessengers now 2010-01-07 16:53:51 -08:00
Greg Farnum
5f54543f29 msgr: Remove erroneous rank->destroy calls I inserted in 9a96bf 2010-01-07 12:05:38 -08:00
Greg Farnum
6737529631 msgr: Make usage compatible with last commit 2010-01-06 17:18:49 -08:00
Greg Farnum
9a96bf6a85 msgr: All SimpleMessenger uses are now on the heap for appropriate destruction 2010-01-06 17:18:48 -08:00
Sage Weil
805b6cbed0 Merge branch 'unstable' into auth
Conflicts:
	src/Makefile.am
	src/ceph.cc
	src/include/ceph_fs.h
	src/kernel/super.c
	src/kernel/super.h
	src/librados.cc
	src/mon/MonClient.cc
	src/mon/MonClient.h
	src/mon/Monitor.cc
	src/mon/Monitor.h
	src/mon/mon_types.h
	src/msg/Dispatcher.h
	src/msg/Message.h
	src/msg/SimpleMessenger.cc
	src/msg/SimpleMessenger.h
	src/osd/OSD.h
2009-10-21 16:13:48 -07:00
Sage Weil
329f5c6490 msgr: simplify policy
We may be a server, and we may be lossy.  This gives us a few policies:

!server, !lossy = lossless_peer(), for bidirectional intracluster fun.
server, !lossy = lossless_server(), e.g. mds <-> client.
server, lossy = lossy_server(), e.g. mon and osd

also, the default is
!server, !lossy = client(), but that doesn't mean much.  The server
decides if the connection is lossy or not.  And !server just means we can
initiate the outgoing connection.
2009-10-13 10:27:06 -07:00
Sage Weil
416cd968b9 osd: use fast_fail() policy to connect to osd 2009-10-08 10:34:09 -07:00
Sage Weil
71d5bcfd96 msgr: do not require bind() on client apps 2009-10-08 10:02:22 -07:00
Yehuda Sadeh
0bdf90da2b auth: common_init should not always init keys 2009-09-25 16:19:38 -07:00
Sage Weil
72ccd2037a monc: hunt for new monitor on failure; cleanup interface 2009-09-04 11:08:03 -07:00
Sage Weil
a0cc21dc66 monc: resubscribe on monitor connection reset 2009-08-31 14:38:22 -07:00
Sage Weil
653ec485ef monclient: refactor MonMap into MonClient 2009-06-26 15:10:27 -07:00
Sage Weil
fda9dbb26e monc: add mount/umount to mon client 2009-05-07 15:32:25 -07:00
Sage Weil
be072bef3e msgr: kill static instance 'rank' of SimpleMessenger 2009-05-01 07:12:18 -07:00
Sage Weil
41766cd0b4 config: clean up common_init a bit 2009-03-20 14:19:28 -07:00
Yehuda Sadeh
29b65edc50 conf: restructure of the conf mechanism 2009-03-11 14:41:44 -07:00
Yehuda Sadeh
c511d68dea added a common initialization function 2009-02-09 15:46:02 -08:00
Sage Weil
8bf6c7a1fe csyn: fix msgr startup 2008-11-13 14:36:48 -08:00
Sage Weil
c4d2160635 msgr: track lossy mode independently for self, peer
The policy will be asymmetrical for the OSDs, so we need to
track it independently.

The various assertions aren't all worked out yet.  Notably,
connection races aren't quite right.  But the basic bits
are there.
2008-10-13 12:02:27 -07:00
Sage Weil
1e98f3e585 mds: versioned dentry, dir items, inode_map 2008-07-08 16:44:43 -07:00
Sage Weil
746a1d5d3f msgr policies; osds now batch and retry failure reports 2008-04-08 16:26:32 -07:00
Sage Weil
23b9d559d9 monclient: simplify interface, used by csyn cmds cosd 2008-03-09 22:32:38 -07:00
Sage Weil
f675756c0c csyn: use MonClient to accept monitor name on command line in place of .ceph_monmap 2008-03-07 16:26:51 -08:00
Sage Weil
a8d7999b8d -d to daemonize, other startup cleanup 2008-01-26 09:33:13 -08:00
Sage Weil
6ece3bbc58 simplemessenger policies 2008-01-07 12:59:25 -08:00
Sage Weil
f1d2f0d6d1 cleaned up char* vs const char* 2008-01-01 14:04:31 -08:00
Sage Weil
c1865445c5 reorganized source tree 2007-12-19 13:28:33 -08:00