Bug 1886325 - Entitlement certificate not containing all content
Summary: Entitlement certificate not containing all content
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 2.9
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: candlepin-bugs
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-08 08:14 UTC by Dirk Götz
Modified: 2024-03-25 16:40 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-02-02 17:43:54 UTC
Embargoed:


Attachments (Terms of Use)

Description Dirk Götz 2020-10-08 08:14:09 UTC
Description of problem:
The initial problem was described to me as the SLES systems not getting all their repositories and narrowed it down to it does not get them because they are not included in the entitlement certificates.

One example which I had to anonymize:

# rct cat-cert /etc/pki/entitlement/1151553941477025897.pem 

+-------------------------------------------+
	Entitlement Certificate
+-------------------------------------------+

Certificate:
	Path: /etc/pki/entitlement/1151553941477025897.pem
	Version: 3.4
	Serial: 1151553941477025897
	Start Date: 2020-04-29 09:11:28+00:00
	End Date: 2049-12-01 00:00:00+00:00
	Pool ID: 2c96813b7157c48b0171c53490451e6c

Subject:
	CN: 8523b71cac4c4643aa4ad3a6337400da
	O: ORGANIZATION

Issuer:
	C: US
	CN: CASERVER
	L: Raleigh
	O: Katello
	OU: SomeOrgUnit
	ST: North Carolina

Product:
	ID: 186245269223
	Name: 1220 Public Cloud Module 12 x86_64
	Version: 
	Arch: ALL
	Tags: 
	Brand Type: 
	Brand Name: 

Order:
	Name: 1220 Public Cloud Module 12 x86_64
	Number: 
	SKU: 186245269223
	Contract: 
	Account: 
	Service Level: 
	Service Type: 
	Quantity: Unlimited
	Quantity Used: 1
	Socket Limit: 
	RAM Limit: 
	Core Limit: 
	Virt Only: False
	Stacking ID: 
	Warning Period: 0
	Provides Management: False

Content:
	Type: yum
	Name: 1220 Public Cloud Module 12 x86_64 SLE-Module-Public-Cloud12-Pool for sle-12-x86_64
	Label: ORGANIZATION_1220_Public_Cloud_Module_12_x86_64_1220_Public_Cloud_Module_12_x86_64_SLE-Module-Public-Cloud12-Pool_for_sle-12-x86_64
	Vendor: Custom
	URL: /ORGANIZATION/Library/SLES/custom/1220_Public_Cloud_Module_12_x86_64/1220_Public_Cloud_Module_12_x86_64_SLE-Module-Public-Cloud12-Pool_for_sle-12-x86_64
	GPG: ../../katello/api/v2/repositories/22470/gpg_key_content
	Enabled: True
	Expires: 1
	Required Tags: 
	Arches: x86_64

For the host at https://FOREMANSERVER/rhsm/consumers/9a1f843c-b83e-43e9-8c21-db631424c699 it looks like:

{
...
        "environmentContent": [
...
            {
                "content": {
                    "created": "2020-04-29T09:11:43+0000",
                    "updated": "2020-07-17T08:18:52+0000",
                    "uuid": "2c96813b72e970f001735bdacb8851c2",
                    "id": "1588151503687",
                    "type": "yum",
                    "label": "ORGANIZATION_1220_Public_Cloud_Module_12_x86_64_1220_Public_Cloud_Module_12_x86_64_SLE-Module-Public-Cloud12-Pool_for_sle-12-x86_64",
                    "name": "1220 Public Cloud Module 12 x86_64 SLE-Module-Public-Cloud12-Pool for sle-12-x86_64",
                    "vendor": "Custom",
                    "contentUrl": "/custom/1220_Public_Cloud_Module_12_x86_64/1220_Public_Cloud_Module_12_x86_64_SLE-Module-Public-Cloud12-Pool_for_sle-12-x86_64",
                    "requiredTags": null,
                    "gpgUrl": "../../katello/api/v2/repositories/22470/gpg_key_content",
                    "modifiedProductIds": [ ],
                    "arches": "x86_64",
                    "requiredProductIds": [ ],
                    "metadataExpire": 1,
                    "releaseVer": null
                },
                "enabled": null
            },
            {
                "content": {
                    "created": "2020-04-29T09:11:53+0000",
                    "updated": "2020-07-17T08:18:52+0000",
                    "uuid": "2c96813b72e970f001735bdacb8851c3",
                    "id": "1588151513954",
                    "type": "yum",
                    "label": "ORGANIZATION_1220_Public_Cloud_Module_12_x86_64_1220_Public_Cloud_Module_12_x86_64_SLE-Module-Public-Cloud12-Updates_for_sle-12-x86_64",
                    "name": "1220 Public Cloud Module 12 x86_64 SLE-Module-Public-Cloud12-Updates for sle-12-x86_64",
                    "vendor": "Custom",
                    "contentUrl": "/custom/1220_Public_Cloud_Module_12_x86_64/1220_Public_Cloud_Module_12_x86_64_SLE-Module-Public-Cloud12-Updates_for_sle-12-x86_64",
                    "requiredTags": null,
                    "gpgUrl": "../../katello/api/v2/repositories/22491/gpg_key_content",
                    "modifiedProductIds": [ ],
                    "arches": "x86_64",
                    "requiredProductIds": [ ],
                    "metadataExpire": 1,
                    "releaseVer": null
                },
                "enabled": null
            },
...
        ]
    },
    "entitlementCount": 11,
}

And the content_overrides at https://FOREMANSERVER/rhsm/consumers/9a1f843c-b83e-43e9-8c21-db631424c699/content_overrides/ (The value gets set for all available repositories via script because of limitations in the subscription-manager version)

[
...
  {

    "created": "2020-09-16T07:19:08+0000",
    "updated": "2020-09-16T07:19:08+0000",
    "contentLabel": "ORGANIZATION_1220_Public_Cloud_Module_12_x86_64_1220_Public_Cloud_Module_12_x86_64_SLE-Module-Public-Cloud12-Pool_for_sle-12-x86_64",
    "name": "repo_gpgcheck",
    "value": "0"
  },
...
]

I have digged deeper and think it is caused by a missing database entry.

# select * from cp2_content where name like '%1220%';
               uuid               |  content_id   |          created           |          updated           |                                                            contenturl                                                           
  |                         gpgurl                          |                                                               label                                                                | metadataexpire |                           
               name                                          | releasever | requiredtags | type | vendor | arches | entity_version | locked 
----------------------------------+---------------+----------------------------+----------------------------+---------------------------------------------------------------------------------------------------------------------------------
--+---------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+----------------+---------------------------
-------------------------------------------------------------+------------+--------------+------+--------+--------+----------------+--------
 2c96813b72e970f001735bdacb8851c3 | 1588151513954 | 2020-04-29 11:11:53.886+02 | 2020-07-17 10:18:52.424+02 | /custom/1220_Public_Cloud_Module_12_x86_64/1220_Public_Cloud_Module_12_x86_64_SLE-Module-Public-Cloud12-Updates_for_sle-12-x86_6
4 | ../../katello/api/v2/repositories/22491/gpg_key_content | ORGANIZATION_1220_Public_Cloud_Module_12_x86_64_1220_Public_Cloud_Module_12_x86_64_SLE-Module-Public-Cloud12-Updates_for_sle-12-x86_64 |              1 | 1220 Public Cloud Module 1
2 x86_64 SLE-Module-Public-Cloud12-Updates for sle-12-x86_64 |            |              | yum  | Custom | x86_64 |     1897444354 |      0
 2c96813b72e970f001735bdacb8851c2 | 1588151503687 | 2020-04-29 11:11:43.642+02 | 2020-07-17 10:18:52.424+02 | /custom/1220_Public_Cloud_Module_12_x86_64/1220_Public_Cloud_Module_12_x86_64_SLE-Module-Public-Cloud12-Pool_for_sle-12-x86_64  
  | ../../katello/api/v2/repositories/22470/gpg_key_content | ORGANIZATION_1220_Public_Cloud_Module_12_x86_64_1220_Public_Cloud_Module_12_x86_64_SLE-Module-Public-Cloud12-Pool_for_sle-12-x86_64    |              1 | 1220 Public Cloud Module 1
2 x86_64 SLE-Module-Public-Cloud12-Pool for sle-12-x86_64    |            |              | yum  | Custom | x86_64 |     2128759327 |      0

# select * from cp2_product_content where product_uuid='2c96813b72e970f001735bdacb8d51c4';
           product_uuid           |           content_uuid           | enabled |          created           |          updated           |                id                
----------------------------------+----------------------------------+---------+----------------------------+----------------------------+----------------------------------
 2c96813b72e970f001735bdacb8d51c4 | 2c96813b72e970f001735bdacb8851c2 | t       | 2020-07-17 10:18:52.429+02 | 2020-07-17 10:18:52.429+02 | 2c96813b72e970f001735bdacb8d51c6

For those repositories working, I see a matching number of entries in cp2_product_content.

I have not found a way to regenerate this database entries and I did not find any help in the Foreman community forum: https://community.theforeman.org/t/entitlement-certificate-not-containing-all-content/20764

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


How reproducible:
I have not found a cause of the problem or way to repoduce it.

Actual results:
SLES systems are missing repositories.


Expected results:
SLES systems get all repositories they are meant to be entitled for.


Additional info:
Distribution: RHEL 7.9
Foreman: 1.24.3
Katello 3.14.1
foreman_scc_manager 1.8.3

Comment 1 Rehana 2020-10-09 14:26:00 UTC
Hi Dirk, 

Thanks for opening the bug. With the given details we find it difficult to troubleshoot due to the custom facts in place. It will be helpful if you can provide us reproducer . 

thanks,
Rehana

Comment 2 Dirk Götz 2020-10-12 06:58:39 UTC
Hi Rehana,

unfortunately it looks very random to me and I did not find a reproducer.
How about a possibility to regenerate the data in cp2_product_content instead of trying to find the cause of the missing data?

Kind Regards,
 Dirk

Comment 3 Barnaby Court 2020-10-19 12:58:26 UTC
Dirk, Can you provide the "subscription-manager facts" & the generated entitlement certificate for one of these systems that is missing content? 

My suspicion is that The architecture the system is reporting doesn't match the repository. Arch is the one thing we filter on the Candlepin server.

Comment 4 Rehana 2020-11-10 10:56:16 UTC
Gentle reminder on the need info request above ( comment 3 ) .

Comment 5 Dirk Götz 2020-11-11 14:51:13 UTC
I am unfortunately waiting to get the info from our customer myself.

Comment 6 Dirk Götz 2020-12-02 08:01:10 UTC
A similar issue reported in the community forum (in this case CentOS 8 instead of SLES): https://community.theforeman.org/t/centos-8-subscriber-not-receiving-all-entitlements-via-subscription-manager/21187

There the architecture was confirmed as matching and there is also the output of rct.

Comment 7 caitslin 2020-12-03 15:37:21 UTC
Hello:

I am the OP of the forum post that Dirk linked to in the last update. The symptom is that the BaseOS repo is missing from the entitlement certificate issued to the consumer OS (CentOS 8 in this instance).

I have found in looking at the candlepin database that there is an arch set for BaseOS repository, but not for the AppStream or PowerTools repositories. I also found there is an entry missing in cp2_product_content for the BaseOS repo:

candlepin=# select * from cp2_content where name like '8%';
               uuid               |  content_id   |          created           |          updated           |          contenturl           |                       gpgurl          
              |                  label                   | metadataexpire |      name      | releasever | requiredtags | type | vendor | arches | entity_version | locked 
----------------------------------+---------------+----------------------------+----------------------------+-------------------------------+---------------------------------------
--------------+------------------------------------------+----------------+----------------+------------+--------------+------+--------+--------+----------------+--------
 8a9084ac754b9a7a017579eb9b611ff5 | 1603292218870 | 2020-10-21 10:56:58.869-04 | 2020-10-30 10:31:25.281-04 | /custom/CentOS/8_-_AppStream  | ../../katello/api/v2/repositories/3/gpg_key_content | My_Awesome_Org_CentOS_8_-_AppStream  |              1 | 8 - AppStream  |            |              | yum  | Custom |        |      497872048 |      0
 8a9084ac754b9a7a017579eb9b841ffa | 1603292227268 | 2020-10-21 10:57:07.265-04 | 2020-10-30 10:31:25.316-04 | /custom/CentOS/8_-_PowerTools | ../../katello/api/v2/repositories/5/gpg_key_content | My_Awesome_Org_CentOS_8_-_PowerTools |              1 | 8 - PowerTools |            |              | yum  | Custom |        |     1365813698 |      0
 8a9084ac754b9a7a01758f85c2a72445 | 1603292223082 | 2020-10-21 10:57:03.08-04  | 2020-11-03 14:11:49.415-05 | /custom/CentOS/8_-_BaseOS     | ../../katello/api/v2/repositories/4/gpg_key_content | My_Awesome_Org_CentOS_8_-_BaseOS     |              1 | 8 - BaseOS     |            |              | yum  | Custom | x86_64 |     1284365651 |      0
(3 rows)

candlepin=# select * from cp2_product_content where content_uuid='8a9084ac754b9a7a017579eb9b611ff5';
           product_uuid           |           content_uuid           | enabled |          created           |          updated           |                id                
----------------------------------+----------------------------------+---------+----------------------------+----------------------------+----------------------------------
 8a9084ac754b9a7a017579eb9b8f1ffc | 8a9084ac754b9a7a017579eb9b611ff5 | t       | 2020-10-30 10:31:25.327-04 | 2020-10-30 10:31:25.327-04 | 8a9084ac754b9a7a017579eb9b8f1fff
(1 row)

candlepin=# select * from cp2_product_content where content_uuid='8a9084ac754b9a7a017579eb9b841ffa';
           product_uuid           |           content_uuid           | enabled |          created           |          updated           |                id                
----------------------------------+----------------------------------+---------+----------------------------+----------------------------+----------------------------------
 8a9084ac754b9a7a017579eb9b8f1ffc | 8a9084ac754b9a7a017579eb9b841ffa | t       | 2020-10-30 10:31:25.327-04 | 2020-10-30 10:31:25.327-04 | 8a9084ac754b9a7a017579eb9b8f1ffd
(1 row)

candlepin=# select * from cp2_product_content where content_uuid='8a9084ac754b9a7a01758f85c2a72445';
 product_uuid | content_uuid | enabled | created | updated | id 
--------------+--------------+---------+---------+---------+----
(0 rows)

candlepin=#


Cheers,

Matthew

Comment 8 Rehana 2020-12-04 14:13:23 UTC
Hi , 

Thank you for the details, unfortunately we are unable to troubleshoot further with out clear reproducer. Can you please help us understand how the data was created ? 

thanks,
Rehana

Comment 9 caitslin 2020-12-04 18:59:52 UTC
I configured my environment using the hammer CLI utility.

I first created the product:

hammer product create --organization "My Awesome Org" --name "CentOS" --description "Community Enterprise Operating System" --sync-plan "Nightly Sync"

I then added each repository:

hammer repository create --organization "My Awesome Org" --content-type yum --download-policy immediate --http-proxy-policy global_default_http_proxy --publish-via-http false --product "CentOS" --name "8 - AppStream" --url "http://mirror.centos.org/centos-8/8/AppStream/x86_64/os" --ignorable-content "drpm,srpm,distribution"

hammer repository create --organization "My Awesome Org" --content-type yum --download-policy immediate --http-proxy-policy global_default_http_proxy --publish-via-http false --product "CentOS" --name "8 - BaseOS" --url "http://mirror.centos.org/centos-8/8/BaseOS/x86_64/os" --ignorable-content "drpm,srpm,distribution"

hammer repository create --organization "My Awesome Org" --content-type yum --download-policy immediate --http-proxy-policy global_default_http_proxy --publish-via-http false --product "CentOS" --name "8 - PowerTools" --url "http://mirror.centos.org/centos-8/8/PowerTools/x86_64/os" --ignorable-content "drpm,srpm,distribution"

I haven't manipulated Candlepin or its database in any other way.

Cheers,

Matthew

Comment 10 Kshitij 2020-12-16 13:57:36 UTC
Hello,

One of my customers is also facing the same issue as per case 02826189.

Let me know if you need further details.

Comment 11 Chris "Ceiu" Rog 2021-01-08 21:19:26 UTC
Is this issue reliably reproducible with other custom product additions? Are there any other details about the environment(s) that may have an impact on product/repo management? Any configuration on the organization or environment/library itself? Have there been other instances of this issue that you've noticed? Do you happen to have the (Candlepin) logs for when the custom product was added?

So far I've been unable to reproduce it locally, so while I put together something for a one-off recovery fix, I want to see if there are any other details here that I might be overlooking that's leading to this problem. I have one idea that could lead to this, but it's so far out in left field, I want to explore more grounded ideas first.

Comment 12 caitslin 2021-01-11 19:33:50 UTC
@crog I have been able to reproduce this issue with Foreman 1.24.3 and Foreman 2.1.4 on a RHEL 7 system. I am currently working with 2.1.4 as I assumed a newer version would resolve the issue. 2.1.4 is a clean, new environment. No data was migrated from the 1.24.3 environment in the event there was corrupt data causing the issue.

I unfortunately don't have Candlepin logs from when the custom Product and Repos were added (this system was built late Oct 2020). I will need to re-build this system so I can capture the logging data requested. I do have Candlepin logs going back to late Nov 2020, but the only errors are the two messages below which appear from time-to-time:

2020-12-16 00:00:00,029 [thread=Thread-3377 (ActiveMQ-client-global-threads)] [=, org=, csid=] ERROR org.candlepin.async.JobManager - Unable to find job status for message: JobMessage [id: ActiveEntitlementJob, key: 8a9084ac754b9a7a017669eb58812ecd]

2020-12-16 00:00:00,030 [thread=Thread-3377 (ActiveMQ-client-global-threads)] [=, org=, csid=] ERROR org.candlepin.async.JobMessageReceiver - Job processing failed terminally; committing job message as acknowledged: org.candlepin.messaging.impl.artemis.ArtemisMessage@49d77fff

2020-12-16 19:00:00,024 [thread=Thread-3420 (ActiveMQ-client-global-threads)] [=, org=, csid=] ERROR org.candlepin.async.JobManager - Unable to find job status for message: JobMessage [id: ActiveEntitlementJob, key: 8a9084ac754b9a7a01766dff0c012efa]

2020-12-16 19:00:00,024 [thread=Thread-3420 (ActiveMQ-client-global-threads)] [=, org=, csid=] ERROR org.candlepin.async.JobMessageReceiver - Job processing failed terminally; committing job message as acknowledged: org.candlepin.messaging.impl.artemis.ArtemisMessage@6848d8e3

2020-12-16 00:00:00,029 [thread=Thread-3377 (ActiveMQ-client-global-threads)] [=, org=, csid=] ERROR org.candlepin.async.JobManager - Unable to find job status for message: JobMessage [id: ActiveEntitlementJob, key: 8a9084ac754b9a7a017669eb58812ecd]

2020-12-16 00:00:00,030 [thread=Thread-3377 (ActiveMQ-client-global-threads)] [=, org=, csid=] ERROR org.candlepin.async.JobMessageReceiver - Job processing failed terminally; committing job message as acknowledged: org.candlepin.messaging.impl.artemis.ArtemisMessage@49d77fff

2020-12-16 19:00:00,024 [thread=Thread-3420 (ActiveMQ-client-global-threads)] [=, org=, csid=] ERROR org.candlepin.async.JobManager - Unable to find job status for message: JobMessage [id: ActiveEntitlementJob, key: 8a9084ac754b9a7a01766dff0c012efa]

2020-12-16 19:00:00,024 [thread=Thread-3420 (ActiveMQ-client-global-threads)] [=, org=, csid=] ERROR org.candlepin.async.JobMessageReceiver - Job processing failed terminally; committing job message as acknowledged: org.candlepin.messaging.impl.artemis.ArtemisMessage@6848d8e3

2020-12-18 22:00:00,022 [thread=Thread-3535 (ActiveMQ-client-global-threads)] [=, org=, csid=] ERROR org.candlepin.async.JobManager - Unable to find job status for message: JobMessage [id: ExpiredPoolsCleanupJob, key: 8a9084ac754b9a7a017678f08f822f6b]

2020-12-18 22:00:00,023 [thread=Thread-3535 (ActiveMQ-client-global-threads)] [=, org=, csid=] ERROR org.candlepin.async.JobMessageReceiver - Job processing failed terminally; committing job message as acknowledged: org.candlepin.messaging.impl.artemis.ArtemisMessage@3926be7c

2020-12-18 22:00:00,022 [thread=Thread-3535 (ActiveMQ-client-global-threads)] [=, org=, csid=] ERROR org.candlepin.async.JobManager - Unable to find job status for message: JobMessage [id: ExpiredPoolsCleanupJob, key: 8a9084ac754b9a7a017678f08f822f6b]

2020-12-18 22:00:00,023 [thread=Thread-3535 (ActiveMQ-client-global-threads)] [=, org=, csid=] ERROR org.candlepin.async.JobMessageReceiver - Job processing failed terminally; committing job message as acknowledged: org.candlepin.messaging.impl.artemis.ArtemisMessage@3926be7c

2020-12-22 00:00:00,037 [thread=Thread-3728 (ActiveMQ-client-global-threads)] [=, org=, csid=] ERROR org.candlepin.async.JobManager - Unable to find job status for message: JobMessage [id: ActiveEntitlementJob, key: 8a9084ac754b9a7a017688d180813012]

2020-12-22 00:00:00,037 [thread=Thread-3728 (ActiveMQ-client-global-threads)] [=, org=, csid=] ERROR org.candlepin.async.JobMessageReceiver - Job processing failed terminally; committing job message as acknowledged: org.candlepin.messaging.impl.artemis.ArtemisMessage@310bc644

2020-12-22 00:00:00,037 [thread=Thread-3728 (ActiveMQ-client-global-threads)] [=, org=, csid=] ERROR org.candlepin.async.JobManager - Unable to find job status for message: JobMessage [id: ActiveEntitlementJob, key: 8a9084ac754b9a7a017688d180813012]

2020-12-22 00:00:00,037 [thread=Thread-3728 (ActiveMQ-client-global-threads)] [=, org=, csid=] ERROR org.candlepin.async.JobMessageReceiver - Job processing failed terminally; committing job message as acknowledged: org.candlepin.messaging.impl.artemis.ArtemisMessage@310bc644

I will post an update once I have rebuilt the system and can provide additional Candlepin logs.

Comment 13 Chris "Ceiu" Rog 2021-01-11 21:00:53 UTC
Alright. I'll retry my testing with 2.1.4 and see if I can get the same disconnect.

Couple notes for checking the state of things:
- Entities originating from cp2_products and cp2_content are considered to be immutable. So whenever one of them changes, a new entity is created and the old ones get cleaned up eventually. That said, when checking the UUIDs from the CP database, you have to follow the chain from cp_pool.product_uuid.

- Assuming the content is supposed to be linked to a specific product, adding the missing entries in the join table shouldn't be an issue, but is real tedious.

- The arch coming out of nowhere is something that's standing out to me. If the client is being registered with an arch other than x86_64, you'll get the behavior you're seeing, even with the proper linkage in the database. So that'd be something to investigate.



As far as the job messages you're seeing, those are (likely) unrelated to this issue. That'll happen if Artemis delivers a job message for a job that no longer exists in the database. I've seen this happen in cases where the database is erroneously truncated or otherwise modified such that jobs are removed from cp_async_jobs after a message is dispatched, but before it is delivered and processed. It *should* only happen once for every such message, as Candlepin should be ACKing them on a terminal failure. If you keep seeing these, it might be worth opening another BZ to start an investigation on that.

I'll keep an eye out for the next update to see if the Candlepin logs have anything illuminating.

Comment 14 Chris "Ceiu" Rog 2021-01-12 16:27:01 UTC
An update from my end. Try as I might, following the repro steps above, I still don't get this into the state observed. The commands issued:


hammer organization create --name "test_org"

hammer sync-plan create --organization test_org --name "Nightly Sync" --enabled true --sync-date "2021-01-30 00:00:00" --interval "daily"

hammer product create --organization "test_org" --name "CentOS" --description "Community Enterprise Operating System" --sync-plan "Nightly Sync"

hammer repository create --organization "test_org" --content-type yum --download-policy immediate --http-proxy-policy global_default_http_proxy --publish-via-http false --product "CentOS" --name "8 - AppStream" --url "http://mirror.centos.org/centos-8/8/AppStream/x86_64/os" --ignorable-content "drpm,srpm,distribution"

hammer repository create --organization "test_org" --content-type yum --download-policy immediate --http-proxy-policy global_default_http_proxy --publish-via-http false --product "CentOS" --name "8 - BaseOS" --url "http://mirror.centos.org/centos-8/8/BaseOS/x86_64/os" --ignorable-content "drpm,srpm,distribution"

hammer repository create --organization "test_org" --content-type yum --download-policy immediate --http-proxy-policy global_default_http_proxy --publish-via-http false --product "CentOS" --name "8 - PowerTools" --url "http://mirror.centos.org/centos-8/8/PowerTools/x86_64/os" --ignorable-content 




SELECT pool.id AS "Pool ID", pool.product_uuid as "Product UUID", prod.name as "Product Name", pc.content_uuid as "Content UUID", cont.name as "Content Name", cont.label AS "Content Label" FROM cp_pool pool JOIN cp2_products prod ON pool.product_uuid = prod.uuid JOIN cp2_product_content pc ON prod.uuid = pc.product_uuid JOIN cp2_content cont ON pc.content_uuid = cont.uuid;

             Pool ID              |           Product UUID           | Product Name |           Content UUID           |  Content Name  |         Content Label          
----------------------------------+----------------------------------+--------------+----------------------------------+----------------+--------------------------------
 ff80808176f319710176f744050c0030 | ff80808176f319710176f7463f51003d | CentOS       | ff80808176f319710176f744dffd0031 | 8 - AppStream  | test_org_CentOS_8_-_AppStream
 ff80808176f319710176f744050c0030 | ff80808176f319710176f7463f51003d | CentOS       | ff80808176f319710176f745ce3b0036 | 8 - BaseOS     | test_org_CentOS_8_-_BaseOS
 ff80808176f319710176f744050c0030 | ff80808176f319710176f7463f51003d | CentOS       | ff80808176f319710176f7463f0a003c | 8 - PowerTools | test_org_CentOS_8_-_PowerTools
(3 rows)



Are there any other steps or configuration that are missing from my steps that could be contributing to the issue here?

Comment 15 caitslin 2021-01-15 18:59:56 UTC
@crog 

I have a bittersweet update; it appears a fresh install has "resolved" the issue. As such, I cannot provide the logs requested and I'm unable to reproduce the issue with a subsequent "wipe and re-install." I have tried to keep things in a "change-freeze" state, so package versions have not changed. I cannot find anything else that has changed. I am going to continue monitoring it and will report back if it rears its head again.

Comment 16 Chris "Ceiu" Rog 2021-01-15 19:26:01 UTC
Well, that's good-ish news, I guess. These are always the most frustrating bugs to deal with.

If you still have your affected environment around, the SQL query I provided above should give you the same output I see (as well as that for several other products -- feel free to add another condition such that you only view the appropriate pool/product). If it doesn't, the safest thing to do would probably be to delete the problematic repo entirely, and then re-add it using hammer commands.

The other thing to watch out for is the arches. In the original post, the arch on the BaseOS repo was "x86_64" (which is odd since the command didn't include an arch), but if the client receiving the entitlement declares itself as using any other arch, the entitlement cert's content would be missing it. The fix there would be to update the repo to no longer have the arch if it is there erroneously. There's an undocumented way to do it through hammer if you modify one file in katello (basically add recognition for the --arch param), or you can manually update the content within the Candlepin DB and restart it. The latter comes with a bunch of extra churn due to the entity version no longer being valid, but it should* work otherwise. I would strongly recommend the former, however.

Comment 17 Chris "Ceiu" Rog 2021-01-18 14:05:40 UTC
Dirk, 

Have you received any updates from your customer on this issue?

Comment 18 Dirk Götz 2021-01-18 16:20:35 UTC
Unfortunately they have completely worked around the issue by skipping subscription-manager and directly assigning the repositories from the published URL.
SLES also makes deletion and recreation until everything works impossible as the SCC manager plugin does only allow to add a product and if you delete a repository directly there is not re-adding. 
Also SLES repositories are bloated with other archs, debuginfo and similar, what was the reason to limit it to x86_64 if I remember correctly.

Comment 19 Chris "Ceiu" Rog 2021-01-25 15:47:52 UTC
Kshitij, any updates on your end here?

Comment 20 Chris "Ceiu" Rog 2021-02-02 17:43:54 UTC
Lacking a proper reproducer or information to pursue on the matter, I'm closing this as "cannot reproduce."

If anyone has any further information on the issue or has any details that could lead to a reproducer, please reopen the BZ and we'll make another attempt at identifying and fixing this problem.

Comment 21 Kshitij 2021-03-19 02:25:33 UTC
Hello,

This is been tracked in a new Bugzilla so yes this should be closed now as a duplicate.


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