Project

General

Profile

Bug #30932

plugin installation fails with "ActiveRecord::RecordInvalid: Validation failed: Name has already been taken"

Added by Eric Helms 2 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Plugin integration
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1882276

Description of problem:
Satellite-installer fails at execution of '/usr/sbin/foreman-rake -- config -k 'remote_execution_cockpit_url' -v '/webcon/=%{host}''

Version-Release number of selected component (if applicable):
- Satellite 6.8.0 snap 17

How reproducible:
- Always

Steps to Reproduce:
1. Try installing satellite 6.8.0 snap 17

Actual results:
- Fails at Execution of '/usr/sbin/foreman-rake -- config -k 'remote_execution_cockpit_url' -v '/webcon/=%{host}'' returned 1: rake aborted!

Expected results:
- Satellite 6.8.0 installed successfully.

Additional info:

Associated revisions

Revision 324bafdb (diff)
Added by Eric Helms 2 months ago

Fixes #30932: Rescue from RecordInvalid for plugin role creation (#8032)

The exception can be raised two if Rails environments start in parallel (two requests, one request and a rake task) and permissions are not yet populated. Then the race condition can occur, as two different requests are trying to create the same role. This is another exception that was observed during this race condition, so we need to rescue from it too.

History

#1 Updated by The Foreman Bot 2 months ago

  • Assignee set to Eric Helms
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8032 added

#2 Updated by The Foreman Bot 2 months ago

  • Fixed in Releases 2.3.0 added

#3 Updated by Eric Helms 2 months ago

  • Status changed from Ready For Testing to Closed

#4 Updated by Tomer Brisker 2 months ago

  • Fixed in Releases 2.1.4, 2.2.0 added
  • Fixed in Releases deleted (2.3.0)

#5 Updated by Tomer Brisker about 2 months ago

  • Subject changed from Satellite installation fails at execution of '/usr/sbin/foreman-rake -- config -k 'remote_execution_cockpit_url' -v '/webcon/=%{host}'' to installation fails at execution of '/usr/sbin/foreman-rake -- config -k 'remote_execution_cockpit_url' -v '/webcon/=%{host}''

#6 Updated by Tomer Brisker about 1 month ago

  • Category changed from Rake tasks to Plugin integration
  • Subject changed from installation fails at execution of '/usr/sbin/foreman-rake -- config -k 'remote_execution_cockpit_url' -v '/webcon/=%{host}'' to plugin installation fails with "ActiveRecord::RecordInvalid: Validation failed: Name has already been taken"

Also available in: Atom PDF