foreman_maintain 1.7.11 → 1.7.13

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: 4943a31799b110a35f93236554fbeb25969a145f316bd97445b6c8a88d4bd3cc
4
- data.tar.gz: 4b8aeb1d31fdc7b79b90ee2407fb8fcd8c5e509150d017f78e7eed776884aea2
3
+ metadata.gz: 921fd9d450b8318e7d7c20bf96f5f81064dc77b98d0fc7c24ee69c89c239f679
4
+ data.tar.gz: c47889d82a038bd8f210f0668fd7670c9b74c7be3e3e782307e887d3e2991bbc
5
5
  SHA512:
6
- metadata.gz: c92f1b9cb4b1a72efcfe395a0500b28687a2ffd554f9249131ea2ffde0dbb67e1897052c01b2ae042fe4c958978d1e95100fe96a8a676a2043563e866b1e5ea7
7
- data.tar.gz: 4a4ae91c74d948e5cac7a663c59d2740b8b3e6d72786cca4632991b6cb9f2b71b2dddf2fe933d2b9a41aba3715b1f04c8db4a356c78c95f3932e7e1a2a38b198
6
+ metadata.gz: 1c416435a3f57720b0ab96a2598afd1a1844658d608a36e48132e995e2b31cc6645e7310d80985e8ddb2510010605eb8a0c53b954508c39e04bc89a5d194f78d
7
+ data.tar.gz: a19d7b834fe3d9c665928041af894d89b89c76955cee7f506219a644c243ec9a0141fd899f4a539724d65ce537f891313b013f4904a27dc3c1fa266082c46fe6
@@ -18,8 +18,8 @@ class Checks::CheckSha1CertificateAuthority < ForemanMaintain::Check
18
18
 
19
19
  begin
20
20
  certificates = load_fullchain(server_ca)
21
- rescue OpenSSL::X509::CertificateError
22
- assert(false, "Error reading server CA certificate #{server_ca}.")
21
+ rescue OpenSSL::X509::CertificateError => e
22
+ assert(false, "Error reading server CA certificate #{server_ca}.\n #{e.message}")
23
23
  else
24
24
  msg = <<~MSG
25
25
  Server CA certificate #{server_ca} signed with sha1 which will break on upgrade.
@@ -41,7 +41,8 @@ class Checks::CheckSha1CertificateAuthority < ForemanMaintain::Check
41
41
  # Can be removed when only Ruby with load_file support is supported
42
42
  File.binread(bundle_pem).
43
43
  lines.
44
- slice_after(/END CERTIFICATE/).
44
+ slice_after(/^-----END CERTIFICATE-----/).
45
+ filter { |pem| pem.join.include?('-----END CERTIFICATE-----') }.
45
46
  map { |pem| OpenSSL::X509::Certificate.new(pem.join) }
46
47
  end
47
48
  end
@@ -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
@@ -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,
@@ -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,
@@ -1,3 +1,3 @@
1
1
  module ForemanMaintain
2
- VERSION = '1.7.11'.freeze
2
+ VERSION = '1.7.13'.freeze
3
3
  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.11
4
+ version: 1.7.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-01-06 00:00:00.000000000 Z
10
+ date: 2025-03-06 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: clamp
@@ -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
@@ -411,7 +411,6 @@ homepage: https://github.com/theforeman/foreman_maintain
411
411
  licenses:
412
412
  - GPL-3.0
413
413
  metadata: {}
414
- post_install_message:
415
414
  rdoc_options: []
416
415
  require_paths:
417
416
  - lib
@@ -429,8 +428,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
429
428
  - !ruby/object:Gem::Version
430
429
  version: '0'
431
430
  requirements: []
432
- rubygems_version: 3.3.27
433
- signing_key:
431
+ rubygems_version: 3.6.2
434
432
  specification_version: 4
435
433
  summary: Foreman maintenance tool belt
436
434
  test_files: []