Bug #8254
Not logging missing_on_shards properly
% Done:
100%
Source:
other
Tags:
Backport:
firefly
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
2014-04-18 17:01:34.565301 7f69feae6700 10 osd.1 pg_epoch: 77 pg[3.2s0( v 77'466 lc 40'64 (0'0,77'466] local-les=73 n=465 ec=8 les/c 73/26 72/72/72) [1,5,0] r=0 lpr=72 pi=25-71/1 luod=77'465 rops=15 crt=71'434 mlcod 38'58 active+recovering m=357] continue_recovery_op: READING return RecoveryOp(hoid=d362481a/plana1323219-759/head//3 v=40'71 missing_on=1(0) missing_on_shards=^@ recovery_info=ObjectRecoveryInfo(d362481a/plana1323219-759/head//3@40'71, copy_subset: [], clone_subset: {}) recovery_progress=ObjectRecoveryProgress(!first, data_recovered_to:2920448, data_complete:true, omap_recovered_to:, omap_complete:true) pending_read=0 obc refcount=1 state=WRITING waiting_on_pushes=1(0) extent_requested=2105344,1052672
Notice the missing_on_shards=^@ in the log message.
The ECBackend::RecoveryOp has "set<shard_id_t> missing_on_shards" that is output using operator<<() with the following:
<< " missing_on_shards=" << rhs.missing_on_shards
Since shard_id_t is a uint8_t which is really an unsigned char a value of 0 is getting logged as ^@ instead of "0".
Related issues
Associated revisions
osd: factorize shard_id_t/shard_t into a struct
The struct contains a single uint8_t and is preferred to control
conversions that would otherwise be implicit. There is no difference
between shard_id_t and shard_t. The definition is moved in
include/types.h so it is available to both hobject.h and osd_types.h
http://tracker.ceph.com/issues/8254 Fixes: #8254
Signed-off-by: Loic Dachary <loic@dachary.org>
History
#1 Updated by Samuel Just almost 9 years ago
- Priority changed from Normal to Urgent
#2 Updated by Loïc Dachary almost 9 years ago
- Category set to OSD
- Status changed from 12 to Fix Under Review
- Assignee set to Loïc Dachary
- % Done changed from 0 to 80
#3 Updated by Loïc Dachary almost 9 years ago
- Status changed from Fix Under Review to Resolved
- Target version set to 0.82
- % Done changed from 80 to 100
#4 Updated by Nathan Cutler over 7 years ago
- Backport set to firefly
- Regression set to No