Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. def perform_prestart_checks(expected_hostname):
  2. # Check if current hostname is equal to expected one (got from the server
  3. # during bootstrap.
  4. global config
  5.  
  6. if expected_hostname is not None:
  7. current_hostname = hostname.hostname(config)
  8. if current_hostname != expected_hostname:
  9. print("Determined hostname does not match expected. Please check agent "
  10. "log for details")
  11. msg = "Ambari agent machine hostname ({0}) does not match expected ambari " \
  12. "server hostname ({1}). Aborting registration. Please check hostname, " \
  13. "hostname -f and /etc/hosts file to confirm your " \
  14. "hostname is setup correctly".format(current_hostname, expected_hostname)
  15. logger.error(msg)
  16. sys.exit(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement