foreman_maintain 1.8.1 → 1.8.2

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: 076bba551da26888de415a1f67a2b1950493db5cbcc8ace83b3efd0498ffa96d
4
- data.tar.gz: b39e663f0109565f11303ce1cd02740e8b937dbd554ff3d8123446b63d09e073
3
+ metadata.gz: a042b3f0cd480eab2e674abcbd5aecb247943b481bad114e31376610a3b785d0
4
+ data.tar.gz: 16e74a0e82caffb11d5d0363046bfa5120afab203ce1d88ad88a4311f664e1f4
5
5
  SHA512:
6
- metadata.gz: 636a6a7fde3ba794afd5080133c38ec4f77533190659b901fc796daa6c0130f7b213c2e9572b1c149e6a6a55911423c5431606b7e119cbe5613b7f91543bface
7
- data.tar.gz: c7361d2bc970e0d58b6e4a2f4fb32550720ceb3565759447305c36339015ad96cc19722e53f9a21130834f3a582b29614de5848d04c7ea1a950b83ed5b2693f8
6
+ metadata.gz: 7bcc01a88e2f8bebb549a83af6d0b1f33a714a76925dc51ee48a2a979611e7d8fc47ed91b162ce97bd004360f9bb8cef7499c34160283e539e63e8b7f4b8315f
7
+ data.tar.gz: 4e056e25de905cb6bb98da55c10dc1c1a57b99de6ed39b13241c4d09d7e2ca8cbaacaf6a44153ccd0f9675f432cda32ed9cb617399c3258940b0569898b12448
@@ -42,35 +42,30 @@ module Checks::Restore
42
42
  def required_katello_files(backup)
43
43
  backup_files_message(
44
44
  backup.katello_online_files.join(', '),
45
- backup.katello_offline_files.join(', '),
46
- [backup.katello_online_files + backup.katello_offline_files].join(', ')
45
+ backup.katello_offline_files.join(', ')
47
46
  )
48
47
  end
49
48
 
50
49
  def required_fpc_files(backup)
51
50
  backup_files_message(
52
51
  backup.fpc_online_files.join(', '),
53
- backup.fpc_offline_files.join(', '),
54
- [backup.fpc_online_files + backup.fpc_offline_files].join(', ')
52
+ backup.fpc_offline_files.join(', ')
55
53
  )
56
54
  end
57
55
 
58
56
  def required_foreman_files(backup)
59
57
  backup_files_message(
60
58
  backup.foreman_online_files.join(', '),
61
- backup.foreman_offline_files.join(', '),
62
- [backup.foreman_online_files + backup.foreman_offline_files].join(', ')
59
+ backup.foreman_offline_files.join(', ')
63
60
  )
64
61
  end
65
62
 
66
- def backup_files_message(online_files, offline_files, logical_files)
63
+ def backup_files_message(online_files, offline_files)
67
64
  message = ''
68
65
  message += 'An online or remote database backup directory contains: '
69
66
  message += "#{online_files}\n"
70
67
  message += 'An offline backup directory contains: '
71
68
  message += "#{offline_files}\n"
72
- message += 'A logical backup directory contains: '
73
- message += "#{logical_files}\n"
74
69
  message
75
70
  end
76
71
  end
@@ -70,6 +70,7 @@ class Features::ForemanProxy < ForemanMaintain::Feature
70
70
  configs += ['/var/lib/dhcpd', File.dirname(dhcpd_config_file)]
71
71
  end
72
72
  configs.push('/usr/share/xml/scap') if backup_features.include?('openscap')
73
+ configs.push('/etc/ansible') if backup_features.include?('ansible')
73
74
  configs
74
75
  end
75
76
 
@@ -26,10 +26,6 @@ class Features::PuppetServer < ForemanMaintain::Feature
26
26
  find_package('puppetserver') ? [system_service('puppetserver', 30)] : []
27
27
  end
28
28
 
29
- def puppet_version
30
- version(execute!("#{puppet_path} --version"))
31
- end
32
-
33
29
  def find_empty_cacert_request_files
34
30
  cmd_output = execute!("find #{cacert_requests_directory} -type f -size 0 | paste -d, -s")
35
31
  cmd_output.split(',')
@@ -14,8 +14,7 @@ module Procedures::Pulpcore
14
14
 
15
15
  feature(:service).handle_services(spinner, 'start', :only => necessary_services)
16
16
 
17
- spinner.update('Adding image metadata to pulp. You can continue using the ' \
18
- 'system normally while the task runs in the background.')
17
+ spinner.update('Adding image metadata to pulp.')
19
18
  execute!(pulpcore_manager('container-handle-image-data'))
20
19
  end
21
20
  end
@@ -8,8 +8,7 @@ module Procedures::Repositories
8
8
  end
9
9
 
10
10
  def run
11
- with_spinner(('Adding image metadata. You can continue using the ' \
12
- 'system normally while the task runs in the background.')) do
11
+ with_spinner('Adding image metadata to Katello.') do
13
12
  execute!('foreman-rake katello:import_container_manifest_labels')
14
13
  end
15
14
  end
@@ -67,18 +67,15 @@ module ForemanMaintain
67
67
  end
68
68
 
69
69
  def valid_fpc_backup?
70
- fpc_online_backup? || fpc_standard_backup? || fpc_logical_backup? || \
71
- fpc_hybrid_db_backup?
70
+ fpc_online_backup? || fpc_standard_backup?
72
71
  end
73
72
 
74
73
  def valid_katello_backup?
75
- katello_online_backup? || katello_standard_backup? || katello_logical_backup? || \
76
- # Katello can have setup where some of dbs are external but not all
77
- katello_hybrid_db_backup?
74
+ katello_online_backup? || katello_standard_backup?
78
75
  end
79
76
 
80
77
  def valid_foreman_backup?
81
- foreman_standard_backup? || foreman_online_backup? || foreman_logical_backup?
78
+ foreman_standard_backup? || foreman_online_backup?
82
79
  end
83
80
 
84
81
  def check_file_existence(existence_map)
@@ -111,19 +108,6 @@ module ForemanMaintain
111
108
  :absent => absent)
112
109
  end
113
110
 
114
- def katello_logical_backup?
115
- present = [:pgsql_data, :candlepin_dump, :foreman_dump, :pulpcore_dump]
116
- absent = []
117
- check_file_existence(:present => present,
118
- :absent => absent)
119
- end
120
-
121
- def katello_hybrid_db_backup?
122
- all_dbs = { :pgsql_data => %w[candlepin foreman pulpcore] }
123
- present, absent = dumps_for_hybrid_db_setup(all_dbs)
124
- check_file_existence(:present => present, :absent => absent)
125
- end
126
-
127
111
  def fpc_standard_backup?
128
112
  present = [:pgsql_data]
129
113
  absent = [:candlepin_dump, :foreman_dump, :pulpcore_dump]
@@ -137,19 +121,6 @@ module ForemanMaintain
137
121
  check_file_existence(:present => present, :absent => absent)
138
122
  end
139
123
 
140
- def fpc_logical_backup?
141
- present = [:pulpcore_dump, :pgsql_data]
142
- absent = [:candlepin_dump, :foreman_dump]
143
- check_file_existence(:present => present, :absent => absent)
144
- end
145
-
146
- def fpc_hybrid_db_backup?
147
- all_dbs = { :pgsql_data => ['pulpcore'] }
148
- present, absent = dumps_for_hybrid_db_setup(all_dbs)
149
- absent.concat [:candlepin_dump, :foreman_dump]
150
- check_file_existence(:present => present, :absent => absent)
151
- end
152
-
153
124
  def foreman_standard_backup?
154
125
  check_file_existence(:present => [:pgsql_data],
155
126
  :absent => [:candlepin_dump, :foreman_dump, :pulpcore_dump])
@@ -160,30 +131,6 @@ module ForemanMaintain
160
131
  :absent => [:candlepin_dump, :pgsql_data, :pulpcore_dump])
161
132
  end
162
133
 
163
- def foreman_logical_backup?
164
- check_file_existence(:present => [:pgsql_data, :foreman_dump],
165
- :absent => [:candlepin_dump, :pulpcore_dump])
166
- end
167
-
168
- def dumps_for_hybrid_db_setup(dbs_hash)
169
- present = []
170
- absent = []
171
- dbs_hash.each do |data_file, dbs|
172
- dbs.each do |db|
173
- feature_label = "#{db}_database"
174
- dump_file = "#{db}_dump"
175
- if feature(feature_label.to_sym).local?
176
- present |= [data_file]
177
- absent << dump_file.to_sym
178
- else
179
- present << dump_file.to_sym
180
- end
181
- end
182
- absent |= [data_file] unless present.include?(data_file)
183
- end
184
- [present, absent]
185
- end
186
-
187
134
  def validate_hostname?
188
135
  # make sure that the system hostname is the same as the backup
189
136
  metadata.fetch('hostname', nil) == hostname
@@ -1,3 +1,3 @@
1
1
  module ForemanMaintain
2
- VERSION = '1.8.1'.freeze
2
+ VERSION = '1.8.2'.freeze
3
3
  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.8.1
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-21 00:00:00.000000000 Z
11
+ date: 2024-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp
@@ -142,7 +142,6 @@ email: inecas@redhat.com
142
142
  executables:
143
143
  - foreman-maintain
144
144
  - foreman-maintain-complete
145
- - foreman-maintain-rotate-tar
146
145
  extensions: []
147
146
  extra_rdoc_files:
148
147
  - LICENSE