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 1982344 - Capsule syncing is not triggered by CV promotion
Summary: Capsule syncing is not triggered by CV promotion
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.10.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.10.0
Assignee: Samir Jha
QA Contact: Vladimír Sedmík
URL:
Whiteboard:
: 1991495 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-14 17:59 UTC by Justin Sherrill
Modified: 2021-11-16 14:12 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:12:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 33014 0 Normal New Capsule syncing is not triggered by CV promotion 2021-07-14 18:00:00 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:12:45 UTC

Description Justin Sherrill 2021-07-14 17:59:58 UTC
Despite settings enabling auto-syncing for LCEs and a capsule with pulpcore featues enabled, the syncing is not planned or executed after a CV promotion to a LCE.

Speculation:
```
[91, 100] in /home/vagrant/projects/katello/app/models/katello/concerns/smart_proxy_extensions.rb
    91:         def self.with_environment(environment, include_default = false)
    92:           byebug
    93:           features = [PULP_NODE_FEATURE]
    94:           features << PULP_FEATURE if include_default
    95: 
=>  96:           unscoped.with_features(features).joins(:capsule_lifecycle_environments).
    97:               where(katello_capsule_lifecycle_environments: { lifecycle_environment_id: environment.id })
    98:         end
    99: 
   100:         def self.sync_needed?(environment)
(byebug) with_features(features)
#<ActiveRecord::Relation []>
(byebug) features
["Pulp Node"]

```

But the smart proxy does have pulpcore enabled:
```
(byebug) SmartProxy.with_features("Pulpcore")
#<ActiveRecord::Relation [#<SmartProxy id: 1, name: "centos7-katello-devel-stable.example.com", url: "https://centos7-katello-devel-stable.example.com:9...", created_at: "2021-07-07 11:43:47", updated_at: "2021-07-07 11:43:47", pubkey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDcY/T9fnvGYA...", expired_logs: "0", puppet_path: nil, download_policy: "on_demand">]>

```

Despite this, the method `sync_needed?(environment)` eventually returns false, preventing any sync actions from being planned.

Discussion thread at:
https://community.theforeman.org/t/auto-sync-of-smart-proxies-not-starting/24372/3

Comment 1 Justin Sherrill 2021-07-14 18:00:03 UTC
Created from redmine issue https://projects.theforeman.org/issues/33014

Comment 2 Justin Sherrill 2021-07-14 18:00:04 UTC
Upstream bug assigned to None

Comment 3 Bryan Kearney 2021-07-22 00:09:07 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/33014 has been resolved.

Comment 4 Justin Sherrill 2021-08-09 16:51:58 UTC
*** Bug 1991495 has been marked as a duplicate of this bug. ***

Comment 5 Vladimír Sedmík 2021-08-10 13:09:05 UTC
Verified on 6.10.0 snap 12 - capsule is synced accordingly to the settings in Administer > Settings > Content > Sync Capsules after Content View promotion

Comment 8 errata-xmlrpc 2021-11-16 14:12:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4702


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