Bug 818786
| Summary: | 502 Proxy Error traceback during large rhn-migrate-classic-to-rhsm | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | John Sefler <jsefler> |
| Component: | subscription-manager | Assignee: | Alex Wood <awood> |
| Status: | CLOSED NOTABUG | QA Contact: | Entitlement Bugs <entitlement-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.3 | CC: | bkearney, syeghiay |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-05-08 18:58: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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 738066 | ||
|
Description
John Sefler
2012-05-04 01:58:57 UTC
/var/log/rhsm/rhsm.log does not show any problems, HOWEVER there is a lot of this in tail /var/log/up2date
[Thu May 3 21:42:44 2012] up2date
Traceback (most recent call last):
File "/usr/sbin/rhn-channel", line 164, in <module>
systemExit(1, e)
File "/usr/sbin/rhn-channel", line 46, in systemExit
sys.stderr.write(rhncli.utf8_encode(msg)+'\n')
<type 'exceptions.TypeError'>: unsupported operand type(s) for +: 'CommunicationError' and 'str'
[Thu May 3 21:42:45 2012] up2date
Traceback (most recent call last):
File "/usr/sbin/rhn-channel", line 164, in <module>
systemExit(1, e)
File "/usr/sbin/rhn-channel", line 46, in systemExit
sys.stderr.write(rhncli.utf8_encode(msg)+'\n')
<type 'exceptions.TypeError'>: unsupported operand type(s) for +: 'CommunicationError' and 'str'
[Thu May 3 21:43:25 2012] up2date
Traceback (most recent call last):
File "/usr/sbin/rhn-channel", line 164, in <module>
systemExit(1, e)
File "/usr/sbin/rhn-channel", line 46, in systemExit
sys.stderr.write(rhncli.utf8_encode(msg)+'\n')
<type 'exceptions.TypeError'>: unsupported operand type(s) for +: 'AuthenticationOrAccountCreationError' and 'str'
Here's a way to subscribe to all those channels in a loop.
#! /bin/bash
while read chan_name
do
rhn-channel --user=qa --password=*** --add --channel=$chan_name
done << '.'
rhel-x86_64-rhev-agent-6-server
rhel-x86_64-rhev-agent-6-server-beta
rhel-x86_64-rhev-agent-6-server-beta-debuginfo
rhel-x86_64-rhev-agent-6-server-debuginfo
rhel-x86_64-rhev-mgmt-agent-6
rhel-x86_64-rhev-mgmt-agent-6-beta
rhel-x86_64-rhev-mgmt-agent-6-beta-debuginfo
rhel-x86_64-rhev-mgmt-agent-6-debuginfo
rhel-x86_64-server-6
rhel-x86_64-server-6-beta
rhel-x86_64-server-6-beta-debuginfo
rhel-x86_64-server-6-cf-ae-1
rhel-x86_64-server-6-cf-ae-1-beta
rhel-x86_64-server-6-cf-ae-1-beta-debuginfo
rhel-x86_64-server-6-cf-ae-1-debuginfo
rhel-x86_64-server-6-cf-ce-1
rhel-x86_64-server-6-cf-ce-1-beta
rhel-x86_64-server-6-cf-ce-1-beta-debuginfo
rhel-x86_64-server-6-cf-ce-1-debuginfo
rhel-x86_64-server-6-cf-se-1
rhel-x86_64-server-6-cf-se-1-beta
rhel-x86_64-server-6-cf-se-1-beta-debuginfo
rhel-x86_64-server-6-cf-se-1-debuginfo
rhel-x86_64-server-6-cf-tools-1
rhel-x86_64-server-6-cf-tools-1-beta
rhel-x86_64-server-6-cf-tools-1-beta-debuginfo
rhel-x86_64-server-6-cf-tools-1-debuginfo
rhel-x86_64-server-6-debuginfo
rhel-x86_64-server-6-htb
rhel-x86_64-server-6-htb-debuginfo
rhel-x86_64-server-6-mrg-grid-2
rhel-x86_64-server-6-mrg-grid-2-debuginfo
rhel-x86_64-server-6-mrg-grid-execute-2
rhel-x86_64-server-6-mrg-grid-execute-2-debuginfo
rhel-x86_64-server-6-mrg-management-2
rhel-x86_64-server-6-mrg-management-2-debuginfo
rhel-x86_64-server-6-mrg-messaging-2
rhel-x86_64-server-6-mrg-messaging-2-debuginfo
rhel-x86_64-server-6-mrg-realtime-2
rhel-x86_64-server-6-mrg-realtime-2-debuginfo
rhel-x86_64-server-6-rhevh
rhel-x86_64-server-6-rhevh-beta
rhel-x86_64-server-6-rhevh-beta-debuginfo
rhel-x86_64-server-6-rhevh-debuginfo
rhel-x86_64-server-6-rhevm-3
rhel-x86_64-server-6-rhevm-3-beta
rhel-x86_64-server-6-rhevm-3-beta-debuginfo
rhel-x86_64-server-6-rhevm-3-debuginfo
rhel-x86_64-server-6-rhevm-3-jboss-5
rhel-x86_64-server-6-rhevm-3-jboss-5-beta
rhel-x86_64-server-6-rhevm-3-jboss-5-beta-debuginfo
rhel-x86_64-server-6-rhevm-3-jboss-5-debuginfo
rhel-x86_64-server-6-rhui-2
rhel-x86_64-server-6-rhui-2-debuginfo
rhel-x86_64-server-clusteredstorage-6-beta
rhel-x86_64-server-ei-replication-6
rhel-x86_64-server-ei-replication-6-beta
rhel-x86_64-server-ei-replication-6-beta-debuginfo
rhel-x86_64-server-ei-replication-6-debuginfo
rhel-x86_64-server-fastrack-6
rhel-x86_64-server-fastrack-6-debuginfo
rhel-x86_64-server-ha-6
rhel-x86_64-server-ha-6-beta
rhel-x86_64-server-ha-6-beta-debuginfo
rhel-x86_64-server-ha-6-debuginfo
rhel-x86_64-server-ha-6-htb
rhel-x86_64-server-ha-6-htb-debuginfo
rhel-x86_64-server-ha-fastrack-6
rhel-x86_64-server-ha-fastrack-6-debuginfo
rhel-x86_64-server-highavailability-6-beta
rhel-x86_64-server-hpn-6
rhel-x86_64-server-hpn-6-beta
rhel-x86_64-server-hpn-6-beta-debuginfo
rhel-x86_64-server-hpn-6-debuginfo
rhel-x86_64-server-hpn-fastrack-6
rhel-x86_64-server-hpn-fastrack-6-debuginfo
rhel-x86_64-server-hts-6
rhel-x86_64-server-hts-6-beta
rhel-x86_64-server-largefilesystem-6-beta
rhel-x86_64-server-lb-6
rhel-x86_64-server-lb-6-beta
rhel-x86_64-server-lb-6-beta-debuginfo
rhel-x86_64-server-lb-6-debuginfo
rhel-x86_64-server-lb-6-htb
rhel-x86_64-server-lb-6-htb-debuginfo
rhel-x86_64-server-lb-fastrack-6
rhel-x86_64-server-lb-fastrack-6-debuginfo
rhel-x86_64-server-loadbalance-6-beta
rhel-x86_64-server-optional-6
rhel-x86_64-server-optional-6-beta
rhel-x86_64-server-optional-6-beta-debuginfo
rhel-x86_64-server-optional-6-debuginfo
rhel-x86_64-server-optional-6-htb
rhel-x86_64-server-optional-6-htb-debuginfo
rhel-x86_64-server-optional-fastrack-6
rhel-x86_64-server-optional-fastrack-6-debuginfo
rhel-x86_64-server-rs-6
rhel-x86_64-server-rs-6-beta
rhel-x86_64-server-rs-6-beta-debuginfo
rhel-x86_64-server-rs-6-debuginfo
rhel-x86_64-server-rs-6-htb
rhel-x86_64-server-rs-6-htb-debuginfo
rhel-x86_64-server-rs-fastrack-6
rhel-x86_64-server-rs-fastrack-6-debuginfo
rhel-x86_64-server-sap-6
rhel-x86_64-server-sap-6-beta
rhel-x86_64-server-sap-6-beta-debuginfo
rhel-x86_64-server-sap-6-debuginfo
rhel-x86_64-server-sfs-6
rhel-x86_64-server-sfs-6-beta
rhel-x86_64-server-sfs-6-beta-debuginfo
rhel-x86_64-server-sfs-6-debuginfo
rhel-x86_64-server-sfs-6-htb
rhel-x86_64-server-sfs-6-htb-debuginfo
rhel-x86_64-server-sfs-fastrack-6
rhel-x86_64-server-sfs-fastrack-6-debuginfo
rhel-x86_64-server-sjis-6
rhel-x86_64-server-sjis-6-beta
rhel-x86_64-server-sjis-6-beta-debuginfo
rhel-x86_64-server-sjis-6-debuginfo
rhel-x86_64-server-supplementary-6
rhel-x86_64-server-supplementary-6-beta
rhel-x86_64-server-supplementary-6-beta-debuginfo
rhel-x86_64-server-supplementary-6-debuginfo
rhel-x86_64-server-v2vwin-6
rhel-x86_64-server-v2vwin-6-beta
rhel-x86_64-server-v2vwin-6-beta-debuginfo
rhel-x86_64-server-v2vwin-6-debuginfo
rhn-tools-rhel-x86_64-server-6
rhn-tools-rhel-x86_64-server-6-beta
rhn-tools-rhel-x86_64-server-6-beta-debuginfo
rhn-tools-rhel-x86_64-server-6-debuginfo
sam-rhel-x86_64-server-6
sam-rhel-x86_64-server-6-beta
sam-rhel-x86_64-server-6-beta-debuginfo
sam-rhel-x86_64-server-6-debuginfo
sam-rhel-x86_64-server-6-htb
sam-rhel-x86_64-server-6-htb-debuginfo
.
After doing some testing, I think you are simply pushing RHN beyond it's capacity. There are so many channels to be unsubscribed from that the request times out. I tried with about half the number of channels and everything worked. If you want we can print a more attractive error message, but I don't think there is much else we can do in this scenario. (In reply to comment #5) > After doing some testing, I think you are simply pushing RHN beyond it's > capacity. There are so many channels to be unsubscribed from that the request > times out. I tried with about half the number of channels and everything > worked. Agreed. This appears to be exactly what is happening and therefore the fix actually belongs somewhere within the Red Hat Network API: system Method: deleteSystems. As awood said, the 502 Proxy Error only seems to happen when the classic system is consuming a tremendous number of channels. In practice no consumer would be consuming this many channels. Reducing the consumed channel count will actually start passing the test. Even in the failed case in comment 0, the system remains registered to RHN Classic and registration w/autosubscribe to the new entitlement model has not yet happened. The only side affect of this failed attempt to migrate is that some migration data product certs are prematurely copied to /etc/pki/product. Re-running the rhn-migrate-classic-to-rhsm tool a second time after the classic consumer has reduced their channel consumption (possibly to zero) is the easiest fix. Because the rhn-migrate-classic-to-rhsm was already attempted while consuming the tremendous number of rhn channels, ALL of the corresponding product certs will already have been copied. Hence the second run of rhn-migrate-classic-to-rhsm doesn't even need to copy any migration product certs, instead it will just finish the job of unregistering from classic and registering to the new entitlement model with autosubscribe. Based on comment 9, I'm moving this bug to CLOSED NOTABUG in component subscription-manager. The fix for bug 881952 probably circumvents the issue raised in this bug. |