Hide Forgot
Description of problem: I was trying to blacklist some packages via package filters. And I tried package filters from cli since filters are not working from webUI. A defect is already logged (755522). So this time, I created filters from cli and tried to promote the product from UI. when I promoted the product from 'locker' to next env. Product is promoted with applied filters. Now I created a new changeset and tried to promote the blacklisted packages because +ADD option was available. When I clicked on +Add to add the package n changeset, got ""Validation failed: Packages is invalid". UI completely hanged. (See first attachment) Production.log says: ===================== Started PUT "/katello//changesets/12" for 10.65.193.48 at Wed Dec 14 17:04:34 +0530 2011 Processing by ChangesetsController#update as Parameters: {"data"=>[{"product_id"=>"12", "adding"=>true, "item_name"=>"gofer-0.63-1.fc15.noarch", "type"=>"package", "item_id"=>"1fc68387-6681-4d2a-bdb7-8cb72bf44181"}], "timestamp"=>"1323862461", "id"=>"12"} Validation failed: Packages is invalid Validation failed: Packages is invalid #<ActiveRecord::RecordInvalid: Validation failed: Packages is invalid> /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/validations.rb:49:in `save!' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/attribute_methods/dirty.rb:30:in `save!' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:245:in `save!' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:292:in `with_transaction_returning_status' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:207:in `transaction' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:290:in `with_transaction_returning_status' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:245:in `save!' /usr/share/katello/app/controllers/changesets_controller.rb:216:in `update' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal/implicit_render.rb:4:in `send_action' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal/implicit_render.rb:4:in `send_action' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/abstract_controller/base.rb:150:in `process_action' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal/rendering.rb:11:in `process_action' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/abstract_controller/callbacks.rb:18:in `process_action' /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:467:in `_run__2091943037__process_action__944252406__callbacks' /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:221:in `_conditional_callback_around_2254' /usr/share/katello/lib/util/threadsession.rb:79:in `thread_locals' /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:220:in `_conditional_callback_around_2254' /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:451:in `_run__2091943037__process_action__944252406__callbacks' /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:410:in `send' /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:410:in `_run_process_action_callbacks' /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:94:in `send' /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:94:in `run_callbacks' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/abstract_controller/callbacks.rb:17:in `process_action' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal/rescue.rb:17:in `process_action' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal/instrumentation.rb:30:in `process_action' /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/notifications.rb:52:in `instrument' /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/notifications/instrumenter.rb:21:in `instrument' /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/notifications.rb:52:in `instrument' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal/instrumentation.rb:29:in `process_action' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/abstract_controller/base.rb:119:in `process' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/abstract_controller/rendering.rb:41:in `process' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal.rb:138:in `dispatch' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal.rb:178:in `action' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/routing/route_set.rb:62:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/routing/route_set.rb:62:in `dispatch' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/routing/route_set.rb:27:in `call' /usr/lib/ruby/gems/1.8/gems/rack-mount-0.7.1/lib/rack/mount/route_set.rb:150:in `call' /usr/lib/ruby/gems/1.8/gems/rack-mount-0.7.1/lib/rack/mount/code_generation.rb:93:in `recognize' /usr/lib/ruby/gems/1.8/gems/rack-mount-0.7.1/lib/rack/mount/code_generation.rb:68:in `optimized_each' /usr/lib/ruby/gems/1.8/gems/rack-mount-0.7.1/lib/rack/mount/code_generation.rb:92:in `recognize' /usr/lib/ruby/gems/1.8/gems/rack-mount-0.7.1/lib/rack/mount/route_set.rb:141:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/routing/route_set.rb:493:in `call' /usr/lib/ruby/gems/1.8/gems/warden-1.0.5/lib/warden/manager.rb:35:in `call' /usr/lib/ruby/gems/1.8/gems/warden-1.0.5/lib/warden/manager.rb:34:in `catch' /usr/lib/ruby/gems/1.8/gems/warden-1.0.5/lib/warden/manager.rb:34:in `call' /usr/lib/ruby/gems/1.8/gems/sass-3.1.4/lib/sass/../sass/plugin/rack.rb:54:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/head.rb:14:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/methodoverride.rb:24:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/params_parser.rb:21:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/flash.rb:182:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/cookies.rb:302:in `call' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/query_cache.rb:32:in `call' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/query_cache.rb:12:in `cache' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/query_cache.rb:31:in `call' /usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:354:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/callbacks.rb:46:in `call' /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:416:in `_run_call_callbacks' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/callbacks.rb:44:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/sendfile.rb:102:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/remote_ip.rb:48:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/show_exceptions.rb:47:in `call' /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/rack/logger.rb:13:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/runtime.rb:17:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/lock.rb:34:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_dispatch/middleware/static.rb:30:in `call' /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/application.rb:168:in `call' /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/application.rb:77:in `send' /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/application.rb:77:in `method_missing' /usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/urlmap.rb:52:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/urlmap.rb:46:in `each' /usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/urlmap.rb:46:in `call' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:84:in `pre_process' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:82:in `catch' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:82:in `pre_process' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:57:in `process' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:42:in `receive_data' /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine' /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/backends/base.rb:61:in `start' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/server.rb:159:in `start' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/controllers/controller.rb:86:in `start' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:185:in `send' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:185:in `run_command' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:151:in `run!' /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/bin/thin:6 /usr/share/katello/script/thin:59:in `load' /usr/share/katello/script/thin:59 Rendering 500:Validation failed: Packages is invalid Rendered common/_config.html.haml (0.4ms) Rendered layouts/_ajax_notices.haml (2.8ms) Rendered layouts/_notification.haml (0.3ms) Rendered common/_common_i18n.html.haml (0.3ms) Rendered layouts/_org.haml (0.9ms) Rendered layouts/_header.haml (6.7ms) Rendered layouts/_footer.haml (0.8ms) Rendered common/500.html.haml within layouts/katello (221.6ms) Completed 500 Internal Server Error in 700ms (Views: 206.1ms | ActiveRecord: 43.7ms) Version-Release number of selected component (if applicable): How reproducible: always for me Steps to Reproduce: 1. Add a product/repo either from UI or cli 2. Define filters from cli 3. Promote the product from UI 4. No create new changeset and tried to promote the blacklisted packages. Actual results: "Validation failed: Packages is invalid" Expected results: I'm not quite sure. I think it shouldn't be allowed to promote blacklisted packages. Additional info:
Facing this issue with following build: [root@dhcp201-220 ~]# rpm -qa | grep katello katello-0.1.135-2.el6.x86_64 katello-configure-0.1.31-2.el6.noarch katello-glue-candlepin-0.1.135-2.el6.x86_64 katello-qpid-broker-key-pair-1.0-1.noarch katello-cli-0.1.23-3.el6.noarch katello-trusted-ssl-cert-1.0-1.noarch katello-cli-common-0.1.23-3.el6.noarch katello-glue-pulp-0.1.135-2.el6.x86_64 katello-all-0.1.135-2.el6.x86_64 katello-glue-foreman-0.1.135-2.el6.x86_64 katello-common-0.1.135-2.el6.noarch katello-httpd-ssl-key-pair-1.0-1.noarch katello-certs-tools-1.0.1-2.el6.noarch [root@dhcp201-220 ~]#
Created attachment 546711 [details] we can see the option to Add the blacklisted packages to new changeset. After applying filters when we promoted the product, it was promoted successfully and filters were applied on that. I blacklisted grinder and gofer packages. later when I created new changeset and tried to add the blacklisted packages, got validation failed message.
mass move to CFSE product.
From the look of it the original issue stated is not really related to black listing and has already been fixed in bz 755042. I have not been able to reproduce this issue. That being said, we have tried to address the "ADD" showing up for the blacklisted packages issue in the following way. As of commit 8df24113db90234b9a704ab9ef8dc677db0cc9a5 we have added warning icons (with reasonable tipsy hover messages) in the promotion screen on products and repositories which have filters on them. These should warn the user that some packages in the filtered products/repositories will not make it to the next environment when promoted. In relation to this also look at the following the to do bugs in the pulp world. https://bugzilla.redhat.com/show_bug.cgi?id=795576 https://bugzilla.redhat.com/show_bug.cgi?id=799120
Verified with following build: [root@perceptor ~]# rpm -qa | grep -ie pulp-1 -ie katello-0 pulp-1.0.0-2.el6.noarch katello-0.2.5-1.el6.noarch Yes, warning icon is added there with below message on promotion screen: ---- This product or one of the repositories belonging to it has one or more filters applied. Packages matching the filter criteria will not be promoted. Applicable Product filters: * pulp_fil ---
+Add option is still available to promote the blacklisted packages.. But in actual, when we tried to promote them, none of them will be promoted in next env and no "Validation failed" message.
mass move ON_QA after brewing
Steps to validate: * Filtered katello-agent and promoted to Dev1 * Registered and subscribed client to Dev1 environment * Attempted to install *katello-agent* but package was not found * Created new changeset and selected only *katello-agent*; promoted to Dev1 * Successfully installed *katello-agent* in client
Verified: * candlepin-0.5.26-1.el6.noarch * candlepin-tomcat6-0.5.26-1.el6.noarch * katello-0.1.304-1.el6.noarch * katello-all-0.1.304-1.el6.noarch * katello-candlepin-cert-key-pair-1.0-1.noarch * katello-certs-tools-1.0.4-1.el6.noarch * katello-cli-0.1.105-1.el6.noarch * katello-cli-common-0.1.105-1.el6.noarch * katello-common-0.1.304-1.el6.noarch * katello-configure-0.1.106-1.el6.noarch * katello-glue-candlepin-0.1.304-1.el6.noarch * katello-glue-foreman-0.1.304-1.el6.noarch * katello-glue-pulp-0.1.304-1.el6.noarch * katello-qpid-broker-key-pair-1.0-1.noarch * katello-qpid-client-key-pair-1.0-1.noarch * katello-selinux-0.1.9-1.el6.noarch * pulp-1.0.0-5.el6.noarch * pulp-common-1.0.0-5.el6.noarch * pulp-selinux-server-1.0.0-5.el6.noarch