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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/definitions/checks/check_hotfix_installed.rb +2 -3
  4. data/definitions/checks/disk/performance.rb +1 -2
  5. data/definitions/checks/package_manager/{yum/validate_yum_config.rb → dnf/validate_dnf_config.rb} +13 -11
  6. data/definitions/checks/repositories/check_upstream_repository.rb +1 -2
  7. data/definitions/features/installer.rb +8 -66
  8. data/definitions/features/instance.rb +0 -6
  9. data/definitions/procedures/backup/metadata.rb +5 -3
  10. data/definitions/procedures/packages/installer_confirmation.rb +1 -1
  11. data/definitions/procedures/packages/update.rb +3 -3
  12. data/definitions/scenarios/backup.rb +1 -6
  13. data/definitions/scenarios/self_upgrade.rb +4 -6
  14. data/definitions/scenarios/{upgrade_to_capsule_6_14_z.rb → upgrade_to_capsule_6_15.rb} +11 -12
  15. data/definitions/scenarios/{upgrade_to_capsule_6_14.rb → upgrade_to_capsule_6_15_z.rb} +12 -13
  16. data/definitions/scenarios/upgrade_to_katello_nightly.rb +1 -1
  17. data/definitions/scenarios/{upgrade_to_satellite_6_14_z.rb → upgrade_to_satellite_6_15.rb} +12 -12
  18. data/definitions/scenarios/{upgrade_to_satellite_6_14.rb → upgrade_to_satellite_6_15_z.rb} +12 -14
  19. data/extras/foreman_protector/foreman-protector.conf +1 -1
  20. data/lib/foreman_maintain/concerns/base_database.rb +0 -41
  21. data/lib/foreman_maintain/concerns/system_helpers.rb +2 -2
  22. data/lib/foreman_maintain/config.rb +5 -1
  23. data/lib/foreman_maintain/package_manager/dnf.rb +138 -11
  24. data/lib/foreman_maintain/package_manager.rb +0 -1
  25. data/lib/foreman_maintain/repository_manager/el.rb +2 -2
  26. data/lib/foreman_maintain/version.rb +1 -1
  27. metadata +11 -20
  28. data/definitions/checks/backup/directory_ready.rb +0 -23
  29. data/definitions/checks/foreman/check_checkpoint_segments.rb +0 -59
  30. data/definitions/checks/foreman/check_duplicate_roles.rb +0 -42
  31. data/definitions/checks/foreman/puppet_class_duplicates.rb +0 -48
  32. data/definitions/checks/original_assets.rb +0 -23
  33. data/definitions/procedures/foreman/apipie_cache.rb +0 -12
  34. data/definitions/procedures/foreman_docker/remove_foreman_docker.rb +0 -16
  35. data/extras/foreman_protector/yum/foreman-protector.py +0 -86
  36. 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: d90e54ce37bbcb97b38d4362699d2e5fdec4bb6a9c73a6449cebc1c6a20cf970
4
- data.tar.gz: 79ddf0919edb2fd587d06d414ade8b01994d197f61069dab8bb2d03c22ad72f3
3
+ metadata.gz: a742f6c45bf5c57c814ba78f83ff3fb72863de35005f0e8f34a6f823de766ba5
4
+ data.tar.gz: be8eb54fe3eb4d9a05d59f64ad34fc314ae97fc4be47c1aeaf4cde3b0d46b979
5
5
  SHA512:
6
- metadata.gz: 11c9f890ad98bdac65ca98df002386f6c5435a67b2374e1349d7dc8f53cf79a3587f5ff6f449c0b1f5a7b1a24cb9e96254706c9b2eb9e257679cb1eead8b6831
7
- data.tar.gz: d827ab0345f35720c3a1eaae0779593b56c6c577f8a72c0aacccc5210cc4d629f8f1a7c2f8afd5371dbdfb042fc2b79414f457d4d69afdbe203d196eb97d60d5
6
+ metadata.gz: 4cb48844ead00af99f66d37ee2a215fe9c397f14b544774580ad5df3dc09598231f5a8a7978fbc2111bb104daa951f1d3c6a1dc2426c2f635e319ded93117e6f
7
+ data.tar.gz: 7c0cea08c66ea928e2fa6659dd051d55c4ab0e9afabba61c18ad9934b1a21fd1b177d7f765e58a2885927103daf92ba8d05513d2fc0f386ec2900e546afa3cbc
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Foreman Maintain [![Build Status](https://github.com/theforeman/foreman_maintain/workflows/Ruby%20Tests/badge.svg?event=pull_request)](https://github.com/theforeman/foreman_maintain/workflows/Ruby%20Tests/badge.svg?event=pull_request) <a href="https://codeclimate.com/github/theforeman/foreman_maintain"><img src="https://codeclimate.com/github/theforeman/foreman_maintain/badges/gpa.svg" /></a>
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
- current_downstream_feature = feature(:instance).downstream
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)
@@ -1,9 +1,9 @@
1
1
  module Checks::PackageManager
2
- module Yum
3
- class ValidateYumConfig < ForemanMaintain::Check
2
+ module Dnf
3
+ class ValidateDnfConfig < ForemanMaintain::Check
4
4
  metadata do
5
- label :validate_yum_config
6
- description 'Check to validate yum configuration before upgrade'
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/yum.conf as below:"\
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 yum update or upgrade!"
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 = yum_config_options.values.join('|')
32
+ combined_regex = dnf_config_options.values.join('|')
31
33
  result[:grep_output] = execute_grep_cmd(combined_regex)
32
- result[:matched_keys] = yum_config_options.keys.select do |key|
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/yum.conf")[1]
41
+ execute_with_status("grep -iE '#{regex_string}' /etc/dnf/dnf.conf")[1]
40
42
  end
41
43
 
42
- def yum_config_options
43
- @yum_config_options ||= {
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
- case @installer_type
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
- case @installer_type
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
- case @installer_type
81
- when :scenarios
82
- if feature(:satellite)
83
- 'satellite-installer'
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(installer_arguments, exec_options)
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
- spinner.update('Collecting proxy configuration')
68
- feature(:installer).answers['foreman_proxy'].select do |key, _|
69
- PROXY_CONFIG_ENTRIES.include?(key)
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 yum execution \n" \
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 :yum_options, 'Extra yum options if any', :array => true, :default => []
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, :yum_options => @yum_options }
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 @yum_options.include?('--downloadonly')
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
- if check_min_version('foreman', '2.5') || check_min_version('foreman-proxy', '2.5')
71
- yum_options = req_repos_to_update_pkgs.map do |id|
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::Capsule_6_14_z
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
- ForemanMaintain.upgrade_in_progress == '6.14.z')
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.14.z'
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.14.z'
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::Foreman::CheckpointSegments)
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.14.z'
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.14.z'
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.14'))
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
- :yum_options => ['--downloadonly']))
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.14.z'
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.14.z'
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::Capsule_6_14
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.13' || \
9
- ForemanMaintain.upgrade_in_progress == '6.14')
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.14'
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.14'
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::Foreman::CheckpointSegments)
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.14'
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.14'
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.14'))
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
- :yum_options => ['--downloadonly']))
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.14'
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.14'
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
- :yum_options => ['--downloadonly']))
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::Satellite_6_14_z
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.14.z')
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.14.z'
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.14.z'
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::Foreman::CheckpointSegments)
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.14.z'
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.14.z'
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.14'))
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
- :yum_options => ['--downloadonly']))
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.14.z'
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.14.z'
84
+ description 'Checks after upgrading to Satellite 6.15'
85
85
  tags :post_upgrade_checks
86
86
  run_strategy :fail_slow
87
87
  end