Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1400624

Summary: capsule sync (after capsule ran out of disk-space) says: "wrong number of arguments (2 for 1)"
Product: Red Hat Satellite Reporter: Jan Hutař <jhutar>
Component: Foreman ProxyAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: high Docs Contact:
Priority: high    
Version: 6.2.5CC: bbuckingham, bkearney, jcallaha, pondrejk, psuriset
Target Milestone: UnspecifiedKeywords: Performance, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-katello-3.0.0.89-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description Jan Hutař 2016-12-01 16:08:33 UTC
Description of problem:
Capsule sync (after capsule ran out of disk-space - I'm not exactly sure if it worked before or not) says: "wrong number of arguments (2 for 1)"


Version-Release number of selected component (if applicable):
Sat: satellite-6.2.5-1.0.el7sat.noarch
Capsule: satellite-capsule-6.2.5-1.0.el7sat.noarch


How reproducible:
Seen on 4 of 4 capsules


Steps to Reproduce:
1. Install Sat and Capsule (capsule had 30GB HDD only by accident)
2. Sync RHEL7 to Sat and Capsules, see Capsules to run out of disk space
3. Migrate /var/lib/pulp of the capsule to new 70GB volume
4. Retry sync


Actual results:
Clicking "Synchronize" in webUI throws error "wrong number of arguments (2 for 1)"


Expected results:
Should work or should provide meaningful error message

Comment 3 Jan Hutař 2016-12-01 16:39:51 UTC
Workaround:

On Satellite by editing capsule remove "Library" from "Lifecycle Environments" selected items.

On Capsule:

[root@capsule4 ~]# pulp-admin -u admin -p $pulpAdminPassword rpm repo list | tr '\n' ';' | sed "s/;                     //g" | tr ';' '\n'
+----------------------------------------------------------------------+       RPM Repositories
+----------------------------------------------------------------------+

Id:                  Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_RH_Common_RPMs_x86_64_7Server
Display Name:        Red Hat Enterprise Linux 7 Server - RH Common RPMs x86_647Server
Description:         None
Content Unit Counts: 
  Erratum: 35
  Rpm:     209

Id:                  Default_Organization-Red_Hat_Satellite_Capsule-Red_Hat_Satellite_Capsule_6_2_for_RHEL_7_Server_RPMs_x86_64
Display Name:        Red Hat Satellite Capsule 6.2 for RHEL 7 Server RPMs x86_64
Description:         None
Content Unit Counts: 

Id:                  Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7Server
Display Name:        Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server
Description:         None
Content Unit Counts:

[root@capsule4 ~]# pulp-admin -u admin -p $pulpAdminPassword rpm repo delete --repo-id Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_RH_Common_RPMs_x86_64_7Server
[root@capsule4 ~]# pulp-admin -u admin -p $pulpAdminPassword rpm repo delete --repo-id Default_Organization-Red_Hat_Satellite_Capsule-Red_Hat_Satellite_Capsule_6_2_for_RHEL_7_Server_RPMs_x86_64
[root@capsule4 ~]# pulp-admin -u admin -p $pulpAdminPassword rpm repo delete --repo-id Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7Server
[root@capsule4 ~]# pulp-admin -u admin -p $pulpAdminPassword orphan remove --all


Now again on Satellite assign "Library" back and sync.

Comment 5 Jan Hutař 2016-12-01 22:04:31 UTC
Unfortunately what is in the comment #3 does not seem to be a permanent fix, I'm getting the issue again.

Comment 6 Brad Buckingham 2016-12-05 14:28:46 UTC
*** Bug 1400903 has been marked as a duplicate of this bug. ***

Comment 7 Justin Sherrill 2016-12-05 16:55:55 UTC
FYI this issue really has nothing to do with running out of disk space, I guess that was an unfortunate coincidence.  You just have to sync a capsule twice (the first time it will work fine).

Comment 9 jcallaha 2016-12-07 16:34:33 UTC
Verified in Satellite 6.2.5 Snap 3

No longer seeing the issue in the areas it is reported to affect:
Repeated Capsule Sync
    * Tested by syncing a capsule 10 times in a row with and without changes.
Repo Sync
    * Tested by sync'ing ~20 repos multiple times 
Repeated Content View Publishing
    * Tested by publishing 5 content views multiple times.

Comment 10 Bryan Kearney 2016-12-12 18:48:17 UTC
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:2940

Comment 11 Bryan Kearney 2016-12-12 18:48:18 UTC
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:2940