| Summary: | [Upgrade failed] Error in ansible-playbook | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Vladislav Walek <vwalek> |
| Component: | Cluster Version Operator | Assignee: | Jason DeTiberus <jdetiber> |
| Status: | CLOSED DUPLICATE | QA Contact: | Anping Li <anli> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.3.0 | CC: | aos-bugs, jokerman, mmccomas |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-10-27 13:33:42 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
*** This bug has been marked as a duplicate of bug 1388445 *** Closing this as a dupe, we don't document --check works nor do we document that ansible can be run inside a container currently. We'll work on fixing the examples task during containerized upgrade in the duped bug. |
Description of problem: During the upgrade from 3.2 to 3.3 by running check in environment: #ansible-playbook /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade.yml --check customer is facing error in /usr/share/ansible/openshift-ansible/playbooks/common/openshift-cluster/upgrades/pre.yml in section: - name: Evaluate additional groups for upgrade ... - name: Evaluate etcd_hosts_to_backup add_host: name: "{{ item }}" groups: etcd_hosts_to_backup with_items: groups.oo_etcd_to_config if groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config | length > 0 else groups.oo_first_master The error is below: The error was: 'item' is undefined\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/playbooks/common/openshift-cluster/upgrades/pre.yml': line 30, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n tasks:\n - name: Evaluate etcd_hosts_to_backup\n ^ here\n"} He is running the latest version of ansible 2.2 and openshift-ansible 3.3.28.1. Check is performed on containerized version of environment. etcd group is defined in ansible-hosts. I've tested to run the pre.yml with check and it fails also. The message is showing it is: [DEPRECATION WARNING]: Using bare variables is deprecated. Update your playbooks so that the environment value uses the full variable syntax ('{{groups.oo_etcd_to_config if groups.oo_etcd_to_config is defined and groups.oo_etcd_to_config | length > 0 else groups.oo_first_master}}'). [DEPRECATION WARNING]: Skipping task due to undefined Error, in the future this will be a fatal error.: 'dict object' has no attribute 'oo_first_master'. The task for oo_first_master will end as: TASK [Evaluate oo_first_master] ************************************************ skipping: [localhost] According the docs [1] the check could be disabled for specific task by adding "check_mode: no". Also based on the docs it should not fail. Can it be disabled? Is the task "Evaluate etcd_hosts_to_backup" needed in the upgrade? [1] http://docs.ansible.com/ansible/playbooks_checkmode.html Version-Release number of selected component (if applicable): ansible-2.2.0-0.50.prerelease.el7.noarch openshift-ansible-3.3.28-1.git.0.762256b.el7.noarch from rhel-7-server-ose-3.3-rpms How reproducible: executed on my lab, results are same as above Steps to Reproduce: 1. 2. 3. Actual results: Same result as customer Expected results: Additional info: