If we aren't auth for the srcdn, don't put it in the journal, or else we'll
barf on journal replay.
This fixes a crash reproduced with
sudo mkdir mnt/foo
sudo touch mnt/foo/a
sudo ln mnt/foo/a mnt/foo/b
sudo rm mnt/foo/a
sudo mkdir mnt/bar
sudo touch mnt/bar/nothing
./ceph mds tell 0 export_dir /bar 1
sudo mv mnt/foo/b mnt/bar/b
+ mds restart.
Signed-off-by: Sage Weil <sage@newdream.net>
This caused two osds to keep flipping the acting set between [2] and
[0,2] when osd.0 was far behind and needed a backlog. This is visible
as toggling between peering and peering+degraded.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
I have a habit of running "sh -x stop.sh" whenever it seems
to fail, and that runs it with dash, not bash. Since it
doesn't actually need the bashisms, remove them.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
Make sure we include boostchart headers before our common/assert.h so that
ours clobbers theirs. Otherwise the generic one will clobber ours and our
assert output won't get logged or be as pretty.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
When parsing argv, ignore dashes after equals signs. This is so that
things like --log-file=/tmp/foo-file will work correctly.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
This is safe because the only other transitions are to Pending (still
peering) and Active, which clears the state itself.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
If you feed in a raw pg (full precision) you should get the same mapping
out as when you plug in the effective/reduced precision pg. The
raw_to_temp_osds() wasn't doing that, which gave you results like
flak:src 04:01 PM $ ./ceph pg map 0.4
2011-05-05 16:01:18.524051 mon <- [pg,map,0.4]
2011-05-05 16:01:18.524987 mon2 -> 'osdmap e11 pg 0.4 (0.4) -> up [1,0] acting [0]' (0)
flak:src 04:01 PM $ ./ceph pg map 0.7ed4
2011-05-05 16:01:21.755490 mon <- [pg,map,0.7ed4]
2011-05-05 16:01:21.755996 mon1 -> 'osdmap e11 pg 0.7ed4 (0.4) -> up [1,0] acting [1,0]' (0)
The objecter was feeding in raw pgs, so this was sending requests to the
wrong nodes.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
If we are the root node or the tableserver, we have to shut down last.
(And even then, if we have client sessions, we can't fully shut down, we
can only kill ourselves!)
Fixes: #1048 (sorta)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
We previously didn't, but we definitely need to as we can go
active while waiting on strays to send in logs to recover missing
objects.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Even after ceph::crypto::shutdown, the library looked
already initialized; this broke the ForkDeathTest.MD5
in "make check", and NSS-using daemons.
See 921d4b3d8b for more.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
Don't fork. (Already fixed in master branch by the start_with_nonce
refactor, so this is just for 0.27.1.)
Signed-off-by: Sage Weil <sage@newdream.net>
Init the keyring in ceph_mount, after the user has a change to load a conf
file or parse command line args.
Signed-off-by: Sage Weil <sage@newdream.net>
Use the same configuration file format as s3-tests. This should make it
easier for people to run obsync tests!
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
The PgPriorSet::down set can have lots of stuff it in without it affecting
peering completion. We just need to look at the some_down flag to tell us
if any nodes in the _cur_ set are down, which indicates no progress is
possible (unless/until someone starts up again or last_epoch_started moves
forward in time).
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
No need to do so in get_infos(). The need_up_thru requirement will only
get better as last_epoch_started floor moves forward in time, not worse.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This fixes a few things:
- do not proceed past GetInfo if there are down osds. ever.
- if we get a new info that moves last_epoch_started forward,
rebuild prior, because we may have eliminated said down osds.
- if we get dup info, do nothing
- if we get new info, see if we can proceed to GetLog
This is all simpler/cleaner by handling Notify/Info (they're the same)
explicitly in the GetInfo state and not falling back to the parent
state handler.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Don't query for info we already have, or have already requested. Remove
unneeded helper so that this is simpler and we have access to the info
we need.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
We shouldn't post a creation event and jump into peering/stray based on
pg creation when we are about to process more information or else we will
send out unnecessary queries. Instead, handle those from Initial and jump
to the appropriate state.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Don't output optional DisplayName if not set. Be a little more explicit
about zeroing other optional fields during xml parsing.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
XML parsing functions in RGW now return a bool, indicating whether they
were able to get the fields they needed to out of the XML.
If any field returns false, the parsing is deemed to have failed.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>