]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/DaemonState: clear devices in set_metadata
authorSage Weil <sage@redhat.com>
Thu, 18 Oct 2018 22:24:24 +0000 (17:24 -0500)
committerSage Weil <sage@redhat.com>
Wed, 24 Oct 2018 17:55:08 +0000 (12:55 -0500)
We are adding new fields in the new data provided; clear out any from the
previous values.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mgr/DaemonState.h

index f706aab3080d814a2cfdd1289f09bc887862c7bf..d0822fee88601c4b88095795b752c87226e1f889 100644 (file)
@@ -168,6 +168,7 @@ class DaemonState
   }
 
   void set_metadata(const std::map<std::string,std::string>& m) {
+    devices.clear();
     metadata = m;
     auto p = m.find("device_ids");
     if (p != m.end()) {