In the condition for checking the configuration directory, one “or” should have
been an “and”. This bug was in cfgupgrade since commit
95e4a8142 (June 2008).
Found thanks to a test script.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
# Check whether it's a Ganeti configuration directory
if not (os.path.isfile(options.CONFIG_DATA_PATH) and
- os.path.isfile(options.SERVER_PEM_PATH) or
+ os.path.isfile(options.SERVER_PEM_PATH) and
os.path.isfile(options.KNOWN_HOSTS_PATH)):
raise Error(("%s does not seem to be a Ganeti configuration"
" directory") % options.data_dir)