Closed mgohashi closed 6 years ago
Thanks for the report, please try to use ansible 2.3 for now, 2.4 is broken. You can track the ansible issue here: https://github.com/ansible/ansible/issues/33177
The GCP ref. arch. code should now work even with ansible 2.4 thanks to https://github.com/openshift/openshift-ansible-contrib/commit/c0f0cccdfbda475906c17fe5e3a00239adddaaea
Hi guys,
I was trying to create an openshift env on GCE and I've got the following issue. I saw that it is defined in group_vars.
BUG REPORT
TASK [openshift_facts] ***** fatal: [ocp-master-kkwt]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {{ console_port }}: 'console_port' is undefined\n\nThe error appears to have been in '/home/mohashi/Projects/redhat/ref/openshift/openshift-gce/openshift-ansible/playbooks/common/openshift-master/config.yml': line 67, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n post_tasks:\n - openshift_facts:\n ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: {{ console_port }}: 'console_port' is undefined"}
PLAY RECAP ***** localhost : ok=37 changed=14 unreachable=0 failed=0
ocp-bastion : ok=5 changed=0 unreachable=0 failed=0
ocp-infra-node-cw4f : ok=124 changed=18 unreachable=0 failed=0
ocp-master-kkwt : ok=203 changed=50 unreachable=0 failed=1
ocp-node-czsf : ok=124 changed=18 unreachable=0 failed=0
ocp-node-qmfd : ok=124 changed=18 unreachable=0 failed=0
Failure summary:
Hosts: ocp-master-kkwt Play: Gather and set facts for master hosts Task: openshift_facts Message: The task includes an option with an undefined variable. The error was: {{ console_port }}: 'console_port' is undefined
BUG REPORT INFO
Environment
Cloud provider: GCE
OS details (
printf "$(uname -srm)\n$(cat /etc/os-release)\n"
): Linux 4.14.3-300.fc27.x86_64 x86_64 NAME=Fedora VERSION="27 (Workstation Edition)" ID=fedora VERSION_ID=27 PRETTY_NAME="Fedora 27 (Workstation Edition)" ANSI_COLOR="0;34" CPE_NAME="cpe:/o:fedoraproject:fedora:27" HOME_URL="https://fedoraproject.org/" SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=27 REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=27 PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy" VARIANT="Workstation Edition" VARIANT_ID=workstationVersion of Ansible (
ansible --version
):ansible 2.4.2.0 config file = /etc/ansible/ansible.cfg configured module search path = [u'/home/mohashi/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.14 (default, Nov 3 2017, 10:55:25) [GCC 7.2.1 20170915 (Red Hat 7.2.1-2)]
Version of Jinja (
pip freeze | grep -i jinja
):Jinja2==2.9.6
Version of Shade (
pip freeze | grep -i shade
):None
The openstack-ansible-contrib version (commit) (
git rev-parse --short HEAD
):5763762
Copy of inventory files and custom variables used (please omit your secrets!):
Main Configuration Section for OCP on GCP reference architecture
Prefix for every resource name deployed. You can deploy multiple clusters
under single account with different prefixes and DNS configuration
prefix: 'ocp'
Username and password for Red Hat Customer Portal
rhsm_user: '' rhsm_password: ''
Pool name which shall be used to register the instances
rhsm_pool: ''
Path to a RHEL image on local machine, downloaded from Red Hat Customer Portal
rhel_image_path: '~/Downloads/rhel-server-7.4-x86_64-kvm.qcow2'
Choose to delete or retain the clean image during teardown
delete_image: false
Choose to delete or retain the gold image during teardown
delete_gold_image: false
Project ID and main zone settings for Google Cloud
gcloud_project: 'openshift-xxxxxx' gcloud_zone: 'us-east1-b'
Public DNS domain which will be configured in Google Cloud DNS
public_hosted_zone: 'ocp.xxxxx.com'
Public DNS name for the Master service
openshift_master_cluster_public_hostname: 'master.{{ public_hosted_zone }}'
Internal DNS name for the Master service
openshift_master_cluster_hostname: 'internal-master.{{ public_hosted_zone }}'
Domain name for the OpenShift applications
wildcard_zone: 'apps.{{ public_hosted_zone }}'
Paths on the local file system for the certificate files. If empty, self-signed
certificate will be generated
master_https_key_file: '' master_https_cert_file: ''
How many instances should be created for each group
master_instance_group_size: 1 infra_node_instance_group_size: 1 node_instance_group_size: 2
Machine types
bastion_machine_type: g1-small master_machine_type: n1-standard-4 infra_machine_type: n1-standard-2 node_machine_type: n1-standard-2
OpenShift deployment type
Use 'origin' to deploy OpenShift Origin on top of CentOS 7
openshift_deployment_type: openshift-enterprise
Deploy OpenShift within containers instead of RPMs?
containerized: false
OpenShift SDN selection
options are 'redhat/openshift-ovs-multitenant', 'redhat/openshift-ovs-subnet'
os_sdn_network_plugin_name: 'redhat/openshift-ovs-subnet'
Deploy OpenShift Metrics
openshift_hosted_metrics_deploy: true openshift_hosted_metrics_storage_volume_size: 20Gi
Deploy OpenShift Logging
Please note that ElasticSearch pod needs 8Gi of free RAM on a node, so you
will probably need at least 'n1-standard-4' size for infra nodes. Alternatively
for evaluation purposes, you can set 'openshift_logging_es_memory_limit'
variable to cca 4Gi, so it fits on the 'n1-standard-2' size of infra nodes.
openshift_hosted_logging_deploy: true openshift_logging_es_pvc_size: 100Gi
OpenShift Identity Providers. This is Google oauth example (hosted_domain is
optional and restricts login to users only from the specified domain)
Any identity provider can be configured here, for documentation see
https://docs.openshift.com/container-platform/latest/install_config/configuring_authentication.html#identity-providers-ansible
openshift_master_identity_providers:
Supplemental options
Disk sizes in GB
bastion_disk_size: 20 master_boot_disk_size: 45 master_docker_disk_size: 25 infra_boot_disk_size: 25 infra_docker_disk_size: 25 infra_openshift_disk_size: 50 node_boot_disk_size: 25 node_docker_disk_size: 25 node_openshift_disk_size: 50
Custom VPC Subnet, example value: '10.160.0.0/20'
Default value is empty, when random subnet in form of 10.x.0.0/20 will be used
gce_vpc_custom_subnet_cidr: ''
deployment_type: '{{ openshift_deployment_type }}'
console_port: 8443
Command used to invoke ansible:
./ocp-on-gcp.sh
Output of ansible run:
https://gist.github.com/mgohashi/3f117cdca37748df36a4977fe99c3547
Anything else do we need to know: