foreman_maintain 1.7.4 → 1.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/definitions/features/pulpcore.rb +2 -2
- data/lib/foreman_maintain/update_runner.rb +22 -3
- data/lib/foreman_maintain/upgrade_runner.rb +0 -1
- data/lib/foreman_maintain/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22d0abf16f40a1448c08bbcc3841e1347d27ffe2e7da598e05dd27a3c565de49
|
4
|
+
data.tar.gz: b3b19431311ac39014e8679653bcb61c055cf46f4cc867158cc1222485986ebd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6534adf54060798589ef949490e03d43ef58525b6cf6818a0b55c9f1c909bd29b6cd8db3909e0961efaf3357b6148ef868b75713c15bd1b85ab7729c7b2331c9
|
7
|
+
data.tar.gz: 53173b1621d5ced84e12eeffb80a03fb5d808dd92ed2f29585439506312e382600cfc25a53c799a692344513de27fe313c5bda1717b17304ef27068909627664
|
data/README.md
CHANGED
@@ -20,7 +20,6 @@ Subcommands:
|
|
20
20
|
check --target-version TARGET_VERSION Run pre-upgrade checks for upgrading to specified version
|
21
21
|
--disable-self-upgrade Disable automatic self upgrade (default: false)
|
22
22
|
run --target-version TARGET_VERSION Run the full upgrade
|
23
|
-
[--phase=phase TARGET_VERSION] Run just a specific phase of the upgrade
|
24
23
|
--disable-self-upgrade Disable automatic self upgrade (default: false)
|
25
24
|
|
26
25
|
advanced Advanced tools for server maintenance
|
@@ -68,8 +68,8 @@ class Features::Pulpcore < ForemanMaintain::Feature
|
|
68
68
|
|
69
69
|
def self.pulpcore_common_services
|
70
70
|
[
|
71
|
-
ForemanMaintain::Utils.system_service('pulpcore-api',
|
72
|
-
ForemanMaintain::Utils.system_service('pulpcore-content',
|
71
|
+
ForemanMaintain::Utils.system_service('pulpcore-api', 20, :socket => 'pulpcore-api'),
|
72
|
+
ForemanMaintain::Utils.system_service('pulpcore-content', 20, :socket => 'pulpcore-content'),
|
73
73
|
]
|
74
74
|
end
|
75
75
|
end
|
@@ -36,7 +36,11 @@ module ForemanMaintain
|
|
36
36
|
PHASES.each do |phase|
|
37
37
|
return run_rollback if quit?
|
38
38
|
|
39
|
-
|
39
|
+
if skip?(phase)
|
40
|
+
skip_phase(phase)
|
41
|
+
else
|
42
|
+
run_phase(phase)
|
43
|
+
end
|
40
44
|
end
|
41
45
|
|
42
46
|
finish_update unless quit?
|
@@ -90,12 +94,22 @@ module ForemanMaintain
|
|
90
94
|
@ask_to_confirm_update = phase == :pre_update_checks
|
91
95
|
end
|
92
96
|
|
97
|
+
def skip_phase(skipped_phase)
|
98
|
+
with_non_empty_scenario(skipped_phase) do |scenario|
|
99
|
+
@reporter.before_scenario_starts(scenario)
|
100
|
+
@reporter.puts <<~MESSAGE
|
101
|
+
Skipping #{skipped_phase} phase as it was already run before.
|
102
|
+
MESSAGE
|
103
|
+
@reporter.after_scenario_finishes(scenario)
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
93
107
|
private
|
94
108
|
|
95
109
|
def rollback_pre_migrations
|
96
110
|
raise "Unexpected phase #{phase}, expecting pre_migrations" unless phase == :pre_migrations
|
97
111
|
|
98
|
-
rollback_needed =
|
112
|
+
rollback_needed = find_scenario(:pre_migrations).steps.any? { |s| s.executed? && s.success? }
|
99
113
|
if rollback_needed
|
100
114
|
@quit = false
|
101
115
|
# prevent the unnecessary confirmation questions
|
@@ -110,7 +124,7 @@ module ForemanMaintain
|
|
110
124
|
end
|
111
125
|
|
112
126
|
def with_non_empty_scenario(phase)
|
113
|
-
next_scenario =
|
127
|
+
next_scenario = find_scenario(phase)
|
114
128
|
unless next_scenario.nil? || next_scenario.steps.empty?
|
115
129
|
yield next_scenario
|
116
130
|
end
|
@@ -153,6 +167,11 @@ module ForemanMaintain
|
|
153
167
|
@ask_to_confirm_update = false
|
154
168
|
end
|
155
169
|
|
170
|
+
def skip?(next_phase)
|
171
|
+
# the next_phase was run before the current phase
|
172
|
+
PHASES.index(next_phase) < PHASES.index(phase)
|
173
|
+
end
|
174
|
+
|
156
175
|
def phase=(phase)
|
157
176
|
raise "Unknown phase #{phase}" unless PHASES.include?(phase)
|
158
177
|
|
@@ -137,7 +137,6 @@ module ForemanMaintain
|
|
137
137
|
@reporter.before_scenario_starts(scenario)
|
138
138
|
@reporter.puts <<~MESSAGE
|
139
139
|
Skipping #{skipped_phase} phase as it was already run before.
|
140
|
-
To enforce to run the phase, use `upgrade run --phase #{skipped_phase}`
|
141
140
|
MESSAGE
|
142
141
|
@reporter.after_scenario_finishes(scenario)
|
143
142
|
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.7.
|
4
|
+
version: 1.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Nečas
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -410,7 +410,7 @@ homepage: https://github.com/theforeman/foreman_maintain
|
|
410
410
|
licenses:
|
411
411
|
- GPL-3.0
|
412
412
|
metadata: {}
|
413
|
-
post_install_message:
|
413
|
+
post_install_message:
|
414
414
|
rdoc_options: []
|
415
415
|
require_paths:
|
416
416
|
- lib
|
@@ -429,7 +429,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
429
429
|
version: '0'
|
430
430
|
requirements: []
|
431
431
|
rubygems_version: 3.3.27
|
432
|
-
signing_key:
|
432
|
+
signing_key:
|
433
433
|
specification_version: 4
|
434
434
|
summary: Foreman maintenance tool belt
|
435
435
|
test_files: []
|