* Nautilus is not supported on any distros still running upstart so upstart
specific files and references have been removed.
+* The 'ceph pg <pgid> list_missing' command has been renamed to
+ 'ceph pg <pgid> list_unfound' to better match its behaviour.
+
>=13.1.0
--------
First, you can identify which objects are unfound with::
- ceph pg 2.4 list_missing [starting offset, in json]
+ ceph pg 2.4 list_unfound [starting offset, in json]
.. code-block:: javascript
done
ceph pg dump pgs
- ceph pg 2.0 list_missing | grep -q $testobj || return 1
+ ceph pg 2.0 list_unfound | grep -q $testobj || return 1
# Command should hang because object is unfound
timeout 5 rados -p $poolname get $testobj $dir/CHECK
done
ceph pg dump pgs
- ceph pg 2.0 list_missing | grep -q $testobj || return 1
+ ceph pg 2.0 list_unfound | grep -q $testobj || return 1
# Command should hang because object is unfound
timeout 5 rados -p $poolname get $testobj $dir/CHECK
done
ceph pg dump pgs
- ceph pg 2.0 list_missing | grep -q $testobj || return 1
+ ceph pg 2.0 list_unfound | grep -q $testobj || return 1
# Command should hang because object is unfound
timeout 5 rados -p $poolname get $testobj $dir/CHECK
done
ceph pg dump pgs
- ceph pg 2.0 list_missing | grep -q $testobj || return 1
+ ceph pg 2.0 list_unfound | grep -q $testobj || return 1
# Command should hang because object is unfound
timeout 5 rados -p $poolname get $testobj $dir/CHECK
for i in $(seq 0 120) ; do
[ $i -lt 60 ] || return 1
- matches=$(ceph pg $pg list_missing | egrep "MOBJ0|MOBJ1" | wc -l)
+ matches=$(ceph pg $pg list_unfound | egrep "MOBJ0|MOBJ1" | wc -l)
[ $matches -eq 2 ] && break
done
self.set_pool_property(pool_name, 'pgp_num', self.pools[pool_name])
return True
- def list_pg_missing(self, pgid):
+ def list_pg_unfound(self, pgid):
"""
- return list of missing pgs with the id specified
+ return list of unfound pgs with the id specified
"""
r = None
offset = {}
while True:
- out = self.raw_cluster_cmd('--', 'pg', pgid, 'list_missing',
+ out = self.raw_cluster_cmd('--', 'pg', pgid, 'list_unfound',
json.dumps(offset))
j = json.loads(out)
if r is None:
# verify that i can list them direct from the osd
log.info('listing missing/lost in %s state %s', pg['pgid'],
pg['state']);
- m = manager.list_pg_missing(pg['pgid'])
+ m = manager.list_pg_unfound(pg['pgid'])
log.info('%s' % m)
assert m['num_unfound'] == pg['stat_sum']['num_objects_unfound']
# verify that i can list them direct from the osd
log.info('listing missing/lost in %s state %s', pg['pgid'],
pg['state']);
- m = manager.list_pg_missing(pg['pgid'])
+ m = manager.list_pg_unfound(pg['pgid'])
#log.info('%s' % m)
assert m['num_unfound'] == pg['stat_sum']['num_objects_unfound']
num_unfound=0
# verify that i can list them direct from the osd
log.info('listing missing/lost in %s state %s', pg['pgid'],
pg['state']);
- m = manager.list_pg_missing(pg['pgid'])
+ m = manager.list_pg_unfound(pg['pgid'])
#log.info('%s' % m)
assert m['num_unfound'] == pg['stat_sum']['num_objects_unfound']
num_unfound=0
"osd", "rw", "cli")
COMMAND("pg " \
"name=pgid,type=CephPgid " \
- "name=cmd,type=CephChoices,strings=list_missing " \
+ "name=cmd,type=CephChoices,strings=list_unfound " \
"name=offset,type=CephString,req=false",
- "list missing objects on this pg, perhaps starting at an offset given in JSON",
+ "list unfound objects on this pg, perhaps starting at an offset given in JSON",
"osd", "r", "cli")
// new form: tell <pgid> <cmd> for both cli and rest
"name=mulcmd,type=CephChoices,strings=revert|delete", \
"mark all unfound objects in this pg as lost, either removing or reverting to a prior version if one is available",
"osd", "rw", "cli,rest")
-COMMAND("list_missing " \
+COMMAND("list_unfound " \
"name=offset,type=CephString,req=false",
- "list missing objects on this pg, perhaps starting at an offset given in JSON",
+ "list unfound objects on this pg, perhaps starting at an offset given in JSON",
"osd", "r", "cli,rest")
COMMAND("perf histogram dump "
"name=logger,type=CephString,req=false "
else if (prefix == "pg" ||
prefix == "query" ||
prefix == "mark_unfound_lost" ||
- prefix == "list_missing"
+ prefix == "list_unfound"
) {
pg_t pgid;
ConnectionRef con,
ceph_tid_t tid)
{
- const auto &missing = pg_log.get_missing();
string prefix;
string format;
mark_all_unfound_lost(mode, con, tid);
return -EAGAIN;
}
- else if (command == "list_missing") {
+ else if (command == "list_unfound") {
hobject_t offset;
string offset_json;
+ bool show_offset = false;
if (cmd_getval(cct, cmdmap, "offset", offset_json)) {
json_spirit::Value v;
try {
ss << "error parsing offset: " << e.what();
return -EINVAL;
}
+ show_offset = true;
}
f->open_object_section("missing");
- {
+ if (show_offset) {
f->open_object_section("offset");
offset.dump(f.get());
f->close_section();
}
- f->dump_int("num_missing", missing.num_missing());
+ auto &needs_recovery_map = missing_loc.get_needs_recovery();
+ f->dump_int("num_missing", needs_recovery_map.size());
f->dump_int("num_unfound", get_num_unfound());
- const map<hobject_t, pg_missing_item> &needs_recovery_map =
- missing_loc.get_needs_recovery();
map<hobject_t, pg_missing_item>::const_iterator p =
needs_recovery_map.upper_bound(offset);
{