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

data import produces failures for existing users (e.g. admin at least) #56

Open
itheodoridis opened this issue Jul 13, 2021 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@itheodoridis
Copy link

Environment

  • Python version: 3.8.10
  • Nautobot version: 1.0.3
  • nautobot-netbox-importer version: 1.4.0

Expected Behavior

no failures when importing data

Observed Behavior

existing users cause failures, even if no users are there beyond admin, the existence of admin causes a failure

Steps to Reproduce

  1. Create a working installation of Nautobot 1.0.3 on Ubuntu 20.04 with nautobot-netbox-importer 1.4.0 following installation guide for Nautobot on Ubuntu and installation guide from plugin github page.
  2. Export data from a working installation of Netbox 2.10.4 following instructions on the plugin github page
  3. Import data with the use of nautobot-netbox-importer following instructions on the plugin github page
@glennmatthews
Copy link
Contributor

Thanks for the report! This is somewhat "working as designed", as inconvenient as that may be, in that it's not trivial for the importer to determine that the user "admin" in the NetBox export is meant to be the same user as "admin" that you've pre-created in Nautobot. Since their primary keys (PKs) don't match, as far as the importer is concerned, these are two separate User accounts who happen to share the same username (which is not permitted in the database, hence why the user creation fails).

The workaround that I would recommend is to ensure that you do not create a user in Nautobot that has the same username as a user that exists in the NetBox database dump - if you really need to create a Nautobot user account prior to running the importer, be sure that it's got a username that does not conflict, even if that means using something like admin2 or nautobot-admin instead of admin.

This would be a good thing to add to the README and/or the FAQ as a potential issue to be avoided; unfortunately I don't think this is something that will be fixable as such.

@glennmatthews glennmatthews added the documentation Improvements or additions to documentation label Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants