13.0.1
------
-* The RBD C API's rbd_discard method now enforces a maximum length of
- 2GB to match the C++ API's Image::discard method. This restriction
- prevents overflow of the result code.
-
* *CephFS*:
* Several "ceph mds" commands have been obsoleted and replaced
mds_session_timeout, mds_session_autoclose, and mds_max_file_size are now
obsolete.
+* *RBD*
+
+ * The RBD C API's rbd_discard method now enforces a maximum length of
+ 2GB to match the C++ API's Image::discard method. This restriction
+ prevents overflow of the result code.
+
+ * The rbd CLI's "lock list" JSON and XML output has changed.
+
* The sample ``crush-location-hook`` script has been removed. Its output is
equivalent to the built-in default behavior, so it has been replaced with an
example in the CRUSH documentation.
-
>= 12.2.2
---------
iochild=$!
# give client time to lock and start reading/writing
-LOCKS='{}'
-while [ "$LOCKS" == "{}" ]
+LOCKS='[]'
+while [ "$LOCKS" == '[]' ]
do
LOCKS=$(rbd lock list $IMAGE --format json)
sleep 1
</images>
$ rbd lock list foo
$ rbd lock list foo --format json | python -mjson.tool | sed 's/,$/, /'
- {}
+ []
$ rbd lock list foo --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp'
<locks></locks>
$ rbd lock list quux
Locker*ID*Address* (glob)
client.* id * (glob)
$ rbd lock list quux --format json | python -mjson.tool | sed 's/,$/, /'
- {
- "id": {
+ [
+ {
"address": "*", (glob)
+ "id": "id",
"locker": "client.*" (glob)
}
- }
+ ]
$ rbd lock list quux --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp'
<locks>
- <id>
+ <lock>
+ <id>id</id>
<locker>client.*</locker> (glob)
<address>*</address> (glob)
- </id>
+ </lock>
</locks>
$ rbd lock list baz
There are 3 shared locks on this image.
client.*id[123].* (re)
client.*id[123].* (re)
$ rbd lock list baz --format json | python -mjson.tool | sed 's/,$/, /'
- {
- "id1": {
+ [
+ {
"address": "*", (glob)
+ "id": "id*", (glob)
"locker": "client.*" (glob)
},
- "id2": {
+ {
"address": "*", (glob)
+ "id": "id*", (glob)
"locker": "client.*" (glob)
},
- "id3": {
+ {
"address": "*", (glob)
+ "id": "id*", (glob)
"locker": "client.*" (glob)
}
- }
+ ]
$ rbd lock list baz --format xml | xml_pp 2>&1 | grep -v '^new version at /usr/bin/xml_pp'
<locks>
- <id*> (glob)
+ <lock>
+ <id>id*</id> (glob)
<locker>client.*</locker> (glob)
<address>*</address> (glob)
- </id*> (glob)
- <id*> (glob)
+ </lock>
+ <lock>
+ <id>id*</id> (glob)
<locker>client.*</locker> (glob)
<address>*</address> (glob)
- </id*> (glob)
- <id*> (glob)
+ </lock>
+ <lock>
+ <id>id*</id> (glob)
<locker>client.*</locker> (glob)
<address>*</address> (glob)
- </id*> (glob)
+ </lock>
</locks>
$ rbd snap list foo
SNAPID NAME SIZE TIMESTAMP
return r;
if (f) {
- f->open_object_section("locks");
+ f->open_array_section("locks");
} else {
tbl.define_column("Locker", TextTable::LEFT, TextTable::LEFT);
tbl.define_column("ID", TextTable::LEFT, TextTable::LEFT);
for (std::list<librbd::locker_t>::const_iterator it = lockers.begin();
it != lockers.end(); ++it) {
if (f) {
- f->open_object_section(it->cookie.c_str());
+ f->open_object_section("lock");
+ f->dump_string("id", it->cookie);
f->dump_string("locker", it->client);
f->dump_string("address", it->address);
f->close_section();