Project

General

Profile

Bug #33014

Capsule syncing is not triggered by CV promotion

Added by James Jeffers 10 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Content Views
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

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

Associated revisions

Revision 2dea3a78 (diff)
Added by Samir Jha 10 months ago

Fixes #33014 - Sync pulpcore capsules after promote (#9475)

History

#1 Updated by James Jeffers 10 months ago

  • Category set to Content Views
  • Project changed from Foreman Maintain to Katello
  • Found in Releases Katello 4.0.1 added

#2 Updated by James Jeffers 10 months ago

  • Triaged changed from No to Yes
  • Target version set to Katello 4.1.2

#3 Updated by Justin Sherrill 10 months ago

  • Bugzilla link set to 1982344

#4 Updated by The Foreman Bot 10 months ago

  • Assignee set to Samir Jha
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/9475 added

#5 Updated by The Foreman Bot 10 months ago

  • Fixed in Releases Katello 4.3.0 added

#6 Updated by Samir Jha 10 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF