summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Mick <dan.mick@inktank.com>2013-09-20 15:41:09 -0700
committerDan Mick <dan.mick@inktank.com>2013-09-20 15:41:09 -0700
commit2d089e4644b623adb58ca8c0c924d2516efcac86 (patch)
treead9db2336d744d148d29b9d303d60854bb25dc4e
parent556956f449cef008c62352e0ae2c980156e2f58e (diff)
parentbcc1680ad2bcf52ba39a25686d831777e9554b01 (diff)
downloadceph-2d089e4644b623adb58ca8c0c924d2516efcac86.tar.gz
Merge pull request #608 from dachary/wip-6357
mon: fix inverted test in osd pool create Reviewed-by: Dan Mick <dan.mick@inktank.com>
-rwxr-xr-xqa/workunits/mon/pool_ops.sh3
-rw-r--r--src/mon/OSDMonitor.cc2
2 files changed, 3 insertions, 2 deletions
diff --git a/qa/workunits/mon/pool_ops.sh b/qa/workunits/mon/pool_ops.sh
index e98e1e4121e..2436cc4837e 100755
--- a/qa/workunits/mon/pool_ops.sh
+++ b/qa/workunits/mon/pool_ops.sh
@@ -2,7 +2,8 @@
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
diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc
index 9643b33e34b..366093e91a3 100644
--- a/src/mon/OSDMonitor.cc
+++ b/src/mon/OSDMonitor.cc
@@ -2526,7 +2526,7 @@ int OSDMonitor::prepare_new_pool(string& name, uint64_t auid, int crush_rule,
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);