katello 3.17.1 → 3.17.2
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/controllers/katello/api/v2/api_controller.rb +1 -2
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +6 -2
- data/app/models/katello/concerns/redhat_extensions.rb +2 -2
- data/app/models/katello/concerns/smart_proxy_extensions.rb +3 -1
- data/app/services/katello/applicability/applicable_content_helper.rb +12 -1
- data/app/services/katello/pulp3/repository.rb +5 -1
- data/db/migrate/20150930183738_migrate_content_hosts.rb +1 -1
- data/db/migrate/20200514092553_move_katello_fields_from_hostgroups.katello.rb +5 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/katello-agent-notice.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-client.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +1 -1
- data/lib/katello/tasks/pulp3_content_switchover.rake +3 -1
- data/lib/katello/tasks/reports.rake +4 -1
- 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: cd21c8de383c0f1eb036bb0591ecf77c27ffa30b8f9df1189b0a2da41abfdae4
|
4
|
+
data.tar.gz: bd0ec2cd3717b3b5237cc1af00c593a810493fb28866fa7e8344c49725563abc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb2b4ce3ba4395eb68975bdb7d17ebd51fae70374742a0b06aab8c1e01e320a2c732bfd06e3ce0428c767604b864610a3e4480282725facb6e5451b0fbba86d2
|
7
|
+
data.tar.gz: 85a4321995088218ab2a92b05e015d8464529ccab3ca8e4ea3a704e28bb04682eede4cc7ea13b151364a7a254413269650af8e424515a476de8e1805e6accc52
|
@@ -39,8 +39,7 @@ module Katello
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def deprecate_katello_agent
|
42
|
-
::Foreman::Deprecation.api_deprecation_warning("
|
43
|
-
"You may consider switching to Remote Execution.")
|
42
|
+
::Foreman::Deprecation.api_deprecation_warning("Katello-agent is deprecated and will be removed in a future release.")
|
44
43
|
end
|
45
44
|
|
46
45
|
def full_result_response(collection)
|
@@ -20,10 +20,14 @@ module Actions
|
|
20
20
|
Actions::Pulp3::CapsuleContent::Sync],
|
21
21
|
repo, smart_proxy,
|
22
22
|
skip_metadata_check: skip_metadata_check)
|
23
|
+
end
|
24
|
+
end
|
23
25
|
|
26
|
+
concurrence do
|
27
|
+
repo_batch.each do |repo|
|
24
28
|
if repo.is_a?(::Katello::Repository) &&
|
25
|
-
|
26
|
-
|
29
|
+
repo.distribution_bootable? &&
|
30
|
+
repo.download_policy == ::Runcible::Models::YumImporter::DOWNLOAD_ON_DEMAND
|
27
31
|
plan_action(Katello::Repository::FetchPxeFiles,
|
28
32
|
id: repo.id,
|
29
33
|
capsule_id: smart_proxy.id)
|
@@ -44,8 +44,8 @@ module Katello
|
|
44
44
|
|
45
45
|
def kickstart_repos(host)
|
46
46
|
distros = distribution_repositories(host).where(distribution_bootable: true)
|
47
|
-
if distros && host
|
48
|
-
distros.map { |distro| distro.to_hash(host.content_source) }
|
47
|
+
if distros && host&.content_facet&.content_source
|
48
|
+
distros.map { |distro| distro.to_hash(host.content_facet.content_source) }
|
49
49
|
else
|
50
50
|
[]
|
51
51
|
end
|
@@ -177,7 +177,9 @@ module Katello
|
|
177
177
|
end
|
178
178
|
|
179
179
|
def fix_pulp3_capabilities(type)
|
180
|
-
|
180
|
+
repository_type_obj = type.is_a?(String) || type.is_a?(Symbol) ? Katello::RepositoryTypeManager.repository_types[type] : type
|
181
|
+
|
182
|
+
if missing_pulp3_capabilities? && repository_type_obj.pulp3_plugin && !pulp2_preferred_for_type?(repository_type_obj.id)
|
181
183
|
self.refresh
|
182
184
|
if self.capabilities(::SmartProxy::PULP3_FEATURE).empty?
|
183
185
|
fail Katello::Errors::PulpcoreMissingCapabilities
|
@@ -78,7 +78,8 @@ module Katello
|
|
78
78
|
joins("INNER JOIN katello_installed_packages ON
|
79
79
|
katello_rpms.name = katello_installed_packages.name AND
|
80
80
|
katello_rpms.arch = katello_installed_packages.arch AND
|
81
|
-
katello_rpms.evr > katello_installed_packages.evr
|
81
|
+
katello_rpms.evr > katello_installed_packages.evr AND
|
82
|
+
katello_installed_packages.id in (#{newest_distinct_installed_packages_query})").
|
82
83
|
joins("LEFT JOIN katello_module_stream_rpms ON
|
83
84
|
katello_rpms.id = katello_module_stream_rpms.rpm_id").
|
84
85
|
joins("INNER JOIN katello_host_installed_packages ON
|
@@ -92,6 +93,16 @@ module Katello
|
|
92
93
|
:enabled_module_streams => enabled_module_stream_ids).pluck(:id).uniq
|
93
94
|
end
|
94
95
|
|
96
|
+
def newest_distinct_installed_packages_query
|
97
|
+
"SELECT DISTINCT ON (katello_installed_packages.name) katello_installed_packages.id " \
|
98
|
+
"FROM katello_installed_packages INNER JOIN " \
|
99
|
+
"katello_host_installed_packages ON " \
|
100
|
+
"katello_installed_packages.id = " \
|
101
|
+
"katello_host_installed_packages.installed_package_id " \
|
102
|
+
"WHERE katello_host_installed_packages.host_id = " \
|
103
|
+
"#{content_facet.host.id} ORDER BY katello_installed_packages.name, katello_installed_packages.evr DESC"
|
104
|
+
end
|
105
|
+
|
95
106
|
def applicable_differences
|
96
107
|
consumer_ids = content_facet.send(applicable_units).pluck("#{content_unit_class.table_name}.id")
|
97
108
|
content_ids = fetch_content_ids
|
@@ -251,8 +251,12 @@ module Katello
|
|
251
251
|
create_version(:base_version => from_repository.version_href)
|
252
252
|
end
|
253
253
|
|
254
|
+
def version_zero?
|
255
|
+
repo.version_href.ends_with?('/versions/0/')
|
256
|
+
end
|
257
|
+
|
254
258
|
def delete_version
|
255
|
-
ignore_404_exception { api.repository_versions_api.delete(repo.version_href) }
|
259
|
+
ignore_404_exception { api.repository_versions_api.delete(repo.version_href) } unless version_zero?
|
256
260
|
end
|
257
261
|
|
258
262
|
def create_version(options = {})
|
@@ -329,7 +329,7 @@ class MigrateContentHosts < ActiveRecord::Migration[4.2]
|
|
329
329
|
# rubocop:disable Metrics/MethodLength
|
330
330
|
# rubocop:disable Metrics/AbcSize
|
331
331
|
def up
|
332
|
-
|
332
|
+
unless User.unscoped.where(:login => User::ANONYMOUS_API_ADMIN).exists?
|
333
333
|
logger.warn("Foreman anonymous admin does not exist, skipping content host migration.")
|
334
334
|
return
|
335
335
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class MoveKatelloFieldsFromHostgroups < ActiveRecord::Migration[6.0]
|
2
2
|
def up
|
3
|
-
if User.where(login: User::ANONYMOUS_ADMIN).exists?
|
3
|
+
if User.unscoped.where(login: User::ANONYMOUS_ADMIN).exists?
|
4
4
|
User.as_anonymous_admin do
|
5
5
|
copy_data_from_hostgroup
|
6
6
|
end
|
@@ -46,7 +46,10 @@ class MoveKatelloFieldsFromHostgroups < ActiveRecord::Migration[6.0]
|
|
46
46
|
content_facet.kickstart_repository_id = kickstart_repository_id
|
47
47
|
content_facet.content_view_id = content_view_id
|
48
48
|
content_facet.lifecycle_environment_id = lifecycle_environment_id
|
49
|
-
content_facet.save
|
49
|
+
unless content_facet.save
|
50
|
+
Rails.logger.warn("Unable to save content facet hostgroup for #{content_facet.inspect} ")
|
51
|
+
Rails.logger.warn(content_facet.errors.full_messages.join("\n"))
|
52
|
+
end
|
50
53
|
end
|
51
54
|
end
|
52
55
|
end
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<section>
|
13
13
|
<p bst-alert="warning" >
|
14
14
|
<span translate>
|
15
|
-
Katello-agent is deprecated and will be removed in
|
15
|
+
Katello-agent is deprecated and will be removed in a future release.
|
16
16
|
</span>
|
17
17
|
</p>
|
18
18
|
</section>
|
data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot
CHANGED
@@ -2756,7 +2756,7 @@ msgstr ""
|
|
2756
2756
|
|
2757
2757
|
#: app/assets/javascripts/bastion_katello/common/views/katello-agent-notice.html
|
2758
2758
|
#: app/assets/javascripts/bastion_katello/content-hosts/views/register-client.html
|
2759
|
-
msgid "Katello-agent is deprecated and will be removed in
|
2759
|
+
msgid "Katello-agent is deprecated and will be removed in a future release."
|
2760
2760
|
msgstr ""
|
2761
2761
|
|
2762
2762
|
#: app/assets/javascripts/bastion_katello/content-views/details/views/content-view-info.html
|
@@ -1,9 +1,11 @@
|
|
1
|
+
load "#{Katello::Engine.root}/lib/katello/tasks/common.rake"
|
2
|
+
|
1
3
|
require File.expand_path("../engine", File.dirname(__FILE__))
|
2
4
|
require "#{Katello::Engine.root}/app/services/katello/pulp3/migration_switchover"
|
3
5
|
|
4
6
|
namespace :katello do
|
5
7
|
desc "Runs a Pulp 3 migration of pulp3 hrefs to pulp ids for supported content types."
|
6
|
-
task :pulp3_content_switchover => :environment do
|
8
|
+
task :pulp3_content_switchover => [:environment, :disable_dynflow] do
|
7
9
|
begin
|
8
10
|
User.current = User.anonymous_admin
|
9
11
|
|
@@ -1,4 +1,7 @@
|
|
1
1
|
load "#{Rails.root}/lib/tasks/reports.rake"
|
2
2
|
|
3
3
|
#Katello reports can generate a foreman task, so mark the task as a dynflow client
|
4
|
-
["reports:daily", "reports:weekly", "reports:monthly"].each
|
4
|
+
["reports:daily", "reports:weekly", "reports:monthly"].each do |task|
|
5
|
+
Rake::Task[task].clear
|
6
|
+
Rake::Task[task].enhance ["dynflow:client"]
|
7
|
+
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- N/A
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|