foreman_maintain 1.13.10 → 1.13.11
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d48f2e58ab16af4747e31fb70a1708573abf8c1837a0942710455e3ec34a4026
|
|
4
|
+
data.tar.gz: c633d8b1721f6e3b29c03d324615b422f9e90dc524492ea5bf18d0b17f0caa90
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8ada0f1c1cca6a127c32b6c879848e1ad3258eb8c72c60b1d17dc0d32c1adfc496eba7ea987942adba0e3fca0c54cba916bff79d6e8423eb3c83f2014074d209
|
|
7
|
+
data.tar.gz: 4445dee86243d7457887eeadf36a55b40ec34e640d958e8adddf77621cc82e8cc3a1df57c640f718fc69e3c1a698f231f4e12fb019cf4f18e17895d5b6c644a5
|
|
@@ -3,14 +3,20 @@ module Procedures::Pulpcore
|
|
|
3
3
|
include ForemanMaintain::Concerns::PulpCommon
|
|
4
4
|
|
|
5
5
|
metadata do
|
|
6
|
-
description '
|
|
6
|
+
description 'Run Pulp RPM data repair commands'
|
|
7
7
|
for_feature :pulpcore
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
def run
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
# Fix package_signing_fingerprint empty strings (SAT-42632 / PULP-1263)
|
|
12
|
+
# Do not fail if unavailable
|
|
13
|
+
with_spinner('Running pulpcore-manager rpm-datarepair 4007') do |spinner|
|
|
14
|
+
exit_status, output = execute_with_status(pulpcore_manager('rpm-datarepair 4007'))
|
|
15
|
+
if exit_status != 0 && output.include?("Unknown issue: '4007'")
|
|
16
|
+
spinner.update('Skipped pulpcore-manager rpm-datarepair 4007, not available')
|
|
17
|
+
elsif exit_status != 0
|
|
18
|
+
fail!(output)
|
|
19
|
+
end
|
|
14
20
|
end
|
|
15
21
|
end
|
|
16
22
|
end
|
|
@@ -4,7 +4,10 @@ module ForemanMaintain::Scenarios
|
|
|
4
4
|
include ForemanMaintain::Concerns::Versions
|
|
5
5
|
|
|
6
6
|
def target_version
|
|
7
|
-
|
|
7
|
+
@target_version ||= begin
|
|
8
|
+
v = Gem::Version.new(feature(:instance).target_version)
|
|
9
|
+
"#{v.segments[0]}.#{v.segments[1] + 1}"
|
|
10
|
+
end
|
|
8
11
|
end
|
|
9
12
|
|
|
10
13
|
def current_version
|
|
@@ -39,19 +42,30 @@ module ForemanMaintain::Scenarios
|
|
|
39
42
|
true
|
|
40
43
|
end
|
|
41
44
|
|
|
45
|
+
def maintain_version
|
|
46
|
+
@maintain_version ||= feature(:instance).target_version
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def current_major
|
|
50
|
+
Gem::Version.new(current_version).segments[0..1].join('.')
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def upgrade_repo_version
|
|
54
|
+
Gem::Version.new(current_version).bump.segments[0..1].join('.')
|
|
55
|
+
end
|
|
56
|
+
|
|
42
57
|
def req_repos_to_update_pkgs
|
|
58
|
+
version = upgrade_repo_version
|
|
43
59
|
if use_rhsm?
|
|
44
|
-
main_rh_repos + [maintenance_repo_id(
|
|
60
|
+
main_rh_repos + [maintenance_repo_id(version)]
|
|
45
61
|
else
|
|
46
|
-
[maintenance_repo_id(
|
|
62
|
+
[maintenance_repo_id(version)]
|
|
47
63
|
end
|
|
48
64
|
end
|
|
49
65
|
|
|
50
66
|
def self_upgrade_allowed?
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
Gem::Version.new(current_version).segments[0..1].join('.') == target ||
|
|
54
|
-
Gem::Version.new(current_version).bump.segments[0..1].join('.') == target
|
|
67
|
+
current_major == maintain_version ||
|
|
68
|
+
Gem::Version.new(current_version).bump.segments[0..1].join('.') == maintain_version
|
|
55
69
|
end
|
|
56
70
|
end
|
|
57
71
|
|
|
@@ -67,10 +81,10 @@ module ForemanMaintain::Scenarios
|
|
|
67
81
|
unless self_upgrade_allowed?
|
|
68
82
|
raise(
|
|
69
83
|
ForemanMaintain::Error::Warn,
|
|
70
|
-
"foreman-maintain
|
|
71
|
-
"version
|
|
72
|
-
"
|
|
73
|
-
"
|
|
84
|
+
"foreman-maintain does not support the installed version of Satellite." \
|
|
85
|
+
"The currently installed version in #{current_version}," \
|
|
86
|
+
"while foreman-maintain only supports #{maintain_version}." \
|
|
87
|
+
"Please install the right version of foreman-maintain."
|
|
74
88
|
)
|
|
75
89
|
end
|
|
76
90
|
|