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

[netbox] Improve superuser account creation #2488

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

k-304
Copy link

@k-304 k-304 commented Apr 10, 2024

Creating a superuser is not idempotent. Since it is based on the migration output, it may be run when performing NetBox updates (at this time, the user does exist already). The task will fail and stop the update.

This change adds a check if the superuser is present or not. Depending on this (rather than depending on the migration task output), a user will be created or the task skipped.

@k-304 k-304 requested review from drybjed and ypid as code owners April 10, 2024 08:12
@k-304 k-304 force-pushed the netbox-superuser-upstream branch from c6d107f to 58c3ae1 Compare April 10, 2024 08:14
@k-304 k-304 requested a review from tasosalvas as a code owner April 10, 2024 08:14
@k-304 k-304 force-pushed the netbox-superuser-upstream branch 3 times, most recently from 7591c80 to e5dc5e5 Compare April 10, 2024 08:26
@k-304 k-304 force-pushed the netbox-superuser-upstream branch from e5dc5e5 to 7d455a1 Compare April 10, 2024 08:27
@l00ptr
Copy link

l00ptr commented May 13, 2024

your proposition look good to me !

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

Successfully merging this pull request may close these issues.

None yet

2 participants