foreman_kernel_care 1.1.1 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/foreman_kernel_care/foreman_tasks.rb +13 -8
- data/app/models/concerns/foreman_kernel_care/host_managed_extensions.rb +103 -34
- data/app/services/concerns/foreman_kernel_care/profiles_uploader.rb +15 -0
- data/app/views/foreman_kernel_care/job_templates/install_kernelcare.erb +10 -0
- data/app/views/foreman_kernel_care/job_templates/kernel_version.erb +9 -5
- data/app/views/foreman_kernel_care/job_templates/update_kernel.erb +9 -7
- data/app/views/foreman_kernel_care/job_templates/view_newest_patch.erb +15 -0
- data/db/seeds.d/100_assign_features_with_templates.rb +2 -2
- data/lib/foreman_kernel_care/engine.rb +8 -8
- data/lib/foreman_kernel_care/remote_execution.rb +4 -0
- data/lib/foreman_kernel_care/version.rb +1 -1
- data/test/factories/foreman_kernel_care_factories.rb +9 -0
- data/test/unit/host_managed_extensions_test.rb +49 -10
- metadata +34 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d48df9124313a81b6ed28245a2a54447b1feca758c16087f5e5d638fd1208f83
|
4
|
+
data.tar.gz: 1af5606d485f619452eef174fe84c849225a676da2e47498364b5d1bf45c1438
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5923597240288d47b3fdd6342be6450f0645f8a2c885cc07899505a8d81125c8c1dfcf97b180714c074801554c435d695f57063b951664f7eed6ed1ca0a7e14
|
7
|
+
data.tar.gz: 1cc8476969f489892f0708edd5d02f66ff81e0359d80da84ede35e1783609fdd073364e3c8ae84db5029dde7f340c37ca34db696ff3b3ecdf5f5185fbcbb5276
|
@@ -4,19 +4,24 @@ module ForemanKernelCare
|
|
4
4
|
callbacks = params.key?(:callback) ? Array(params) : params[:callbacks]
|
5
5
|
ids = callbacks.map { |payload| payload[:callback][:task_id] }
|
6
6
|
foreman_tasks = ::ForemanTasks::Task.where(:id => ids)
|
7
|
-
external_map = Hash[*foreman_tasks.pluck(:id, :external_id).flatten]
|
8
7
|
callbacks.each do |payload|
|
9
8
|
# We need to call .to_unsafe_h to unwrap the hash from ActionController::Parameters
|
10
9
|
callback = payload[:callback]
|
11
10
|
foreman_task = foreman_tasks.find { |task| task.id == callback[:task_id] }
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
next unless foreman_task.action.include?('Get patched kernel version')
|
12
|
+
complete_output = ''
|
13
|
+
result = payload[:data].to_unsafe_h['result']
|
14
|
+
result.each { |x| complete_output += x['output'] }
|
15
|
+
kernel, kcare = complete_output.split(/\n/)
|
16
|
+
kernel = kernel.gsub('Installed kernel version: ', '')
|
17
|
+
kcare = kcare.gsub('Patched kernel version: ', '')
|
18
|
+
version, release = kcare.strip.split('-')
|
19
|
+
next if version.empty? || release.empty?
|
20
|
+
job_invocation = ::JobInvocation.where(:task_id => foreman_task.parent_task_id).first
|
21
|
+
job_invocation.targeting.hosts.each { |host| host.update_kernel_version(version, release, kernel) }
|
18
22
|
end
|
19
|
-
|
23
|
+
|
24
|
+
super
|
20
25
|
end
|
21
26
|
end
|
22
27
|
end
|
@@ -7,57 +7,103 @@ module ForemanKernelCare
|
|
7
7
|
composer.trigger!
|
8
8
|
end
|
9
9
|
|
10
|
-
|
11
|
-
sync_package_associations(found.map(&:id).uniq)
|
10
|
+
super(simple_packages)
|
12
11
|
end
|
13
12
|
|
14
13
|
def import_tracer_profile(tracer_profile)
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
if kernelcare?
|
15
|
+
new_tracer_profile = {}
|
16
|
+
tracer_profile.each do |trace, attributes|
|
17
|
+
if trace.to_s == 'kernel'
|
18
|
+
composer = ::JobInvocationComposer.for_feature(:update_kernel, self)
|
19
|
+
composer.triggering.mode = :future
|
20
|
+
composer.trigger!
|
21
|
+
else
|
22
|
+
new_tracer_profile[trace] = attributes
|
23
|
+
end
|
24
|
+
end
|
25
|
+
super(new_tracer_profile)
|
26
|
+
else
|
27
|
+
super(tracer_profile)
|
28
|
+
end
|
29
|
+
end
|
18
30
|
|
19
|
-
|
20
|
-
|
21
|
-
composer.triggering.mode = :future
|
22
|
-
composer.trigger!
|
31
|
+
def update_kernel_version(version, release, old_kernel_version)
|
32
|
+
old_version, old_release = old_kernel_version.split('-')
|
23
33
|
|
24
|
-
|
25
|
-
|
34
|
+
case operatingsystem.family
|
35
|
+
when 'Redhat'
|
36
|
+
packages = find_yum_kernel_packages(old_version, old_release)
|
37
|
+
return if packages.empty?
|
26
38
|
|
27
|
-
|
39
|
+
delete_yum_pkgs(packages)
|
40
|
+
create_new_yum_kernel_packages(packages, version, release)
|
41
|
+
when 'Debian'
|
42
|
+
old_version = "#{old_version}-#{old_release}"
|
43
|
+
new_version = "#{version}-#{release}"
|
44
|
+
packages = find_deb_kernel_packages(old_version)
|
45
|
+
return if packages.empty?
|
46
|
+
|
47
|
+
create_new_deb_kernel_packages(packages, new_version, old_version)
|
28
48
|
end
|
29
|
-
host_traces.delete_all
|
30
|
-
Katello::HostTracer.import(traces, validate: false)
|
31
|
-
update_trace_status
|
32
49
|
end
|
33
50
|
|
34
|
-
def
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
51
|
+
def kernelcare?
|
52
|
+
!installed_packages.select { |package| package.name == 'kernelcare' }.empty? ||
|
53
|
+
!installed_debs.select { |package| package.name == 'kernelcare' }.empty?
|
54
|
+
end
|
55
|
+
|
56
|
+
class ::Host::Managed::Jail < Safemode::Jail
|
57
|
+
allow :installed_debs, :kernelcare?
|
58
|
+
end
|
59
|
+
|
60
|
+
protected
|
61
|
+
|
62
|
+
def find_yum_kernel_packages(old_version, old_release)
|
63
|
+
installed_packages.select do |p|
|
64
|
+
p.name.include?('kernel') &&
|
65
|
+
p.name != 'kernelcare' &&
|
66
|
+
p.version == old_version &&
|
67
|
+
old_release.include?(p.release)
|
46
68
|
end
|
47
|
-
found = import_package_profile_in_bulk(simple_packages)
|
48
|
-
sync_kernel_associations(found.map(&:id).uniq, delete_ids)
|
49
69
|
end
|
50
70
|
|
51
|
-
def
|
71
|
+
def delete_yum_pkgs(packages)
|
72
|
+
delete_ids = packages.map(&:id)
|
52
73
|
::Katello::Util::Support.active_record_retry do
|
53
74
|
table_name = host_installed_packages.table_name
|
54
|
-
|
55
75
|
queries = []
|
56
76
|
|
57
77
|
if delete_ids.any?
|
58
78
|
queries << "DELETE FROM #{table_name} WHERE host_id=#{id} AND installed_package_id IN (#{delete_ids.join(', ')})"
|
59
79
|
end
|
60
80
|
|
81
|
+
queries.each do |query|
|
82
|
+
::ActiveRecord::Base.connection.execute(query)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
def create_new_yum_kernel_packages(packages, version, release)
|
88
|
+
new_kernels = packages.map do |p|
|
89
|
+
::Katello::Pulp::SimplePackage.new({
|
90
|
+
arch: p.arch,
|
91
|
+
epoch: p.epoch,
|
92
|
+
version: version,
|
93
|
+
release: release,
|
94
|
+
name: p.name
|
95
|
+
})
|
96
|
+
end
|
97
|
+
found = import_package_profile_in_bulk(new_kernels)
|
98
|
+
sync_yum_kernel_associations(found.map(&:id).uniq)
|
99
|
+
end
|
100
|
+
|
101
|
+
def sync_yum_kernel_associations(new_patched_kernel_ids)
|
102
|
+
::Katello::Util::Support.active_record_retry do
|
103
|
+
table_name = host_installed_packages.table_name
|
104
|
+
|
105
|
+
queries = []
|
106
|
+
|
61
107
|
unless new_patched_kernel_ids.empty?
|
62
108
|
inserts = new_patched_kernel_ids.map { |unit_id| "(#{unit_id.to_i}, #{id.to_i})" }
|
63
109
|
queries << "INSERT INTO #{table_name} (installed_package_id, host_id) VALUES #{inserts.join(', ')}"
|
@@ -69,10 +115,33 @@ module ForemanKernelCare
|
|
69
115
|
end
|
70
116
|
end
|
71
117
|
|
72
|
-
|
118
|
+
def find_deb_kernel_packages(old_version)
|
119
|
+
installed_debs.select do |p|
|
120
|
+
p.name.include?('linux') && p.version.include?(old_version)
|
121
|
+
end
|
122
|
+
end
|
73
123
|
|
74
|
-
def
|
75
|
-
|
124
|
+
def create_new_deb_kernel_packages(packages, new_version, old_version)
|
125
|
+
old_kernel_ids = packages.map(&:id)
|
126
|
+
new_kernels = packages.map do |p|
|
127
|
+
name = if p.name.include?(old_version)
|
128
|
+
p.name.sub(old_version, new_version)
|
129
|
+
else
|
130
|
+
p.name
|
131
|
+
end
|
132
|
+
::Katello::InstalledDeb.find_or_create_by(name: name, architecture: p.architecture, version: new_version)
|
133
|
+
end
|
134
|
+
return if new_kernels.empty? || old_kernel_ids.empty?
|
135
|
+
|
136
|
+
sync_deb_kernel_associations(new_kernels.map(&:id), old_kernel_ids)
|
137
|
+
end
|
138
|
+
|
139
|
+
def sync_deb_kernel_associations(new_patched_kernel_ids, old_kernel_ids)
|
140
|
+
new_installed_debs = installed_deb_ids.reject do |id|
|
141
|
+
old_kernel_ids.include?(id)
|
142
|
+
end
|
143
|
+
self.installed_deb_ids = new_installed_debs.concat(new_patched_kernel_ids)
|
144
|
+
save!
|
76
145
|
end
|
77
146
|
end
|
78
147
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module ForemanKernelCare
|
2
|
+
module ProfilesUploader
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
def import_deb_package_profile(profile)
|
6
|
+
if @host.kernelcare?
|
7
|
+
composer = ::JobInvocationComposer.for_feature(:kernel_version, @host)
|
8
|
+
composer.triggering.mode = :future
|
9
|
+
composer.trigger!
|
10
|
+
end
|
11
|
+
|
12
|
+
super(profile)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%#
|
2
|
+
kind: job_template
|
3
|
+
name: LivePatching - Install Kernelcare
|
4
|
+
model: JobTemplate
|
5
|
+
job_category: LivePatching - Script Default
|
6
|
+
description_format: Install kernelcare package
|
7
|
+
provider_type: script
|
8
|
+
%>
|
9
|
+
|
10
|
+
<%= render_template('Package Action - Script Default', :action => 'install', :package => 'kernelcare') %>
|
@@ -1,15 +1,19 @@
|
|
1
1
|
<%#
|
2
2
|
kind: job_template
|
3
|
-
name: Kernel version
|
3
|
+
name: LivePatching - Kernel version
|
4
4
|
model: JobTemplate
|
5
|
-
job_category:
|
5
|
+
job_category: LivePatching - Script Default
|
6
6
|
description_format: "Get patched kernel version"
|
7
|
-
provider_type:
|
7
|
+
provider_type: script
|
8
8
|
feature: kernel_version
|
9
9
|
%>
|
10
10
|
<%
|
11
|
-
unless @host.installed_packages.
|
12
|
-
render_error(N_('
|
11
|
+
unless @host.installed_packages.map{ |package| package.name }.include?('kernelcare') || @host.installed_debs.map{ |package| package.name }.include?('kernelcare')
|
12
|
+
render_error(N_('The "kernelcare" package is not installed on your managed host which is required by this job template.'))
|
13
13
|
end
|
14
14
|
%>
|
15
|
+
|
16
|
+
echo -n "Installed kernel version: "
|
17
|
+
uname -r
|
18
|
+
echo -n "Patched kernel version: "
|
15
19
|
/usr/bin/kcarectl --uname
|
@@ -1,15 +1,17 @@
|
|
1
1
|
<%#
|
2
2
|
kind: job_template
|
3
|
-
name: Update kernel
|
3
|
+
name: LivePatching - Update kernel
|
4
4
|
model: JobTemplate
|
5
|
-
job_category:
|
6
|
-
description_format: "
|
7
|
-
provider_type:
|
5
|
+
job_category: LivePatching - Script Default
|
6
|
+
description_format: "Update kernel"
|
7
|
+
provider_type: script
|
8
8
|
feature: update_kernel
|
9
9
|
%>
|
10
|
+
|
10
11
|
<%
|
11
|
-
unless @host.
|
12
|
-
render_error(N_('
|
12
|
+
unless @host.installed_packages.map{ |package| package.name }.include?('kernelcare') || @host.installed_debs.map{ |package| package.name }.include?('kernelcare')
|
13
|
+
render_error(N_('The "kernelcare" package is not installed on your managed host which is required by this job template.'))
|
13
14
|
end
|
14
15
|
%>
|
15
|
-
|
16
|
+
|
17
|
+
/usr/bin/kcarectl --update
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%#
|
2
|
+
kind: job_template
|
3
|
+
name: LivePatching - View newest Patch
|
4
|
+
model: JobTemplate
|
5
|
+
job_category: LivePatching - Script Default
|
6
|
+
description_format: "View available patches"
|
7
|
+
provider_type: script
|
8
|
+
%>
|
9
|
+
<%
|
10
|
+
unless @host.installed_packages.map{ |package| package.name }.include?('kernelcare') || @host.installed_debs.map{ |package| package.name }.include?('kernelcare')
|
11
|
+
render_error(N_('The "kernelcare" package is not installed on your managed host which is required by this job template.'))
|
12
|
+
end
|
13
|
+
%>
|
14
|
+
|
15
|
+
/usr/bin/kcarectl --latest-patch-info --json
|
@@ -10,14 +10,14 @@ User.as_anonymous_admin do
|
|
10
10
|
ForemanKernelCare::Engine.register_rex_feature
|
11
11
|
end
|
12
12
|
JobTemplate.without_auditing do
|
13
|
-
module_template = JobTemplate.find_by(name: 'Update kernel')
|
13
|
+
module_template = JobTemplate.find_by(name: 'LivePatching - Update kernel')
|
14
14
|
if module_template && !Rails.env.test? && Setting[:remote_execution_sync_templates]
|
15
15
|
module_template.sync_feature('update_kernel')
|
16
16
|
module_template.organizations << Organization.unscoped.all if module_template.organizations.empty?
|
17
17
|
module_template.locations << Location.unscoped.all if module_template.locations.empty?
|
18
18
|
end
|
19
19
|
|
20
|
-
module_template = JobTemplate.find_by(name: 'Kernel version')
|
20
|
+
module_template = JobTemplate.find_by(name: 'LivePatching - Kernel version')
|
21
21
|
if module_template && !Rails.env.test? && Setting[:remote_execution_sync_templates]
|
22
22
|
module_template.sync_feature('kernel_version')
|
23
23
|
module_template.organizations << Organization.unscoped.all if module_template.organizations.empty?
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'katello'
|
2
|
+
require 'foreman_tasks'
|
1
3
|
require 'foreman_kernel_care/remote_execution'
|
2
4
|
|
3
5
|
module ForemanKernelCare
|
@@ -6,22 +8,20 @@ module ForemanKernelCare
|
|
6
8
|
engine_name 'foreman_kernel_care'
|
7
9
|
|
8
10
|
config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
|
11
|
+
config.autoload_paths += Dir["#{config.root}/app/services/concerns"]
|
9
12
|
|
10
13
|
initializer 'foreman_kernel_care.register_plugin', :before => :finisher_hook do |_app|
|
11
14
|
Foreman::Plugin.register :foreman_kernel_care do
|
12
15
|
requires_foreman '>= 1.19.0'
|
13
|
-
|
14
|
-
# Add a new role called 'Discovery' if it doesn't exist
|
15
16
|
role 'Foreman KernelCare', [:view_job_templates]
|
16
17
|
end
|
17
18
|
end
|
18
19
|
|
19
|
-
#
|
20
|
-
|
21
|
-
Katello::Concerns::HostManagedExtensions.prepend ForemanKernelCare::HostManagedExtensions
|
22
|
-
|
23
|
-
|
24
|
-
Rails.logger.warn "ForemanKernelCare: skipping engine hook (#{e})"
|
20
|
+
# make sure the plugin is initialized before katello loads the host extensions
|
21
|
+
initializer 'foreman_kernel_care.load_kernelcare_override', :before => :finisher_hook, :after => ['katello.register_plugin', 'foreman_tasks.register_plugin'] do
|
22
|
+
::Katello::Concerns::HostManagedExtensions.prepend ForemanKernelCare::HostManagedExtensions
|
23
|
+
::Katello::Host::ProfilesUploader.prepend ForemanKernelCare::ProfilesUploader
|
24
|
+
::ForemanTasks::Api::TasksController.prepend ForemanKernelCare::ForemanTasks
|
25
25
|
end
|
26
26
|
|
27
27
|
rake_tasks do
|
@@ -5,6 +5,10 @@ require 'foreman_remote_execution'
|
|
5
5
|
module ForemanKernelCare
|
6
6
|
# Dependencies related with the remote execution plugin
|
7
7
|
class Engine < ::Rails::Engine
|
8
|
+
config.to_prepare do
|
9
|
+
ForemanKernelCare::Engine.register_rex_feature
|
10
|
+
end
|
11
|
+
|
8
12
|
def self.register_rex_feature
|
9
13
|
RemoteExecutionFeature.register(
|
10
14
|
:update_kernel,
|
@@ -1,5 +1,14 @@
|
|
1
1
|
FactoryBot.modify do
|
2
2
|
factory :host do
|
3
|
+
trait :debian_with_kernelcare do
|
4
|
+
after(:create) do |host|
|
5
|
+
installed_deb_id = ::Katello::InstalledDeb.find_or_create_by(name: 'kernelcare',
|
6
|
+
architecture: 'x86_64',
|
7
|
+
version: '2.54-1').id
|
8
|
+
host.installed_deb_ids = installed_deb_id
|
9
|
+
host.save!
|
10
|
+
end
|
11
|
+
end
|
3
12
|
trait :with_kernelcare do
|
4
13
|
after(:create) do |host|
|
5
14
|
package_json = {
|
@@ -9,25 +9,64 @@ module ForemanKernelCare
|
|
9
9
|
feature = RemoteExecutionFeature.register('kernel_version', 'Kernel version')
|
10
10
|
template = FactoryBot.create(:job_template, name: 'Kernel versionl')
|
11
11
|
template.sync_feature(feature.label)
|
12
|
-
|
13
|
-
@host = FactoryBot.create(:host, :with_kernelcare)
|
14
|
-
package_json = {:name => "kernel", :version => "1", :release => "1.el7", :arch => "x86_64", :epoch => "1",
|
15
|
-
:nvra => "kernel-1-1.el7.x86_64"}
|
16
|
-
@host.import_package_profile([::Katello::Pulp::SimplePackage.new(package_json)])
|
17
|
-
@nvra = 'kernel-1-1.el7.x86_64'
|
18
|
-
@host.reload
|
19
12
|
end
|
20
13
|
|
21
14
|
def test_update_kernel_version
|
15
|
+
host = FactoryBot.create(:host, :with_kernelcare,
|
16
|
+
:operatingsystem => FactoryBot.create(:operatingsystem,
|
17
|
+
:family => 'Redhat'))
|
18
|
+
package_json = { :name => 'kernel', :version => '1',
|
19
|
+
:release => '1.el7', :arch => 'x86_64', :epoch => '1',
|
20
|
+
:nvra => 'kernel-1-1.el7.x86_64' }
|
21
|
+
host.import_package_profile([::Katello::Pulp::SimplePackage.new(package_json)])
|
22
|
+
nvra = 'kernel-1-1.el7.x86_64'
|
23
|
+
host.reload
|
22
24
|
version = '2'
|
23
25
|
release = '2.el7'
|
24
|
-
|
25
|
-
|
26
|
+
old_kernel_version = '1-1.el7.x86_64'
|
27
|
+
host.update_kernel_version(version, release, old_kernel_version)
|
28
|
+
kernel_package = host.installed_packages.where(name: 'kernel').first
|
26
29
|
|
27
|
-
assert_not_equal kernel_package.nvra,
|
30
|
+
assert_not_equal kernel_package.nvra, nvra
|
28
31
|
assert_equal kernel_package.version, version
|
29
32
|
assert_equal kernel_package.release, release
|
30
33
|
end
|
34
|
+
|
35
|
+
def test_update_kernel_version_debian
|
36
|
+
host = FactoryBot.create(:host, :debian_with_kernelcare,
|
37
|
+
:operatingsystem => FactoryBot.create(:operatingsystem,
|
38
|
+
:major => '10',
|
39
|
+
:release_name => 'rn10',
|
40
|
+
:family => 'Debian'))
|
41
|
+
kernels = [
|
42
|
+
{ architecture: 'x86_64', version: '1-1', name: 'linux-image-generic' },
|
43
|
+
{ architecture: 'x86_64', version: '1-1', name: 'linux-headers-generic ' },
|
44
|
+
{ architecture: 'x86_64', version: '1-1', name: 'linux-generic' },
|
45
|
+
{ architecture: 'x86_64', version: '1-1', name: 'linux-signed-generic' },
|
46
|
+
{ architecture: 'x86_64', version: '1-1', name: 'linux-image-1-1-generic' }
|
47
|
+
]
|
48
|
+
kernel_deb_ids = kernels.map do |kernel|
|
49
|
+
::Katello::InstalledDeb.find_or_create_by(name: kernel[:name],
|
50
|
+
architecture: kernel[:architecture],
|
51
|
+
version: kernel[:version]).id
|
52
|
+
end
|
53
|
+
kernelcare_id = host.installed_deb_ids.first
|
54
|
+
installed_deb_ids = kernel_deb_ids << kernelcare_id
|
55
|
+
host.installed_deb_ids = installed_deb_ids
|
56
|
+
host.save!
|
57
|
+
|
58
|
+
version = '2'
|
59
|
+
release = '2'
|
60
|
+
old_kernel_version = '1-1-generic'
|
61
|
+
host.update_kernel_version(version, release, old_kernel_version)
|
62
|
+
debian_kernel_packages = host.installed_debs.select do |p|
|
63
|
+
p.name.include?('generic')
|
64
|
+
end
|
65
|
+
debian_kernel_packages.each do |p|
|
66
|
+
assert_not_equal p.name, 'linux-image-1-1-generic'
|
67
|
+
assert_equal p.version, "#{version}-#{release}"
|
68
|
+
end
|
69
|
+
end
|
31
70
|
end
|
32
71
|
|
33
72
|
class HostTracerTest < HostManagedExtensionsTestBase
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_kernel_care
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maxim Petukhov
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman_remote_execution
|
@@ -42,30 +42,50 @@ dependencies:
|
|
42
42
|
name: rdoc
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '6'
|
45
48
|
- - ">="
|
46
49
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
50
|
+
version: 6.3.1
|
48
51
|
type: :development
|
49
52
|
prerelease: false
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
51
54
|
requirements:
|
55
|
+
- - "~>"
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '6'
|
52
58
|
- - ">="
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
60
|
+
version: 6.3.1
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: rubocop
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
65
|
- - ">="
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
67
|
+
version: 0.87.0
|
62
68
|
type: :development
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
72
|
- - ">="
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
74
|
+
version: 0.87.0
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: rubocop-rails
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 2.8.1
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 2.8.1
|
69
89
|
description: This plugin removes kernel trace and update the kernel package version
|
70
90
|
if KernelCare package is installed on host
|
71
91
|
email:
|
@@ -79,8 +99,11 @@ files:
|
|
79
99
|
- Rakefile
|
80
100
|
- app/controllers/concerns/foreman_kernel_care/foreman_tasks.rb
|
81
101
|
- app/models/concerns/foreman_kernel_care/host_managed_extensions.rb
|
102
|
+
- app/services/concerns/foreman_kernel_care/profiles_uploader.rb
|
103
|
+
- app/views/foreman_kernel_care/job_templates/install_kernelcare.erb
|
82
104
|
- app/views/foreman_kernel_care/job_templates/kernel_version.erb
|
83
105
|
- app/views/foreman_kernel_care/job_templates/update_kernel.erb
|
106
|
+
- app/views/foreman_kernel_care/job_templates/view_newest_patch.erb
|
84
107
|
- db/seeds.d/100_assign_features_with_templates.rb
|
85
108
|
- db/seeds.d/70_job_templates.rb
|
86
109
|
- lib/foreman_kernel_care.rb
|
@@ -95,7 +118,7 @@ homepage: https://github.com/maccelf/foreman_kernel_care
|
|
95
118
|
licenses:
|
96
119
|
- GPL-3.0
|
97
120
|
metadata: {}
|
98
|
-
post_install_message:
|
121
|
+
post_install_message:
|
99
122
|
rdoc_options: []
|
100
123
|
require_paths:
|
101
124
|
- lib
|
@@ -103,15 +126,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
103
126
|
requirements:
|
104
127
|
- - ">="
|
105
128
|
- !ruby/object:Gem::Version
|
106
|
-
version:
|
129
|
+
version: 2.5.0
|
107
130
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
131
|
requirements:
|
109
132
|
- - ">="
|
110
133
|
- !ruby/object:Gem::Version
|
111
134
|
version: '0'
|
112
135
|
requirements: []
|
113
|
-
rubygems_version: 3.
|
114
|
-
signing_key:
|
136
|
+
rubygems_version: 3.2.33
|
137
|
+
signing_key:
|
115
138
|
specification_version: 4
|
116
139
|
summary: Plugin for KernelCare
|
117
140
|
test_files:
|