Bug 1465186

Summary: Cannot enable new repositories after upgrade from Satellite 6.1.11 to 6.2.10
Product: Red Hat Satellite Reporter: James Wilson <james.wilson>
Component: Content ManagementAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.10CC: bbuckingham, inecas, james.wilson, mbacovsk, vvasilev
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-22 19:23:08 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:
Description Flags
Error backtrace from failed Task detail none

Description James Wilson 2017-06-26 23:49:01 UTC
Description of problem:
Upgrade logs show a successful upgrade of Satellite, however we cannot enable any new repo's under any Org, the error shown is:
	 undefined method `default_capsule?' for nil:NilClass

Version-Release number of selected component (if applicable):
6.2.10

How reproducible:
Can reproduce every time

Steps to Reproduce:
1. Select Org from dropdown list, goto Content -> Redhat Repositories
2. Expand any Redhat Product under RPMS and select tick box
3.

Actual results:
There was an error attempting to enable or disable this repository
undefined method `default_capsule?' for nil:NilClass

Expected results:
Expect Repo to enable without any errors

Additional info:
We upgraded another instance from Satellite 6.1.9 to 6.2.9 with no issues.
I checked https://access.redhat.com/errata/RHBA-2017:1553, found all were up to date

Comment 2 James Wilson 2017-06-27 00:02:12 UTC
Raised support ticket for this issue also:
CASE 01878483

Comment 3 James Wilson 2017-06-27 02:43:45 UTC
Created attachment 1292143 [details]
Error backtrace from failed Task detail

Comment 4 Ivan Necas 2017-06-27 04:53:43 UTC
This bug seems to be related to changed done in https://bugzilla.redhat.com/show_bug.cgi?id=1375075.

It seems there is an issue with detecting the default_capsule. The default capsule should be detected by the specific feature present on the proxy.

    hammer --csv proxy list

Comment 5 Ivan Necas 2017-06-27 04:54:52 UTC
Could you provide us the output of the `hammer --csv proxy list` command, as it should provide us some clue around the problem

Comment 8 Ivan Necas 2017-07-07 13:23:42 UTC
The issue was caused by the default capsule (with foreman-proxy running on the satellite server itself) not being assigned to the organizations.

To fix the issue:

 1) go to Web UI > Infrastructure > Capsules
 2) edit the capsule that has the same name as the Satellite server -> Organizations -> Add all organizations in the list
 3) Submit

I'm creating an upstream issue to not allow to remove any organization from the default capsule.

Comment 9 James Wilson 2017-07-09 21:56:48 UTC
(In reply to Ivan Necas from comment #8)
> The issue was caused by the default capsule (with foreman-proxy running on
> the satellite server itself) not being assigned to the organizations.
> 
> To fix the issue:
> 
>  1) go to Web UI > Infrastructure > Capsules
>  2) edit the capsule that has the same name as the Satellite server ->
> Organizations -> Add all organizations in the list
>  3) Submit
> 
> I'm creating an upstream issue to not allow to remove any organization from
> the default capsule.

Thanks Ivan, can you please edit the 'Comment 6' field and remove the hostnames from my reply - these are client sensitive. Thanks