Commit Graph

12269 Commits

Author SHA1 Message Date
Colin Patrick McCabe
4644247ce4 osd: FileJournal: use derr
Use derr to announce errors in FileJournal.

Handle EINTR where necessary (still haven't fixed
read/write/pread/pwrite uses).

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-16 10:32:47 -08:00
Colin Patrick McCabe
4fc1af5e60 logging: re-introduce derr
Re-introduce derr as a special log level (level -1) which will show up
in all logs, and on stderr. These messages are the only messages which
will show up on stderr.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-16 10:32:45 -08:00
Yehuda Sadeh
c321620e3b osd: send notify message only to unexpired watchers 2010-12-15 16:33:42 -08:00
Yehuda Sadeh
1e490eff77 osd: timed out watcher is added to unconnected map 2010-12-15 16:33:42 -08:00
Colin Patrick McCabe
619b45ad0b logging: close file when reloading global config
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-15 16:26:49 -08:00
Yehuda Sadeh
060fd42810 osd: fix watch timer, locking 2010-12-15 15:23:08 -08:00
Colin Patrick McCabe
e31f0a4783 tools: don't start msgr thread before daemonize
Calling messenger->add_dispatcher_head() has the side-effect of starting
the messenger thread. So we must not do it before calling
messenger->start(), which sometimes calls daemonize.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-15 12:44:01 -08:00
Sage Weil
d54a854811 Merge branch 'objecter' into unstable 2010-12-15 11:02:19 -08:00
Sage Weil
530083cc32 objecter: check for pg mapping changes in each incremental; refactor misc resubmission code
We need to detect when a pg mapping changes but the primary stays the same.
That means we can't just look at the final osdmap and see what is says; we
have to look at each intervening map and check each request to see if
something switched and the osd has thrown our request out.

Also refactor and clean up the linger vs normal op stuff some more.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-15 11:02:09 -08:00
Sage Weil
32a8aed92a objecter: add reopen_session helper
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-15 11:02:09 -08:00
Sage Weil
f6dc5d9f92 objecter: cleanup: rename op maps
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-15 11:02:09 -08:00
Sage Weil
065cdf523e objecter: track pending requests by osd, not pg
This is a big cleanup.  Also
 - switch to keeping per-osd Connection *'s
 - make requests time out independently (not very efficiently yet)

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-15 11:02:09 -08:00
Sage Weil
07e593c4f3 mds: fix inode ancestor attr encoding
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-15 11:01:50 -08:00
Sage Weil
5d44d5993a msgr: mark down by Connection*
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-15 11:01:50 -08:00
Colin Patrick McCabe
fdbd85e4d2 automake: ignore rmdir errors during uninstall
We don't want to fail "make distcheck" for a silly reason.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-15 10:15:49 -08:00
Yehuda Sadeh
7b5e923cd0 osd: send pending notification for reconnected watcher 2010-12-14 17:00:49 -08:00
Colin Patrick McCabe
f9694648fc automake: add osd/Watch.h to noinst_HEADERS
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-14 16:28:39 -08:00
Colin Patrick McCabe
3e076c397a logging: use Mutex::Locker
Use Mutex::Locker to make logging exception-safe. That is, if you are
doing "dout() << foo() << dendl;" and foo throws an exception, the dout
mutex will not be left in a locked state.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-14 06:56:27 -08:00
Colin Patrick McCabe
bf31f3f129 logger: Fix DoutStreambuf::create_rank_symlink
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-14 06:20:23 -08:00
Colin Patrick McCabe
4c37719988 cephtool: rename tools files
Rename tools files to be more consistent. For example, the main()
function for ./ceph should be in ceph.cc.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-14 06:13:50 -08:00
Sage Weil
c8d9b20cc5 Merge branch 'sync2' into unstable 2010-12-14 12:47:40 -08:00
Sage Weil
056e91e0ce librados: drop watch_lock
Use the existing lock to do protect all of this.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-14 11:02:12 -08:00
Sage Weil
d4420a8a57 objecter: drop linger_info_mutex
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-14 11:00:19 -08:00
Sage Weil
215f3320fe objecter: simplify linger register
Drop single-use helper; make unregister_linger part of the public
interface.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-14 10:48:57 -08:00
Sage Weil
b60a9abf56 objecter: fix up linger ack/commit to trigger first time only
We only want the user-provided ack/commit callbacks to trigger the first
time we register the lingering op.  Same goes for the eversion_t *objver.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-14 10:47:19 -08:00
Sage Weil
8a75086d5e objecter: clean up linger interface
Put LingerOp on heap.  Use xlist to attach to PGs.  Add in/out bufferlists.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-14 10:35:40 -08:00
Sage Weil
96b32382d0 Merge remote branch 'origin/unstable' into sync2
Conflicts:
	src/auth/Crypto.cc
	src/osd/ReplicatedPG.cc
	src/osd/ReplicatedPG.h
	src/osd/osd_types.h
2010-12-14 09:55:21 -08:00
Vangelis Koukis
a3fcf90898 logging: Fix use-before-access in debug.cc
Signed-off-by: Vangelis Koukis <vkoukis@cslab.ece.ntua.gr>
Signed-off-by: Constantinos Venetsanopoulos <cven@cslab.ece.ntua.gr>
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-14 01:58:14 -08:00
Sage Weil
0e08cb0f6c osd: return ENOSPC for non-mds if full flag is set in osdmap
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-11 13:58:47 -08:00
Sage Weil
239b7677e7 Merge remote branch 'origin/syslog' into unstable
Conflicts:
	src/mon/Paxos.cc
	src/osd/PG.cc
2010-12-11 08:09:17 -08:00
Sage Weil
46242586ed Merge branch 'gceph' into unstable 2010-12-11 08:04:09 -08:00
Colin Patrick McCabe
292414c5fd gceph: Add gceph to rpm, deb
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-10 20:34:49 -08:00
Colin Patrick McCabe
71a19a9432 gceph: run shutdown functions at exit
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-10 20:30:57 -08:00
Colin Patrick McCabe
bb82fd3d19 gceph: fix compile
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-10 20:25:47 -08:00
Colin Patrick McCabe
1a201f85e4 gceph: add -h argument
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-10 20:15:25 -08:00
Colin Patrick McCabe
b4ceb19472 ceph tool: Create gceph
Put the gui into a separate binary.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-10 20:12:56 -08:00
Yehuda Sadeh
4984473848 librados, objecter: fix unwatch operation 2010-12-09 15:57:55 -08:00
Colin Patrick McCabe
346a2aac42 rpm: update changelog
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-09 14:38:08 -08:00
Colin Patrick McCabe
e23d620068 rpm: fix ceph.spec to work with gcephtool
Don't try to package gui_resources unless we are building the GUI.
Get GUI dependencies correct.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-09 14:35:48 -08:00
Yehuda Sadeh
e5769b061b objecter: resend_linger copies ops 2010-12-09 13:55:45 -08:00
Vangelis Koukis
83612ef736 Fix overflow in FileJournal::_open_file()
[ The following text is in the "iso-8859-7" character set. ]
    [ Your display is set for the "iso-8859-1" character set.  ]
    [ Some special characters may be displayed incorrectly. ]

Running the unstable branch, mkcephfs fails when trying to create
a 3GB journal file on the OSDs.

Relevant messages from the osd logfile:

2010-12-09 19:03:54.419737 7fdde4d51720 journal _open_file: unable to extend journal to 18446744072560312320 bytes
2010-12-09 19:03:54.419789 7fdde4d51720 filestore(/osd) mkjournal error creating journal on /osd/journal

The problem is that the calculation of the journal size in bytes
overflows, in FileJournal::_open_file().

Signed-off-by: Vangelis Koukis <vkoukis@cslab.ece.ntua.gr>
Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-09 13:45:30 -08:00
Samuel Just
d0fbc30a0a ReplicatedPG.cc: Fixes a bug in snap_trimmer where a pointer to a stack
Cond is left in the mode.waiting_cond list.

Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
2010-12-09 13:09:20 -08:00
Samuel Just
329ae1bc3b ReplicatedPG: snap_trimmer now acquires a read lock on the osd map
before calling share_pg_info.

Signed-off-by: Samuel Just <samuelj@hq.newdream.net>
2010-12-09 13:09:20 -08:00
Colin Patrick McCabe
f68e6e7d38 rpm: don't try to package radosacl
radosacl is just a test binary, so unless we build with --with-debug, we
won't get it.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-09 11:18:33 -08:00
Colin Patrick McCabe
6722b0c85d rpm: add pkgconfig to BuildRequires
You can't build without pkgconfig.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-09 11:18:32 -08:00
Colin Patrick McCabe
9df18d1984 rpm: set files-attr for radosgw
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-09 10:28:39 -08:00
Sage Weil
b4264fbbdc filejournal: reset last_commited_seq if we find journal to be invalid
If we read an event that's later than our expected entry, we set read_pos
to -1 and discard the journal.  If that happens we also need to reset
last_committed_seq to avoid a crash like

2010-12-08 17:04:39.246950 7f269d138910 journal commit_finish thru 16904
2010-12-08 17:04:39.246961 7f269d138910 journal committed_thru 16904 < last_committed_seq 37778589
os/FileJournal.cc: In function 'virtual void FileJournal::committed_thru(uint64_t)':
os/FileJournal.cc:854: FAILED assert(seq >= last_committed_seq)
 ceph version 0.24~rc (commit:fe10300317383ec29948d7dbe3cb31b3aa277e3c)
 1: (FileJournal::committed_thru(unsigned long)+0xad) [0x588e7d]
 2: (JournalingObjectStore::commit_finish()+0x8c) [0x57f2ec]
 3: (FileStore::sync_entry()+0xcff) [0x5764cf]
 4: (FileStore::SyncThread::entry()+0xd) [0x506d9d]
 5: (Thread::_entry_func(void*)+0xa) [0x4790ba]
 6: /lib/libpthread.so.0 [0x7f26a2f8373a]
 7: (clone()+0x6d) [0x7f26a1c2569d]

Fixes #631

Signed-off-by: Sage Weil <sage@newdream.net>
2010-12-08 18:10:49 -08:00
Yehuda Sadeh
cc78bbf16e objecter: create a new op for resending lingering requests 2010-12-08 16:02:52 -08:00
Colin Patrick McCabe
027d5bfdca logger: tweak cmon log output a bit
Make the output of cmon on stderr a little bit less verbose.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-08 13:51:00 -08:00
Colin Patrick McCabe
fdc7414ecd logging: DoutStreambuf: handle daemonizing better
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-08 12:25:17 -08:00