When using the properties key=value only, the test was inverted
and an attempt to obtain a substring at index string::npos throws
an exception.
Add variations of osd pool create to qa/workunits/mon/pool_ops.sh
to assert the problem has been fixed and all code paths are used.
http://tracker.ceph.com/issues/6357 fixes #6357
Signed-off-by: Loic Dachary <loic@dachary.org>
set -e
-ceph osd pool create foo 123 123
+ceph osd pool create foo 123 123 key1=+++ && exit 1 || true
+ceph osd pool create foo 123 123 key1=value1 key2 key3=value3
ceph osd pool create fooo 123
ceph osd pool create foo 123 # idempotent
i != properties.end();
i++) {
size_t equal = i->find('=');
- if (equal != string::npos)
+ if (equal == string::npos)
pi->properties[*i] = string();
else {
const string key = i->substr(0, equal);