foreman_maintain 1.2.12 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da68f2093b4fd4dabd725c3f8fd59d8050bf46b69c25406bccb211289130dd83
4
- data.tar.gz: 2d55369e3d21aa803de8e79adff315409db43ebf0f07d897d3393592dfe16601
3
+ metadata.gz: b4d4f7fe5a4a2f6a3a992a94e7fe674a00866dac9fa0f2f59fe30b5296c0a3a4
4
+ data.tar.gz: 56b9be2ae99686aefa13e2de26b9c72bcd4a3eb82697ef2ec7b099252a2ce352
5
5
  SHA512:
6
- metadata.gz: 00da118403806e13ae41ebef9eceb6f4480278203659ff9b7018a91f2c453637ac7d3a2e63a85985b5f5d06265993d8dbdac3ea3cb23f4d30f33355aa111c562
7
- data.tar.gz: 6bc88a7f89d38490ec2742d3b8dcfed65fb8a8a459d9f452b22fc2723b4ee5874a72720aeddcc8e6b00b85ff7092d978cbefa23c7a2ecc2df6436d7f09c469c5
6
+ metadata.gz: 9dc4c82dcc0fef0ee09cc838af7afd1065c5171ea5b3400a33c58e6aece35e0964b359e8a57a9f058cb4ee82741edafc5d6da14e9d8e566a13455c44a524f9a6
7
+ data.tar.gz: 4dae3e89d6bdc190fa10dde17fce93147f6c6f31ba636bb87d919cf78dbfc253dd10096e45e78f606230709bac50963a7e6c4b006203dc6386331f8209c1b425
@@ -10,7 +10,11 @@ module ForemanMaintain
10
10
  end
11
11
 
12
12
  def services
13
- [system_service('foreman', 30, :socket => 'foreman')]
13
+ if execute?('systemctl is-enabled foreman')
14
+ [system_service('foreman', 30, :socket => 'foreman')]
15
+ else
16
+ [system_service('httpd', 30)]
17
+ end
14
18
  end
15
19
 
16
20
  def plugins
@@ -3,13 +3,17 @@ require 'foreman_maintain/utils/service/systemd'
3
3
  class Features::Pulpcore < ForemanMaintain::Feature
4
4
  metadata do
5
5
  label :pulpcore
6
+
7
+ confine do
8
+ ForemanMaintain::Utils::Service::Systemd.new('pulpcore-api', 0).enabled?
9
+ end
6
10
  end
7
11
 
8
12
  def services
9
13
  redis_services = feature(:redis) ? feature(:redis).services : []
10
14
 
11
15
  self.class.pulpcore_common_services + configured_workers +
12
- redis_services
16
+ redis_services + feature(:apache).services
13
17
  end
14
18
 
15
19
  def configured_workers
@@ -21,6 +25,15 @@ class Features::Pulpcore < ForemanMaintain::Feature
21
25
  end
22
26
  end
23
27
 
28
+ def self.pulpcore_migration_services
29
+ pulpcore_common_services + [
30
+ ForemanMaintain::Utils.system_service('pulpcore-worker@1', 20),
31
+ ForemanMaintain::Utils.system_service('pulpcore-worker@2', 20),
32
+ ForemanMaintain::Utils.system_service('pulpcore-worker@3', 20),
33
+ ForemanMaintain::Utils.system_service('pulpcore-worker@4', 20)
34
+ ]
35
+ end
36
+
24
37
  def config_files
25
38
  [
26
39
  '/etc/pulp/settings.py',
@@ -29,9 +42,22 @@ class Features::Pulpcore < ForemanMaintain::Feature
29
42
  end
30
43
 
31
44
  def self.pulpcore_common_services
32
- [
45
+ common_services = [
33
46
  ForemanMaintain::Utils.system_service('pulpcore-api', 10, :socket => 'pulpcore-api'),
34
47
  ForemanMaintain::Utils.system_service('pulpcore-content', 10, :socket => 'pulpcore-content')
35
48
  ]
49
+ common_services + pulpcore_resource_manager_service
50
+ end
51
+
52
+ def self.pulpcore_resource_manager_service
53
+ # The pulpcore_resource_manager is only required on 3.14+
54
+ # if the old tasking system is being used
55
+ # The foreman-installer does not create unit file for this service,
56
+ # if the new tasking system is being used
57
+ if feature(:service).unit_file_available?('pulpcore-resource-manager.service')
58
+ return [ForemanMaintain::Utils.system_service('pulpcore-resource-manager', 10)]
59
+ end
60
+
61
+ []
36
62
  end
37
63
  end
@@ -4,7 +4,7 @@ module Procedures::Puppet
4
4
  description 'Remove Puppet feature'
5
5
  confine do
6
6
  feature(:puppet_server) &&
7
- (check_min_version('foreman', '3.0') || check_min_version('foreman-proxy', '3.0'))
7
+ (check_min_version('foreman', '3.6') || check_min_version('foreman-proxy', '3.6'))
8
8
  end
9
9
  advanced_run false
10
10
  end
@@ -42,7 +42,6 @@ module Procedures::Puppet
42
42
  options << '--foreman-proxy-puppet false'
43
43
  options << '--foreman-proxy-puppetca false'
44
44
  end
45
- options << '--foreman-proxy-content-puppet false' if answers.key?('foreman_proxy_content')
46
45
  options
47
46
  end
48
47
 
@@ -28,7 +28,6 @@ module ForemanMaintain::Scenarios
28
28
 
29
29
  add_steps_with_context(Procedures::Restore::Confirmation,
30
30
  Procedures::Selinux::SetFileSecurity,
31
- Procedures::Restore::RequiredPackages,
32
31
  Procedures::Restore::Configs)
33
32
  add_step_with_context(Procedures::Crond::Stop) if feature(:cron)
34
33
  unless backup.incremental?
@@ -104,7 +103,6 @@ module ForemanMaintain::Scenarios
104
103
  Checks::Restore::ValidateBackup => :backup_dir,
105
104
  Checks::Restore::ValidateHostname => :backup_dir,
106
105
  Checks::Restore::ValidateInterfaces => :backup_dir,
107
- Procedures::Restore::RequiredPackages => :backup_dir,
108
106
  Procedures::Restore::Configs => :backup_dir,
109
107
  Procedures::Restore::DropDatabases => :backup_dir,
110
108
  Procedures::Restore::CandlepinDump => :backup_dir,
@@ -73,7 +73,6 @@ module Scenarios::Capsule_6_13
73
73
  def compose
74
74
  add_step(Procedures::RefreshFeatures)
75
75
  add_step(Procedures::Service::Start.new)
76
- add_step(Procedures::Pulpcore::ContainerRepairMediaType.new)
77
76
  add_steps(find_procedures(:post_migrations))
78
77
  end
79
78
  end
@@ -0,0 +1,92 @@
1
+ module Scenarios::Capsule_6_14
2
+ class Abstract < ForemanMaintain::Scenario
3
+ def self.upgrade_metadata(&block)
4
+ metadata do
5
+ tags :upgrade_scenario
6
+ confine do
7
+ feature(:capsule) &&
8
+ (feature(:capsule).current_minor_version == '6.13' || \
9
+ ForemanMaintain.upgrade_in_progress == '6.14')
10
+ end
11
+ instance_eval(&block)
12
+ end
13
+ end
14
+
15
+ def target_version
16
+ '6.14'
17
+ end
18
+ end
19
+
20
+ class PreUpgradeCheck < Abstract
21
+ upgrade_metadata do
22
+ description 'Checks before upgrading to Capsule 6.14'
23
+ tags :pre_upgrade_checks
24
+ run_strategy :fail_slow
25
+ end
26
+
27
+ def compose
28
+ add_steps(find_checks(:default))
29
+ add_steps(find_checks(:pre_upgrade))
30
+ add_step(Checks::Foreman::CheckpointSegments)
31
+ add_step(Checks::Repositories::Validate.new(:version => '6.14'))
32
+ end
33
+ end
34
+
35
+ class PreMigrations < Abstract
36
+ upgrade_metadata do
37
+ description 'Procedures before migrating to Capsule 6.14'
38
+ tags :pre_migrations
39
+ end
40
+
41
+ def compose
42
+ add_steps(find_procedures(:pre_migrations))
43
+ add_step(Procedures::Service::Stop.new)
44
+ end
45
+ end
46
+
47
+ class Migrations < Abstract
48
+ upgrade_metadata do
49
+ description 'Migration scripts to Capsule 6.14'
50
+ tags :migrations
51
+ end
52
+
53
+ def set_context_mapping
54
+ context.map(:assumeyes, Procedures::Installer::Upgrade => :assumeyes)
55
+ end
56
+
57
+ def compose
58
+ add_step(Procedures::Repositories::Setup.new(:version => '6.14'))
59
+ modules_to_enable = ["satellite-capsule:#{el_short_name}"]
60
+ add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
61
+ add_step(Procedures::Packages::UnlockVersions.new)
62
+ add_step(Procedures::Packages::Update.new(:assumeyes => true))
63
+ add_step_with_context(Procedures::Installer::Upgrade)
64
+ end
65
+ end
66
+
67
+ class PostMigrations < Abstract
68
+ upgrade_metadata do
69
+ description 'Procedures after migrating to Capsule 6.14'
70
+ tags :post_migrations
71
+ end
72
+
73
+ def compose
74
+ add_step(Procedures::RefreshFeatures)
75
+ add_step(Procedures::Service::Start.new)
76
+ add_steps(find_procedures(:post_migrations))
77
+ end
78
+ end
79
+
80
+ class PostUpgradeChecks < Abstract
81
+ upgrade_metadata do
82
+ description 'Checks after upgrading to Capsule 6.14'
83
+ tags :post_upgrade_checks
84
+ run_strategy :fail_slow
85
+ end
86
+
87
+ def compose
88
+ add_steps(find_checks(:default))
89
+ add_steps(find_checks(:post_upgrade))
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,92 @@
1
+ module Scenarios::Capsule_6_14_z
2
+ class Abstract < ForemanMaintain::Scenario
3
+ def self.upgrade_metadata(&block)
4
+ metadata do
5
+ tags :upgrade_scenario
6
+ confine do
7
+ feature(:capsule) &&
8
+ (feature(:capsule).current_minor_version == '6.14' || \
9
+ ForemanMaintain.upgrade_in_progress == '6.14.z')
10
+ end
11
+ instance_eval(&block)
12
+ end
13
+ end
14
+
15
+ def target_version
16
+ '6.14.z'
17
+ end
18
+ end
19
+
20
+ class PreUpgradeCheck < Abstract
21
+ upgrade_metadata do
22
+ description 'Checks before upgrading to Capsule 6.14.z'
23
+ tags :pre_upgrade_checks
24
+ run_strategy :fail_slow
25
+ end
26
+
27
+ def compose
28
+ add_steps(find_checks(:default))
29
+ add_steps(find_checks(:pre_upgrade))
30
+ add_step(Checks::Foreman::CheckpointSegments)
31
+ add_step(Checks::Repositories::Validate.new(:version => '6.14'))
32
+ end
33
+ end
34
+
35
+ class PreMigrations < Abstract
36
+ upgrade_metadata do
37
+ description 'Procedures before migrating to Capsule 6.14.z'
38
+ tags :pre_migrations
39
+ end
40
+
41
+ def compose
42
+ add_steps(find_procedures(:pre_migrations))
43
+ add_step(Procedures::Service::Stop.new)
44
+ end
45
+ end
46
+
47
+ class Migrations < Abstract
48
+ upgrade_metadata do
49
+ description 'Migration scripts to Capsule 6.14.z'
50
+ tags :migrations
51
+ end
52
+
53
+ def set_context_mapping
54
+ context.map(:assumeyes, Procedures::Installer::Upgrade => :assumeyes)
55
+ end
56
+
57
+ def compose
58
+ add_step(Procedures::Repositories::Setup.new(:version => '6.14'))
59
+ modules_to_enable = ["satellite-capsule:#{el_short_name}"]
60
+ add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
61
+ add_step(Procedures::Packages::UnlockVersions.new)
62
+ add_step(Procedures::Packages::Update.new(:assumeyes => true))
63
+ add_step_with_context(Procedures::Installer::Upgrade)
64
+ end
65
+ end
66
+
67
+ class PostMigrations < Abstract
68
+ upgrade_metadata do
69
+ description 'Procedures after migrating to Capsule 6.14.z'
70
+ tags :post_migrations
71
+ end
72
+
73
+ def compose
74
+ add_step(Procedures::RefreshFeatures)
75
+ add_step(Procedures::Service::Start.new)
76
+ add_steps(find_procedures(:post_migrations))
77
+ end
78
+ end
79
+
80
+ class PostUpgradeChecks < Abstract
81
+ upgrade_metadata do
82
+ description 'Checks after upgrading to Capsule 6.14.z'
83
+ tags :post_upgrade_checks
84
+ run_strategy :fail_slow
85
+ end
86
+
87
+ def compose
88
+ add_steps(find_checks(:default))
89
+ add_steps(find_checks(:post_upgrade))
90
+ end
91
+ end
92
+ end
@@ -76,7 +76,6 @@ module Scenarios::Satellite_6_13
76
76
  add_step(Procedures::RefreshFeatures)
77
77
  add_step(Procedures::Service::Start.new)
78
78
  add_step(Procedures::Pulpcore::TrimRpmChangelogs.new)
79
- add_step(Procedures::Pulpcore::ContainerRepairMediaType.new)
80
79
  add_steps(find_procedures(:post_migrations))
81
80
  end
82
81
  end
@@ -0,0 +1,94 @@
1
+ module Scenarios::Satellite_6_14
2
+ class Abstract < ForemanMaintain::Scenario
3
+ def self.upgrade_metadata(&block)
4
+ metadata do
5
+ tags :upgrade_scenario
6
+ confine do
7
+ feature(:satellite) &&
8
+ (feature(:satellite).current_minor_version == '6.13' || \
9
+ ForemanMaintain.upgrade_in_progress == '6.14')
10
+ end
11
+ instance_eval(&block)
12
+ end
13
+ end
14
+
15
+ def target_version
16
+ '6.14'
17
+ end
18
+ end
19
+
20
+ class PreUpgradeCheck < Abstract
21
+ upgrade_metadata do
22
+ description 'Checks before upgrading to Satellite 6.14'
23
+ tags :pre_upgrade_checks
24
+ run_strategy :fail_slow
25
+ end
26
+
27
+ def compose
28
+ add_steps(find_checks(:default))
29
+ add_steps(find_checks(:pre_upgrade))
30
+ add_step(Checks::Foreman::CheckpointSegments)
31
+ add_step(Checks::Repositories::Validate.new(:version => '6.14'))
32
+ end
33
+ end
34
+
35
+ class PreMigrations < Abstract
36
+ upgrade_metadata do
37
+ description 'Procedures before migrating to Satellite 6.14'
38
+ tags :pre_migrations
39
+ end
40
+
41
+ def compose
42
+ add_steps(find_procedures(:pre_migrations))
43
+ add_step(Procedures::Service::Stop.new)
44
+ end
45
+ end
46
+
47
+ class Migrations < Abstract
48
+ upgrade_metadata do
49
+ description 'Migration scripts to Satellite 6.14'
50
+ tags :migrations
51
+ run_strategy :fail_fast
52
+ end
53
+
54
+ def set_context_mapping
55
+ context.map(:assumeyes, Procedures::Installer::Upgrade => :assumeyes)
56
+ end
57
+
58
+ def compose
59
+ add_step(Procedures::Repositories::Setup.new(:version => '6.14'))
60
+ modules_to_enable = ["satellite:#{el_short_name}"]
61
+ add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
62
+ add_step(Procedures::Packages::UnlockVersions.new)
63
+ add_step(Procedures::Packages::Update.new(:assumeyes => true))
64
+ add_step_with_context(Procedures::Installer::Upgrade)
65
+ add_step(Procedures::Installer::UpgradeRakeTask)
66
+ end
67
+ end
68
+
69
+ class PostMigrations < Abstract
70
+ upgrade_metadata do
71
+ description 'Procedures after migrating to Satellite 6.14'
72
+ tags :post_migrations
73
+ end
74
+
75
+ def compose
76
+ add_step(Procedures::RefreshFeatures)
77
+ add_step(Procedures::Service::Start.new)
78
+ add_steps(find_procedures(:post_migrations))
79
+ end
80
+ end
81
+
82
+ class PostUpgradeChecks < Abstract
83
+ upgrade_metadata do
84
+ description 'Checks after upgrading to Satellite 6.14'
85
+ tags :post_upgrade_checks
86
+ run_strategy :fail_slow
87
+ end
88
+
89
+ def compose
90
+ add_steps(find_checks(:default))
91
+ add_steps(find_checks(:post_upgrade))
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,93 @@
1
+ module Scenarios::Satellite_6_14_z
2
+ class Abstract < ForemanMaintain::Scenario
3
+ def self.upgrade_metadata(&block)
4
+ metadata do
5
+ tags :upgrade_scenario
6
+ confine do
7
+ feature(:satellite) &&
8
+ (feature(:satellite).current_minor_version == '6.14' || \
9
+ ForemanMaintain.upgrade_in_progress == '6.14.z')
10
+ end
11
+ instance_eval(&block)
12
+ end
13
+ end
14
+
15
+ def target_version
16
+ '6.14.z'
17
+ end
18
+ end
19
+
20
+ class PreUpgradeCheck < Abstract
21
+ upgrade_metadata do
22
+ description 'Checks before upgrading to Satellite 6.14.z'
23
+ tags :pre_upgrade_checks
24
+ run_strategy :fail_slow
25
+ end
26
+
27
+ def compose
28
+ add_steps(find_checks(:default))
29
+ add_steps(find_checks(:pre_upgrade))
30
+ add_step(Checks::Foreman::CheckpointSegments)
31
+ add_step(Checks::Repositories::Validate.new(:version => '6.14'))
32
+ end
33
+ end
34
+
35
+ class PreMigrations < Abstract
36
+ upgrade_metadata do
37
+ description 'Procedures before migrating to Satellite 6.14.z'
38
+ tags :pre_migrations
39
+ end
40
+
41
+ def compose
42
+ add_steps(find_procedures(:pre_migrations))
43
+ add_step(Procedures::Service::Stop.new)
44
+ end
45
+ end
46
+
47
+ class Migrations < Abstract
48
+ upgrade_metadata do
49
+ description 'Migration scripts to Satellite 6.14.z'
50
+ tags :migrations
51
+ end
52
+
53
+ def set_context_mapping
54
+ context.map(:assumeyes, Procedures::Installer::Upgrade => :assumeyes)
55
+ end
56
+
57
+ def compose
58
+ add_step(Procedures::Repositories::Setup.new(:version => '6.14'))
59
+ modules_to_enable = ["satellite:#{el_short_name}"]
60
+ add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
61
+ add_step(Procedures::Packages::UnlockVersions.new)
62
+ add_step(Procedures::Packages::Update.new(:assumeyes => true))
63
+ add_step_with_context(Procedures::Installer::Upgrade)
64
+ add_step(Procedures::Installer::UpgradeRakeTask)
65
+ end
66
+ end
67
+
68
+ class PostMigrations < Abstract
69
+ upgrade_metadata do
70
+ description 'Procedures after migrating to Satellite 6.14.z'
71
+ tags :post_migrations
72
+ end
73
+
74
+ def compose
75
+ add_step(Procedures::RefreshFeatures)
76
+ add_step(Procedures::Service::Start.new)
77
+ add_steps(find_procedures(:post_migrations))
78
+ end
79
+ end
80
+
81
+ class PostUpgradeChecks < Abstract
82
+ upgrade_metadata do
83
+ description 'Checks after upgrading to Satellite 6.14.z'
84
+ tags :post_upgrade_checks
85
+ run_strategy :fail_slow
86
+ end
87
+
88
+ def compose
89
+ add_steps(find_checks(:default))
90
+ add_steps(find_checks(:post_upgrade))
91
+ end
92
+ end
93
+ end
@@ -68,7 +68,7 @@ module ForemanMaintain::PackageManager
68
68
  end
69
69
 
70
70
  def check_update(packages: nil, with_status: false)
71
- yum_action('check-update', packages, :assumeyes => true, :valid_exit_statuses => [0, 100],
71
+ yum_action('check-update', packages, :assumeyes => true, :valid_exit_statuses => [100],
72
72
  :with_status => with_status)
73
73
  end
74
74
 
@@ -337,18 +337,6 @@ module ForemanMaintain
337
337
  def online_backup?
338
338
  !!metadata.fetch('online', false)
339
339
  end
340
-
341
- def installed_rpms
342
- metadata.fetch('rpms', metadata.fetch(:rpms, []))
343
- end
344
-
345
- def with_puppetserver?
346
- installed_rpms.any? { |rpm| rpm.start_with?('puppetserver-') }
347
- end
348
-
349
- def with_qpidd?
350
- installed_rpms.any? { |rpm| rpm.start_with?('qpid-cpp-server-') }
351
- end
352
340
  end
353
341
  end
354
342
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanMaintain
2
- VERSION = '1.2.12'.freeze
2
+ VERSION = '1.3.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_maintain
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.12
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-15 00:00:00.000000000 Z
11
+ date: 2023-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp
@@ -300,7 +300,6 @@ files:
300
300
  - definitions/procedures/pulp/migrate.rb
301
301
  - definitions/procedures/pulp/print_remove_instructions.rb
302
302
  - definitions/procedures/pulp/remove.rb
303
- - definitions/procedures/pulpcore/container_repair_media_type.rb
304
303
  - definitions/procedures/pulpcore/migrate.rb
305
304
  - definitions/procedures/pulpcore/trim_rpm_changelogs.rb
306
305
  - definitions/procedures/puppet/delete_empty_ca_cert_request_files.rb
@@ -326,7 +325,6 @@ files:
326
325
  - definitions/procedures/restore/pulpcore_dump.rb
327
326
  - definitions/procedures/restore/regenerate_queues.rb
328
327
  - definitions/procedures/restore/reindex_databases.rb
329
- - definitions/procedures/restore/required_packages.rb
330
328
  - definitions/procedures/selinux/set_file_security.rb
331
329
  - definitions/procedures/service/base.rb
332
330
  - definitions/procedures/service/daemon_reload.rb
@@ -356,6 +354,8 @@ files:
356
354
  - definitions/scenarios/upgrade_to_capsule_6_12_z.rb
357
355
  - definitions/scenarios/upgrade_to_capsule_6_13.rb
358
356
  - definitions/scenarios/upgrade_to_capsule_6_13_z.rb
357
+ - definitions/scenarios/upgrade_to_capsule_6_14.rb
358
+ - definitions/scenarios/upgrade_to_capsule_6_14_z.rb
359
359
  - definitions/scenarios/upgrade_to_capsule_6_8.rb
360
360
  - definitions/scenarios/upgrade_to_capsule_6_8_z.rb
361
361
  - definitions/scenarios/upgrade_to_capsule_6_9.rb
@@ -370,6 +370,8 @@ files:
370
370
  - definitions/scenarios/upgrade_to_satellite_6_12_z.rb
371
371
  - definitions/scenarios/upgrade_to_satellite_6_13.rb
372
372
  - definitions/scenarios/upgrade_to_satellite_6_13_z.rb
373
+ - definitions/scenarios/upgrade_to_satellite_6_14.rb
374
+ - definitions/scenarios/upgrade_to_satellite_6_14_z.rb
373
375
  - definitions/scenarios/upgrade_to_satellite_6_2.rb
374
376
  - definitions/scenarios/upgrade_to_satellite_6_2_z.rb
375
377
  - definitions/scenarios/upgrade_to_satellite_6_3.rb
@@ -498,7 +500,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
498
500
  - !ruby/object:Gem::Version
499
501
  version: '0'
500
502
  requirements: []
501
- rubygems_version: 3.4.10
503
+ rubygems_version: 3.2.33
502
504
  signing_key:
503
505
  specification_version: 4
504
506
  summary: Foreman maintenance tool belt
@@ -1,23 +0,0 @@
1
- module Procedures::Pulpcore
2
- class ContainerRepairMediaType < ForemanMaintain::Procedure
3
- include ForemanMaintain::Concerns::SystemService
4
-
5
- metadata do
6
- description 'Repair container media type in the pulpcore db'
7
- for_feature :pulpcore
8
- end
9
-
10
- def run
11
- with_spinner('Repairing container media type in the pulpcore db') do |spinner|
12
- necessary_services = feature(:pulpcore_database).services
13
-
14
- feature(:service).handle_services(spinner, 'start', :only => necessary_services)
15
-
16
- spinner.update('Repairing container media type')
17
- execute!('PULP_SETTINGS=/etc/pulp/settings.py '\
18
- 'DJANGO_SETTINGS_MODULE=pulpcore.app.settings '\
19
- 'pulpcore-manager container-repair-media-type')
20
- end
21
- end
22
- end
23
- end
@@ -1,23 +0,0 @@
1
- module Procedures::Restore
2
- class RequiredPackages < ForemanMaintain::Procedure
3
- metadata do
4
- description 'Ensure required packages are installed before restore'
5
-
6
- param :backup_dir,
7
- 'Path to backup directory',
8
- :required => true
9
- end
10
-
11
- def run
12
- backup = ForemanMaintain::Utils::Backup.new(@backup_dir)
13
- required_packages = []
14
- required_packages << 'puppetserver' if backup.with_puppetserver?
15
- required_packages << 'qpid-cpp-server' if backup.with_qpidd?
16
- if required_packages.any?
17
- with_spinner('Installing required packages') do
18
- ForemanMaintain.package_manager.install(required_packages, assumeyes: true)
19
- end
20
- end
21
- end
22
- end
23
- end