Bug 1289976 - Deployment fails with "undefined method `[]' for nil:NilClass (NoMethodError)"
Summary: Deployment fails with "undefined method `[]' for nil:NilClass (NoMethodError)"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Quickstart Cloud Installer
Classification: Red Hat
Component: WebUI
Version: 1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: TP2
: 1.0
Assignee: Jesus M. Rodriguez
QA Contact: Antonin Pagac
URL:
Whiteboard:
Depends On:
Blocks: rhci-sprint-12
TreeView+ depends on / blocked
 
Reported: 2015-12-09 13:00 UTC by Antonin Pagac
Modified: 2016-10-03 19:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-03 19:11:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
relevant part of production.log (18.89 KB, text/plain)
2015-12-09 13:00 UTC, Antonin Pagac
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1304634 0 unspecified CLOSED "No subscriptions found" when creating new subscription management application and adding subscriptions via webUI 2021-02-22 00:41:40 UTC

Internal Links: 1304634

Description Antonin Pagac 2015-12-09 13:00:32 UTC
Created attachment 1103876 [details]
relevant part of production.log

Description of problem:
In a new RHEVM+CFME deployment, in the Installation Review screen, when I click on the Deploy button, for a few seconds it seems that everything is ok, message reads "Building task list", but then it throws me back at the Installation Review screen and above the displayed information about my deployment there is an error in red frame:

{"displayMessage":"Task 41f1ccac-c271-439c-9ca8-cba85225be97: NoMethodError: undefined method `[]' for nil:NilClass","errors":["Task 41f1ccac-c271-439c-9ca8-cba85225be97: NoMethodError: undefined method `[]' for nil:NilClass"]}

Upon hitting the Deploy button again, the error changes to:

{"displayMessage":"Required lock is already taken by other running tasks.\nPlease inspect their state, fix their errors and resume them.\n\nRequired lock: read\nConflicts with tasks:\n- https://<SATELLITE HOSTNAME>/foreman_tasks/tasks/41f1ccac-c271-439c-9ca8-cba85225be97","errors":["Required lock is already taken by other running tasks.\nPlease inspect their state, fix their errors and resume them.\n\nRequired lock: read\nConflicts with tasks:\n- https://<SATELLITE HOSTNAME>/foreman_tasks/tasks/41f1ccac-c271-439c-9ca8-cba85225be97"]}

I did create new Subscription Management Application during the configuration of the deployment, upon investigating it seems the issue is concerning task  Label: Actions::Fusor::Subscription::ManageManifest.
In Content -> Red Hat Subscriptions -> Manage Manifest I can see "No subscription manifest imported". Also, there are no data in Details and Import History tabs.

Attaching relevant part of production.log.

Version-Release number of selected component (if applicable):
RHCI-6.0-RHEL-7-20151208.t.0

How reproducible:
Happened to me once

Steps to Reproduce:
1. Configure a deployment of RHEVM+CFME (possibly other kinds of deployment)
2. Create new Subscription Management Application during the process, choose to use it
3. Hit the Deploy button on the Installation Review screen
4. Wait a couple of seconds, the error appears and you are thrown back to the Installation Review screen

Actual results:
Error displayed after hitting the deploy button; can't resume; can't continue deployment

Expected results:
No error displayed; deployment continues and ends successfully

Additional info:

Comment 1 John Matthews 2015-12-09 13:24:16 UTC
Antonin do you still have access to the system?

If so, please tar up the directory /var/log/foreman and attach to this BZ

Comment 2 Antonin Pagac 2015-12-09 13:26:23 UTC
Reproduced.

When trying another deployment, I can see that there are no subscriptions attached to the created Subscription Management Application.

When I created that in the RHCI UI, I added the subscriptions to it by checking the checkbox at the Add Subscriptions page. I did not touch the number that was automatically filled in, since it was appropriate. I just hit Next and continue with the deployment.

In Installation Review page in Subscriptions section I can see:

"Quantity 3"

which is correct, but subscriptions have NOT been attached to the Subscription Management Application.

This bug is about the RHCI not being able to attach predefined number of subscriptions to the newly created Subscription Management Application.

Comment 4 John Matthews 2015-12-09 16:56:03 UTC
Issue is that with CF 4.0 GA going out access to CF 4.0 Beta was removed.

We are updating fusor.yaml to use 4.0 GA.
https://github.com/fusor/fusor/pull/552

Additionally there is a repository name change which we are waiting to take effect, once that is done we'll do one more update to fusor.yaml to account for the repo name change.

Comment 5 John Matthews 2015-12-09 16:57:27 UTC
Please ignore comment #4, separate issue, not related to root cause of this BZ.

Comment 6 John Matthews 2015-12-18 15:44:42 UTC
Moving to ON_QA as I think this is now resolved that CF 4.0 has gone GA and we've updated fusor.yaml to use it.

Comment 7 John Matthews 2016-01-10 15:40:43 UTC
Please ignore comment #4 and #6, I confused this issue twice with another problem we had at around that time.

I believe this issue is still open and we need to investigate.

Comment 8 John Matthews 2016-01-13 23:54:11 UTC
This issue may have been related to our inability to create a new sub mgmt app and attach subscriptions.

Prior to merging PR 619 this was a problem and would raise an error.
https://github.com/fusor/fusor/pull/619

After mering PR 619 I'm seeing success with creating a new sub mgmt app and attaching subs through our deployment wizard.

Comment 9 Antonin Pagac 2016-02-04 09:11:24 UTC
I created new sub mgmt app and attached 15 subscriptions and verified via access.redhat.com. Marking as verified.

RHCI-6.0-RHEL-7-20160201.0-RHCI-x86_64-dvd1.iso
RHCIOOO-7-RHEL-7-20160127.0-RHCIOOO-x86_64-dvd1.iso


Note You need to log in before you can comment on or make changes to this bug.