Commit Graph

10686 Commits

Author SHA1 Message Date
Sage Weil
8ea9cd5956 mds: journal dirty items in order
There was some weird thing where dirty items were added to the front of
the list in the EMetaBlob, dating from 2007.  I have no idea why.  But it
was breaking rename, which dirties the same inode twice in some cases
(same src and dst dir).  Since it would replay in reverse, the inode would
end up with an older state.  If that happened to be the last time the inode
was modified in the journal prior to an mds restart+replay, we'd get bad
dirstat/rstat metadata.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-16 11:43:42 -07:00
Sage Weil
1ac265f8b3 mds: helpful journal replay debug output
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-16 11:43:42 -07:00
Sage Weil
63642224df client: drop unnecessary #include
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-16 11:43:42 -07:00
Sage Weil
74e3d79681 mds: simplify rstat/dirstat debug printing
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-16 11:43:42 -07:00
Sage Weil
00fae3a258 mds: remove bogus 'oldest snap' floor on lssnap result
I suspect the intent was to exclude snaps from parents from before we
existed.  However, get_snap_info() already does that intelligently.  And
get_oldest_snap() was wrong: this dirs snaps have little to do with
the nested snaprealms, old_inodes isn't a good indicator of birth time,
etc.

This fixes a bug where we couldn't see a snap in .snaps, but after the mds
restart could (because old_inodes included more old versions after
replay).

Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-16 11:43:42 -07:00
Christian Brunner
eb1738703d lower loglevel for successfull mon hunting
I'm receving log output on every rados_initialize (... found mon0).
Since this makes the qemu-iotests fail, I'd suggest to lower the loglevel.

Christian
2010-07-16 11:38:19 -07:00
Greg Farnum
cf02db4288 messages: fix MClientRequest::is_write(), rename to may_write().
Also remove unused can_forward(), auth_is_best().
2010-07-16 09:56:40 -07:00
Sage Weil
2d358a4c4c msgr: use in6addr_any extern for is_blank_addr()
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-15 14:51:29 -07:00
Sage Weil
0d9b998d18 msgr: put brackets around ipv6 addrs
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-15 14:51:29 -07:00
Sage Weil
5f6d077abb mds: throw std::bad_alloc on boost:pool<> depletion
A bit more informative than a segfault from this=NULL in the constructor.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-15 14:51:29 -07:00
Yehuda Sadeh
1f7e11aaf0 rbd: fix usage 2010-07-15 14:50:33 -07:00
Yehuda Sadeh
d565ae3d04 rbd: rbd tool can parse embedded snapshots name
also update man page
2010-07-15 14:35:04 -07:00
Yehuda Sadeh
b0a5cc2db2 rbd: update man page, other external tools 2010-07-15 14:35:04 -07:00
Sage Weil
851a734122 mon: limit size of MOSDMap messages when subscribing
Send multiple MOSDMap messages (max of 100 incrementals per) when
clients who are way behind subscribe.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-15 11:05:16 -07:00
Sage Weil
17a31fd598 debug: fix append to log file
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-15 10:54:09 -07:00
Sage Weil
cf6cc8b41c osd: oops, fix pool thing
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-15 10:51:46 -07:00
Sage Weil
787ecb8f98 osd: MOSDOp: print snapc if snap_seq != 0, not when snap list is empty
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-15 10:43:55 -07:00
Sage Weil
e8991f1952 osd: use client or pool snapc based on _pool_ snap mode, not client op
The pool snap mode determines where the snapc should come from.  In
particular, if the client specifies no snap seq, but the pool is in
unmanaged snap mode, then use the client (empty) snapc, and do not generate
one from the pool.

The pool might have a snap seq that is > 0, leading to and totally
invalid(!) snapc like 2=[], e.g., because the pool seq was bumped to create
an unmanaged snapc by another client.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-15 10:43:31 -07:00
Greg Farnum
af65f15b85 rgw: delete bucket objects from root pool on destruction.
This allows a bucket with that name to be created later.
2010-07-15 08:23:57 -07:00
Yehuda Sadeh
27bd901898 rbdtool: rename rbdtool to 'rbd' tool and change usage 2010-07-14 16:59:12 -07:00
Greg Farnum
145429118d cfuse: return EROFS when attempting to modify snapshots 2010-07-14 13:19:29 -07:00
Greg Farnum
9c90f7b794 mds: Check all write ops to make sure they aren't in a snapshot; return EROFS if they are. 2010-07-13 11:35:00 -07:00
Yehuda Sadeh
4884f7429c rbdtool: fix add-snap 2010-07-09 17:07:47 -07:00
Yehuda Sadeh
8b96c3ca44 rbdtool: rearrange usage 2010-07-09 16:24:18 -07:00
Yehuda Sadeh
2b02afd68c rbdtool: rename should first check source
that is, source image doesn't exist error should have priority
over destination already exists.
2010-07-09 16:24:18 -07:00
Sage Weil
e61ceee1de debian: override lintian warning unstripped-binary-or-object 2010-07-09 15:51:25 -07:00
Sage Weil
d19f05a4f3 debug: fix debug rank symlink rotate when log_per_instance
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-09 15:51:25 -07:00
Yehuda Sadeh
e0229b0a1f rbdtool: implement copy 2010-07-09 15:37:53 -07:00
Yehuda Sadeh
8f0da0ae7c rbdtool: use canonical image name (pool/image) 2010-07-09 15:31:55 -07:00
Yehuda Sadeh
98bdd8da11 rbdtool: can read data using snapshot 2010-07-09 15:31:54 -07:00
Sage Weil
8921a18e16 mds: fix up snap cap issue logic comments 2010-07-09 14:47:21 -07:00
Sage Weil
372db05178 mds: fix acquire_lock() calls in handle_client_open()
We want to acquire_locks exactly once per path through the function.
Don't look at mdr->* yet if we haven't locked yet.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-09 14:47:21 -07:00
Sage Weil
3cbf578e5e mds: issue all snap_caps allowed given locks, not by current cap
For snap_caps, who cares if the live inode has a cap for this client.  We
always want to issue the maximum set of caps the inode locks allow for
a live inode or snapped inode with caps, or the max caps ever for a snapped
inode without caps.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-09 14:47:21 -07:00
Christian Brunner
f5c4fc61b6 fix FCGI detection and specfile
configure is building radosgw as soon as libfcgi is installed, even
if --without-radosgw is given. Here is a fix for configure.in and the
specfile.

Regards,
Christian

Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-09 13:51:14 -07:00
Sage Weil
878a7de521 mon: avoid OOB m->cmd access in auth proprocess_command
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-09 13:14:25 -07:00
Sage Weil
c91c8a3115 msgr: brackets (not braces) for ipv6 addrs
Sigh

Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-09 11:27:34 -07:00
Sage Weil
71b9daa85d debug: only truncate log file on open if log_per_instance is set
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-09 11:27:34 -07:00
Sage Weil
876cca9e14 mds: termiante client sessions before flushign log during shutdown
We need to close out client sessions, and caps, to empty the open_files
lists, so that we can properly trim the EOpen events from the log.

This fixes a crash like so:

mds/journal.cc: In function 'C_Gather* LogSegment::try_to_expire(MDS*)':
mds/journal.cc:160: FAILED assert(ls != this)
 1: (LogSegment::try_to_expire(MDS*)+0x11c1) [0x90a1df]
 2: (MDLog::try_expire(LogSegment*)+0x2d) [0x902c25]
 3: (MDLog::trim(int)+0x55b) [0x902b0b]
 4: (MDCache::shutdown_pass()+0xeb) [0x7d6aab]
 5: (MDS::_dispatch(Message*)+0x2dc1) [0x71597f]
 6: (MDS::ms_dispatch(Message*)+0x38) [0x712a44]
 7: (Messenger::ms_deliver_dispatch(Message*)+0x63) [0x6fe07b]
 8: (SimpleMessenger::dispatch_entry()+0x5fd) [0x6ef7e7]
 9: (SimpleMessenger::DispatchThread::entry()+0x2c) [0x6e44b8]
 10: (Thread::_entry_func(void*)+0x23) [0x6fd075]
 11: /lib64/libpthread.so.0() [0x3552e06a3a]
 12: (clone()+0x6d) [0x35526ddf3d]
 NOTE: a copy of the executable, or `objdump -rdS <executable>` is
needed to interpret this.

Reported-by: Henry C Chang <henry_c_chang@tcloudcomputing.com>
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-09 10:09:53 -07:00
Christian Brunner
84d4c11f1f ceph.spec.in: create /var/log/ceph directory
I've missed this one in my previous patch series.

Regards,
Christian

Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-09 09:38:15 -07:00
Christian Brunner
8ec5134aad ceph.spec.in: add a build option for radosgw (--with radosgw)
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-09 09:38:12 -07:00
Christian Brunner
bf047a644c ceph.spec.in: add /var/lib/ceph/
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-09 09:38:12 -07:00
Christian Brunner
19886eb6e0 ceph.spec.in: add logrotate configuration
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-09 09:38:11 -07:00
Christian Brunner
293299f0ca ceph.spec.in: set correct path for rbd classes
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-09 09:38:10 -07:00
Sage Weil
9b74eb6f8a osd: print debug write before adding to transaction
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-08 15:41:32 -07:00
Sage Weil
4701e8388c msgr: return error and dethrottle if message decode fails
This was broken by the addition of the throttling stuff.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-08 14:55:53 -07:00
Sage Weil
b81273d5ec debian: make helper scripts remember most recent release
So you don't have to cut&paste it on the command line

Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-08 14:27:57 -07:00
Sage Weil
f456b51d60 osd: fix delayed pg creation use after free
Use local acting[], not the one stashed in creating_pgs[pgid].  And drop
the duplication .erase().

Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-08 13:34:15 -07:00
Sage Weil
6612a1f15c vstart: specify osd class tmp dir
Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-08 11:34:48 -07:00
Sage Weil
9fd3f5932f monc: make hunt, ping rates configuration
3s for hunt rate, 10s for ping rate.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-08 10:56:32 -07:00
Sage Weil
a396fcb224 client: increase client mount timeout
This needs to be longer than the monclient hunt rate (currently 10s) so
that we succeed if we initially pick a down monitor.

Signed-off-by: Sage Weil <sage@newdream.net>
2010-07-08 10:49:51 -07:00