Bug #14324
closedValidation error: Content type must be one of the following: docker, file, puppet, yum on creating ostree repo
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1318549
Description of problem:
I was trying to create ostree type repo from webUI with sat6.2 snap4 and found below error:
ActiveRecord::RecordInvalid: Validation failed: Content type must be one of the following: docker, file, puppet, yum
2016-03-17 04:26:37 [app] [I] Started POST "/katello/api/v2/repositories?organization_id=1" for 10.65.193.200 at 2016-03-17 04:26:37 -0400
2016-03-17 04:26:37 [app] [I] Processing by Katello::Api::V2::RepositoriesController#create as JSON
2016-03-17 04:26:37 [app] [I] Parameters: {"product_id"=>"7", "unprotected"=>true, "checksum_type"=>nil, "download_policy"=>nil, "mirror_on_sync"=>true, "name"=>"fedoratree22", "label"=>"fedoratree22", "content_type"=>"ostree", "url"=>"https://dl.fedoraproject.org/pub/fedora/linux/atomic/22/", "organization_id"=>"1", "api_version"=>"v2", "repository"=>{"name"=>"fedoratree22", "label"=>"fedoratree22", "url"=>"https://dl.fedoraproject.org/pub/fedora/linux/atomic/22/", "unprotected"=>true, "content_type"=>"ostree", "product_id"=>"7", "checksum_type"=>nil, "mirror_on_sync"=>true, "download_policy"=>nil}}
2016-03-17 04:26:38 [foreman-tasks/action] [E] Validation failed: Content type must be one of the following: docker, file, puppet, yum (ActiveRecord::RecordInvalid)
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/validations.rb:57:in `save!'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/attribute_methods/dirty.rb:29:in `save!'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:273:in `block in save!'
| /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status'
Please note that I've seelcted ostree type and even on submit the add_repo form, UI raises error. but repo created successfully.
Version-Release number of selected component (if applicable):
sat 6.2 snap4
How reproducible:
always
Steps to Reproduce:
1. create a ostree type repo
2.
3.
Actual results:
ActiveRecord::RecordInvalid: Validation failed: Content type must be one of the following: docker, file, puppet, yum
Expected results:
there shoudn't be any error on creating ostree repository
Additional info:
Updated by Partha Aji over 8 years ago
- Category changed from Repositories to Installer
foreman-installer --katello-enable-ostree=true
should restart foreman-tasks and httpd after installing ostree.
Updated by Partha Aji over 8 years ago
- Status changed from New to Closed
- Pull request https://github.com/Katello/puppet-katello/pull/118 added
Updated by Partha Aji over 8 years ago
- Translation missing: en.field_release set to 86