From d48663e4c3c79b7cd738bab4a3abe5c6e7468f83 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Sun, 28 Sep 2008 14:43:30 +0000 Subject: [PATCH] Fix a bug related to static minors When the node does not yet have any minors allocated, the first minor (0) will not be entered in the ConfigWriter._temporary_drbds structure. This does not happen for our current usage, since we always ask for two minors (so the next call will not match this case), but it will be triggered if we only ask for one minor, and then ask again before adding the instance to the config file. Reviewed-by: ultrotter --- lib/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/config.py b/lib/config.py index b8adc8402..f44340b8d 100644 --- a/lib/config.py +++ b/lib/config.py @@ -397,6 +397,7 @@ class ConfigWriter: # no minors used, we can start at 0 result.append(0) ndata[0] = instance + self._temporary_drbds[(nname, 0)] = instance continue keys = ndata.keys() keys.sort() -- GitLab