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

cisco.cml.cml_lab_facts and cisco.cml.inventory not returning i"pv4_addresses" data #31

Open
ashwini-mhatre opened this issue Feb 15, 2024 · 2 comments

Comments

@ashwini-mhatre
Copy link

ashwini-mhatre commented Feb 15, 2024

OS / ENVIRONMENT

CML version - 2.5.1
virl2-client-2.6.1

STEPS TO REPRODUCE

when using cisco.cml.cml_lab_facts and cisco.cml.inventory playbooks, The resulted facts doesn't have ipv4_address data:

we have two nodes in our topology:
1.nxos
2.external connector

On nxos we have configured ip address on management interface that should come as part of facts of nxos node. which is not coming.

IP address was configured via DHCP from the external connector.

And also the /labs/{ lab_id }/layer3_addresses endpoint also does not return this data.

R1(config)# show ip interface brief vrf management 

IP Interface Status for VRF "management"(2)
Interface            IP Address      Interface Status
mgmt0                192.168.255.217 protocol-up/link-up/admin-up       
R1(config)# 

ACTUAL RESULTS

ok: [localhost] => {
    "changed": false,
    "cml_facts": {
        "details": {
            "created": "2024-02-14T12:56:36+00:00",
            "groups": [],
            "id": "d20b605b-ac4f-4db1-bb4c-a21007955119",
            "lab_description": "",
            "lab_notes": "",
            "lab_title": "nxos",
            "link_count": 1,
            "modified": "2024-02-14T12:56:36+00:00",
            "node_count": 2,
            "owner": "5b0eec9d-5437-4048-acc7-01ae30574a88",
            "owner_username": "*********",
            "state": "STARTED"
        },
        "nodes": {
            "ext-conn-0": {
                "ansible_host": null,
                "ansible_host_interface": null,
                "config": "virbr0",
                "cpus": null,
                "data_volume": null,
                "image_definition": null,
                "interfaces": {
                    "port": {
                        "ipv4_addresses": null,
                        "ipv6_addresses": null,
                        "is_physical": true,
                        "mac_address": null,
                        "readbytes": 3168110,
                        "readpackets": 42888,
                        "state": "STARTED",
                        "writebytes": 263862,
                        "writepackets": 1245
                    }
                },
                "node_definition": "external_connector",
                "ram": null,
                "state": "BOOTED",
                "tags": []
            },
            "nxos9000-0": {
                "ansible_host": null,
                "ansible_host_interface": null,
                "config": "\n!Command: show running-config\n!Running configuration last done at: Mon Feb 12 07:11:33 2024\n!Time: Mon Feb 12 07:11:33 2024\n\nversion 10.3(1) Bios:version\nhostname R1\nvdc R1 id 1\n  limit-resource vlan minimum 16 maximum 4094\n  limit-resource vrf minimum 2 maximum 4096\n  limit-resource port-channel minimum 0 maximum 511\n  limit-resource m4route-mem minimum 58 maximum 58\n  limit-resource m6route-mem minimum 8 maximum 8\n\nno password strength-check\nusername admin password 5 $5$AADOBF$GVXUV2cvmlZH42xDu6wnqfBpV9gXF61WGVNrGF5Gk6C  role network-admin\nusername ansible password 5 $5$GHBNKA$8ccD8KWjmP6NzxzkIRufl7giaUWjrhAn4SRrVWYZ4R1  role network-admin\nusername ansible passphrase  lifetime 99999 warntime 14 gracetime 3\nssh key rsa 2048\nip domain-lookup\nsnmp-server user admin network-admin auth md5 040F90283AEB9A92CCAF81F5CDA2639FFFCD priv aes-128 006084272498F8CD8F98DE888DEC6899C6D0 localizedV2key\nsnmp-server user ansible network-admin auth md5 5207BA419F48B4EB39149FDC00BE411BC828 priv aes-128 041EED4A876CACFD7656EA885CE15D3CE108 localizedV2key\nrmon event 1 log trap public description FATAL(1) owner PMON@FATAL\nrmon event 2 log trap public description CRITICAL(2) owner PMON@CRITICAL\nrmon event 3 log trap public description ERROR(3) owner PMON@ERROR\nrmon event 4 log trap public description WARNING(4) owner PMON@WARNING\nrmon event 5 log trap public description INFORMATION(5) owner PMON@INFO\n\nvlan 1\n\nvrf context management\n  ip name-server 192.168.255.1\n  ip route 0.0.0.0/0 192.168.255.1\n\ninterface Ethernet1/1\n\ninterface Ethernet1/2\n\ninterface Ethernet1/3\n\ninterface Ethernet1/4\n\ninterface Ethernet1/5\n\ninterface Ethernet1/6\n\ninterface Ethernet1/7\n\ninterface Ethernet1/8\n\ninterface Ethernet1/9\n\ninterface Ethernet1/10\n\ninterface Ethernet1/11\n\ninterface Ethernet1/12\n\ninterface Ethernet1/13\n\ninterface Ethernet1/14\n\ninterface Ethernet1/15\n\ninterface Ethernet1/16\n\ninterface Ethernet1/17\n\ninterface Ethernet1/18\n\ninterface Ethernet1/19\n\ninterface Ethernet1/20\n\ninterface Ethernet1/21\n\ninterface Ethernet1/22\n\ninterface Ethernet1/23\n\ninterface Ethernet1/24\n\ninterface Ethernet1/25\n\ninterface Ethernet1/26\n\ninterface Ethernet1/27\n\ninterface Ethernet1/28\n\ninterface Ethernet1/29\n\ninterface Ethernet1/30\n\ninterface Ethernet1/31\n\ninterface Ethernet1/32\n\ninterface Ethernet1/33\n\ninterface Ethernet1/34\n\ninterface Ethernet1/35\n\ninterface Ethernet1/36\n\ninterface Ethernet1/37\n\ninterface Ethernet1/38\n\ninterface Ethernet1/39\n\ninterface Ethernet1/40\n\ninterface Ethernet1/41\n\ninterface Ethernet1/42\n\ninterface Ethernet1/43\n\ninterface Ethernet1/44\n\ninterface Ethernet1/45\n\ninterface Ethernet1/46\n\ninterface Ethernet1/47\n\ninterface Ethernet1/48\n\ninterface Ethernet1/49\n\ninterface Ethernet1/50\n\ninterface Ethernet1/51\n\ninterface Ethernet1/52\n\ninterface Ethernet1/53\n\ninterface Ethernet1/54\n\ninterface Ethernet1/55\n\ninterface Ethernet1/56\n\ninterface Ethernet1/57\n\ninterface Ethernet1/58\n\ninterface Ethernet1/59\n\ninterface Ethernet1/60\n\ninterface Ethernet1/61\n\ninterface Ethernet1/62\n\ninterface Ethernet1/63\n\ninterface Ethernet1/64\n\ninterface mgmt0\n  ip address dhcp\n  vrf member management\nicam monitor scale\n\nline console\n  exec-timeout 0\nline vty\n  exec-timeout 0\nboot nxos bootflash:/nxos64-cs.10.3.1.F.bin\n\nno logging console",
                "cpus": null,
                "data_volume": null,
                "image_definition": null,
                "interfaces": {
                    "Ethernet1/1": {
                        "ipv4_addresses": [],
                        "ipv6_addresses": [],
                        "is_physical": true,
                        "mac_address": "52:54:00:17:71:97",
                        "readbytes": 0,
                        "readpackets": 0,
                        "state": "STARTED",
                        "writebytes": 0,
                        "writepackets": 0
                    },
                    "Ethernet1/2": {
                        "ipv4_addresses": [],
                        "ipv6_addresses": [],
                        "is_physical": true,
                        "mac_address": "52:54:00:0c:ce:e8",
                        "readbytes": 0,
                        "readpackets": 0,
                        "state": "STARTED",
                        "writebytes": 0,
                        "writepackets": 0
                    },
                    "Ethernet1/3": {
                        "ipv4_addresses": [],
                        "ipv6_addresses": [],
                        "is_physical": true,
                        "mac_address": "52:54:00:11:c5:79",
                        "readbytes": 0,
                        "readpackets": 0,
                        "state": "STARTED",
                        "writebytes": 0,
                        "writepackets": 0
                    },
                    "Loopback0": {
                        "ipv4_addresses": null,
                        "ipv6_addresses": null,
                        "is_physical": false,
                        "mac_address": null,
                        "readbytes": 0,
                        "readpackets": 0,
                        "state": "STARTED",
                        "writebytes": 0,
                        "writepackets": 0
                    },
                    "mgmt0": {
                        "ipv4_addresses": [],
                        "ipv6_addresses": [],
                        "is_physical": true,
                        "mac_address": "52:54:00:00:e9:71",
                        "readbytes": 263862,
                        "readpackets": 1245,
                        "state": "STARTED",
                        "writebytes": 3168110,
                        "writepackets": 42888
                    }
                },
                "node_definition": "nxosv9000",
                "ram": null,
                "state": "BOOTED",
                "tags": []
            }
        }
    },
    "invocation": {
        "module_args": {
            "force_basic_auth": true,
            "host": "*.*.*.*",
            "lab": "****",
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "timeout": 30,
            "user": "*****",
            "username": "******",
            "validate_certs": false
        }
    }
}
@NilashishC
Copy link

@stevenca Could you please help us with this? Thank you!

@jasonking3
Copy link
Collaborator

The CML layer3_addresses endpoint can sometimes stop working and will cause the behavior you are seeing. Restarting the CML services will usually restore the L3 functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants