Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def perform_prestart_checks(expected_hostname):
- # Check if current hostname is equal to expected one (got from the server
- # during bootstrap.
- global config
- if expected_hostname is not None:
- current_hostname = hostname.hostname(config)
- if current_hostname != expected_hostname:
- print("Determined hostname does not match expected. Please check agent "
- "log for details")
- msg = "Ambari agent machine hostname ({0}) does not match expected ambari " \
- "server hostname ({1}). Aborting registration. Please check hostname, " \
- "hostname -f and /etc/hosts file to confirm your " \
- "hostname is setup correctly".format(current_hostname, expected_hostname)
- logger.error(msg)
- sys.exit(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement