Created attachment 557505 [details] katello log Description of problem: Registered a RHEL 6.1 (minimal install) system through the subscription-manager. Went to the web ui, selected the system and clicked on Subscriptions tab. Got "undefined method `[]' for nil:NilClass" displayed in the ui Version-Release number of selected component (if applicable): Katello Version: 0.1.195-1.el6 How reproducible: Steps to Reproduce: 1. Log in as the admin and create new Org named "NY Data Center" with a "Development environment 2. Create a new "wbos" user with password "password", assigning him the "NY Data Center" org 3. Boot a minimal installation of RHEL 6.1 and follow the instructions here (https://fedorahosted.org/katello/wiki/GuideSystemRegistrationClient) to register the system Actual results: Got "undefined method `[]' for nil:NilClass" displayed in the ui Expected results: Additional info:
Created attachment 557508 [details] Now using RHEL6.2 This shows a different error when using RHEL 6.2
Hello, package profile upload is allowed when: - user that is uploading using katello cli has edit_user permission OR - user uploading from RHSM has valid client certificate Otherwise Permission denied is raised. Looking at the code I think rule number 1 is not valid anymore (we are not able to upload package profiles from the CLI) so I will remove it. But this is another story. Back to your bug, couple of questions: You did not assign this user register_systems according to the steps provided. How did you register this system? Under the admin username? I dont have full log. What was the rhsm registration commant exactly? Did you use activation keys? In this case there is existing bz: https://bugzilla.redhat.com/show_bug.cgi?id=751407 What particular version of rhsm are you using here? You see this error in the UI? I don't get it. Where in the UI exactly? Should I hand this over to the UI guys?
Please provide me more info since you had to be registering under different username. Without proper pemissions one cannot register a system: [root@ofed ~]# kk user create --username test --password testtest --email test Successfully created user [ test ] [root@ofed ~]# subscription-manager register --username=test --password=testtest --force --org=ACME_Corporation --environment=testing User test is not allowed to access api/environments/index
Can you please do: # grep insecure /etc/rhsm/rhsm.conf on the client?
(In reply to comment #3) > Please provide me more info since you had to be registering under different > username. Without proper pemissions one cannot register a system: I followed the instructions here (https://fedorahosted.org/katello/wiki/GuideSystemRegistrationClient) for registering a new client. As far as granting permissions/roles to the user that was doing the registration, wbogs, I've been told that simply giving a standard user a default Org and Env would suffice to allow him to register a system... But to be clear, the user who attempted the registration was "wbogs" and the logs are attached to the issue.
*** Bug 784704 has been marked as a duplicate of this bug. ***
*** Bug 784701 has been marked as a duplicate of this bug. ***
(In reply to comment #4) > Can you please do: > > # grep insecure /etc/rhsm/rhsm.conf # grep insecure /etc/rhsm/rhsm.conf insecure = 1 > on the client? Yes
<lzap> OgMaciel, rpm -q subscription-manager for https://bugzilla.redhat.com/show_bug.cgi?id=784679 pls As I have tried this with 2 different systems: RHEL 6.1: subscription-manager-0.95.11-1.el6.x86_64 RHEL 6.2: subscription-manager-0.96.17-1.el6.x86_64
Are you absolutely sure 6.2 version does not work? subscription-manager-0.96.17-1.el6.x86_64
OK. This is a bug or behavior of RHSM that sends out package profile with HTTP AUTH headers instead of already deployed consumer cert. It has been fixed in the master: https://bugzilla.redhat.com/show_bug.cgi?id=767265 But as we need to support rhsm's that are in the wild (RHEL 6.1/6.2), we must support both. Thomas is working on a patch that will accept also HTTP AUTH headers. We were not checking for right permissions in this case. New versions (6.3+) will send consumer certificate, so the request will be passed on. But this is another story ^^^^^^ The name of this bug is: Getting undefined method `[]' for nil:NilClass when looking at subscription for a system and this is something different in the UI. I hope somebody will take care of it :-)
committed c8e05b8f070a9239ffa06832c3f8f06150c835e8 (thanks to tom)
mass ON_QA move
Verified on Katello Version: 0.1.198-1.el6
getting rid of 6.0.0 version since that doesn't exist