]>
Commit | Line | Data |
---|---|---|
1a629971 | 1 | From 9b015f1ad4d9b9912f2b49b65e5349cc1b4c74db Mon Sep 17 00:00:00 2001 |
10a7309d FG |
2 | From: Joao Eduardo Luis <joao@suse.de> |
3 | Date: Wed, 20 Sep 2017 17:53:40 +0100 | |
4 | Subject: [PATCH 6/6] mon/MgrMonitor: read cmd descs if empty on | |
5 | update_from_paxos() | |
6 | MIME-Version: 1.0 | |
7 | Content-Type: text/plain; charset=UTF-8 | |
8 | Content-Transfer-Encoding: 8bit | |
9 | ||
10 | If the MgrMonitor's `command_descs` is empty, the monitor will not send | |
11 | the mgr commands to clients on `get_descriptions`. This, in turn, has | |
12 | the clients sending the commands to the monitors, which will have no | |
13 | idea how to handle them. | |
14 | ||
15 | Therefore, make sure to read the `command_descs` from disk if the vector | |
16 | is empty. | |
17 | ||
18 | Fixes: http://tracker.ceph.com/issues/21300 | |
19 | ||
20 | Signed-off-by: Joao Eduardo Luis <joao@suse.de> | |
21 | (cherry picked from commit 3d06079bae0fbc096d6c3639807d9be3597e841a) | |
22 | (cherry picked from commit 86d143722e1f16a19a56ed7a163d1dc9327c0c90) | |
23 | Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> | |
24 | --- | |
25 | src/mon/MgrMonitor.cc | 5 +++-- | |
26 | 1 file changed, 3 insertions(+), 2 deletions(-) | |
27 | ||
28 | diff --git a/src/mon/MgrMonitor.cc b/src/mon/MgrMonitor.cc | |
29 | index 3840b642b9..55bce43920 100644 | |
30 | --- a/src/mon/MgrMonitor.cc | |
31 | +++ b/src/mon/MgrMonitor.cc | |
32 | @@ -85,8 +85,9 @@ void MgrMonitor::update_from_paxos(bool *need_bootstrap) | |
33 | check_subs(); | |
34 | ||
35 | if (version == 1 | |
36 | - || (map.get_available() | |
37 | - && (!old_available || old_gid != map.get_active_gid()))) { | |
38 | + || command_descs.empty() | |
39 | + || (map.get_available() | |
40 | + && (!old_available || old_gid != map.get_active_gid()))) { | |
41 | dout(4) << "mkfs or daemon transitioned to available, loading commands" | |
42 | << dendl; | |
43 | bufferlist loaded_commands; | |
44 | -- | |
45 | 2.14.1 | |
46 |