Closed AllezWiggo closed 6 years ago
Inventory file:
[OSEv3:children]
masters
nodes
etcd
[OSEv3:vars]
# if your target hosts are Fedora uncomment this
#ansible_python_interpreter=/usr/bin/python3
ansible_user=centos
# If ansible_user is not root, ansible_become must be set to true and the
# user must be configured for passwordless sudo
ansible_become=yes
openshift_deployment_type=origin
openshift_release=3.7
osm_cluster_network_cidr=10.128.0.0/14
openshift_portal_net=172.30.0.0/16
osm_host_subnet_length=9
# localhost likely doesn't meet the minimum requirements
openshift_disable_check=disk_availability,memory_availability
[masters]
master.ocpdemo.local
[etcd]
master.ocpdemo.local
[nodes]
master.ocpdemo.local openshift_schedulable=true openshift_node_labels="{'region': 'infra', 'zone': 'default'}"
node1.ocpdemo.local
node2.ocpdemo.local
Receiving the same error with release-3.9, RHEL Atomic hosts, ansible 2.4.3.0:
TASK [openshift_master : Ensure that Template Service Broker has nodes to run on] *******************************************************************************************
fatal: [masternode-01]: FAILED! => {"msg": "Unexpected templating type error occurred on ({{ __schedulable_nodes_matching_selector['results']['results'][0]['items'] | default([]) | length != 0 }}): object of type 'builtin_function_or_method' has no len()"}
Looks like it ties back to this Ansible module: https://github.com/openshift/openshift-ansible/blob/release-3.9/roles/lib_openshift/src/ansible/oc_obj.py
Manually running the oc get nodes
command with the same flags produces the same result:
oc get node --selector=region=infra --field-selector=spec.unschedulable!=true -o json -n default
Error: unknown flag: --field-selector
Usage:
oc get [(-o|--output=)json|yaml|wide|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=...] (TYPE [NAME | -l label] | TYPE/NAME ...) [flags] [options]
<snip>
The master branch's oc_obj module is using --field-selector which was introduced in the 3.9 client so using the master branch with other releases like 3.7 is not compatible. This isn't the only reason but it's the most recent incompatibility.
Using the release-3.7 branch with 3.7 is the recommended approach. We've also had a pretty big docs bug recommending use of the master branch which is now corrected here https://docs.openshift.org/latest/install_config/install/host_preparation.html#preparing-for-advanced-installations-origin and matches our README, "If you're running from the openshift-ansible master branch we can only guarantee compatibility with the newest origin releases in development."
Same goes for release-3.9 and any release that isn't 3.9. If you're using release-3.9 with 3.9 packages and getting this error then it's a definite bug.
Well, that likely explains my issue. Thanks for the heads up.
Ah, so openshift_release in inventory needs to be in sync with ansible repo used. Will correct this and try. Thanks.
I've commented "openshift_release" in inventory file and still getting the same error. If no version is specified does it use the latest? What value does openshift_release accept to install latest version? I also tried giving:
openshift_release=v3.10
openshift_pkg_version=-3.10.0
But still getting the error:
TASK [openshift_version : fail] *********************************************************************************************************************************************************************
fatal: [master.ocpdemo.local]: FAILED! => {"changed": false, "msg": "Package 'origin-3.10*' not found"}
to retry, use: --limit @/home/centos/openshift-ansible/playbooks/deploy_cluster.retry
If no version is specified does it use the latest?
It would use the latest found in the repos. What's the output of yum list origin
?
But still getting the error:
Neither 3.9 nor 3.10 are released and not available in CentOS repos
Ah ok, was able to proceed with 3.8
Installed Packages
origin.x86_64 3.7.0-1.0.7ed6862 @centos-openshift-origin
Right, in that case you should use release-3.7
branch
Description
Provide a brief description of your issue here. For example:
Error during multinode, single master install
Version
Please put the following version information in the code block indicated below.
Place the output between the code block below:
Steps To Reproduce
Expected Results
Describe what you expected to happen.
Observed Results
Error
For long output or logs, consider using a gist
Additional Information
Provide any additional information which may help us diagnose the issue.