Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aci_contract: No JSON object could be decoded error #23

Closed
aciguru opened this issue Apr 14, 2020 · 2 comments
Closed

aci_contract: No JSON object could be decoded error #23

aciguru opened this issue Apr 14, 2020 · 2 comments

Comments

@aciguru
Copy link
Contributor

aciguru commented Apr 14, 2020

SUMMARY

ISSUE TYPE
Informational

COMPONENT NAME
aci_contract

ANSIBLE VERSION
Observed in Ansible 2.5.1, 2.5.2 and 2.5.3, with Ansible Tower 3.2.4.

CONFIGURATION
DEFAULT_LOOKUP_PLUGIN_PATH(/etc/ansible/ansible.cfg) = [u'/usr/share/ansible/plu
DEFAULT_MODULE_PATH(/etc/ansible/ansible.cfg) = [u'/usr/share/ansible']

OS / ENVIRONMENT
N/A

STEPS TO REPRODUCE
Following APIC upgrade to Version: 3.1(2o), the ACI playbook demonstrated (https://youtu.be/Fs8STriMqTM?t=8m24s) began to intermittently fail when when adding contracts to the APIC. Running the same playbook against an APIC simulator on 3.0(1k) has not encountered errors, using the same playbook and the same instance of Ansible Tower. Only the target APIC was changed.

Enabling debug level 3 (-vvv) appears to reduce or eliminate the frequency of the problem, suggesting it may be load or timing related. I suspect the fault is with the APIC controller on release 3.1(2o). This is an informational issue only.

    - name: Add (or delete) the contract
      aci_contract:
        hostname: '{{ inventory_hostname }}'
        username: '{{ apic.username }}'
        password: '{{ apic.password }}'
        validate_certs: '{{ validate_certs }}'
        state: '{{ desired_state }}'
        #
        contract: '{{ item.contract_name }}'
        description: '{{ item.contract_descr }}'
        tenant: '{{ tenant }}'
        scope: '{{ scope }}'  
      with_items: '{{ tpe }}'
      tags: contract

EXPECTED RESULTS
The contract would be added to the APIC.

ACTUAL RESULTS

{
    "changed": false,
    "error": {
        "code": -1,
        "text": "Unable to parse output as JSON, see 'raw' output. No JSON object could be decoded"
    }
}
failed: [aci-demo.sandbox.wwtatc.local] (item={u'contract_name': u'QA_Bling_Enterprise-to-Prod_Qualys', u'dst_port_start': u'4445', u'dst_port_end': u'4445', u'ip_protocol': u'tcp', u'contract_subject_name': u'sub-QA_Bling_Enterprise-to-Prod_Qualys', u'contract_descr': u'WorkOrder6756', u'entry_name': u'tcp-port_4445', u'filter_name': u'tcp-4445', u'contract_subject_descr': u'WorkOrder6756', u'filter_descr': u'WorkOrder6756', u'filter_entry_descr': u'ent_descr', u'ether_type': u'ip'}) => {
    "changed": false,
    "error": {
        "code": -1,
        "text": "Unable to parse output as JSON, see 'raw' output. No JSON object could be decoded"
    },
    "item": {
        "contract_descr": "WorkOrder6756",
        "contract_name": "QA_Bling_Enterprise-to-Prod_Qualys",
        "contract_subject_descr": "WorkOrder6756",
        "contract_subject_name": "sub-QA_Bling_Enterprise-to-Prod_Qualys",
        "dst_port_end": "4445",
        "dst_port_start": "4445",
        "entry_name": "tcp-port_4445",
        "ether_type": "ip",
        "filter_descr": "WorkOrder6756",
        "filter_entry_descr": "ent_descr",
-snip-
}
@aciguru
Copy link
Contributor Author

aciguru commented Apr 14, 2020

ansible/ansible#40636

@lhercot lhercot removed their assignment Jun 11, 2020
@lhercot lhercot removed aci duplicate This issue or pull request already exists labels Jun 18, 2020
@lhercot
Copy link
Member

lhercot commented Oct 12, 2020

This will be addressed as part of the connection plugin when we get to it #25

@lhercot lhercot closed this as completed Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants