Commit d48663e4 authored by Iustin Pop's avatar Iustin Pop
Browse files

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
parent 48ce9fd9
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment