]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: LogEntry: if channel is missing, default to "cluster"
authorJoao Eduardo Luis <joao@redhat.com>
Fri, 19 Sep 2014 16:16:49 +0000 (17:16 +0100)
committerJoao Eduardo Luis <joao@redhat.com>
Mon, 22 Sep 2014 16:36:29 +0000 (17:36 +0100)
Keeps backward compatibility when there are entities that do not know
what a channel is.  This way we ensure that those messages are logged as
they were expected to be before channels were introduced: to the cluster
log.

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
src/common/LogEntry.cc

index 42389f0f2c87190f46a97fb40dbc110e97995cb2..f3fb989cc8945f457c002a440ff7f633dd8f3f50 100644 (file)
@@ -188,7 +188,10 @@ void LogEntry::decode(bufferlist::iterator& bl)
   if (struct_v >= 3) {
     ::decode(channel, bl);
   } else {
-    channel = CLOG_CHANNEL_DEFAULT;
+    // prior to having logging channels we only had a cluster log.
+    // Ensure we keep that appearance when the other party has no
+    // clue of what a 'channel' is.
+    channel = CLOG_CHANNEL_CLUSTER;
   }
   DECODE_FINISH(bl);
 }