Conditional check failed: 'dict object' has no attribute 'ActiveState'

Solution Verified - Updated -

Issue

  • While upgrading OCP from 3.9 to 3.10, the upgrade failed and below is the error
TASK [etcd : Set runtime to docker] **************************************************************************************************************************
fatal: [master1]: FAILED! => {"failed": true, "msg": "The conditional check 'etcd_container_service.status.ActiveState == 'active' and not l_is_etcd_system_container' failed. The error was: error while evaluating conditional (etcd_container_service.status.ActiveState == 'active' and not l_is_etcd_system_container): 'dict object' has no attribute 'ActiveState'\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/roles/etcd/tasks/runtime.yml': line 24, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Set runtime to docker\n  ^ here\n"}
fatal: [master2]: FAILED! => {"failed": true, "msg": "The conditional check 'etcd_container_service.status.ActiveState == 'active' and not l_is_etcd_system_container' failed. The error was: error while evaluating conditional (etcd_container_service.status.ActiveState == 'active' and not l_is_etcd_system_container): 'dict object' has no attribute 'ActiveState'\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/roles/etcd/tasks/runtime.yml': line 24, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Set runtime to docker\n  ^ here\n"}
fatal: [master3]: FAILED! => {"failed": true, "msg": "The conditional check 'etcd_container_service.status.ActiveState == 'active' and not l_is_etcd_system_container' failed. The error was: error while evaluating conditional (etcd_container_service.status.ActiveState == 'active' and not l_is_etcd_system_container): 'dict object' has no attribute 'ActiveState'\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/roles/etcd/tasks/runtime.yml': line 24, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Set runtime to docker\n  ^ here\n"}
  • When running a test playbook (details in Diagnostic Steps) to simply attempt to register a service named etcd_container and get the following results, with status field completely blank:
$ ansible-playbook -i master1, test.yml --ask-become-pass

SUDO password:

PLAY [master1] ***********************************************************************************************************************************************

TASK [Gathering Facts] ***************************************************************************************************************************************

ok: [master1]

TASK [Check if etcd service exists] **************************************************************************************************************************

ok: [master1]

TASK [debug] *************************************************************************************************************************************************

ok: [master1] => {

    "etcd_container_service": {

        "changed": false,

        "failed": false,

        "name": "etcd_container",

        "status": {}

    }

}

PLAY RECAP ***************************************************************************************************************************************************

master1                    : ok=3    changed=0    unreachable=0    failed=0

Environment

  • OpenShift Container Platform
    • 3.10

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content