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

Conflicting Domain creation at the same time results in an ISE (500) #4183

Closed
jlsherrill opened this issue Jul 28, 2023 · 0 comments · Fixed by #4245
Closed

Conflicting Domain creation at the same time results in an ISE (500) #4183

jlsherrill opened this issue Jul 28, 2023 · 0 comments · Fixed by #4245

Comments

@jlsherrill
Copy link
Contributor

Version
3.29.1

Describe the bug
if multiple requests are dispatched to pulp at the same time to create a domain with the same name, pulp will return an ISE instead of a proper 400 (bad request).

To Reproduce
trigger multiple requests:

http --auth admin:password  localhost:8080/pulp/default/api/v3/domains/  name=foo2  storage_class="pulpcore.app.models.storage.FileSystem"  storage_settings[location]="/var/lib/pulp/foo2"  &
http --auth admin:password  localhost:8080/pulp/default/api/v3/domains/  name=foo2  storage_class="pulpcore.app.models.storage.FileSystem"  storage_settings[location]="/var/lib/pulp/foo2" &

One will result in an ISE, while the other creates the domain. If i try again after its created, i get a proper 400 Bad Request.

Expected behavior

I'd expect a 400 or 409

Additional context
We can't pre-create the domains, nor can we control when the requests come in that need a domain created, so we can't avoid this situation. We've worked around it for now, so i wouldn't consider this a high priority, but it does prevent us from detecting actual 500s if they were to occur as easily. (Right now we just assume its a conflict).

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

Successfully merging a pull request may close this issue.

2 participants