Bug 1309308
Summary: | User shouldn't be able to install packages after un-registering a host from content-host page | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Sachin Ghai <sghai> |
Component: | Hosts | Assignee: | Justin Sherrill <jsherril> |
Status: | CLOSED ERRATA | QA Contact: | Sachin Ghai <sghai> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | Nightly | CC: | ehelms |
Target Milestone: | Unspecified | ||
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://projects.theforeman.org/issues/13756 | ||
Whiteboard: | |||
Fixed In Version: | rubygem-katello-3.0.0.31-1,rubygem-katello-3.0.0.31-1 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-07-27 11:00:57 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Attachments: |
Created redmine issue http://projects.theforeman.org/issues/13756 from this bug Upstream bug component is Content Management Upstream bug assigned to jsherril Upstream bug component is Hosts Reproducible with sat 6.2 snap2. At first place, we host is not registered then user should get a warning message on installing package: Like: This Host is not currently registered with subscription-manager However, now with sat6.2 snap2, user can install package but UI throws error: Host id '6' content facet is missing a uuid Also production.log throws following traceback: 2016-03-07 04:51:59 [app] [I] Started PUT "/api/v2/hosts/6/packages/install" for 10.65.193.200 at 2016-03-07 04:51:59 -0500 2016-03-07 04:51:59 [app] [I] Processing by Katello::Api::V2::HostPackagesController#install as JSON 2016-03-07 04:51:59 [app] [I] Parameters: {"id"=>6, "packages"=>["zsh"], "api_version"=>"v2", "host_id"=>"6", "host_package"=>{"id"=>6, "packages"=>["zsh"]}} 2016-03-07 04:51:59 [app] [E] Katello::HttpErrors::NotFound: Host id '6' content facet is missing a uuid | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.4/app/controllers/katello/api/v2/host_packages_controller.rb:95:in `find_editable_host_with_facet' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:424:in `block in make_lambda' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:143:in `call' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:143:in `block in halting_and_conditional' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call' | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting' I plan on improving the experience with: * At unregister time, delete installed_packages list as they may not be accurate * If attempting to install a package, throw a nicer warning * UI to attempt to install a package is still there for REX * Remove duplicate error/success messages block Moving to POST since upstream bug http://projects.theforeman.org/issues/13756 has been closed Thanks Justin, Verified with sat62 GA snap13 Now I see proper error on trying to install package on unregistered content-host. Created attachment 1162789 [details]
on installing pkg on a unregistered content-host UI raises error: Host has not been registered with subscription-manager.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1501 |
Created attachment 1127930 [details] packages tab still shows options to install packages when host is unregistered Description of problem: I unregistered a content-host from webUI, host was unregistered successfully and I can see a message on UI on accessing subscription and errata tab like: This Host is not currently registered with subscription-manager. Click here for registration information. However, packages tab is still available to install packages though host is not registered. So use should get similar message as on accessing the 'packages' tab Version-Release number of selected component (if applicable): foreman-release-1.11.0-0.develop.201602111150gitf6014fb.el7.noarch katello-installer-2.5.0-1.nightly.201602120122git5f95a31.el7.noarch katello-2.5.0-4.nightly.el7.noarch How reproducible: always Steps to Reproduce: 1. unregister a content-host 2. select content-host and goto 'packages' tab. It allows to install/removes packages 3. Actual results: packages tab allows to install/remove/update packages on content-host which is unregistered. Expected results: user should get message similar to one accessing subscription/errata tabs like: This Host is not currently registered with subscription-manager. Click here for registration information. Additional info: