Bug 1248955 - Failed to register satellite-6.1 after updated candlepin to 2.0.6 [404 Resource Not Found]
Failed to register satellite-6.1 after updated candlepin to 2.0.6 [404 Resou...
Status: CLOSED NOTABUG
Product: Candlepin
Classification: Community
Component: candlepin (Show other bugs)
1.2
x86_64 Linux
high Severity high
: ---
: ---
Assigned To: Filip Nguyen
Katello QA List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-31 04:13 EDT by Eko
Modified: 2015-10-12 02:36 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-12 02:36:40 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
cpdb --update (25.94 KB, text/plain)
2015-08-11 04:58 EDT, Eko
no flags Details
404 error register host to sam (7.41 KB, text/plain)
2015-08-12 05:10 EDT, Eko
no flags Details

  None (edit)
Description Eko 2015-07-31 04:13:09 EDT
Description of problem:
We want to verify the bug1240728, this issue need to install the latest candlepin-2.0.6, after updated candlepin to 2.0.6, register to satellite-6.1 failed, shows 404 Resource Not Found.

Version-Release number of selected component (if applicable):
candlepin-2.0.6-1.el7.noarch.rpm 
candlepin-selinux-2.0.6-1.el7.noarch.rpm
virt-who-0.14-2.el7.noarch
python-rhsm-1.15.3-1.el7.x86_64
subscription-manager-1.15.6-1.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. update candlepin to 2.0.6
The latest satellite-6.1 repository still provides candlepin0.9.49.3-1.el7.noarch.rpm, no candlepin-2.0.6 found. 
so we download candlepin-2.0.6 from https://brewweb.devel.redhat.com/buildinfo?buildID=448308 and update:
# rpm -Uvh candlepin-2.0.6-1.el7.noarch.rpm candlepin-selinux-2.0.6-1.el7.noarch.rpm

2. re-setup the rhsm config and register host again, it shows 404 Resource Not Found
# subscription-manager register --username=admin --password=admin
subscription-manager register  now has -1 pts of karma
There was an issue with the backend service candlepin: 404 Resource Not Found

3. check rhsm.log
# tail -f /var/log/rhsm/rhsm.log
Traceback (most recent call last):
   File "/usr/share/rhsm/subscription_manager/managercli.py", line 1069, in _do_command 
     content_tags=self.installed_mgr.tags)
   File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 833, in registerConsumer
     return self.conn.request_post(url, params)
   File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 612, in request_post
     return self._request("POST", method, params)
   File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 537, in _request
     self.validateResponse(result, request_type, handler)
   File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 579, in validateResponse
     raise RestlibException(response['status'], error_msg)
RestlibException: There was an issue with the backend service candlepin: 404 Resource Not Found


Actual results:
register failed due to candlepin: 404 Resource Not Found

Expected results:
after updated candlepin to 2.0.6, can be registered normally, virt-who can fetch the host/guests mapping info normally.

Additional info:
Comment 1 Devan Goodwin 2015-08-04 08:45:23 EDT
Candlepin updates almost always require a database upgrade. Normally this would happen during the overall Satellite upgrade.

However in your case you're going to need to trigger it manually. I cannot guarantee this is correct but I think you just need to run this after the rpm -Uvh:

/usr/share/candlepin/cpdb --update -u username -p password 

The database username and password I'm not sure about for a Sat install. Username is likely "candlepin", and password you should be able to see in the database config in /etc/candlepin/candlepin.conf. 

Be forewarned however that Candlepin 2.0 is unreleased and has not seen proper QE, the upgrade is significant and it's hard to say for sure if it's ready and will work without issue.
Comment 2 Eko 2015-08-11 04:57:23 EDT
Hi Devan,
After updated candlepin to 2.0.6 package,  I still failed to run:
# /usr/share/candlepin/cpdb  --update -u candlepin -p candlepin

More details, please refer to the attachment.

BTW, do we have some available yum repository integrated candlepin-2.0 with SAM/Satellite for internal testing?
Comment 3 Eko 2015-08-11 04:58:02 EDT
Created attachment 1061363 [details]
cpdb --update
Comment 4 Devan Goodwin 2015-08-11 07:17:46 EDT
Hi Eko, do you have liquibase 2.x installed?

This might require 3.x, which should be relatively widely available, epel, brew, etc.

There are no known builds of Satellite integrating candlepin 2.0 at this time as far as I am aware.
Comment 5 Eko 2015-08-12 05:09:19 EDT
Hi Devan, thanks for your feedback, I updated liquibase to 3.1.0-5 from brew's package, cpdb can update the database normally. 

but still can't register the host to the san server due to 
"Server error attempting a POST to /sam/api/consumers?owner=ACME_Corporation returned status 404"

More details, please refer to the register_error.log attachment.
Comment 6 Eko 2015-08-12 05:10:57 EDT
Created attachment 1061887 [details]
404 error register host to sam
Comment 7 Devan Goodwin 2015-08-12 07:09:13 EDT
We would probably need a foreman debug to see what the actual issue was on the server.

However this effort is doomed to fail, candlepin 2.0 needs proper integration into Satellite when the team has time, there will be Satellite changes required for it to function properly. Tom McKay was looking at this a bit, not sure where it stands yet but it should be happening for Sat 6.2.
Comment 8 Filip Nguyen 2015-10-01 13:22:56 EDT
Eko, are you still committed to resolve this? If so I will help you but I need actual logs from the CP server. 

If Devans answer in Comment 7 persuaded you that this is not an issue for now I will close this as NOT A BUG
Comment 9 Eko 2015-10-11 21:38:02 EDT
Hi, Filip Nguyen, now we are waiting for the candlepin 2.x integrated with Sat 6.2 ,  we don't update the candlepin to 2.x by manual for testing, so I think you can close it as Not A Bug.

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