foreman_maintain 1.7.12 → 1.7.14
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/definitions/checks/disk/postgresql_mountpoint.rb +35 -0
- data/definitions/procedures/pulpcore/rpm_datarepair.rb +17 -0
- data/definitions/scenarios/foreman_upgrade.rb +2 -0
- data/definitions/scenarios/satellite_upgrade.rb +2 -0
- data/lib/foreman_maintain/cli/base.rb +3 -3
- data/lib/foreman_maintain/version.rb +1 -1
- metadata +9 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 35f9b342d0c7de2d288870f2ec1612abef36f3f966b87e1380766a6559e3ab39
|
|
4
|
+
data.tar.gz: 596e1552a72dcdff40a03eef29ed22c4cc4307f9426a0653836a45f5146b5018
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 440a16953ba3b289d989fa7cbc0f9a0ef852fc822601d0be5d7785abf8bf069b9344436e94b4c89691493e94703ac6627110b9afdaeccd01ef90ac2a34da7bee
|
|
7
|
+
data.tar.gz: 7a179118880980a5fac803379d02013d5927817127addf21331940aa8ee19e5f57a7f0bd059cf98f885b9aa7024f07b579951b72da949af655149a9d7a10bbb0
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module Checks
|
|
2
|
+
module Disk
|
|
3
|
+
class PostgresqlMountpoint < ForemanMaintain::Check
|
|
4
|
+
metadata do
|
|
5
|
+
label :postgresql_mountpoint
|
|
6
|
+
description 'Check to make sure PostgreSQL data is not on an own mountpoint'
|
|
7
|
+
confine do
|
|
8
|
+
feature(:instance).postgresql_local? && ForemanMaintain.el?
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def run
|
|
13
|
+
assert(psql_dir_device == psql_data_dir_device, warning_message)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def psql_dir_device
|
|
17
|
+
device = ForemanMaintain::Utils::Disk::Device.new('/var/lib/pgsql')
|
|
18
|
+
device.name
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def psql_data_dir_device
|
|
22
|
+
device = ForemanMaintain::Utils::Disk::Device.new('/var/lib/pgsql/data')
|
|
23
|
+
device.name
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def warning_message
|
|
27
|
+
<<~MSG
|
|
28
|
+
PostgreSQL data (/var/lib/pgsql/data) is on a different device than /var/lib/pgsql.
|
|
29
|
+
This is not supported and breaks PostgreSQL upgrades.
|
|
30
|
+
Please ensure PostgreSQL data is on the same mountpoint as the /var/lib/pgsql.
|
|
31
|
+
MSG
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Procedures::Pulpcore
|
|
2
|
+
class RpmDatarepair < ForemanMaintain::Procedure
|
|
3
|
+
include ForemanMaintain::Concerns::PulpCommon
|
|
4
|
+
|
|
5
|
+
metadata do
|
|
6
|
+
description 'Rename ContentArtifact relative_paths to match `{N-V-R.A.rpm}`'
|
|
7
|
+
for_feature :pulpcore
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def run
|
|
11
|
+
with_spinner('Running pulpcore-manager rpm-datarepair 4073') do
|
|
12
|
+
# Assumption: services are already started
|
|
13
|
+
execute!(pulpcore_manager('rpm-datarepair 4073'))
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -39,6 +39,7 @@ module Scenarios::Foreman
|
|
|
39
39
|
Checks::Disk::AvailableSpace,
|
|
40
40
|
Checks::Disk::AvailableSpaceCandlepin, # if candlepin
|
|
41
41
|
Checks::Disk::AvailableSpacePostgresql13,
|
|
42
|
+
Checks::Disk::PostgresqlMountpoint,
|
|
42
43
|
Checks::Foreman::ValidateExternalDbVersion, # if external database
|
|
43
44
|
Checks::Foreman::CheckCorruptedRoles,
|
|
44
45
|
Checks::Foreman::CheckDuplicatePermissions,
|
|
@@ -114,6 +115,7 @@ module Scenarios::Foreman
|
|
|
114
115
|
add_steps(
|
|
115
116
|
Procedures::RefreshFeatures,
|
|
116
117
|
Procedures::Service::Start,
|
|
118
|
+
Procedures::Pulpcore::RpmDatarepair,
|
|
117
119
|
Procedures::Crond::Start,
|
|
118
120
|
Procedures::SyncPlans::Enable,
|
|
119
121
|
Procedures::MaintenanceMode::DisableMaintenanceMode
|
|
@@ -39,6 +39,7 @@ module Scenarios::Satellite
|
|
|
39
39
|
Checks::CheckUpstreamRepository,
|
|
40
40
|
Checks::Disk::AvailableSpace,
|
|
41
41
|
Checks::Disk::AvailableSpaceCandlepin, # if candlepin
|
|
42
|
+
Checks::Disk::PostgresqlMountpoint,
|
|
42
43
|
Checks::Foreman::ValidateExternalDbVersion, # if external database
|
|
43
44
|
Checks::Foreman::CheckCorruptedRoles,
|
|
44
45
|
Checks::Foreman::CheckDuplicatePermissions,
|
|
@@ -119,6 +120,7 @@ module Scenarios::Satellite
|
|
|
119
120
|
add_steps(
|
|
120
121
|
Procedures::RefreshFeatures,
|
|
121
122
|
Procedures::Service::Start,
|
|
123
|
+
Procedures::Pulpcore::RpmDatarepair,
|
|
122
124
|
Procedures::Crond::Start,
|
|
123
125
|
Procedures::SyncPlans::Enable,
|
|
124
126
|
Procedures::MaintenanceMode::DisableMaintenanceMode,
|
|
@@ -137,7 +137,7 @@ module ForemanMaintain
|
|
|
137
137
|
option '--label', 'label',
|
|
138
138
|
'Run only a specific check with a label. ' \
|
|
139
139
|
'(Use "list" command to see available labels)' do |label|
|
|
140
|
-
raise ArgumentError, 'value
|
|
140
|
+
raise ArgumentError, 'no value provided' if label.nil? || label.empty?
|
|
141
141
|
underscorize(label).to_sym
|
|
142
142
|
end
|
|
143
143
|
end
|
|
@@ -147,7 +147,7 @@ module ForemanMaintain
|
|
|
147
147
|
'Run only those with all specific set of tags. ' \
|
|
148
148
|
'(Use list-tags command to see available tags)',
|
|
149
149
|
:multivalued => true) do |tags|
|
|
150
|
-
raise ArgumentError, 'value
|
|
150
|
+
raise ArgumentError, 'no value provided' if tags.nil? || tags.empty?
|
|
151
151
|
tags.map { |tag| underscorize(tag).to_sym }
|
|
152
152
|
end
|
|
153
153
|
end
|
|
@@ -166,7 +166,7 @@ module ForemanMaintain
|
|
|
166
166
|
if opts.include?('whitelist')
|
|
167
167
|
option(['-w', '--whitelist'], 'whitelist',
|
|
168
168
|
'Comma-separated list of labels of steps to be skipped') do |whitelist|
|
|
169
|
-
raise ArgumentError, 'value
|
|
169
|
+
raise ArgumentError, 'no value provided' if whitelist.nil? || whitelist.empty?
|
|
170
170
|
whitelist.split(',').map(&:strip)
|
|
171
171
|
end
|
|
172
172
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
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.14
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ivan Nečas
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: clamp
|
|
@@ -56,16 +55,16 @@ dependencies:
|
|
|
56
55
|
name: minitest
|
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
|
58
57
|
requirements:
|
|
59
|
-
- - "
|
|
58
|
+
- - "~>"
|
|
60
59
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0'
|
|
60
|
+
version: '5.0'
|
|
62
61
|
type: :development
|
|
63
62
|
prerelease: false
|
|
64
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
64
|
requirements:
|
|
66
|
-
- - "
|
|
65
|
+
- - "~>"
|
|
67
66
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '0'
|
|
67
|
+
version: '5.0'
|
|
69
68
|
- !ruby/object:Gem::Dependency
|
|
70
69
|
name: minitest-reporters
|
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -168,6 +167,7 @@ files:
|
|
|
168
167
|
- definitions/checks/disk/available_space_candlepin.rb
|
|
169
168
|
- definitions/checks/disk/available_space_postgresql13.rb
|
|
170
169
|
- definitions/checks/disk/performance.rb
|
|
170
|
+
- definitions/checks/disk/postgresql_mountpoint.rb
|
|
171
171
|
- definitions/checks/env_proxy.rb
|
|
172
172
|
- definitions/checks/foreman/check_corrupted_roles.rb
|
|
173
173
|
- definitions/checks/foreman/check_duplicate_permission.rb
|
|
@@ -274,6 +274,7 @@ files:
|
|
|
274
274
|
- definitions/procedures/packages/update.rb
|
|
275
275
|
- definitions/procedures/packages/update_all_confirmation.rb
|
|
276
276
|
- definitions/procedures/pulpcore/container_handle_image_metadata.rb
|
|
277
|
+
- definitions/procedures/pulpcore/rpm_datarepair.rb
|
|
277
278
|
- definitions/procedures/pulpcore/wait_for_tasks.rb
|
|
278
279
|
- definitions/procedures/puppet/delete_empty_ca_cert_request_files.rb
|
|
279
280
|
- definitions/procedures/puppet/remove_puppet.rb
|
|
@@ -411,7 +412,6 @@ homepage: https://github.com/theforeman/foreman_maintain
|
|
|
411
412
|
licenses:
|
|
412
413
|
- GPL-3.0
|
|
413
414
|
metadata: {}
|
|
414
|
-
post_install_message:
|
|
415
415
|
rdoc_options: []
|
|
416
416
|
require_paths:
|
|
417
417
|
- lib
|
|
@@ -429,8 +429,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
429
429
|
- !ruby/object:Gem::Version
|
|
430
430
|
version: '0'
|
|
431
431
|
requirements: []
|
|
432
|
-
rubygems_version:
|
|
433
|
-
signing_key:
|
|
432
|
+
rubygems_version: 4.0.10
|
|
434
433
|
specification_version: 4
|
|
435
434
|
summary: Foreman maintenance tool belt
|
|
436
435
|
test_files: []
|