Project

General

Profile

Bug #6108

Attempting to create a content view w/ more than one KS tree fails

Added by Brad Buckingham over 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Web UI
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1105310
Description of problem:
If user tries to create a CV with more than one KS repo, the completion will fail.

Version-Release number of selected component (if applicable):
Satellite-6.0.3-RHEL-6-20140605.0 (and the build before that, really)

How reproducible:
Probably pretty repro'able

Steps to Reproduce:
1. Sync two kickstart repos.
2. Add both of these to a content view
3. Attempt to publish.

Actual results:
Something like

Validation failed: Name has already been taken (ActiveRecord::RecordInvalid)
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:56:in `save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods/dirty.rb:33:in `save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:246:in `block in save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:246:in `save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:41:in `create!'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/models/katello/concerns/medium_extensions.rb:53:in `find_or_create_medium'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/models/katello/concerns/medium_extensions.rb:35:in `update_media'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/katello/foreman.rb:24:in `block in update_foreman_content'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/katello/foreman.rb:24:in `update_foreman_content'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/katello/foreman/content_update.rb:32:in `finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/action.rb:445:in `block (2 levels) in execute_finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware/stack.rb:26:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/middleware/remote_action.rb:29:in `block in finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/middleware/remote_action.rb:51:in `block (2 levels) in as_remote_user'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/katello/util/thread_session.rb:85:in `set_pulp_config'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/middleware/remote_action.rb:41:in `as_pulp_user'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/middleware/remote_action.rb:50:in `block in as_remote_user'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/katello/util/thread_session.rb:92:in `set_cp_config'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/middleware/remote_action.rb:36:in `as_cp_user'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/middleware/remote_action.rb:49:in `as_remote_user'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/middleware/remote_action.rb:29:in `finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/action/progress.rb:30:in `with_progress_calculation'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/action/progress.rb:22:in `finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/middleware/keep_locale.rb:28:in `block in finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/middleware/keep_locale.rb:35:in `with_locale'
/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/middleware/keep_locale.rb:28:in `finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware/world.rb:30:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/action.rb:444:in `block in execute_finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/action.rb:353:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/action.rb:353:in `block in with_error_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/action.rb:353:in `catch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/action.rb:353:in `with_error_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/action.rb:443:in `execute_finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/action.rb:222:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:9:in `block (2 levels) in execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/execution_plan/steps/abstract.rb:141:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/execution_plan/steps/abstract.rb:141:in `with_meta_calculation'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:8:in `block in execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:22:in `open_action'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/execution_plan/steps/abstract_flow_step.rb:7:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/executors/parallel/sequential_manager.rb:72:in `run_step'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/executors/parallel/sequential_manager.rb:57:in `dispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/executors/parallel/sequential_manager.rb:64:in `block in run_in_sequence'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/executors/parallel/sequential_manager.rb:64:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/executors/parallel/sequential_manager.rb:64:in `all?'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/executors/parallel/sequential_manager.rb:64:in `run_in_sequence'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/executors/parallel/sequential_manager.rb:53:in `dispatch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/executors/parallel/sequential_manager.rb:28:in `block (2 levels) in finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware/stack.rb:26:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware.rb:41:in `finalize_phase'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware.rb:41:in `finalize_phase'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware/stack.rb:26:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware.rb:16:in `pass'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware.rb:41:in `finalize_phase'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware/stack.rb:22:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/middleware/world.rb:30:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/executors/parallel/sequential_manager.rb:27:in `block in finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/transaction_adapters/active_record.rb:5:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/executors/parallel/sequential_manager.rb:24:in `finalize'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/executors/parallel/worker.rb:23:in `block in on_message'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:859:in `block in assigns'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:858:in `tap'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:858:in `assigns'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:138:in `match_value'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:116:in `block in match'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:115:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/algebrick-0.4.0/lib/algebrick.rb:115:in `match'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/executors/parallel/worker.rb:17:in `on_message'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/micro_actor.rb:82:in `on_envelope'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/micro_actor.rb:72:in `receive'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/micro_actor.rb:99:in `block (2 levels) in run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/micro_actor.rb:99:in `loop'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/micro_actor.rb:99:in `block in run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/micro_actor.rb:99:in `catch'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/micro_actor.rb:99:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.6.1/lib/dynflow/micro_actor.rb:13:in `block in initialize'
/opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/logging-1.8.1/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
Expected results:
Success, I imagine.

Additional info:

Associated revisions

Revision 75f45ba1 (diff)
Added by Brad Buckingham over 6 years ago

fixes #6108/BZ 1105310 - ensure unique name when creating installation media

When publishing a kickstart repository (which could be the result of syncing the repo or publishing it as part of a content view), installation media will be created.

The media name currently uses the following convention:
org.label/lifecycle_environment.label[/content_view.label] distro.family distro.variant distro.version distro.arch

For example:
ACME_Corporation/Library RedHat Server 6.5 x86_64
ACME_Corporation/Library/ks_view RedHat Server 6.5 x86_64

The current convention can cause name conflicts when creating the media as both the 6Server and 6.5 kickstart repos have distro.version of "6.5"; however, they are 2 separate repos/media from a content management point of view.

In order to address this, this commit modifies the naming convention to the following:
org.label/lifecycle_environment.label[/content_view.label]/repo.label

E.g:
ACME_Corporation/Library/Red_Hat_6_Server_Kickstart_x86_64_6_5
ACME_Corporation/Library/Red_Hat_6_Server_Kickstart_x86_64_6Server

Revision 5fd2ac54
Added by Brad Buckingham over 6 years ago

Merge pull request #4227 from bbuckingham/issue-6108

fixes #6108/BZ 1105310 - ensure unique name when creating installation media

History

#1 Updated by Brad Buckingham over 6 years ago

  • Assignee set to Brad Buckingham
  • Target version set to 45
  • Legacy Backlogs Release (now unused) set to 13
  • Triaged set to Yes

#2 Updated by Brad Buckingham over 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset katello|commit:75f45ba1405b22270c2e82ed83468b47dab55f5e.

Also available in: Atom PDF