Revision 4b63dc7a daemons/ganeti-masterd

b/daemons/ganeti-masterd
499 499
                          (constants.MASTERD_USER, constants.DAEMONS_GROUP))
500 500
    sys.exit(constants.EXIT_FAILURE)
501 501

  
502
  # Check the configuration is sane before anything else
503
  try:
504
    config.ConfigWriter()
505
  except errors.ConfigVersionMismatch, err:
506
    v1 = "%s.%s.%s" % constants.SplitVersion(err.args[0])
507
    v2 = "%s.%s.%s" % constants.SplitVersion(err.args[1])
508
    print >> sys.stderr,  \
509
        ("Configuration version mismatch. The current Ganeti software"
510
         " expects version %s, but the on-disk configuration file has"
511
         " version %s. This is likely the result of upgrading the"
512
         " software without running the upgrade procedure. Please contact"
513
         " your cluster administrator or complete the upgrade using the"
514
         " cfgupgrade utility, after reading the upgrade notes." %
515
         (v1, v2))
516
    sys.exit(constants.EXIT_FAILURE)
517
  except errors.ConfigurationError, err:
518
    print >> sys.stderr, \
519
        ("Configuration error while opening the configuration file: %s\n"
520
         "This might be caused by an incomplete software upgrade or"
521
         " by a corrupted configuration file. Until the problem is fixed"
522
         " the master daemon cannot start." % str(err))
523
    sys.exit(constants.EXIT_FAILURE)
502 524

  
503 525
  # If CheckMaster didn't fail we believe we are the master, but we have to
504 526
  # confirm with the other nodes.

Also available in: Unified diff