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 1337076 - Publishing composite content view is not atomic when removing content views
Summary: Publishing composite content view is not atomic when removing content views
Keywords:
Status: CLOSED DUPLICATE of bug 1494064
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.1.8
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1122832
TreeView+ depends on / blocked
 
Reported: 2016-05-18 08:57 UTC by Peter Vreman
Modified: 2018-03-05 16:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-05 16:00:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Peter Vreman 2016-05-18 08:57:07 UTC
Description of problem:
When removing a component content view from an Composite Content View the operation is not atomic. The component content view is already removed before the final content view is made available to the Library. Clients checking in and doing a yum update during the publish will receive a 404 on the missing repositories of the removed component content view

See below client output at 8:45am that is during the publishing action:

vrempet@li-lc-1441 ~
$ date
Wed May 18 08:45:33 UTC 2016
vrempet@li-lc-1441 ~
$ sudo yum repolist
Loaded plugins: changelog, package_upload, product-id, search-disabled-repos, security, subscription-manager
https://li-lc-1017.hag.hilti.com/pulp/repos/Hilti/Library/hg-crash__IPS__Test-6_8-latest/custom/HOIOS/HOIOS-6_8-sp8/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
To address this issue please refer to the below knowledge base article

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

https://li-lc-1017.hag.hilti.com/pulp/repos/Hilti/Library/hg-crash__IPS__Test-6_8-latest/custom/HOIOS/HOIOS-6_8-sp8/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Hilti_HOIPRODUCTS_HOIPRODUCTS-1_2-sp5                                                                                                                                                  | 2.1 kB     00:00
Hilti_HOIPRODUCTS_HOIPRODUCTS-1_2-sp5/primary                                                                                                                                          | 9.7 kB     00:00
Hilti_HOIPRODUCTS_HOIPRODUCTS-1_2-sp5                                                                                                                                                                   25/25
Hilti_HOIRHEL_HOIRHEL-6_8-d20160515             
...


The output of the Publishing process that shows the publishing is sarting at 8:36 and still not running at 8:45 that the client was doing a yum repolist:

build	18-May-2016 08:35:16	2016-05-18 08:35:16 [DEBUG][crash]Requesting GET '[KT]organizations/3/content_views' ("environment_id":"2")
build	18-May-2016 08:35:25	2016-05-18 08:35:25 [INFO ][crash]- Assigned Product Content Views:
build	18-May-2016 08:35:25	2016-05-18 08:35:25 [INFO ][crash]  - 'product-HOIOS-6.8-sp9'
build	18-May-2016 08:35:25	2016-05-18 08:35:25 [INFO ][crash]  - 'product-HOIPRODUCTS-1.2-sp5'
build	18-May-2016 08:35:25	2016-05-18 08:35:25 [INFO ][crash]  - 'product-HOIRHEL-6.8-d20160515'
build	18-May-2016 08:35:25	2016-05-18 08:35:25 [INFO ][crash]- Updating Hostgroup Composite Content View 'hg-crash', assigned Product Content Views changed
build	18-May-2016 08:35:25	2016-05-18 08:35:25 [INFO ][crash]Composite Content View 'hg-crash' assigning Content Views
build	18-May-2016 08:35:25	2016-05-18 08:35:25 [DEBUG][crash]Requesting GET '[KT]organizations/3/content_views' ("name":"hg-crash")
build	18-May-2016 08:35:26	2016-05-18 08:35:26 [DEBUG][crash]Requesting GET '[KT]organizations/3/environments' ("name":"Library")
build	18-May-2016 08:35:27	2016-05-18 08:35:27 [DEBUG][crash]Requesting GET '[KT]content_views' ("organization_id":3,"name":"product-HOIOS-6.8-sp9")
build	18-May-2016 08:35:28	2016-05-18 08:35:28 [DEBUG][crash]Requesting GET '[KT]content_views/279/content_view_versions' ("environment_id":"2")
build	18-May-2016 08:35:30	2016-05-18 08:35:30 [INFO ][crash]- Adding Content View 'product-HOIOS-6.8-sp9' version '1.0'
build	18-May-2016 08:35:30	2016-05-18 08:35:30 [DEBUG][crash]Requesting GET '[KT]content_views' ("organization_id":3,"name":"product-HOIPRODUCTS-1.2-sp5")
build	18-May-2016 08:35:31	2016-05-18 08:35:31 [DEBUG][crash]Requesting GET '[KT]content_views/238/content_view_versions' ("environment_id":"2")
build	18-May-2016 08:35:32	2016-05-18 08:35:32 [INFO ][crash]- Skipping Content View 'product-HOIPRODUCTS-1.2-sp5', is already version '1.0'
build	18-May-2016 08:35:33	2016-05-18 08:35:32 [DEBUG][crash]Requesting GET '[KT]content_views' ("organization_id":3,"name":"product-HOIRHEL-6.8-d20160515")
build	18-May-2016 08:35:33	2016-05-18 08:35:33 [DEBUG][crash]Requesting GET '[KT]content_views/278/content_view_versions' ("environment_id":"2")
build	18-May-2016 08:35:36	2016-05-18 08:35:36 [INFO ][crash]- Skipping Content View 'product-HOIRHEL-6.8-d20160515', is already version '1.0'
build	18-May-2016 08:35:36	2016-05-18 08:35:36 [INFO ][crash]- Removing Content View 'product-HOIOS-6.8-sp8'
build	18-May-2016 08:35:36	2016-05-18 08:35:36 [INFO ][crash]- Updating with assigned Content View Versions
build	18-May-2016 08:35:36	2016-05-18 08:35:36 [DEBUG][crash]Requesting PUT '[KT]content_views/18' ("content_view":{"component_ids":[1346,1657,1675]})
build	18-May-2016 08:35:40	2016-05-18 08:35:40 [INFO ][crash]- Publishing new version
build	18-May-2016 08:35:40	2016-05-18 08:35:40 [DEBUG][crash]Requesting POST '[KT]content_views/18/publish' ()
build	18-May-2016 08:36:52	2016-05-18 08:36:52 [INFO ][crash]Waiting for 1 Tasks
build	18-May-2016 08:36:52	2016-05-18 08:36:52 [INFO ][crash][TASKS]Waiting for 1 tasks, completed 0 tasks, elapsed 0 minutes, waiting 0 seconds
build	18-May-2016 08:36:52	2016-05-18 08:36:52 [DEBUG][crash][TASKS]Requesting POST '[TASKS]tasks/bulk_search' ("searches":[{"type":"task","task_id":"8b444264-acd6-481d-91e2-b4fcf2aa2c96"}])
build	18-May-2016 08:36:54	2016-05-18 08:36:54 [INFO ][crash][TASKS]Waiting for 1 tasks, completed 0 tasks, elapsed 0 minutes, waiting 10 seconds
build	18-May-2016 08:37:05	2016-05-18 08:37:04 [DEBUG][crash][TASKS]Requesting POST '[TASKS]tasks/bulk_search' ("searches":[{"type":"task","task_id":"8b444264-acd6-481d-91e2-b4fcf2aa2c96"}])
build	18-May-2016 08:37:06	2016-05-18 08:37:06 [INFO ][crash][TASKS]Waiting for 1 tasks, completed 0 tasks, elapsed 0 minutes, waiting 20 seconds
build	18-May-2016 08:37:26	2016-05-18 08:37:26 [DEBUG][crash][TASKS]Requesting POST '[TASKS]tasks/bulk_search' ("searches":[{"type":"task","task_id":"8b444264-acd6-481d-91e2-b4fcf2aa2c96"}])
build	18-May-2016 08:37:28	2016-05-18 08:37:28 [INFO ][crash][TASKS]Waiting for 1 tasks, completed 0 tasks, elapsed 0 minutes, waiting 30 seconds
build	18-May-2016 08:37:58	2016-05-18 08:37:58 [DEBUG][crash][TASKS]Requesting POST '[TASKS]tasks/bulk_search' ("searches":[{"type":"task","task_id":"8b444264-acd6-481d-91e2-b4fcf2aa2c96"}])
build	18-May-2016 08:38:00	2016-05-18 08:38:00 [INFO ][crash][TASKS]Waiting for 1 tasks, completed 0 tasks, elapsed 1 minutes, waiting 40 seconds
build	18-May-2016 08:38:40	2016-05-18 08:38:40 [DEBUG][crash][TASKS]Requesting POST '[TASKS]tasks/bulk_search' ("searches":[{"type":"task","task_id":"8b444264-acd6-481d-91e2-b4fcf2aa2c96"}])
build	18-May-2016 08:38:42	2016-05-18 08:38:42 [INFO ][crash][TASKS]Waiting for 1 tasks, completed 0 tasks, elapsed 1 minutes, waiting 50 seconds
build	18-May-2016 08:39:32	2016-05-18 08:39:32 [DEBUG][crash][TASKS]Requesting POST '[TASKS]tasks/bulk_search' ("searches":[{"type":"task","task_id":"8b444264-acd6-481d-91e2-b4fcf2aa2c96"}])
build	18-May-2016 08:39:35	2016-05-18 08:39:35 [INFO ][crash][TASKS]Waiting for 1 tasks, completed 0 tasks, elapsed 2 minutes, waiting 60 seconds
build	18-May-2016 08:40:35	2016-05-18 08:40:35 [DEBUG][crash][TASKS]Requesting POST '[TASKS]tasks/bulk_search' ("searches":[{"type":"task","task_id":"8b444264-acd6-481d-91e2-b4fcf2aa2c96"}])
build	18-May-2016 08:40:37	2016-05-18 08:40:37 [INFO ][crash][TASKS]Waiting for 1 tasks, completed 0 tasks, elapsed 3 minutes, waiting 60 seconds
build	18-May-2016 08:41:37	2016-05-18 08:41:37 [DEBUG][crash][TASKS]Requesting POST '[TASKS]tasks/bulk_search' ("searches":[{"type":"task","task_id":"8b444264-acd6-481d-91e2-b4fcf2aa2c96"}])
build	18-May-2016 08:41:39	2016-05-18 08:41:39 [INFO ][crash][TASKS]Waiting for 1 tasks, completed 0 tasks, elapsed 4 minutes, waiting 60 seconds
build	18-May-2016 08:42:39	2016-05-18 08:42:39 [DEBUG][crash][TASKS]Requesting POST '[TASKS]tasks/bulk_search' ("searches":[{"type":"task","task_id":"8b444264-acd6-481d-91e2-b4fcf2aa2c96"}])
build	18-May-2016 08:42:41	2016-05-18 08:42:41 [INFO ][crash][TASKS]Waiting for 1 tasks, completed 0 tasks, elapsed 5 minutes, waiting 60 seconds
build	18-May-2016 08:43:41	2016-05-18 08:43:41 [DEBUG][crash][TASKS]Requesting POST '[TASKS]tasks/bulk_search' ("searches":[{"type":"task","task_id":"8b444264-acd6-481d-91e2-b4fcf2aa2c96"}])
build	18-May-2016 08:43:43	2016-05-18 08:43:43 [INFO ][crash][TASKS]Waiting for 1 tasks, completed 0 tasks, elapsed 6 minutes, waiting 60 seconds
build	18-May-2016 08:44:43	2016-05-18 08:44:43 [DEBUG][crash][TASKS]Requesting POST '[TASKS]tasks/bulk_search' ("searches":[{"type":"task","task_id":"8b444264-acd6-481d-91e2-b4fcf2aa2c96"}])
build	18-May-2016 08:44:46	2016-05-18 08:44:46 [INFO ][crash][TASKS]Waiting for 1 tasks, completed 0 tasks, elapsed 7 minutes, waiting 60 seconds
build	18-May-2016 08:45:46	2016-05-18 08:45:46 [DEBUG][crash][TASKS]Requesting POST '[TASKS]tasks/bulk_search' ("searches":[{"type":"task","task_id":"8b444264-acd6-481d-91e2-b4fcf2aa2c96"}])
build	18-May-2016 08:45:47	2016-05-18 08:45:47 [INFO ][crash][TASKS]Waiting for 1 tasks, completed 0 tasks, elapsed 8 minutes, waiting 60 seconds
build	18-May-2016 08:46:48	2016-05-18 08:46:47 [DEBUG][crash][TASKS]Requesting POST '[TASKS]tasks/bulk_search' ("searches":[{"type":"task","task_id":"8b444264-acd6-481d-91e2-b4fcf2aa2c96"}])
build	18-May-2016 08:46:49	2016-05-18 08:46:49 [INFO ][crash][TASKS]Waiting for 1 tasks, completed 0 tasks, elapsed 9 minutes, waiting 60 seconds
build	18-May-2016 08:47:49	2016-05-18 08:47:49 [DEBUG][crash][TASKS]Requesting POST '[TASKS]tasks/bulk_search' ("searches":[{"type":"task","task_id":"8b444264-acd6-481d-91e2-b4fcf2aa2c96"}])
build	18-May-2016 08:47:51	2016-05-18 08:47:51 [INFO ][crash][TASKS]Waiting for 1 tasks, completed 0 tasks, elapsed 10 minutes, waiting 60 seconds
....




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


How reproducible:


Steps to Reproduce:
1. Create ContentView A with large repos
2. Create ContentView B with different large repos
3. Create CompositeContentView C with ContentView A
4. Publish CompositeContentView C 
5. Create ActivationKey C, add CompositeContentView C
6. Attach ActivationKey C to a host X
7. On host X subscription-manager repos --enable=\*
8. On host X do a yum repolist, make sure it lists the repos of A
9. Update CompositeContentView C add ContentView B and remove ContentView A
10. Publish CompositeContentView C
Now execute the steps 11-13 during the Publishing is running!
11. On host X subscription-manager refresh to see the updated CompositeContentView C
12. On host X subscription-manager repos --enable=\*
13. On host X do a yum repolist, make sure it lists the repos of B

Actual results:
During yum repolist get error 404 on repos of ContentView A.

Expected results:
No errors. The yum repolist shall still see repos of ContentView A until the publishing of CompositeContentView C is finished.
After the publishing of CompositeContentView C the new content of ContentView B is visible as an atomic switch.

Additional info:

Comment 2 Peter Vreman 2018-03-05 15:52:20 UTC
Hi Justin,

I think the https://bugzilla.redhat.com/show_bug.cgi?id=1494064 will also prevent this case. For me it is ok to close as duplicate.

Peter

Comment 3 Justin Sherrill 2018-03-05 16:00:58 UTC
The window for this to occur is still there, but should be much much smaller to the point that its likely not a problem.  Since you are the only customer on this bz I'm okay closing. Thanks again peter!

*** This bug has been marked as a duplicate of bug 1494064 ***


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