Skip to content

cisco.aci.aci_rest fails in ansible-core 2.19.0 (DCNE-504) #799

@velotiger

Description

@velotiger

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Module cisco.aci.aci_rest does not work in ansible-core 2.19.0.

  • It seems that integer parameter values are misinterpreted: the 1st numeral of an integer parameter value is somehow stripped; see example below.
  • Platform: Python 3.13.5, macOS 15.6, Apple M1
  • Authentication: local user, certificate-based

Affected Module Name(s):

  • aci_rest

APIC version and APIC Platform

  • V5.2.8i and on-prem.

Collection versions

  • cisco.aci 2.12.0

Output/ Error message

[ERROR]: Task failed: Module failed: APIC Error 120: unknown property value 2768, , name prio, class lacpIfPol [(Dn0)] Dn0=, 
Origin: aci-demo.yaml:39:5

37
38   tasks:
39   - name: "Create portchannel member policy."
       ^ column 5

failed: [myapic] (item=0 present, PO-MEMBER POM_FASTLACP) => 
    ansible_index_var: idx
    ansible_loop_var: item
    changed: false
    error:
        code: '120'
        text: 'unknown property value 2768, , name prio, class lacpIfPol [(Dn0)] Dn0=, '
    idx: 0
    item:
        ifpoltype_Name: PO-MEMBER
        ifpoltype_ifpol_Name: POM_FASTLACP
        ifpoltype_ifpol_descr: Port Channel Member Policy for Fast LACP, Priority 32768
        ifpoltype_ifpol_prio: 32768
        ifpoltype_ifpol_state: present
        ifpoltype_ifpol_txrate: fast
    msg: 'APIC Error 120: unknown property value 2768, , name prio, class lacpIfPol [(Dn0)]
        Dn0=, '
    status: -1
failed: [myapic] (item=1 present, PO-MEMBER POM_NORMALLACP) => 
    ansible_index_var: idx
    ansible_loop_var: item
    changed: false
    error:
        code: '120'
        text: 'unknown property value 2768, , name prio, class lacpIfPol [(Dn0)] Dn0=, '
    idx: 1
    item:
        ifpoltype_Name: PO-MEMBER
        ifpoltype_ifpol_Name: POM_NORMALLACP
        ifpoltype_ifpol_descr: Port Channel Member Policy for Normal LACP, Priority 32768
        ifpoltype_ifpol_prio: 32768
        ifpoltype_ifpol_state: present
        ifpoltype_ifpol_txrate: normal
    msg: 'APIC Error 120: unknown property value 2768, , name prio, class lacpIfPol [(Dn0)]
        Dn0=, '
    status: -1

Expected Behavior

I expected that our tasks that make use of module cisco.aci.aci_rest work as before in ansible-core 2.18.x.

Actual Behavior

Any task that feeds an integer parameter value to cisco.aci.aci_rest fails in ansible-core 2.19.0. Portchannel member policy (lacpIfPol) is just an example. E.g. the behaviour for other policies (link level: fabricHIfPol) that make use of integer parameter values is similar: The 1st numeral of the value is stripped and the remaining number is printed in the error output.

Playbook tasks to Reproduce

# aci-demo.yaml
---

- name: "ACI linklevel demo playbook."
  hosts: myapic
  gather_facts: no

  vars:
    aci_generic_dict: &aci_generic
      host: myapic
      username: "{{ APIC_CERT_USER | default('certuser') }}"
      private_key: "{{ APIC_CERT_KEY | default('nocertificate') }}"
      use_proxy: no
      use_ssl: yes
      validate_certs: yes
    PORTCHANNEL_MEMBER_POLICIES:
      ifpoltype:
      - Name: PO-MEMBER
        ifpol:
        - Name: POM_FASTLACP
          descr: Port Channel Member Policy for Fast LACP, Priority 32768
          prio: 32768
          state: present
          txrate: fast
        - Name: POM_NORMALLACP
          descr: Port Channel Member Policy for Normal LACP, Priority 32768
          prio: 32768
          state: present
          txrate: normal

  module_defaults:
    group/cisco.aci.all:
      <<: *aci_generic
    cisco.aci.aci_rest:
      method: post
      path: /api/mo/uni.json

  tasks:
  - name: "Create portchannel member policy."
    cisco.aci.aci_rest:
      path: "/api/mo/uni/infra/lacpifp-{{ item.ifpoltype_ifpol_Name }}.json"
      content: "{{ PAYLOAD }}"
    loop: "{{ PORTCHANNEL_MEMBER_POLICIES|aci_listify('ifpoltype', 'ifpol') }}"
    loop_control:
      label: "{{ idx }} {{ status }}, {{ item.ifpoltype_Name }} {{ item.ifpoltype_ifpol_Name }}"
      index_var: idx
    vars:
      status: "{{ item.ifpoltype_ifpol_state }}"
      PAYLOAD:
        lacpIfPol:
          attributes:
            descr: "{{ item.ifpoltype_ifpol_descr }}"
            name: "{{ item.ifpoltype_ifpol_Name }}"
            prio: "{{ item.ifpoltype_ifpol_prio }}"
            txRate: "{{ item.ifpoltype_ifpol_txrate }}"

...

Important Factoids

References

  • #0000

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingjira-syncSync this issue to Jira

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions