Skip to content

Polling multiple devices results in failure due to local datastore overlap #68

@mmartinezonsemi

Description

@mmartinezonsemi
SUMMARY

When Polling multiple devices via persist = results in failure due to local datastore overlap

ISSUE TYPE
  • Bug Report
{
  "changed": false,
  "msg": "Failed to clone repository: https://github.com/mmartinezonsemi/SOT.git",
  "output": [
    {
      "command": "git -C . -c 'http.extraheader=AUTHORIZATION: basic <TOKEN>' clone --depth=1 --progress --no-single-branch https://github.com/mmartinezonsemi/SOT.git",
      "env": "",
      "stdout_lines": [],
      "stderr_lines": [
        "fatal: destination path 'sot' already exists and is not an empty directory."
      ],
      "return_code": 128
    }
  ],
  "branch_name": "",
  "branches": [],
  "name": "",
  "path": "",
  "_ansible_no_log": null
}
COMPONENT NAME

Network.base

operation: persist

ANSIBLE VERSION
ansible-playbook [core 2.14.0]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /runner/requirements_collections:/root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible-playbook
  python version = 3.9.13 (main, Nov  9 2022, 13:16:24) [GCC 8.5.0 20210514 (Red Hat 8.5.0-15)] (/usr/bin/python3.9)
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
network.base 4.0
ansible scm
CONFIGURATION
Using automation platform
OS / ENVIRONMENT

C9300 / C3850 switches

STEPS TO REPRODUCE

Simply try to run operation persist against more than 1 device.

- name: Network Resource Manager
  ansible.builtin.include_role:
    name: network.base.resource_manager
  vars:
    operation: persist
    ansible_network_os: cisco.ios.ios
    resources:
      - 'acl_interfaces'
      - 'acls'
      - 'bgp_address_family'
      - 'bgp_global'
      - 'hostname'
      - 'interfaces'
      - 'l2_interfaces'
      - 'l3_interfaces'
      - 'lacp'
      - 'lacp_interfaces'
      - 'lag_interfaces'
      - 'lldp_global'
      - 'lldp_interfaces'
      - 'logging_global'
      - 'ntp_global'
      - 'ospf_interfaces'
      - 'ospfv2'
      - 'ospfv3'
      - 'prefix_lists'
      - 'route_maps'
      - 'service'
      - 'snmp_server'
      - 'static_routes'
      - 'vlans'
    data_store:
      scm:
        origin:   
          url: "***"
          token: "***"
          user:
            name: ***
            email: ***
EXPECTED RESULTS

What I expect here is to have one branch with multiple devices - any respective updates should be in one single branch..

Currently it seems i can get it working by getting it to run in serial mode.. however this opens a new branch for each device which is not idea at all.

ACTUAL RESULTS
{
  "changed": false,
  "msg": "Failed to clone repository: https://github.com/mmartinezonsemi/SOT.git",
  "output": [
    {
      "command": "git -C . -c 'http.extraheader=AUTHORIZATION: basic <TOKEN>' clone --depth=1 --progress --no-single-branch https://github.com/mmartinezonsemi/SOT.git",
      "env": "",
      "stdout_lines": [],
      "stderr_lines": [
        "fatal: destination path 'sot' already exists and is not an empty directory."
      ],
      "return_code": 128
    }
  ],
  "branch_name": "",
  "branches": [],
  "name": "",
  "path": "",
  "_ansible_no_log": null
}

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions