nautobot / nautobot-app-golden-config

Golden Configuration App for Nautobot.
https://docs.nautobot.com/projects/golden-config/en/latest/
Other
101 stars 57 forks source link

Sync golden config setting from Git and having two platforms with same network driver fails #794

Open jeffkala opened 3 months ago

jeffkala commented 3 months ago

Environment

Expected Behavior

syncs in properly and doesn't result in traceback

Observed Behavior

Generic failure.

Steps to Reproduce

  1. Create two platforms both mapped to the same network_driver

  2. Try to sync in GC settings from repo

  3. Repo sync fails with

    {
    "exc_message": [
        "get() returned more than one Platform -- it returned 2!"
    ],
    "exc_module": "nautobot.dcim.models.devices",
    "exc_type": "Platform.MultipleObjectsReturned"
    }
  4. compliance job fails with

RENDER COMPLIANCE TASK GROUP failed: list index out of range
--
bryanculver commented 2 months ago

@jeffkala could you provide an example Git repo and data?

jeffkala commented 2 months ago

Yes, will provide shortly.

jeffkala commented 2 months ago

@bryanculver repo https://github.com/jeffkala/home-gc-templates branch: broken-properties

repo is public so no token should be needed.

  1. create platform called "Cisco IOS" and in the platform set the network driver to "cisco_ios".
  2. create platform called "Cisco IOS-XE" and in the platform set the network driver to "cisco_ios".
  3. Create/sync the repo with definition above and the failure should be visible.

let me know if anything else is needed.