foreman_maintain 1.3.4 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/definitions/procedures/backup/offline/candlepin_db.rb +2 -1
- data/definitions/procedures/backup/offline/foreman_db.rb +2 -0
- data/definitions/procedures/backup/offline/pulpcore_db.rb +2 -1
- data/definitions/scenarios/{upgrade_to_capsule_6_14_z.rb → upgrade_to_capsule_6_15.rb} +10 -10
- data/definitions/scenarios/{upgrade_to_capsule_6_14.rb → upgrade_to_capsule_6_15_z.rb} +11 -11
- data/definitions/scenarios/{upgrade_to_satellite_6_14_z.rb → upgrade_to_satellite_6_15.rb} +11 -10
- data/definitions/scenarios/{upgrade_to_satellite_6_14.rb → upgrade_to_satellite_6_15_z.rb} +11 -12
- data/lib/foreman_maintain/concerns/base_database.rb +2 -1
- data/lib/foreman_maintain/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8e76b84acb5103032daf0a4207f4c53a7d425fffe2fbfce49273200e3f5a732
|
4
|
+
data.tar.gz: a91160e10024846b1b931515e55c6461aba0c2c3b5209a966fb9c43685b3eea5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 005d201ea441c1e1ecdd51838f76f9157357a332cb025ba6ea9fe835bff604d601b259ca374d8cf32118ab12203bea2dfc490d959127dee1f92768a684fb0e0f
|
7
|
+
data.tar.gz: f51b31aa841554becdf0e3904c1a9d5259bd0d7691a83240b99f731320335ad20ee5428fc5c02267bf41ec50bd4f0e87bce2e7fcb9cec0f068ea4c03b04e1cac
|
@@ -36,7 +36,8 @@ module Procedures::Backup
|
|
36
36
|
pg_backup_file,
|
37
37
|
:listed_incremental => File.join(@backup_dir, '.postgres.snar'),
|
38
38
|
:volume_size => @tar_volume_size,
|
39
|
-
:data_dir => pg_data_dir
|
39
|
+
:data_dir => pg_data_dir,
|
40
|
+
:restore_dir => feature(:candlepin_database).data_dir
|
40
41
|
)
|
41
42
|
end
|
42
43
|
end
|
@@ -39,11 +39,13 @@ module Procedures::Backup
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def do_backup(pg_dir, cmd)
|
42
|
+
restore_dir = el? ? feature(:foreman_database).data_dir : pg_dir
|
42
43
|
feature(:foreman_database).backup_local(
|
43
44
|
pg_backup_file,
|
44
45
|
:listed_incremental => File.join(@backup_dir, '.postgres.snar'),
|
45
46
|
:volume_size => @tar_volume_size,
|
46
47
|
:data_dir => pg_dir,
|
48
|
+
:restore_dir => restore_dir,
|
47
49
|
:command => cmd
|
48
50
|
)
|
49
51
|
end
|
@@ -36,7 +36,8 @@ module Procedures::Backup
|
|
36
36
|
pg_backup_file,
|
37
37
|
:listed_incremental => File.join(@backup_dir, '.postgres.snar'),
|
38
38
|
:volume_size => @tar_volume_size,
|
39
|
-
:data_dir => pg_data_dir
|
39
|
+
:data_dir => pg_data_dir,
|
40
|
+
:restore_dir => feature(:pulpcore_database).data_dir
|
40
41
|
)
|
41
42
|
end
|
42
43
|
end
|
@@ -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
|
@@ -28,13 +28,13 @@ module Scenarios::Capsule_6_14_z
|
|
28
28
|
add_steps(find_checks(:default))
|
29
29
|
add_steps(find_checks(:pre_upgrade))
|
30
30
|
add_step(Checks::Foreman::CheckpointSegments)
|
31
|
-
add_step(Checks::Repositories::Validate.new(:version => '6.
|
31
|
+
add_step(Checks::Repositories::Validate.new(:version => '6.15'))
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
class PreMigrations < Abstract
|
36
36
|
upgrade_metadata do
|
37
|
-
description 'Procedures before migrating to Capsule 6.
|
37
|
+
description 'Procedures before migrating to Capsule 6.15'
|
38
38
|
tags :pre_migrations
|
39
39
|
end
|
40
40
|
|
@@ -45,7 +45,7 @@ module Scenarios::Capsule_6_14_z
|
|
45
45
|
|
46
46
|
class Migrations < Abstract
|
47
47
|
upgrade_metadata do
|
48
|
-
description 'Migration scripts to Capsule 6.
|
48
|
+
description 'Migration scripts to Capsule 6.15'
|
49
49
|
tags :migrations
|
50
50
|
end
|
51
51
|
|
@@ -54,7 +54,7 @@ module Scenarios::Capsule_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-capsule:#{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,
|
@@ -67,7 +67,7 @@ module Scenarios::Capsule_6_14_z
|
|
67
67
|
|
68
68
|
class PostMigrations < Abstract
|
69
69
|
upgrade_metadata do
|
70
|
-
description 'Procedures after migrating to Capsule 6.
|
70
|
+
description 'Procedures after migrating to Capsule 6.15'
|
71
71
|
tags :post_migrations
|
72
72
|
end
|
73
73
|
|
@@ -80,7 +80,7 @@ module Scenarios::Capsule_6_14_z
|
|
80
80
|
|
81
81
|
class PostUpgradeChecks < Abstract
|
82
82
|
upgrade_metadata do
|
83
|
-
description 'Checks after upgrading to Capsule 6.
|
83
|
+
description 'Checks after upgrading to Capsule 6.15'
|
84
84
|
tags :post_upgrade_checks
|
85
85
|
run_strategy :fail_slow
|
86
86
|
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
|
@@ -28,13 +28,13 @@ module Scenarios::Capsule_6_14
|
|
28
28
|
add_steps(find_checks(:default))
|
29
29
|
add_steps(find_checks(:pre_upgrade))
|
30
30
|
add_step(Checks::Foreman::CheckpointSegments)
|
31
|
-
add_step(Checks::Repositories::Validate.new(:version => '6.
|
31
|
+
add_step(Checks::Repositories::Validate.new(:version => '6.15'))
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
class PreMigrations < Abstract
|
36
36
|
upgrade_metadata do
|
37
|
-
description 'Procedures before migrating to Capsule 6.
|
37
|
+
description 'Procedures before migrating to Capsule 6.15.z'
|
38
38
|
tags :pre_migrations
|
39
39
|
end
|
40
40
|
|
@@ -45,7 +45,7 @@ module Scenarios::Capsule_6_14
|
|
45
45
|
|
46
46
|
class Migrations < Abstract
|
47
47
|
upgrade_metadata do
|
48
|
-
description 'Migration scripts to Capsule 6.
|
48
|
+
description 'Migration scripts to Capsule 6.15.z'
|
49
49
|
tags :migrations
|
50
50
|
end
|
51
51
|
|
@@ -54,7 +54,7 @@ module Scenarios::Capsule_6_14
|
|
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-capsule:#{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,
|
@@ -67,7 +67,7 @@ module Scenarios::Capsule_6_14
|
|
67
67
|
|
68
68
|
class PostMigrations < Abstract
|
69
69
|
upgrade_metadata do
|
70
|
-
description 'Procedures after migrating to Capsule 6.
|
70
|
+
description 'Procedures after migrating to Capsule 6.15.z'
|
71
71
|
tags :post_migrations
|
72
72
|
end
|
73
73
|
|
@@ -80,7 +80,7 @@ module Scenarios::Capsule_6_14
|
|
80
80
|
|
81
81
|
class PostUpgradeChecks < Abstract
|
82
82
|
upgrade_metadata do
|
83
|
-
description 'Checks after upgrading to Capsule 6.
|
83
|
+
description 'Checks after upgrading to Capsule 6.15.z'
|
84
84
|
tags :post_upgrade_checks
|
85
85
|
run_strategy :fail_slow
|
86
86
|
end
|
@@ -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
|
@@ -28,13 +28,13 @@ module Scenarios::Satellite_6_14_z
|
|
28
28
|
add_steps(find_checks(:default))
|
29
29
|
add_steps(find_checks(:pre_upgrade))
|
30
30
|
add_step(Checks::Foreman::CheckpointSegments)
|
31
|
-
add_step(Checks::Repositories::Validate.new(:version => '6.
|
31
|
+
add_step(Checks::Repositories::Validate.new(:version => '6.15'))
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
class PreMigrations < Abstract
|
36
36
|
upgrade_metadata do
|
37
|
-
description 'Procedures before migrating to Satellite 6.
|
37
|
+
description 'Procedures before migrating to Satellite 6.15'
|
38
38
|
tags :pre_migrations
|
39
39
|
end
|
40
40
|
|
@@ -45,8 +45,9 @@ module Scenarios::Satellite_6_14_z
|
|
45
45
|
|
46
46
|
class Migrations < Abstract
|
47
47
|
upgrade_metadata do
|
48
|
-
description 'Migration scripts to Satellite 6.
|
48
|
+
description 'Migration scripts to Satellite 6.15'
|
49
49
|
tags :migrations
|
50
|
+
run_strategy :fail_fast
|
50
51
|
end
|
51
52
|
|
52
53
|
def set_context_mapping
|
@@ -54,7 +55,7 @@ module Scenarios::Satellite_6_14_z
|
|
54
55
|
end
|
55
56
|
|
56
57
|
def compose
|
57
|
-
add_step(Procedures::Repositories::Setup.new(:version => '6.
|
58
|
+
add_step(Procedures::Repositories::Setup.new(:version => '6.15'))
|
58
59
|
modules_to_enable = ["satellite:#{el_short_name}"]
|
59
60
|
add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
|
60
61
|
add_step(Procedures::Packages::Update.new(:assumeyes => true,
|
@@ -68,7 +69,7 @@ module Scenarios::Satellite_6_14_z
|
|
68
69
|
|
69
70
|
class PostMigrations < Abstract
|
70
71
|
upgrade_metadata do
|
71
|
-
description 'Procedures after migrating to Satellite 6.
|
72
|
+
description 'Procedures after migrating to Satellite 6.15'
|
72
73
|
tags :post_migrations
|
73
74
|
end
|
74
75
|
|
@@ -81,7 +82,7 @@ module Scenarios::Satellite_6_14_z
|
|
81
82
|
|
82
83
|
class PostUpgradeChecks < Abstract
|
83
84
|
upgrade_metadata do
|
84
|
-
description 'Checks after upgrading to Satellite 6.
|
85
|
+
description 'Checks after upgrading to Satellite 6.15'
|
85
86
|
tags :post_upgrade_checks
|
86
87
|
run_strategy :fail_slow
|
87
88
|
end
|
@@ -1,25 +1,25 @@
|
|
1
|
-
module Scenarios::
|
1
|
+
module Scenarios::Satellite_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(:satellite) &&
|
8
|
-
(feature(:satellite).current_minor_version == '6.
|
9
|
-
ForemanMaintain.upgrade_in_progress == '6.
|
8
|
+
(feature(:satellite).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 Satellite 6.
|
22
|
+
description 'Checks before upgrading to Satellite 6.15.z'
|
23
23
|
tags :pre_upgrade_checks
|
24
24
|
run_strategy :fail_slow
|
25
25
|
end
|
@@ -28,13 +28,13 @@ module Scenarios::Satellite_6_14
|
|
28
28
|
add_steps(find_checks(:default))
|
29
29
|
add_steps(find_checks(:pre_upgrade))
|
30
30
|
add_step(Checks::Foreman::CheckpointSegments)
|
31
|
-
add_step(Checks::Repositories::Validate.new(:version => '6.
|
31
|
+
add_step(Checks::Repositories::Validate.new(:version => '6.15'))
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
class PreMigrations < Abstract
|
36
36
|
upgrade_metadata do
|
37
|
-
description 'Procedures before migrating to Satellite 6.
|
37
|
+
description 'Procedures before migrating to Satellite 6.15.z'
|
38
38
|
tags :pre_migrations
|
39
39
|
end
|
40
40
|
|
@@ -45,9 +45,8 @@ module Scenarios::Satellite_6_14
|
|
45
45
|
|
46
46
|
class Migrations < Abstract
|
47
47
|
upgrade_metadata do
|
48
|
-
description 'Migration scripts to Satellite 6.
|
48
|
+
description 'Migration scripts to Satellite 6.15.z'
|
49
49
|
tags :migrations
|
50
|
-
run_strategy :fail_fast
|
51
50
|
end
|
52
51
|
|
53
52
|
def set_context_mapping
|
@@ -55,7 +54,7 @@ module Scenarios::Satellite_6_14
|
|
55
54
|
end
|
56
55
|
|
57
56
|
def compose
|
58
|
-
add_step(Procedures::Repositories::Setup.new(:version => '6.
|
57
|
+
add_step(Procedures::Repositories::Setup.new(:version => '6.15'))
|
59
58
|
modules_to_enable = ["satellite:#{el_short_name}"]
|
60
59
|
add_step(Procedures::Packages::EnableModules.new(:module_names => modules_to_enable))
|
61
60
|
add_step(Procedures::Packages::Update.new(:assumeyes => true,
|
@@ -69,7 +68,7 @@ module Scenarios::Satellite_6_14
|
|
69
68
|
|
70
69
|
class PostMigrations < Abstract
|
71
70
|
upgrade_metadata do
|
72
|
-
description 'Procedures after migrating to Satellite 6.
|
71
|
+
description 'Procedures after migrating to Satellite 6.15.z'
|
73
72
|
tags :post_migrations
|
74
73
|
end
|
75
74
|
|
@@ -82,7 +81,7 @@ module Scenarios::Satellite_6_14
|
|
82
81
|
|
83
82
|
class PostUpgradeChecks < Abstract
|
84
83
|
upgrade_metadata do
|
85
|
-
description 'Checks after upgrading to Satellite 6.
|
84
|
+
description 'Checks after upgrading to Satellite 6.15.z'
|
86
85
|
tags :post_upgrade_checks
|
87
86
|
run_strategy :fail_slow
|
88
87
|
end
|
@@ -101,13 +101,14 @@ module ForemanMaintain
|
|
101
101
|
|
102
102
|
def backup_local(backup_file, extra_tar_options = {})
|
103
103
|
dir = extra_tar_options.fetch(:data_dir, data_dir)
|
104
|
+
restore_dir = extra_tar_options.fetch(:restore_dir, data_dir)
|
104
105
|
command = extra_tar_options.fetch(:command, 'create')
|
105
106
|
|
106
107
|
FileUtils.cd(dir) do
|
107
108
|
tar_options = {
|
108
109
|
:archive => backup_file,
|
109
110
|
:command => command,
|
110
|
-
:transform => "s,^,#{
|
111
|
+
:transform => "s,^,#{restore_dir[1..]},S",
|
111
112
|
:files => '*',
|
112
113
|
}.merge(extra_tar_options)
|
113
114
|
feature(:tar).run(tar_options)
|
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.
|
4
|
+
version: 1.4.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-
|
11
|
+
date: 2023-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -332,12 +332,12 @@ files:
|
|
332
332
|
- definitions/scenarios/restore.rb
|
333
333
|
- definitions/scenarios/self_upgrade.rb
|
334
334
|
- definitions/scenarios/services.rb
|
335
|
-
- definitions/scenarios/
|
336
|
-
- definitions/scenarios/
|
335
|
+
- definitions/scenarios/upgrade_to_capsule_6_15.rb
|
336
|
+
- definitions/scenarios/upgrade_to_capsule_6_15_z.rb
|
337
337
|
- definitions/scenarios/upgrade_to_foreman_nightly.rb
|
338
338
|
- definitions/scenarios/upgrade_to_katello_nightly.rb
|
339
|
-
- definitions/scenarios/
|
340
|
-
- definitions/scenarios/
|
339
|
+
- definitions/scenarios/upgrade_to_satellite_6_15.rb
|
340
|
+
- definitions/scenarios/upgrade_to_satellite_6_15_z.rb
|
341
341
|
- extras/foreman-maintain.sh
|
342
342
|
- extras/foreman_protector/dnf/foreman-protector.py
|
343
343
|
- extras/foreman_protector/foreman-protector.conf
|