Project

General

Profile

Bug #16698

[Katello 3.1] Client subscription-manager out of sync with server repos

Added by Prasun Gera over 2 years ago. Updated 12 months ago.

Status:
Needs design
Priority:
Normal
Category:
Candlepin
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Copying text from https://groups.google.com/forum/#!topic/foreman-users/Shzh4CAkG8M

I am using Katello 3.1 on a RHEL 7 system to manage RHEL 7 clients. I disabled a RH repository from the main RH subscriptions. However, the client still thinks that it is subscribed to that repo, and it eventually gives a 404 not found error on yum commands. Calling subscription-manger refresh or un-regestering and re-registering the client didn't help. This happened once earlier too for a different repo, but enabling and disabling the repo again in Katello brought the client in sync. For this particular repo though, it doesn't help. I saw the following error message in server's /var/log/messages for the repo in question

```
Sep 19 12:50:39 example pulp: pulp.server.event.http:INFO: (32572-85248) {"call_report": {"exception": null, "task_type": "pulp.server.managers.repo.sync.sync", "_href": "/pulp/api/v2/tasks/198fc8b0-fc25-41ad-841c-d65b97241385/", "task_id": "198fc8b0-fc25-41ad-841c-d65b97241385", "tags": ["pulp:repository:Org-Red_Hat_Enterprise_Linux_Server-Red_Hat_Satellite_Tools_6_2_for_RHEL_7_Server_RPMs_x86_64", "pulp:action:sync"], "finish_time": null, "_ns": "task_status", "start_time": "2016-09-19T16:50:23Z", "traceback": null, "spawned_tasks": [], "progress_report": {"yum_importer": {"content": {"items_total": 56, "state": "FINISHED", "error_details": [], "details": {"rpm_total": 56, "rpm_done": 56, "drpm_total": 0, "drpm_done": 0}, "size_total": 7035408, "size_left": 0, "items_left": 0}, "comps": {"state": "FINISHED"}, "purge_duplicates": {"state": "FINISHED"}, "distribution": {"items_total": 0, "state": "FINISHED", "error_details": [], "items_left": 0}, "errata": {"state": "FINISHED"}, "metadata": {"state": "FINISHED"}}}, "state": "running", "worker_name": "", "result": null, "error": null, "_id": {"$oid": "57e015984d0e0969d1034ff6"}, "id": "57e015984d0e0969d1034ff6"}, "event_type": "repo.sync.finish", "payload": {"importer_id": "yum_importer", "exception": null, "repo_id": "Org-Red_Hat_Enterprise_Linux_Server-Red_Hat_Satellite_Tools_6_2_for_RHEL_7_Server_RPMs_x86_64", "traceback": null, "started": "2016-09-19T16:50:23Z", "_ns": "repo_sync_results", "completed": "2016-09-19T16:50:39Z", "importer_type_id": "yum_importer", "error_message": null, "summary": {"content": {"state": "FINISHED"}, "comps": {"state": "FINISHED"}, "purge_duplicates": {"state": "FINISHED"}, "distribution": {"state": "FINISHED"}, "errata": {"state": "FINISHED"}, "metadata": {"state": "FINISHED"}}, "added_count": 63, "result": "success", "updated_count": 0, "details": {"content": {"size_total": 7035408, "items_left": 0, "items_total": 56, "state": "FINISHED", "size_left": 0, "details": {"rpm_total": 56, "rpm_
Sep 19 12:50:39 example pulp: pulp.server.event.http:INFO: (32572-85248) done": 56, "drpm_total": 0, "drpm_done": 0}, "error_details": []}, "comps": {"state": "FINISHED"}, "purge_duplicates": {"state": "FINISHED"}, "distribution": {"items_total": 0, "state": "FINISHED", "error_details": [], "items_left": 0}, "errata": {"state": "FINISHED"}, "metadata": {"state": "FINISHED"}}, "id": "57e0175f589b907f3cf535ee", "removed_count": 0}}
```


Related issues

Has duplicate Katello - Bug #17391: [Katello 3.1] Client subscription-manager out of sync with server reposDuplicate2016-09-26

History

#1 Updated by Justin Sherrill over 2 years ago

  • Category set to Candlepin
  • Status changed from New to Need more information
  • Assignee set to Justin Sherrill

I believe this was resolved by http://projects.theforeman.org/issues/15482

Would you be able to re-test on Katello 3.2 RC1

#2 Updated by Prasun Gera over 2 years ago

Justin Sherrill wrote:

I believe this was resolved by http://projects.theforeman.org/issues/15482

Would you be able to re-test on Katello 3.2 RC1

Thanks. I'll give it a shot on 3.2 RC1 and report back.

#3 Updated by Prasun Gera over 2 years ago

Would you be able to re-test on Katello 3.2 RC1

I think it's fixed on 3.2. Right after upgrading to 3.2, the client was still listing the channel in subscription-manager repos --list. However, I enabled and disabled it on the server, and now the client doesn't show it any more.

#4 Updated by Prasun Gera over 2 years ago

I think it's fixed on 3.2.

I'm still seeing issues with 3.2 server. I again deleted a repository from a product, and now the client gives 404 errors, and the repo is still listed under subscription-manager repos --list

#5 Updated by Prasun Gera over 2 years ago

FYI, still see this on Katello 3.2 RC2. Any help with debugging this ? Pretty easy to reproduce for me. Steps: Add a repo to a product and enable it for a client; call yum repolist on the client; delete the repo; call yum repolist again on the client.

#6 Updated by Justin Sherrill over 2 years ago

Hi Prasun,

I'm still not able to reproduce this. One thing to note is that you have to run 'subscription-manager refresh' after the repo is disabled for the client to pick that up. This happens automatically ever 4 hours via the rhsmcertd command.

If you run subscription-manager refresh before the yum repolist command, does that resolve the issue?

-Justin

#7 Updated by Prasun Gera over 2 years ago

Justin Sherrill wrote:

Hi Prasun,

I'm still not able to reproduce this. One thing to note is that you have to run 'subscription-manager refresh' after the repo is disabled for the client to pick that up. This happens automatically ever 4 hours via the rhsmcertd command.

If you run subscription-manager refresh before the yum repolist command, does that resolve the issue?

-Justin

Hi Justin,
No, running subscription-manger refresh doesn't resolve it. I'm happy to post logs if there is any way to provide additional information. Is there a way to tie the client error back to some candlepin logs on the server ?

#8 Updated by Justin Sherrill over 2 years ago

Prasun,

Were these Red Hat repositories? or Custom Repositories? Can you give an example of one such repository?

There are some cases regarding Release version where this will occur, such as if you enable RHEL 7Server RPMs, and RHEL 7.2 RPMS. If a client has his release version set to 7.2, he will get content from the 7.2 repo. If you disable the 7.2 repo but leave the 7Server repo enabled, subscription manager has no way to differentiate and will continue to populate the redhat.repo file with a repo that does not exist. Does that sound like what is happening (Note that none of this applies to custom repos)?

#9 Updated by Prasun Gera over 2 years ago

Justin Sherrill wrote:

Prasun,

Were these Red Hat repositories? or Custom Repositories? Can you give an example of one such repository?

I've seen this with both RHEL repos as well as custom repos. I'm currently seeing this issue with a custom repo right now. Incidentally, I'm seeing this for the katello client repo. I enabled the katello 3.2 RC client repo since the server was updated to 3.2 RC. However, since the client packages aren't signed by the gpg key until GA, the clients were getting errors on yum update. So I tried to remove the client repo on the server. The client would still try to fetch from the repo (even after a subscription-manager refresh), and error out. Currently, the only fix is to disable the repo on the client manually with subscription-manager repos --disable.

Output of
sudo subscription-manager repos --list | grep Katello
Repo ID: Org_Katello_Client_Katello_Client_3_2_Sources
Repo Name: Katello Client 3.2 Sources
Repo URL: https://example.com/pulp/repos/Org/Library/custom/Katello_Client/Katello_Client_3_2_Sources
Repo ID: Org_Katello_Client_Katello_Client_3_1_Source
Repo Name: Katello Client 3.1 Source
Repo URL: https://example.com/pulp/repos/Org/Library/custom/Katello_Client/Katello_Client_3_1_Source
Repo ID: Org_Katello_Client_Katello_Client_3_1
Repo Name: Katello Client 3.1
Repo URL: https://example.com/pulp/repos/Org/Library/custom/Katello_Client/Katello_Client_3_1
Repo ID: Org_Katello_Client_Katello_Client_3_2
Repo Name: Katello Client 3.2
Repo URL: https://example.com/pulp/repos/Org/Library/custom/Katello_Client/Katello_Client_3_2

3.2 client repo has been deleted from the server, but subscription-manager still reports it.

#10 Updated by Prasun Gera over 2 years ago

  • Copied to Bug #17391: [Katello 3.1] Client subscription-manager out of sync with server repos added

#11 Updated by Eric Helms over 2 years ago

  • Copied to deleted (Bug #17391: [Katello 3.1] Client subscription-manager out of sync with server repos)

#12 Updated by Eric Helms over 2 years ago

  • Has duplicate Bug #17391: [Katello 3.1] Client subscription-manager out of sync with server repos added

#13 Updated by Eric Helms over 2 years ago

  • Status changed from Need more information to Needs design

#14 Updated by John Mitsch about 2 years ago

  • Legacy Backlogs Release (now unused) set to 114

Also available in: Atom PDF