How to determine the IP of the bootstrap node

Solution Unverified - Updated

Environment

  • Red Hat OpenShift Container Platform 4.x

Issue

  • In the event of a failed install, how do I determine the IP or hostname of the bootstrap system to debug why the install failed?

Resolution

You can get the bootstrap IP from the terraform.tfstate file by running one fo the following commands:

  1. Using Content from stedolan.github.io is not included.jq to parse the json state file.

    $ jq '.modules[].resources."aws_instance.bootstrap".primary.attributes."public_ip" | select(.)' cluster_install_dir/terraform.tfstate
    
  2. Using Python with our an extra dependency

    $ python -c 'import sys, json; d=reduce(lambda x,y: dict(x.items() + y.items()), map(lambda x: x["resources"], json.load(sys.stdin)["modules"])); k="aws_instance.bootstrap"; print d[k]["primary"]["attributes"]["public_ip"] if k in d else ""' < cluster_install_dir/terraform.tfstate
    
SBR
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.