foreman_maintain 1.3.5 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/definitions/checks/check_hotfix_installed.rb +2 -3
- data/definitions/checks/disk/performance.rb +1 -2
- data/definitions/checks/package_manager/{yum/validate_yum_config.rb → dnf/validate_dnf_config.rb} +13 -11
- data/definitions/checks/repositories/check_upstream_repository.rb +1 -2
- data/definitions/features/installer.rb +8 -66
- data/definitions/features/instance.rb +0 -6
- data/definitions/procedures/backup/metadata.rb +5 -3
- data/definitions/procedures/packages/installer_confirmation.rb +1 -1
- data/definitions/procedures/packages/update.rb +3 -3
- data/definitions/scenarios/backup.rb +1 -6
- data/definitions/scenarios/self_upgrade.rb +4 -6
- data/definitions/scenarios/{upgrade_to_capsule_6_14_z.rb → upgrade_to_capsule_6_15.rb} +11 -12
- data/definitions/scenarios/{upgrade_to_capsule_6_14.rb → upgrade_to_capsule_6_15_z.rb} +12 -13
- data/definitions/scenarios/upgrade_to_katello_nightly.rb +1 -1
- data/definitions/scenarios/{upgrade_to_satellite_6_14_z.rb → upgrade_to_satellite_6_15.rb} +12 -12
- data/definitions/scenarios/{upgrade_to_satellite_6_14.rb → upgrade_to_satellite_6_15_z.rb} +12 -14
- data/extras/foreman_protector/foreman-protector.conf +1 -1
- data/lib/foreman_maintain/concerns/base_database.rb +0 -41
- data/lib/foreman_maintain/concerns/system_helpers.rb +2 -2
- data/lib/foreman_maintain/config.rb +5 -1
- data/lib/foreman_maintain/package_manager/dnf.rb +138 -11
- data/lib/foreman_maintain/package_manager.rb +0 -1
- data/lib/foreman_maintain/repository_manager/el.rb +2 -2
- data/lib/foreman_maintain/version.rb +1 -1
- metadata +11 -20
- data/definitions/checks/backup/directory_ready.rb +0 -23
- data/definitions/checks/foreman/check_checkpoint_segments.rb +0 -59
- data/definitions/checks/foreman/check_duplicate_roles.rb +0 -42
- data/definitions/checks/foreman/puppet_class_duplicates.rb +0 -48
- data/definitions/checks/original_assets.rb +0 -23
- data/definitions/procedures/foreman/apipie_cache.rb +0 -12
- data/definitions/procedures/foreman_docker/remove_foreman_docker.rb +0 -16
- data/extras/foreman_protector/yum/foreman-protector.py +0 -86
- data/lib/foreman_maintain/package_manager/yum.rb +0 -142
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a742f6c45bf5c57c814ba78f83ff3fb72863de35005f0e8f34a6f823de766ba5
|
4
|
+
data.tar.gz: be8eb54fe3eb4d9a05d59f64ad34fc314ae97fc4be47c1aeaf4cde3b0d46b979
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cb48844ead00af99f66d37ee2a215fe9c397f14b544774580ad5df3dc09598231f5a8a7978fbc2111bb104daa951f1d3c6a1dc2426c2f635e319ded93117e6f
|
7
|
+
data.tar.gz: 7c0cea08c66ea928e2fa6659dd051d55c4ab0e9afabba61c18ad9934b1a21fd1b177d7f765e58a2885927103daf92ba8d05513d2fc0f386ec2900e546afa3cbc
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Foreman Maintain [![
|
1
|
+
# Foreman Maintain [![Ruby Tests](https://github.com/theforeman/foreman_maintain/actions/workflows/ruby_tests.yml/badge.svg)](https://github.com/theforeman/foreman_maintain/actions/workflows/ruby_tests.yml) <a href="https://codeclimate.com/github/theforeman/foreman_maintain"><img src="https://codeclimate.com/github/theforeman/foreman_maintain/badges/gpa.svg" /></a>
|
2
2
|
|
3
3
|
The `foreman_maintain` aims to provide various features that helps keep the
|
4
4
|
Foreman/Satellite up and running. It supports multiple versions and subparts
|
@@ -4,8 +4,7 @@ class Checks::CheckHotfixInstalled < ForemanMaintain::Check
|
|
4
4
|
description 'Check to verify if any hotfix installed on system'
|
5
5
|
tags :pre_upgrade
|
6
6
|
preparation_steps do
|
7
|
-
[Checks::Repositories::CheckNonRhRepository.new
|
8
|
-
Procedures::Packages::Install.new(:packages => %w[yum-utils])]
|
7
|
+
[Checks::Repositories::CheckNonRhRepository.new]
|
9
8
|
end
|
10
9
|
|
11
10
|
confine do
|
@@ -45,7 +44,7 @@ class Checks::CheckHotfixInstalled < ForemanMaintain::Check
|
|
45
44
|
|
46
45
|
def installed_packages
|
47
46
|
packages = []
|
48
|
-
IO.popen(['repoquery', '-a', '--installed', '--qf', query_format]) do |io|
|
47
|
+
IO.popen(['dnf', 'repoquery', '-a', '--installed', '--qf', query_format]) do |io|
|
49
48
|
io.each do |line|
|
50
49
|
repo, pkg = line.chomp.split
|
51
50
|
next if repo.nil? || pkg.nil?
|
@@ -30,8 +30,7 @@ module Checks
|
|
30
30
|
puts "\n"
|
31
31
|
puts stats.stdout
|
32
32
|
|
33
|
-
|
34
|
-
if current_downstream_feature&.at_least_version?('6.3')
|
33
|
+
if feature(:instance).downstream
|
35
34
|
assert(success, io_obj.slow_disk_error_msg + warning_message, :warn => true)
|
36
35
|
else
|
37
36
|
assert(success, io_obj.slow_disk_error_msg)
|
data/definitions/checks/package_manager/{yum/validate_yum_config.rb → dnf/validate_dnf_config.rb}
RENAMED
@@ -1,9 +1,9 @@
|
|
1
1
|
module Checks::PackageManager
|
2
|
-
module
|
3
|
-
class
|
2
|
+
module Dnf
|
3
|
+
class ValidateDnfConfig < ForemanMaintain::Check
|
4
4
|
metadata do
|
5
|
-
label :
|
6
|
-
description 'Check to validate
|
5
|
+
label :validate_dnf_config
|
6
|
+
description 'Check to validate dnf configuration before upgrade'
|
7
7
|
tags :pre_upgrade
|
8
8
|
end
|
9
9
|
|
@@ -17,30 +17,32 @@ module Checks::PackageManager
|
|
17
17
|
|
18
18
|
private
|
19
19
|
|
20
|
+
# rubocop:disable Metrics/LineLength
|
20
21
|
def failure_message(final_result)
|
21
22
|
verb_string = final_result[:matched_keys].length > 1 ? 'are' : 'is'
|
22
23
|
|
23
|
-
"#{final_result[:matched_keys].join(',')} #{verb_string} set in /etc/
|
24
|
+
"#{final_result[:matched_keys].join(',')} #{verb_string} set in /etc/dnf/dnf.conf as below:"\
|
24
25
|
"\n#{final_result[:grep_output]}"\
|
25
|
-
"\nUnset this configuration as it is risky while
|
26
|
+
"\nUnset this configuration as it is risky while dnf update or upgrade!"
|
26
27
|
end
|
28
|
+
# rubocop:enable Metrics/LineLength
|
27
29
|
|
28
30
|
def verify_config_options
|
29
31
|
result = {}
|
30
|
-
combined_regex =
|
32
|
+
combined_regex = dnf_config_options.values.join('|')
|
31
33
|
result[:grep_output] = execute_grep_cmd(combined_regex)
|
32
|
-
result[:matched_keys] =
|
34
|
+
result[:matched_keys] = dnf_config_options.keys.select do |key|
|
33
35
|
result[:grep_output].include?(key)
|
34
36
|
end
|
35
37
|
result
|
36
38
|
end
|
37
39
|
|
38
40
|
def execute_grep_cmd(regex_string)
|
39
|
-
execute_with_status("grep -iE '#{regex_string}' /etc/
|
41
|
+
execute_with_status("grep -iE '#{regex_string}' /etc/dnf/dnf.conf")[1]
|
40
42
|
end
|
41
43
|
|
42
|
-
def
|
43
|
-
@
|
44
|
+
def dnf_config_options
|
45
|
+
@dnf_config_options ||= {
|
44
46
|
'exclude' => '^exclude\s*=\s*\S+.*$',
|
45
47
|
}
|
46
48
|
end
|
@@ -6,8 +6,7 @@ class Checks::CheckUpstreamRepository < ForemanMaintain::Check
|
|
6
6
|
description 'Check if any upstream repositories are enabled on system'
|
7
7
|
tags :pre_upgrade
|
8
8
|
preparation_steps do
|
9
|
-
[Checks::Repositories::CheckNonRhRepository.new
|
10
|
-
Procedures::Packages::Install.new(:packages => %w[yum-utils])]
|
9
|
+
[Checks::Repositories::CheckNonRhRepository.new]
|
11
10
|
end
|
12
11
|
confine do
|
13
12
|
feature(:instance).downstream
|
@@ -3,22 +3,10 @@ class Features::Installer < ForemanMaintain::Feature
|
|
3
3
|
label :installer
|
4
4
|
|
5
5
|
confine do
|
6
|
-
find_package('foreman-installer')
|
7
|
-
find_package('katello-installer') ||
|
8
|
-
find_package('capsule-installer')
|
6
|
+
find_package('foreman-installer')
|
9
7
|
end
|
10
8
|
end
|
11
9
|
|
12
|
-
def initialize
|
13
|
-
@installer_type = if find_package('foreman-installer')
|
14
|
-
:scenarios
|
15
|
-
elsif find_package('katello-installer')
|
16
|
-
:legacy_katello
|
17
|
-
elsif find_package('capsule-installer')
|
18
|
-
:legacy_capsule
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
10
|
def answers
|
23
11
|
load_answers(configuration)
|
24
12
|
end
|
@@ -28,39 +16,17 @@ class Features::Installer < ForemanMaintain::Feature
|
|
28
16
|
end
|
29
17
|
|
30
18
|
def config_file
|
31
|
-
|
32
|
-
when :scenarios
|
33
|
-
last_scenario_config
|
34
|
-
when :legacy_katello
|
35
|
-
File.join(config_directory, 'katello-installer.yaml')
|
36
|
-
when :legacy_capsule
|
37
|
-
File.join(config_directory, 'capsule-installer.yaml')
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
def with_scenarios?
|
42
|
-
@installer_type == :scenarios
|
19
|
+
last_scenario_config
|
43
20
|
end
|
44
21
|
|
45
22
|
def config_directory
|
46
|
-
|
47
|
-
when :scenarios
|
48
|
-
'/etc/foreman-installer'
|
49
|
-
when :legacy_katello
|
50
|
-
'/etc/katello-installer'
|
51
|
-
when :legacy_capsule
|
52
|
-
'/etc/capsule-installer'
|
53
|
-
end
|
23
|
+
'/etc/foreman-installer'
|
54
24
|
end
|
55
25
|
|
56
26
|
def custom_hiera_file
|
57
27
|
@custom_hiera_file ||= File.join(config_directory, 'custom-hiera.yaml')
|
58
28
|
end
|
59
29
|
|
60
|
-
def can_upgrade?
|
61
|
-
@installer_type == :scenarios || @installer_type == :legacy_katello
|
62
|
-
end
|
63
|
-
|
64
30
|
def config_files
|
65
31
|
Dir.glob(File.join(config_directory, '**/*')) +
|
66
32
|
[
|
@@ -71,23 +37,14 @@ class Features::Installer < ForemanMaintain::Feature
|
|
71
37
|
end
|
72
38
|
|
73
39
|
def last_scenario
|
74
|
-
return nil unless with_scenarios?
|
75
|
-
|
76
40
|
File.basename(last_scenario_config).split('.')[0]
|
77
41
|
end
|
78
42
|
|
79
43
|
def installer_command
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
else
|
85
|
-
'foreman-installer'
|
86
|
-
end
|
87
|
-
when :legacy_katello
|
88
|
-
'katello-installer'
|
89
|
-
when :legacy_capsule
|
90
|
-
'capsule-installer'
|
44
|
+
if feature(:satellite)
|
45
|
+
'satellite-installer'
|
46
|
+
else
|
47
|
+
'foreman-installer'
|
91
48
|
end
|
92
49
|
end
|
93
50
|
|
@@ -105,22 +62,7 @@ class Features::Installer < ForemanMaintain::Feature
|
|
105
62
|
end
|
106
63
|
|
107
64
|
def upgrade(exec_options = {})
|
108
|
-
run(
|
109
|
-
end
|
110
|
-
|
111
|
-
def installer_arguments
|
112
|
-
installer_args = ''
|
113
|
-
|
114
|
-
if feature(:foreman_proxy)&.with_content? &&
|
115
|
-
check_max_version('foreman-installer', '3.4')
|
116
|
-
installer_args += ' --disable-system-checks'
|
117
|
-
end
|
118
|
-
|
119
|
-
if !check_min_version('foreman-installer', '2.1') && can_upgrade?
|
120
|
-
installer_args += ' --upgrade'
|
121
|
-
end
|
122
|
-
|
123
|
-
installer_args
|
65
|
+
run('', exec_options)
|
124
66
|
end
|
125
67
|
|
126
68
|
def initial_admin_username
|
@@ -139,12 +139,6 @@ class Features::Instance < ForemanMaintain::Feature
|
|
139
139
|
end
|
140
140
|
|
141
141
|
def pick_failing_components(components)
|
142
|
-
if feature(:katello).current_version < Gem::Version.new('3.2.0')
|
143
|
-
# Note that katello_ping returns an empty result against foreman_auth.
|
144
|
-
# https://github.com/Katello/katello/commit/95d7b9067d38f269a5ec121fb73b5c19d4422baf
|
145
|
-
components.reject! { |n| n.eql?('foreman_auth') }
|
146
|
-
end
|
147
|
-
|
148
142
|
components.each_with_object([]) do |(name, data), failing|
|
149
143
|
failing << name unless data['status'] == 'ok'
|
150
144
|
end
|
@@ -64,9 +64,11 @@ module Procedures::Backup
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def proxy_config(spinner)
|
67
|
-
|
68
|
-
|
69
|
-
|
67
|
+
if feature(:installer)
|
68
|
+
spinner.update('Collecting proxy configuration')
|
69
|
+
feature(:installer).answers['foreman_proxy'].select do |key, _|
|
70
|
+
PROXY_CONFIG_ENTRIES.include?(key)
|
71
|
+
end
|
70
72
|
end
|
71
73
|
end
|
72
74
|
end
|
@@ -6,7 +6,7 @@ module Procedures::Packages
|
|
6
6
|
|
7
7
|
def run
|
8
8
|
question = "\nWARNING: This script runs #{feature(:installer).installer_command} " \
|
9
|
-
"after the
|
9
|
+
"after the dnf execution \n" \
|
10
10
|
"to ensure the #{feature(:instance).product_name} " \
|
11
11
|
"is in a consistent state.\n" \
|
12
12
|
"As a result some of your services may be restarted. \n\n" \
|
@@ -6,13 +6,13 @@ module Procedures::Packages
|
|
6
6
|
param :force, 'Do not skip if package is installed', :flag => true, :default => false
|
7
7
|
param :warn_on_errors, 'Do not interrupt scenario on failure',
|
8
8
|
:flag => true, :default => false
|
9
|
-
param :
|
9
|
+
param :dnf_options, 'Extra dnf options if any', :array => true, :default => []
|
10
10
|
end
|
11
11
|
|
12
12
|
def run
|
13
13
|
assumeyes_val = @assumeyes.nil? ? assumeyes? : @assumeyes
|
14
14
|
package_manager.clean_cache(:assumeyes => assumeyes_val)
|
15
|
-
opts = { :assumeyes => assumeyes_val, :
|
15
|
+
opts = { :assumeyes => assumeyes_val, :dnf_options => @dnf_options }
|
16
16
|
packages_action(:update, @packages, opts)
|
17
17
|
rescue ForemanMaintain::Error::ExecutionError => e
|
18
18
|
if @warn_on_errors
|
@@ -27,7 +27,7 @@ module Procedures::Packages
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def description
|
30
|
-
if @
|
30
|
+
if @dnf_options.include?('--downloadonly')
|
31
31
|
"Download package(s) #{@packages.join(', ')}"
|
32
32
|
else
|
33
33
|
"Update package(s) #{@packages.join(', ')}"
|
@@ -25,7 +25,7 @@ module ForemanMaintain::Scenarios
|
|
25
25
|
accessibility_confirmation
|
26
26
|
prepare_directory
|
27
27
|
logical_volume_confirmation
|
28
|
-
add_step_with_context(Procedures::Backup::Metadata)
|
28
|
+
add_step_with_context(Procedures::Backup::Metadata, :online_backup => online_backup?)
|
29
29
|
|
30
30
|
case strategy
|
31
31
|
when :online
|
@@ -49,7 +49,6 @@ module ForemanMaintain::Scenarios
|
|
49
49
|
# rubocop:disable Metrics/MethodLength
|
50
50
|
def set_context_mapping
|
51
51
|
context.map(:backup_dir,
|
52
|
-
Checks::Backup::DirectoryReady => :backup_dir,
|
53
52
|
Procedures::Backup::PrepareDirectory => :backup_dir,
|
54
53
|
Procedures::Backup::Metadata => :backup_dir,
|
55
54
|
Procedures::Backup::ConfigFiles => :backup_dir,
|
@@ -66,7 +65,6 @@ module ForemanMaintain::Scenarios
|
|
66
65
|
Procedures::Backup::Snapshot::MountForemanDB => :backup_dir,
|
67
66
|
Procedures::Backup::Snapshot::MountPulpcoreDB => :backup_dir)
|
68
67
|
context.map(:preserve_dir,
|
69
|
-
Checks::Backup::DirectoryReady => :preserve_dir,
|
70
68
|
Procedures::Backup::PrepareDirectory => :preserve_dir)
|
71
69
|
context.map(:incremental_dir,
|
72
70
|
Procedures::Backup::PrepareDirectory => :incremental_dir,
|
@@ -104,8 +102,6 @@ module ForemanMaintain::Scenarios
|
|
104
102
|
|
105
103
|
def prepare_directory
|
106
104
|
add_step_with_context(Procedures::Backup::PrepareDirectory)
|
107
|
-
add_step_with_context(Checks::Backup::DirectoryReady,
|
108
|
-
:postgres_access => online_backup? || include_db_dumps?)
|
109
105
|
end
|
110
106
|
|
111
107
|
def logical_volume_confirmation
|
@@ -199,7 +195,6 @@ module ForemanMaintain::Scenarios
|
|
199
195
|
Procedures::Backup::Online::ForemanDB,
|
200
196
|
Procedures::Backup::Online::PulpcoreDB
|
201
197
|
)
|
202
|
-
add_step_with_context(Procedures::Backup::Metadata, :online_backup => true)
|
203
198
|
end
|
204
199
|
|
205
200
|
def strategy
|
@@ -67,13 +67,11 @@ module ForemanMaintain::Scenarios
|
|
67
67
|
def downstream_self_upgrade(pkgs_to_update)
|
68
68
|
ForemanMaintain.enable_maintenance_module
|
69
69
|
|
70
|
-
|
71
|
-
|
72
|
-
"--enablerepo=#{id}"
|
73
|
-
end
|
74
|
-
add_step(Procedures::Packages::Update.new(packages: pkgs_to_update, assumeyes: true,
|
75
|
-
yum_options: yum_options))
|
70
|
+
dnf_options = req_repos_to_update_pkgs.map do |id|
|
71
|
+
"--enablerepo=#{id}"
|
76
72
|
end
|
73
|
+
add_step(Procedures::Packages::Update.new(packages: pkgs_to_update, assumeyes: true,
|
74
|
+
dnf_options: dnf_options))
|
77
75
|
end
|
78
76
|
|
79
77
|
def upstream_self_upgrade(pkgs_to_update)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module Scenarios::
|
1
|
+
module Scenarios::Capsule_6_15
|
2
2
|
class Abstract < ForemanMaintain::Scenario
|
3
3
|
def self.upgrade_metadata(&block)
|
4
4
|
metadata do
|
@@ -6,20 +6,20 @@ module Scenarios::Capsule_6_14_z
|
|
6
6
|
confine do
|
7
7
|
feature(:capsule) &&
|
8
8
|
(feature(:capsule).current_minor_version == '6.14' || \
|
9
|
-
|
9
|
+
ForemanMaintain.upgrade_in_progress == '6.15')
|
10
10
|
end
|
11
11
|
instance_eval(&block)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
15
|
def target_version
|
16
|
-
'6.
|
16
|
+
'6.15'
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
20
|
class PreUpgradeCheck < Abstract
|
21
21
|
upgrade_metadata do
|
22
|
-
description 'Checks before upgrading to Capsule 6.
|
22
|
+
description 'Checks before upgrading to Capsule 6.15'
|
23
23
|
tags :pre_upgrade_checks
|
24
24
|
run_strategy :fail_slow
|
25
25
|
end
|
@@ -27,14 +27,13 @@ module Scenarios::Capsule_6_14_z
|
|
27
27
|
def compose
|
28
28
|
add_steps(find_checks(:default))
|
29
29
|
add_steps(find_checks(:pre_upgrade))
|
30
|
-
add_step(Checks::
|
31
|
-
add_step(Checks::Repositories::Validate.new(:version => '6.14'))
|
30
|
+
add_step(Checks::Repositories::Validate.new(:version => '6.15'))
|
32
31
|
end
|
33
32
|
end
|
34
33
|
|
35
34
|
class PreMigrations < Abstract
|
36
35
|
upgrade_metadata do
|
37
|
-
description 'Procedures before migrating to Capsule 6.
|
36
|
+
description 'Procedures before migrating to Capsule 6.15'
|
38
37
|
tags :pre_migrations
|
39
38
|
end
|
40
39
|
|
@@ -45,7 +44,7 @@ module Scenarios::Capsule_6_14_z
|
|
45
44
|
|
46
45
|
class Migrations < Abstract
|
47
46
|
upgrade_metadata do
|
48
|
-
description 'Migration scripts to Capsule 6.
|
47
|
+
description 'Migration scripts to Capsule 6.15'
|
49
48
|
tags :migrations
|
50
49
|
end
|
51
50
|
|
@@ -54,11 +53,11 @@ module Scenarios::Capsule_6_14_z
|
|
54
53
|
end
|
55
54
|
|
56
55
|
def compose
|
57
|
-
add_step(Procedures::Repositories::Setup.new(:version => '6.
|
56
|
+
add_step(Procedures::Repositories::Setup.new(:version => '6.15'))
|
58
57
|
modules_to_enable = ["satellite-capsule:#{el_short_name}"]
|
59
58
|
add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
|
60
59
|
add_step(Procedures::Packages::Update.new(:assumeyes => true,
|
61
|
-
:
|
60
|
+
:dnf_options => ['--downloadonly']))
|
62
61
|
add_step(Procedures::Service::Stop.new)
|
63
62
|
add_step(Procedures::Packages::Update.new(:assumeyes => true))
|
64
63
|
add_step_with_context(Procedures::Installer::Upgrade)
|
@@ -67,7 +66,7 @@ module Scenarios::Capsule_6_14_z
|
|
67
66
|
|
68
67
|
class PostMigrations < Abstract
|
69
68
|
upgrade_metadata do
|
70
|
-
description 'Procedures after migrating to Capsule 6.
|
69
|
+
description 'Procedures after migrating to Capsule 6.15'
|
71
70
|
tags :post_migrations
|
72
71
|
end
|
73
72
|
|
@@ -80,7 +79,7 @@ module Scenarios::Capsule_6_14_z
|
|
80
79
|
|
81
80
|
class PostUpgradeChecks < Abstract
|
82
81
|
upgrade_metadata do
|
83
|
-
description 'Checks after upgrading to Capsule 6.
|
82
|
+
description 'Checks after upgrading to Capsule 6.15'
|
84
83
|
tags :post_upgrade_checks
|
85
84
|
run_strategy :fail_slow
|
86
85
|
end
|
@@ -1,25 +1,25 @@
|
|
1
|
-
module Scenarios::
|
1
|
+
module Scenarios::Capsule_6_15_z
|
2
2
|
class Abstract < ForemanMaintain::Scenario
|
3
3
|
def self.upgrade_metadata(&block)
|
4
4
|
metadata do
|
5
5
|
tags :upgrade_scenario
|
6
6
|
confine do
|
7
7
|
feature(:capsule) &&
|
8
|
-
(feature(:capsule).current_minor_version == '6.
|
9
|
-
|
8
|
+
(feature(:capsule).current_minor_version == '6.15' || \
|
9
|
+
ForemanMaintain.upgrade_in_progress == '6.15.z')
|
10
10
|
end
|
11
11
|
instance_eval(&block)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
15
|
def target_version
|
16
|
-
'6.
|
16
|
+
'6.15.z'
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
20
|
class PreUpgradeCheck < Abstract
|
21
21
|
upgrade_metadata do
|
22
|
-
description 'Checks before upgrading to Capsule 6.
|
22
|
+
description 'Checks before upgrading to Capsule 6.15.z'
|
23
23
|
tags :pre_upgrade_checks
|
24
24
|
run_strategy :fail_slow
|
25
25
|
end
|
@@ -27,14 +27,13 @@ module Scenarios::Capsule_6_14
|
|
27
27
|
def compose
|
28
28
|
add_steps(find_checks(:default))
|
29
29
|
add_steps(find_checks(:pre_upgrade))
|
30
|
-
add_step(Checks::
|
31
|
-
add_step(Checks::Repositories::Validate.new(:version => '6.14'))
|
30
|
+
add_step(Checks::Repositories::Validate.new(:version => '6.15'))
|
32
31
|
end
|
33
32
|
end
|
34
33
|
|
35
34
|
class PreMigrations < Abstract
|
36
35
|
upgrade_metadata do
|
37
|
-
description 'Procedures before migrating to Capsule 6.
|
36
|
+
description 'Procedures before migrating to Capsule 6.15.z'
|
38
37
|
tags :pre_migrations
|
39
38
|
end
|
40
39
|
|
@@ -45,7 +44,7 @@ module Scenarios::Capsule_6_14
|
|
45
44
|
|
46
45
|
class Migrations < Abstract
|
47
46
|
upgrade_metadata do
|
48
|
-
description 'Migration scripts to Capsule 6.
|
47
|
+
description 'Migration scripts to Capsule 6.15.z'
|
49
48
|
tags :migrations
|
50
49
|
end
|
51
50
|
|
@@ -54,11 +53,11 @@ module Scenarios::Capsule_6_14
|
|
54
53
|
end
|
55
54
|
|
56
55
|
def compose
|
57
|
-
add_step(Procedures::Repositories::Setup.new(:version => '6.
|
56
|
+
add_step(Procedures::Repositories::Setup.new(:version => '6.15'))
|
58
57
|
modules_to_enable = ["satellite-capsule:#{el_short_name}"]
|
59
58
|
add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
|
60
59
|
add_step(Procedures::Packages::Update.new(:assumeyes => true,
|
61
|
-
:
|
60
|
+
:dnf_options => ['--downloadonly']))
|
62
61
|
add_step(Procedures::Service::Stop.new)
|
63
62
|
add_step(Procedures::Packages::Update.new(:assumeyes => true))
|
64
63
|
add_step_with_context(Procedures::Installer::Upgrade)
|
@@ -67,7 +66,7 @@ module Scenarios::Capsule_6_14
|
|
67
66
|
|
68
67
|
class PostMigrations < Abstract
|
69
68
|
upgrade_metadata do
|
70
|
-
description 'Procedures after migrating to Capsule 6.
|
69
|
+
description 'Procedures after migrating to Capsule 6.15.z'
|
71
70
|
tags :post_migrations
|
72
71
|
end
|
73
72
|
|
@@ -80,7 +79,7 @@ module Scenarios::Capsule_6_14
|
|
80
79
|
|
81
80
|
class PostUpgradeChecks < Abstract
|
82
81
|
upgrade_metadata do
|
83
|
-
description 'Checks after upgrading to Capsule 6.
|
82
|
+
description 'Checks after upgrading to Capsule 6.15.z'
|
84
83
|
tags :post_upgrade_checks
|
85
84
|
run_strategy :fail_slow
|
86
85
|
end
|
@@ -55,7 +55,7 @@ module Scenarios::Katello_Nightly
|
|
55
55
|
modules_to_enable = ["katello:#{el_short_name}", "pulpcore:#{el_short_name}"]
|
56
56
|
add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
|
57
57
|
add_step(Procedures::Packages::Update.new(:assumeyes => true,
|
58
|
-
:
|
58
|
+
:dnf_options => ['--downloadonly']))
|
59
59
|
add_step(Procedures::Service::Stop.new)
|
60
60
|
add_step(Procedures::Packages::Update.new(:assumeyes => true))
|
61
61
|
add_step_with_context(Procedures::Installer::Upgrade)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module Scenarios::
|
1
|
+
module Scenarios::Satellite_6_15
|
2
2
|
class Abstract < ForemanMaintain::Scenario
|
3
3
|
def self.upgrade_metadata(&block)
|
4
4
|
metadata do
|
@@ -6,20 +6,20 @@ module Scenarios::Satellite_6_14_z
|
|
6
6
|
confine do
|
7
7
|
feature(:satellite) &&
|
8
8
|
(feature(:satellite).current_minor_version == '6.14' || \
|
9
|
-
ForemanMaintain.upgrade_in_progress == '6.
|
9
|
+
ForemanMaintain.upgrade_in_progress == '6.15')
|
10
10
|
end
|
11
11
|
instance_eval(&block)
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
15
|
def target_version
|
16
|
-
'6.
|
16
|
+
'6.15'
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
20
|
class PreUpgradeCheck < Abstract
|
21
21
|
upgrade_metadata do
|
22
|
-
description 'Checks before upgrading to Satellite 6.
|
22
|
+
description 'Checks before upgrading to Satellite 6.15'
|
23
23
|
tags :pre_upgrade_checks
|
24
24
|
run_strategy :fail_slow
|
25
25
|
end
|
@@ -27,14 +27,13 @@ module Scenarios::Satellite_6_14_z
|
|
27
27
|
def compose
|
28
28
|
add_steps(find_checks(:default))
|
29
29
|
add_steps(find_checks(:pre_upgrade))
|
30
|
-
add_step(Checks::
|
31
|
-
add_step(Checks::Repositories::Validate.new(:version => '6.14'))
|
30
|
+
add_step(Checks::Repositories::Validate.new(:version => '6.15'))
|
32
31
|
end
|
33
32
|
end
|
34
33
|
|
35
34
|
class PreMigrations < Abstract
|
36
35
|
upgrade_metadata do
|
37
|
-
description 'Procedures before migrating to Satellite 6.
|
36
|
+
description 'Procedures before migrating to Satellite 6.15'
|
38
37
|
tags :pre_migrations
|
39
38
|
end
|
40
39
|
|
@@ -45,8 +44,9 @@ module Scenarios::Satellite_6_14_z
|
|
45
44
|
|
46
45
|
class Migrations < Abstract
|
47
46
|
upgrade_metadata do
|
48
|
-
description 'Migration scripts to Satellite 6.
|
47
|
+
description 'Migration scripts to Satellite 6.15'
|
49
48
|
tags :migrations
|
49
|
+
run_strategy :fail_fast
|
50
50
|
end
|
51
51
|
|
52
52
|
def set_context_mapping
|
@@ -54,11 +54,11 @@ module Scenarios::Satellite_6_14_z
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def compose
|
57
|
-
add_step(Procedures::Repositories::Setup.new(:version => '6.
|
57
|
+
add_step(Procedures::Repositories::Setup.new(:version => '6.15'))
|
58
58
|
modules_to_enable = ["satellite:#{el_short_name}"]
|
59
59
|
add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
|
60
60
|
add_step(Procedures::Packages::Update.new(:assumeyes => true,
|
61
|
-
:
|
61
|
+
:dnf_options => ['--downloadonly']))
|
62
62
|
add_step(Procedures::Service::Stop.new)
|
63
63
|
add_step(Procedures::Packages::Update.new(:assumeyes => true))
|
64
64
|
add_step_with_context(Procedures::Installer::Upgrade)
|
@@ -68,7 +68,7 @@ module Scenarios::Satellite_6_14_z
|
|
68
68
|
|
69
69
|
class PostMigrations < Abstract
|
70
70
|
upgrade_metadata do
|
71
|
-
description 'Procedures after migrating to Satellite 6.
|
71
|
+
description 'Procedures after migrating to Satellite 6.15'
|
72
72
|
tags :post_migrations
|
73
73
|
end
|
74
74
|
|
@@ -81,7 +81,7 @@ module Scenarios::Satellite_6_14_z
|
|
81
81
|
|
82
82
|
class PostUpgradeChecks < Abstract
|
83
83
|
upgrade_metadata do
|
84
|
-
description 'Checks after upgrading to Satellite 6.
|
84
|
+
description 'Checks after upgrading to Satellite 6.15'
|
85
85
|
tags :post_upgrade_checks
|
86
86
|
run_strategy :fail_slow
|
87
87
|
end
|