foreman_maintain 1.14.0 → 1.14.1
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: a44c3749923c8c50ee979b2692286e568ad55fd213efb96b06c3f662ebebfb96
|
|
4
|
+
data.tar.gz: 5248121eceec015f2be5bc9e96c5b93a4042e34193f223781f87c6b26e306d96
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3e54601d8b7f4a71f31c3190e6b5db6e3afa4bfa75d44a9f0a7b5c29a847b91da7f006cacbf6fb678688501bd62f8701287882ba32c87e0bccb6675b2f04bc23
|
|
7
|
+
data.tar.gz: 3da19df1167b93f7ea64b7925d7ca21b305a67badb20abbd7a8318b64d9a4187ffee7f985e817f71bd8f063432353e89fb9a75ab59abb89e0d171b8bb1d54b83
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
class Checks::CheckSubscriptionManagerRelease < ForemanMaintain::Check
|
|
2
|
+
metadata do
|
|
3
|
+
label :check_subscription_manager_release
|
|
4
|
+
description 'Check if subscription-manager release is not set to a minor version'
|
|
5
|
+
|
|
6
|
+
confine do
|
|
7
|
+
feature(:instance).downstream
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def run
|
|
12
|
+
status, output = execute_with_status('LC_ALL=C subscription-manager release --show')
|
|
13
|
+
|
|
14
|
+
# If command fails (subscription-manager not installed or system not registered), pass the check
|
|
15
|
+
return if status != 0
|
|
16
|
+
|
|
17
|
+
assert(valid_release?(output), error_message(output))
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
private
|
|
21
|
+
|
|
22
|
+
def valid_release?(output)
|
|
23
|
+
# Valid formats: "Release not set" or "Release: X" where X is a major version without dots
|
|
24
|
+
return true if output == 'Release not set'
|
|
25
|
+
return true if /^Release:\s+\d+$/.match?(output)
|
|
26
|
+
|
|
27
|
+
false
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def extract_release(output)
|
|
31
|
+
match = output.match(/^Release:\s+(.+)$/)
|
|
32
|
+
match ? match[1] : output
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def error_message(output)
|
|
36
|
+
subman_release = extract_release(output)
|
|
37
|
+
"Your system is configured to use RHEL #{subman_release}, but Satellite is only "\
|
|
38
|
+
"supported on the latest RHEL. Please unset the release in subscription-manager by "\
|
|
39
|
+
"calling `subscription-manager release --unset`."
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -35,6 +35,7 @@ module Scenarios::Satellite
|
|
|
35
35
|
Checks::SystemRegistration,
|
|
36
36
|
Checks::CheckHotfixInstalled,
|
|
37
37
|
Checks::CheckTmout,
|
|
38
|
+
Checks::CheckSubscriptionManagerRelease,
|
|
38
39
|
Checks::CheckUpstreamRepository,
|
|
39
40
|
Checks::Container::PodmanLogin, # if downstream, connected, containers used
|
|
40
41
|
Checks::Disk::AvailableSpace,
|
|
@@ -33,6 +33,7 @@ module Scenarios::Update
|
|
|
33
33
|
Checks::SystemRegistration,
|
|
34
34
|
Checks::CheckHotfixInstalled,
|
|
35
35
|
Checks::CheckTmout,
|
|
36
|
+
Checks::CheckSubscriptionManagerRelease,
|
|
36
37
|
Checks::CheckIpv6Disable,
|
|
37
38
|
Checks::CheckUpstreamRepository,
|
|
38
39
|
Checks::Container::PodmanLogin, # if downstream, connected, containers used
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: foreman_maintain
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.14.
|
|
4
|
+
version: 1.14.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ivan Nečas
|
|
@@ -55,16 +55,16 @@ dependencies:
|
|
|
55
55
|
name: minitest
|
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
|
57
57
|
requirements:
|
|
58
|
-
- - "
|
|
58
|
+
- - "~>"
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '0'
|
|
60
|
+
version: '5.0'
|
|
61
61
|
type: :development
|
|
62
62
|
prerelease: false
|
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
64
64
|
requirements:
|
|
65
|
-
- - "
|
|
65
|
+
- - "~>"
|
|
66
66
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: '0'
|
|
67
|
+
version: '5.0'
|
|
68
68
|
- !ruby/object:Gem::Dependency
|
|
69
69
|
name: minitest-reporters
|
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -161,6 +161,7 @@ files:
|
|
|
161
161
|
- definitions/checks/check_hotfix_installed.rb
|
|
162
162
|
- definitions/checks/check_ipv6_disable.rb
|
|
163
163
|
- definitions/checks/check_sha1_certificate_authority.rb
|
|
164
|
+
- definitions/checks/check_subscription_manager_release.rb
|
|
164
165
|
- definitions/checks/check_tmout.rb
|
|
165
166
|
- definitions/checks/container/podman_login.rb
|
|
166
167
|
- definitions/checks/disk/available_space.rb
|
|
@@ -487,7 +488,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
487
488
|
- !ruby/object:Gem::Version
|
|
488
489
|
version: '0'
|
|
489
490
|
requirements: []
|
|
490
|
-
rubygems_version:
|
|
491
|
+
rubygems_version: 4.0.3
|
|
491
492
|
specification_version: 4
|
|
492
493
|
summary: Foreman maintenance tool belt
|
|
493
494
|
test_files: []
|