katello 3.17.0 → 3.17.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/lib/actions/katello/applicability/hosts/bulk_generate.rb +6 -2
- data/app/lib/actions/katello/host/hypervisors_update.rb +18 -0
- data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +1 -1
- data/app/lib/actions/pulp3/repository/delete.rb +1 -1
- data/app/services/katello/pulp3/repository.rb +3 -3
- data/app/services/katello/pulp3/repository/yum.rb +1 -2
- data/lib/katello/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4911d03477352b7d0d1f70c1fe0aabf89a4203f925d11b06b09fb753cca4119
|
4
|
+
data.tar.gz: 0442bdaf70ac3842ccae4d639111cdbefabb4d3c6601292c789fd7184e4273d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93f259c486b6f6d766389c062a894ca2a77e46cebe0fa9d4b6cb00d3722cefbeffefc46d0836c4bfcb08979206517d1e586e10ae5de0b22049798f060626b32f
|
7
|
+
data.tar.gz: 61b4ea0699d961668d15ff3235d67e4bb8bb30e987166a8a8cf6a00444a827b19d63665842fccf3f65539e28ddf46c277b4b0c070321b6cfe4254921b483e629
|
@@ -9,8 +9,12 @@ module Actions
|
|
9
9
|
|
10
10
|
def run
|
11
11
|
input[:host_ids].each do |host_id|
|
12
|
-
content_facet = ::Host.
|
13
|
-
content_facet.
|
12
|
+
content_facet = ::Katello::Host::ContentFacet.find_by_host_id(host_id)
|
13
|
+
if content_facet.present?
|
14
|
+
content_facet.calculate_and_import_applicability
|
15
|
+
else
|
16
|
+
Rails.logger.warn(_("Content Facet for host with id %s is non-existent. Skipping applicability calculation.") % host_id)
|
17
|
+
end
|
14
18
|
end
|
15
19
|
end
|
16
20
|
|
@@ -13,6 +13,8 @@ module Actions
|
|
13
13
|
@hypervisors = input[:hypervisors]
|
14
14
|
return unless @hypervisors
|
15
15
|
|
16
|
+
@duplicate_uuid_hypervisors = {}
|
17
|
+
|
16
18
|
User.as_anonymous_admin do
|
17
19
|
ActiveRecord::Base.transaction do
|
18
20
|
load_resources
|
@@ -30,8 +32,16 @@ module Actions
|
|
30
32
|
update_facts(uuid, host)
|
31
33
|
end
|
32
34
|
end
|
35
|
+
|
36
|
+
@duplicate_uuid_hypervisors.each do |hypervisor, existing_host|
|
37
|
+
fail _("Host creation was skipped for %s because it shares a BIOS UUID with %s. " \
|
38
|
+
"To report this hypervisor, override its dmi.system.uuid fact or set 'candlepin.use_system_uuid_for_matching' " \
|
39
|
+
"to 'true' in the Candlepin configuration." % [hypervisor[:name], existing_host.name])
|
40
|
+
end
|
33
41
|
end
|
34
42
|
|
43
|
+
private
|
44
|
+
|
35
45
|
def load_hosts_guests
|
36
46
|
@hosts.each do |uuid, host|
|
37
47
|
host.subscription_facet ||= host.build_subscription_facet(uuid: uuid)
|
@@ -81,6 +91,14 @@ module Actions
|
|
81
91
|
@hypervisors.each do |hypervisor|
|
82
92
|
next if @hosts.key?(hypervisor[:uuid])
|
83
93
|
|
94
|
+
created_host = new_hypervisors[hypervisor[:uuid]]
|
95
|
+
if created_host
|
96
|
+
# we've already created a host record for this duplicate hypervisor
|
97
|
+
# track it so we can message later, and continue processing the remaining hypervisors
|
98
|
+
@duplicate_uuid_hypervisors[hypervisor] = created_host
|
99
|
+
next
|
100
|
+
end
|
101
|
+
|
84
102
|
duplicate_name, org = duplicate_name(hypervisor, @candlepin_attributes[hypervisor[:uuid]])
|
85
103
|
new_hypervisors[hypervisor[:uuid]] = create_host_for_hypervisor(duplicate_name, org)
|
86
104
|
end
|
@@ -14,7 +14,7 @@ module Actions
|
|
14
14
|
content_view.repository_references.each do |repository_reference|
|
15
15
|
repo = repository_reference.root_repository.library_instance
|
16
16
|
#force pulp3 in case we've done migrations, but haven't switched over yet
|
17
|
-
tasks << repo.backend_service(smart_proxy, true).
|
17
|
+
tasks << repo.backend_service(smart_proxy, true).delete_repository(repository_reference)
|
18
18
|
end
|
19
19
|
content_view.repository_references.destroy_all
|
20
20
|
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require "pulpcore_client"
|
2
|
-
|
3
2
|
module Katello
|
4
3
|
module Pulp3
|
5
4
|
class Repository
|
@@ -188,8 +187,9 @@ module Katello
|
|
188
187
|
api.repositories_api.read(repository_reference.try(:repository_href))
|
189
188
|
end
|
190
189
|
|
191
|
-
def
|
192
|
-
|
190
|
+
def delete_repository(repo_reference = repository_reference)
|
191
|
+
href = repo_reference.try(:repository_href)
|
192
|
+
repo_reference.try(:destroy)
|
193
193
|
ignore_404_exception { api.repositories_api.delete(href) } if href
|
194
194
|
end
|
195
195
|
|
@@ -159,8 +159,7 @@ module Katello
|
|
159
159
|
|
160
160
|
data_dup.config[i][:content] = leftover_units.pop(copy_amount)
|
161
161
|
unit_copy_counter += copy_amount
|
162
|
-
|
163
|
-
if unit_copy_counter >= UNIT_LIMIT || (i == data_dup.config.size - 1 && leftover_units.empty?)
|
162
|
+
if unit_copy_counter != 0
|
164
163
|
tasks << api.copy_api.copy_content(data_dup)
|
165
164
|
unit_copy_counter = 0
|
166
165
|
end
|
data/lib/katello/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: katello
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.17.
|
4
|
+
version: 3.17.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- N/A
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|