foreman_maintain 0.5.6 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/definitions/checks/disk/performance.rb +1 -1
- data/definitions/features/dynflow_sidekiq.rb +39 -0
- data/definitions/features/foreman_proxy.rb +15 -4
- data/definitions/features/foreman_tasks.rb +3 -8
- data/definitions/features/instance.rb +6 -2
- data/definitions/features/katello.rb +0 -7
- data/definitions/features/mongo.rb +1 -1
- data/definitions/features/{pulp.rb → pulp2.rb} +1 -1
- data/definitions/features/pulp3.rb +22 -0
- data/definitions/features/puppet_server.rb +2 -6
- data/definitions/features/redis.rb +34 -0
- data/definitions/features/tar.rb +18 -18
- data/definitions/procedures/backup/config_files.rb +43 -13
- data/definitions/procedures/backup/prepare_directory.rb +1 -8
- data/definitions/procedures/backup/pulp.rb +3 -3
- data/definitions/procedures/backup/snapshot/logical_volume_confirmation.rb +1 -1
- data/definitions/procedures/backup/snapshot/mount_pulp.rb +3 -3
- data/definitions/procedures/content/prepare.rb +12 -0
- data/definitions/procedures/packages/installer_confirmation.rb +1 -1
- data/definitions/procedures/pulp/migrate.rb +1 -1
- data/definitions/procedures/restore/configs.rb +7 -0
- data/definitions/procedures/restore/extract_files.rb +0 -1
- data/definitions/procedures/restore/mongo_dump.rb +2 -2
- data/definitions/procedures/service/base.rb +1 -1
- data/definitions/scenarios/backup.rb +1 -2
- data/definitions/scenarios/packages.rb +3 -7
- data/extras/foreman_protector/foreman-protector.py +1 -1
- data/lib/foreman_maintain/cli/packages_command.rb +1 -1
- data/lib/foreman_maintain/concerns/downstream.rb +2 -1
- data/lib/foreman_maintain/concerns/system_helpers.rb +9 -7
- data/lib/foreman_maintain/feature.rb +0 -4
- data/lib/foreman_maintain/reporter/cli_reporter.rb +3 -3
- data/lib/foreman_maintain/utils/disk/io_device.rb +1 -1
- data/lib/foreman_maintain/utils/facter.rb +1 -1
- data/lib/foreman_maintain/utils/service/abstract.rb +2 -1
- data/lib/foreman_maintain/utils/service/systemd.rb +26 -2
- data/lib/foreman_maintain/version.rb +1 -1
- metadata +165 -163
- data/definitions/checks/foreman/check_duplicate_permission.rb +0 -33
- data/definitions/procedures/foreman/remove_duplicate_permissions.rb +0 -70
- data/definitions/procedures/packages/update_all_confirmation.rb +0 -24
metadata
CHANGED
@@ -1,97 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_maintain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
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: 2020-
|
11
|
+
date: 2020-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: highline
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.17'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.17'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: minitest
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: mocha
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - <
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 11.0.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - <
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 11.0.0
|
97
97
|
description: Provides various features that helps keeping the Foreman/Satellite up
|
@@ -107,87 +107,159 @@ extra_rdoc_files:
|
|
107
107
|
- LICENSE
|
108
108
|
- README.md
|
109
109
|
files:
|
110
|
-
- LICENSE
|
111
|
-
- README.md
|
112
110
|
- bin/foreman-maintain
|
113
111
|
- bin/foreman-maintain-complete
|
114
112
|
- bin/foreman-maintain-rotate-tar
|
115
113
|
- bin/passenger-recycler
|
116
|
-
-
|
117
|
-
-
|
118
|
-
-
|
119
|
-
-
|
120
|
-
-
|
121
|
-
-
|
122
|
-
-
|
123
|
-
-
|
124
|
-
-
|
125
|
-
-
|
126
|
-
-
|
114
|
+
- lib/foreman_maintain/cli/health_command.rb
|
115
|
+
- lib/foreman_maintain/cli/maintenance_mode_command.rb
|
116
|
+
- lib/foreman_maintain/cli/restore_command.rb
|
117
|
+
- lib/foreman_maintain/cli/transform_clamp_options.rb
|
118
|
+
- lib/foreman_maintain/cli/upgrade_command.rb
|
119
|
+
- lib/foreman_maintain/cli/advanced_command.rb
|
120
|
+
- lib/foreman_maintain/cli/base.rb
|
121
|
+
- lib/foreman_maintain/cli/service_command.rb
|
122
|
+
- lib/foreman_maintain/cli/advanced/prebuild_bash_completion.rb
|
123
|
+
- lib/foreman_maintain/cli/advanced/procedure/abstract_by_tag_command.rb
|
124
|
+
- lib/foreman_maintain/cli/advanced/procedure/abstract_procedure_command.rb
|
125
|
+
- lib/foreman_maintain/cli/advanced/procedure/by_tag_command.rb
|
126
|
+
- lib/foreman_maintain/cli/advanced/procedure/run_command.rb
|
127
|
+
- lib/foreman_maintain/cli/advanced/procedure_command.rb
|
128
|
+
- lib/foreman_maintain/cli/backup_command.rb
|
129
|
+
- lib/foreman_maintain/cli/packages_command.rb
|
130
|
+
- lib/foreman_maintain/concerns/base_database.rb
|
131
|
+
- lib/foreman_maintain/concerns/directory_marker.rb
|
132
|
+
- lib/foreman_maintain/concerns/finders.rb
|
133
|
+
- lib/foreman_maintain/concerns/hammer.rb
|
134
|
+
- lib/foreman_maintain/concerns/metadata.rb
|
135
|
+
- lib/foreman_maintain/concerns/reporter.rb
|
136
|
+
- lib/foreman_maintain/concerns/scenario_metadata.rb
|
137
|
+
- lib/foreman_maintain/concerns/logger.rb
|
138
|
+
- lib/foreman_maintain/concerns/system_service.rb
|
139
|
+
- lib/foreman_maintain/concerns/downstream.rb
|
140
|
+
- lib/foreman_maintain/concerns/system_helpers.rb
|
141
|
+
- lib/foreman_maintain/reporter/cli_reporter.rb
|
142
|
+
- lib/foreman_maintain/runner/execution.rb
|
143
|
+
- lib/foreman_maintain/runner/stored_execution.rb
|
144
|
+
- lib/foreman_maintain/utils/disk/nil_device.rb
|
145
|
+
- lib/foreman_maintain/utils/disk/device.rb
|
146
|
+
- lib/foreman_maintain/utils/disk/stats.rb
|
147
|
+
- lib/foreman_maintain/utils/disk/io_device.rb
|
148
|
+
- lib/foreman_maintain/utils/curl_response.rb
|
149
|
+
- lib/foreman_maintain/utils/disk.rb
|
150
|
+
- lib/foreman_maintain/utils/facter.rb
|
151
|
+
- lib/foreman_maintain/utils/hash_tools.rb
|
152
|
+
- lib/foreman_maintain/utils/mongo_core.rb
|
153
|
+
- lib/foreman_maintain/utils/service.rb
|
154
|
+
- lib/foreman_maintain/utils/service/remote_db.rb
|
155
|
+
- lib/foreman_maintain/utils/service/abstract.rb
|
156
|
+
- lib/foreman_maintain/utils/service/systemd.rb
|
157
|
+
- lib/foreman_maintain/utils/system_helpers.rb
|
158
|
+
- lib/foreman_maintain/utils/backup.rb
|
159
|
+
- lib/foreman_maintain/utils/bash.rb
|
160
|
+
- lib/foreman_maintain/utils/command_runner.rb
|
161
|
+
- lib/foreman_maintain/utils/response.rb
|
162
|
+
- lib/foreman_maintain/procedure.rb
|
163
|
+
- lib/foreman_maintain/package_manager/base.rb
|
164
|
+
- lib/foreman_maintain/package_manager/yum.rb
|
165
|
+
- lib/foreman_maintain/package_manager/dnf.rb
|
166
|
+
- lib/foreman_maintain/cli.rb
|
167
|
+
- lib/foreman_maintain/version.rb
|
168
|
+
- lib/foreman_maintain/package_manager.rb
|
169
|
+
- lib/foreman_maintain/top_level_modules.rb
|
170
|
+
- lib/foreman_maintain/reporter.rb
|
171
|
+
- lib/foreman_maintain/yaml_storage.rb
|
172
|
+
- lib/foreman_maintain/scenario.rb
|
173
|
+
- lib/foreman_maintain/config.rb
|
174
|
+
- lib/foreman_maintain/runner.rb
|
175
|
+
- lib/foreman_maintain/utils.rb
|
176
|
+
- lib/foreman_maintain/check.rb
|
177
|
+
- lib/foreman_maintain/context.rb
|
178
|
+
- lib/foreman_maintain/core_ext.rb
|
179
|
+
- lib/foreman_maintain/csv_parser.rb
|
180
|
+
- lib/foreman_maintain/dependency_graph.rb
|
181
|
+
- lib/foreman_maintain/error.rb
|
182
|
+
- lib/foreman_maintain/executable.rb
|
183
|
+
- lib/foreman_maintain/param.rb
|
184
|
+
- lib/foreman_maintain/detector.rb
|
185
|
+
- lib/foreman_maintain/feature.rb
|
186
|
+
- lib/foreman_maintain/upgrade_runner.rb
|
187
|
+
- lib/foreman_maintain.rb
|
188
|
+
- definitions/checks/foreman_tasks/invalid/check_old.rb
|
189
|
+
- definitions/checks/foreman_tasks/invalid/check_pending_state.rb
|
190
|
+
- definitions/checks/foreman_tasks/invalid/check_planning_state.rb
|
191
|
+
- definitions/checks/foreman_tasks/not_running.rb
|
192
|
+
- definitions/checks/foreman_tasks/not_paused.rb
|
127
193
|
- definitions/checks/check_tmout.rb
|
128
194
|
- definitions/checks/disk/available_space.rb
|
129
195
|
- definitions/checks/disk/performance.rb
|
130
196
|
- definitions/checks/foreman/check_corrupted_roles.rb
|
131
|
-
- definitions/checks/foreman/check_duplicate_permission.rb
|
132
|
-
- definitions/checks/foreman/check_duplicate_roles.rb
|
133
197
|
- definitions/checks/foreman/db_up.rb
|
134
|
-
- definitions/checks/foreman/facts_names.rb
|
135
198
|
- definitions/checks/foreman/puppet_class_duplicates.rb
|
199
|
+
- definitions/checks/foreman/check_duplicate_roles.rb
|
200
|
+
- definitions/checks/foreman/facts_names.rb
|
136
201
|
- definitions/checks/foreman_openscap/invalid_report_associations.rb
|
137
202
|
- definitions/checks/foreman_proxy/verify_dhcp_config_syntax.rb
|
138
|
-
- definitions/checks/foreman_tasks/invalid/check_old.rb
|
139
|
-
- definitions/checks/foreman_tasks/invalid/check_pending_state.rb
|
140
|
-
- definitions/checks/foreman_tasks/invalid/check_planning_state.rb
|
141
|
-
- definitions/checks/foreman_tasks/not_paused.rb
|
142
|
-
- definitions/checks/foreman_tasks/not_running.rb
|
143
203
|
- definitions/checks/maintenance_mode/check_consistency.rb
|
144
204
|
- definitions/checks/mongo/db_up.rb
|
145
205
|
- definitions/checks/mongo/tools_installed.rb
|
146
|
-
- definitions/checks/original_assets.rb
|
147
|
-
- definitions/checks/puppet/provide_upgrade_guide.rb
|
148
206
|
- definitions/checks/puppet/verify_no_empty_cacert_requests.rb
|
207
|
+
- definitions/checks/puppet/provide_upgrade_guide.rb
|
149
208
|
- definitions/checks/remote_execution/verify_settings_file_already_exists.rb
|
150
209
|
- definitions/checks/repositories/check_upstream_repository.rb
|
151
210
|
- definitions/checks/repositories/validate.rb
|
152
211
|
- definitions/checks/restore/validate_backup.rb
|
153
212
|
- definitions/checks/restore/validate_hostname.rb
|
154
213
|
- definitions/checks/root_user.rb
|
214
|
+
- definitions/checks/yum_exclude.rb
|
215
|
+
- definitions/checks/check_epel_repository.rb
|
216
|
+
- definitions/checks/check_hotfix_installed.rb
|
155
217
|
- definitions/checks/server_ping.rb
|
156
218
|
- definitions/checks/services_up.rb
|
157
219
|
- definitions/checks/system_registration.rb
|
220
|
+
- definitions/checks/original_assets.rb
|
158
221
|
- definitions/checks/version_locking_enabled.rb
|
159
|
-
- definitions/checks/
|
222
|
+
- definitions/checks/backup/directory_ready.rb
|
223
|
+
- definitions/checks/backup/certs_tar_exist.rb
|
224
|
+
- definitions/checks/candlepin/db_up.rb
|
225
|
+
- definitions/checks/candlepin/validate_db.rb
|
226
|
+
- definitions/features/foreman_1_11_x.rb
|
160
227
|
- definitions/features/candlepin.rb
|
161
228
|
- definitions/features/candlepin_database.rb
|
162
|
-
- definitions/features/capsule.rb
|
163
|
-
- definitions/features/cron.rb
|
164
|
-
- definitions/features/foreman_1_11_x.rb
|
165
|
-
- definitions/features/foreman_1_7_x.rb
|
166
229
|
- definitions/features/foreman_database.rb
|
167
230
|
- definitions/features/foreman_openscap.rb
|
168
|
-
- definitions/features/foreman_proxy.rb
|
169
|
-
- definitions/features/foreman_server.rb
|
170
|
-
- definitions/features/foreman_tasks.rb
|
171
|
-
- definitions/features/gofer.rb
|
172
|
-
- definitions/features/hammer.rb
|
173
|
-
- definitions/features/installer.rb
|
174
231
|
- definitions/features/instance.rb
|
232
|
+
- definitions/features/pulp3.rb
|
233
|
+
- definitions/features/installer.rb
|
234
|
+
- definitions/features/capsule.rb
|
235
|
+
- definitions/features/tar.rb
|
236
|
+
- definitions/features/redis.rb
|
237
|
+
- definitions/features/foreman_1_7_x.rb
|
238
|
+
- definitions/features/gofer.rb
|
175
239
|
- definitions/features/iptables.rb
|
176
|
-
- definitions/features/katello.rb
|
177
|
-
- definitions/features/mongo.rb
|
178
|
-
- definitions/features/pulp.rb
|
179
240
|
- definitions/features/puppet_server.rb
|
180
|
-
- definitions/features/satellite.rb
|
181
|
-
- definitions/features/service.rb
|
182
241
|
- definitions/features/sync_plans.rb
|
183
242
|
- definitions/features/system_repos.rb
|
184
|
-
- definitions/features/tar.rb
|
185
243
|
- definitions/features/upstream.rb
|
244
|
+
- definitions/features/satellite.rb
|
245
|
+
- definitions/features/katello.rb
|
246
|
+
- definitions/features/pulp2.rb
|
247
|
+
- definitions/features/foreman_tasks.rb
|
248
|
+
- definitions/features/cron.rb
|
249
|
+
- definitions/features/foreman_server.rb
|
250
|
+
- definitions/features/hammer.rb
|
251
|
+
- definitions/features/service.rb
|
252
|
+
- definitions/features/foreman_proxy.rb
|
253
|
+
- definitions/features/mongo.rb
|
254
|
+
- definitions/features/dynflow_sidekiq.rb
|
255
|
+
- definitions/procedures/foreman_tasks/delete.rb
|
256
|
+
- definitions/procedures/foreman_tasks/fetch_tasks_status.rb
|
257
|
+
- definitions/procedures/foreman_tasks/resume.rb
|
258
|
+
- definitions/procedures/foreman_tasks/ui_investigate.rb
|
259
|
+
- definitions/procedures/sync_plans/disable.rb
|
260
|
+
- definitions/procedures/sync_plans/enable.rb
|
186
261
|
- definitions/procedures/backup/accessibility_confirmation.rb
|
187
262
|
- definitions/procedures/backup/clean.rb
|
188
|
-
- definitions/procedures/backup/compress_data.rb
|
189
|
-
- definitions/procedures/backup/config_files.rb
|
190
|
-
- definitions/procedures/backup/metadata.rb
|
191
263
|
- definitions/procedures/backup/offline/candlepin_db.rb
|
192
264
|
- definitions/procedures/backup/offline/foreman_db.rb
|
193
265
|
- definitions/procedures/backup/offline/mongo.rb
|
@@ -197,45 +269,39 @@ files:
|
|
197
269
|
- definitions/procedures/backup/online/pg_global_objects.rb
|
198
270
|
- definitions/procedures/backup/online/safety_confirmation.rb
|
199
271
|
- definitions/procedures/backup/prepare_directory.rb
|
200
|
-
- definitions/procedures/backup/pulp.rb
|
201
272
|
- definitions/procedures/backup/snapshot/clean_mount.rb
|
202
|
-
- definitions/procedures/backup/snapshot/logical_volume_confirmation.rb
|
203
273
|
- definitions/procedures/backup/snapshot/mount_base.rb
|
204
274
|
- definitions/procedures/backup/snapshot/mount_candlepin_db.rb
|
205
275
|
- definitions/procedures/backup/snapshot/mount_foreman_db.rb
|
206
276
|
- definitions/procedures/backup/snapshot/mount_mongo.rb
|
207
|
-
- definitions/procedures/backup/snapshot/mount_pulp.rb
|
208
277
|
- definitions/procedures/backup/snapshot/prepare_mount.rb
|
278
|
+
- definitions/procedures/backup/snapshot/logical_volume_confirmation.rb
|
279
|
+
- definitions/procedures/backup/snapshot/mount_pulp.rb
|
280
|
+
- definitions/procedures/backup/metadata.rb
|
281
|
+
- definitions/procedures/backup/compress_data.rb
|
282
|
+
- definitions/procedures/backup/config_files.rb
|
283
|
+
- definitions/procedures/backup/pulp.rb
|
209
284
|
- definitions/procedures/candlepin/delete_orphaned_records_from_env_content.rb
|
210
285
|
- definitions/procedures/crond/start.rb
|
211
286
|
- definitions/procedures/crond/stop.rb
|
212
|
-
- definitions/procedures/files/remove.rb
|
213
287
|
- definitions/procedures/foreman/apipie_cache.rb
|
214
|
-
- definitions/procedures/foreman/fix_corrupted_roles.rb
|
215
288
|
- definitions/procedures/foreman/remove_duplicate_obsolete_roles.rb
|
216
|
-
- definitions/procedures/foreman/
|
289
|
+
- definitions/procedures/foreman/fix_corrupted_roles.rb
|
217
290
|
- definitions/procedures/foreman_docker/remove_foreman_docker.rb
|
218
291
|
- definitions/procedures/foreman_openscap/invalid_report_associations.rb
|
219
|
-
- definitions/procedures/foreman_proxy/features.rb
|
220
|
-
- definitions/procedures/foreman_tasks/delete.rb
|
221
|
-
- definitions/procedures/foreman_tasks/fetch_tasks_status.rb
|
222
|
-
- definitions/procedures/foreman_tasks/resume.rb
|
223
|
-
- definitions/procedures/foreman_tasks/ui_investigate.rb
|
224
292
|
- definitions/procedures/hammer_setup.rb
|
225
|
-
- definitions/procedures/installer/run.rb
|
226
293
|
- definitions/procedures/installer/upgrade.rb
|
294
|
+
- definitions/procedures/installer/run.rb
|
227
295
|
- definitions/procedures/iptables/add_maintenance_mode_chain.rb
|
228
296
|
- definitions/procedures/iptables/remove_maintenance_mode_chain.rb
|
229
|
-
- definitions/procedures/knowledge_base_article.rb
|
230
297
|
- definitions/procedures/maintenance_mode/is_enabled.rb
|
231
|
-
- definitions/procedures/packages/enable_version_locking.rb
|
232
298
|
- definitions/procedures/packages/install.rb
|
233
299
|
- definitions/procedures/packages/installer_confirmation.rb
|
300
|
+
- definitions/procedures/packages/enable_version_locking.rb
|
234
301
|
- definitions/procedures/packages/lock_versions.rb
|
235
302
|
- definitions/procedures/packages/locking_status.rb
|
236
303
|
- definitions/procedures/packages/unlock_versions.rb
|
237
304
|
- definitions/procedures/packages/update.rb
|
238
|
-
- definitions/procedures/packages/update_all_confirmation.rb
|
239
305
|
- definitions/procedures/passenger_recycler.rb
|
240
306
|
- definitions/procedures/pulp/migrate.rb
|
241
307
|
- definitions/procedures/puppet/delete_empty_ca_cert_request_files.rb
|
@@ -243,124 +309,59 @@ files:
|
|
243
309
|
- definitions/procedures/repositories/disable.rb
|
244
310
|
- definitions/procedures/repositories/setup.rb
|
245
311
|
- definitions/procedures/restore/candlepin_dump.rb
|
246
|
-
- definitions/procedures/restore/configs.rb
|
247
312
|
- definitions/procedures/restore/confirmation.rb
|
248
313
|
- definitions/procedures/restore/drop_databases.rb
|
249
314
|
- definitions/procedures/restore/ensure_mongo_engine_matches.rb
|
250
315
|
- definitions/procedures/restore/extract_files.rb
|
251
316
|
- definitions/procedures/restore/foreman_dump.rb
|
252
|
-
- definitions/procedures/restore/installer_reset.rb
|
253
|
-
- definitions/procedures/restore/mongo_dump.rb
|
254
317
|
- definitions/procedures/restore/pg_global_objects.rb
|
255
318
|
- definitions/procedures/restore/postgres_owner.rb
|
319
|
+
- definitions/procedures/restore/installer_reset.rb
|
320
|
+
- definitions/procedures/restore/configs.rb
|
321
|
+
- definitions/procedures/restore/mongo_dump.rb
|
256
322
|
- definitions/procedures/selinux/set_file_security.rb
|
257
|
-
- definitions/procedures/service/base.rb
|
258
323
|
- definitions/procedures/service/daemon_reload.rb
|
259
324
|
- definitions/procedures/service/disable.rb
|
260
325
|
- definitions/procedures/service/enable.rb
|
261
326
|
- definitions/procedures/service/list.rb
|
262
|
-
- definitions/procedures/service/restart.rb
|
263
327
|
- definitions/procedures/service/start.rb
|
264
328
|
- definitions/procedures/service/status.rb
|
265
329
|
- definitions/procedures/service/stop.rb
|
266
|
-
- definitions/procedures/
|
267
|
-
- definitions/procedures/
|
268
|
-
- definitions/
|
330
|
+
- definitions/procedures/service/restart.rb
|
331
|
+
- definitions/procedures/service/base.rb
|
332
|
+
- definitions/procedures/foreman_proxy/features.rb
|
333
|
+
- definitions/procedures/files/remove.rb
|
334
|
+
- definitions/procedures/knowledge_base_article.rb
|
335
|
+
- definitions/procedures/content/prepare.rb
|
269
336
|
- definitions/scenarios/maintenance_mode.rb
|
337
|
+
- definitions/scenarios/upgrade_to_satellite_6_6.rb
|
270
338
|
- definitions/scenarios/packages.rb
|
271
339
|
- definitions/scenarios/restore.rb
|
272
|
-
- definitions/scenarios/services.rb
|
273
340
|
- definitions/scenarios/upgrade_to_satellite_6_2.rb
|
341
|
+
- definitions/scenarios/upgrade_to_satellite_6_4.rb
|
342
|
+
- definitions/scenarios/upgrade_to_satellite_6_6_z.rb
|
343
|
+
- definitions/scenarios/backup.rb
|
274
344
|
- definitions/scenarios/upgrade_to_satellite_6_2_z.rb
|
275
|
-
- definitions/scenarios/upgrade_to_satellite_6_3.rb
|
276
345
|
- definitions/scenarios/upgrade_to_satellite_6_3_z.rb
|
277
|
-
- definitions/scenarios/upgrade_to_satellite_6_4.rb
|
278
346
|
- definitions/scenarios/upgrade_to_satellite_6_4_z.rb
|
279
|
-
- definitions/scenarios/upgrade_to_satellite_6_5.rb
|
280
347
|
- definitions/scenarios/upgrade_to_satellite_6_5_z.rb
|
281
|
-
- definitions/scenarios/upgrade_to_satellite_6_6.rb
|
282
|
-
- definitions/scenarios/upgrade_to_satellite_6_6_z.rb
|
283
348
|
- definitions/scenarios/upgrade_to_satellite_6_7.rb
|
349
|
+
- definitions/scenarios/services.rb
|
350
|
+
- definitions/scenarios/upgrade_to_satellite_6_3.rb
|
351
|
+
- definitions/scenarios/upgrade_to_satellite_6_5.rb
|
284
352
|
- definitions/scenarios/upgrade_to_satellite_6_7_z.rb
|
353
|
+
- config/foreman-maintain.completion
|
354
|
+
- config/foreman_maintain.yml.example
|
355
|
+
- config/foreman_maintain.yml.packaging
|
356
|
+
- config/hammer.yml.example
|
357
|
+
- config/passenger-recycler.yaml
|
285
358
|
- extras/foreman-maintain.sh
|
286
359
|
- extras/foreman_protector/foreman-protector.conf
|
287
360
|
- extras/foreman_protector/foreman-protector.py
|
288
361
|
- extras/foreman_protector/foreman-protector.whitelist
|
289
362
|
- extras/passenger-recycler.cron
|
290
|
-
-
|
291
|
-
-
|
292
|
-
- lib/foreman_maintain/cli.rb
|
293
|
-
- lib/foreman_maintain/cli/advanced/prebuild_bash_completion.rb
|
294
|
-
- lib/foreman_maintain/cli/advanced/procedure/abstract_by_tag_command.rb
|
295
|
-
- lib/foreman_maintain/cli/advanced/procedure/abstract_procedure_command.rb
|
296
|
-
- lib/foreman_maintain/cli/advanced/procedure/by_tag_command.rb
|
297
|
-
- lib/foreman_maintain/cli/advanced/procedure/run_command.rb
|
298
|
-
- lib/foreman_maintain/cli/advanced/procedure_command.rb
|
299
|
-
- lib/foreman_maintain/cli/advanced_command.rb
|
300
|
-
- lib/foreman_maintain/cli/backup_command.rb
|
301
|
-
- lib/foreman_maintain/cli/base.rb
|
302
|
-
- lib/foreman_maintain/cli/health_command.rb
|
303
|
-
- lib/foreman_maintain/cli/maintenance_mode_command.rb
|
304
|
-
- lib/foreman_maintain/cli/packages_command.rb
|
305
|
-
- lib/foreman_maintain/cli/restore_command.rb
|
306
|
-
- lib/foreman_maintain/cli/service_command.rb
|
307
|
-
- lib/foreman_maintain/cli/transform_clamp_options.rb
|
308
|
-
- lib/foreman_maintain/cli/upgrade_command.rb
|
309
|
-
- lib/foreman_maintain/concerns/base_database.rb
|
310
|
-
- lib/foreman_maintain/concerns/directory_marker.rb
|
311
|
-
- lib/foreman_maintain/concerns/downstream.rb
|
312
|
-
- lib/foreman_maintain/concerns/finders.rb
|
313
|
-
- lib/foreman_maintain/concerns/hammer.rb
|
314
|
-
- lib/foreman_maintain/concerns/logger.rb
|
315
|
-
- lib/foreman_maintain/concerns/metadata.rb
|
316
|
-
- lib/foreman_maintain/concerns/reporter.rb
|
317
|
-
- lib/foreman_maintain/concerns/scenario_metadata.rb
|
318
|
-
- lib/foreman_maintain/concerns/system_helpers.rb
|
319
|
-
- lib/foreman_maintain/concerns/system_service.rb
|
320
|
-
- lib/foreman_maintain/config.rb
|
321
|
-
- lib/foreman_maintain/context.rb
|
322
|
-
- lib/foreman_maintain/core_ext.rb
|
323
|
-
- lib/foreman_maintain/csv_parser.rb
|
324
|
-
- lib/foreman_maintain/dependency_graph.rb
|
325
|
-
- lib/foreman_maintain/detector.rb
|
326
|
-
- lib/foreman_maintain/error.rb
|
327
|
-
- lib/foreman_maintain/executable.rb
|
328
|
-
- lib/foreman_maintain/feature.rb
|
329
|
-
- lib/foreman_maintain/package_manager.rb
|
330
|
-
- lib/foreman_maintain/package_manager/base.rb
|
331
|
-
- lib/foreman_maintain/package_manager/dnf.rb
|
332
|
-
- lib/foreman_maintain/package_manager/yum.rb
|
333
|
-
- lib/foreman_maintain/param.rb
|
334
|
-
- lib/foreman_maintain/procedure.rb
|
335
|
-
- lib/foreman_maintain/reporter.rb
|
336
|
-
- lib/foreman_maintain/reporter/cli_reporter.rb
|
337
|
-
- lib/foreman_maintain/runner.rb
|
338
|
-
- lib/foreman_maintain/runner/execution.rb
|
339
|
-
- lib/foreman_maintain/runner/stored_execution.rb
|
340
|
-
- lib/foreman_maintain/scenario.rb
|
341
|
-
- lib/foreman_maintain/top_level_modules.rb
|
342
|
-
- lib/foreman_maintain/upgrade_runner.rb
|
343
|
-
- lib/foreman_maintain/utils.rb
|
344
|
-
- lib/foreman_maintain/utils/backup.rb
|
345
|
-
- lib/foreman_maintain/utils/bash.rb
|
346
|
-
- lib/foreman_maintain/utils/command_runner.rb
|
347
|
-
- lib/foreman_maintain/utils/curl_response.rb
|
348
|
-
- lib/foreman_maintain/utils/disk.rb
|
349
|
-
- lib/foreman_maintain/utils/disk/device.rb
|
350
|
-
- lib/foreman_maintain/utils/disk/io_device.rb
|
351
|
-
- lib/foreman_maintain/utils/disk/nil_device.rb
|
352
|
-
- lib/foreman_maintain/utils/disk/stats.rb
|
353
|
-
- lib/foreman_maintain/utils/facter.rb
|
354
|
-
- lib/foreman_maintain/utils/hash_tools.rb
|
355
|
-
- lib/foreman_maintain/utils/mongo_core.rb
|
356
|
-
- lib/foreman_maintain/utils/response.rb
|
357
|
-
- lib/foreman_maintain/utils/service.rb
|
358
|
-
- lib/foreman_maintain/utils/service/abstract.rb
|
359
|
-
- lib/foreman_maintain/utils/service/remote_db.rb
|
360
|
-
- lib/foreman_maintain/utils/service/systemd.rb
|
361
|
-
- lib/foreman_maintain/utils/system_helpers.rb
|
362
|
-
- lib/foreman_maintain/version.rb
|
363
|
-
- lib/foreman_maintain/yaml_storage.rb
|
363
|
+
- LICENSE
|
364
|
+
- README.md
|
364
365
|
homepage: https://github.com/theforeman/foreman_maintain
|
365
366
|
licenses:
|
366
367
|
- GPL-3.0
|
@@ -371,16 +372,17 @@ require_paths:
|
|
371
372
|
- lib
|
372
373
|
required_ruby_version: !ruby/object:Gem::Requirement
|
373
374
|
requirements:
|
374
|
-
- -
|
375
|
+
- - '>='
|
375
376
|
- !ruby/object:Gem::Version
|
376
377
|
version: '0'
|
377
378
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
378
379
|
requirements:
|
379
|
-
- -
|
380
|
+
- - '>='
|
380
381
|
- !ruby/object:Gem::Version
|
381
382
|
version: '0'
|
382
383
|
requirements: []
|
383
|
-
|
384
|
+
rubyforge_project:
|
385
|
+
rubygems_version: 2.0.14.1
|
384
386
|
signing_key:
|
385
387
|
specification_version: 4
|
386
388
|
summary: Foreman maintenance tool belt
|
@@ -1,33 +0,0 @@
|
|
1
|
-
module Checks
|
2
|
-
module Foreman
|
3
|
-
class CheckDuplicatePermissions < ForemanMaintain::Check
|
4
|
-
metadata do
|
5
|
-
label :duplicate_permissions
|
6
|
-
for_feature :foreman_database
|
7
|
-
description 'Check for duplicate permissions from database'
|
8
|
-
tags :pre_upgrade
|
9
|
-
end
|
10
|
-
|
11
|
-
def run
|
12
|
-
duplicate_permissions = find_duplicate_permissions
|
13
|
-
assert(
|
14
|
-
duplicate_permissions.empty?,
|
15
|
-
'Duplicate permissions in your database',
|
16
|
-
:next_steps => [
|
17
|
-
Procedures::Foreman::RemoveDuplicatePermissions.new
|
18
|
-
]
|
19
|
-
)
|
20
|
-
end
|
21
|
-
|
22
|
-
def find_duplicate_permissions
|
23
|
-
feature(:foreman_database).query(self.class.query_to_get_duplicate_permission)
|
24
|
-
end
|
25
|
-
|
26
|
-
def self.query_to_get_duplicate_permission
|
27
|
-
<<-SQL
|
28
|
-
SELECT id,name FROM permissions p WHERE (SELECT count(name) FROM permissions pr WHERE p.name =pr.name) > 1
|
29
|
-
SQL
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
@@ -1,70 +0,0 @@
|
|
1
|
-
module Procedures::Foreman
|
2
|
-
class RemoveDuplicatePermissions < ForemanMaintain::Procedure
|
3
|
-
metadata do
|
4
|
-
for_feature :foreman_database
|
5
|
-
description 'Remove duplicate permissions from database'
|
6
|
-
end
|
7
|
-
|
8
|
-
def run
|
9
|
-
duplicate_permissions = feature(:foreman_database).query(
|
10
|
-
Checks::Foreman::CheckDuplicatePermissions.query_to_get_duplicate_permission
|
11
|
-
).group_by { |permission| permission['name'] }
|
12
|
-
unassigned_permissions = []
|
13
|
-
duplicate_permissions.each_value do |permissions|
|
14
|
-
permission_ids = permissions.map { |i| i['id'] }
|
15
|
-
filterings = check_permissions_assign_to_filter(permission_ids)
|
16
|
-
assigned_permissions = filterings.keys
|
17
|
-
unassigned_permissions << permission_ids - assigned_permissions
|
18
|
-
fix_permissions(assigned_permissions) if assigned_permissions.length > 1
|
19
|
-
end
|
20
|
-
delete_permission(unassigned_permissions.flatten) unless unassigned_permissions.empty?
|
21
|
-
end
|
22
|
-
|
23
|
-
private
|
24
|
-
|
25
|
-
def check_permissions_assign_to_filter(permission_ids)
|
26
|
-
sql = <<-SQL
|
27
|
-
SELECT id, filter_id, permission_id FROM filterings WHERE permission_id IN (#{permission_ids.join(',')})
|
28
|
-
SQL
|
29
|
-
feature(:foreman_database).query(sql).group_by { |filtering| filtering['permission_id'] }
|
30
|
-
end
|
31
|
-
|
32
|
-
def fix_permissions(assigned_permissions)
|
33
|
-
persist_permission = assigned_permissions.shift
|
34
|
-
filter_ids = filters_for_permission(persist_permission)
|
35
|
-
update_filtering(assigned_permissions, persist_permission, filter_ids)
|
36
|
-
delete_filtering(assigned_permissions)
|
37
|
-
delete_permission(assigned_permissions)
|
38
|
-
end
|
39
|
-
|
40
|
-
def filters_for_permission(permission)
|
41
|
-
feature(:foreman_database).query(
|
42
|
-
"SELECT filter_id FROM filterings WHERE permission_id = #{permission.to_i}"
|
43
|
-
).map { |filter| filter['filter_id'] }
|
44
|
-
end
|
45
|
-
|
46
|
-
def update_filtering(old_ids, new_id, filter_ids)
|
47
|
-
sql = <<-SQL
|
48
|
-
WITH rows AS (
|
49
|
-
UPDATE filterings SET permission_id = '#{new_id}' WHERE permission_id IN (#{old_ids.join(',')}) AND filter_id NOT IN (#{filter_ids.join(',')})
|
50
|
-
RETURNING id
|
51
|
-
)
|
52
|
-
SELECT id
|
53
|
-
FROM rows
|
54
|
-
SQL
|
55
|
-
feature(:foreman_database).query(sql)
|
56
|
-
end
|
57
|
-
|
58
|
-
def delete_filtering(permission_ids)
|
59
|
-
feature(:foreman_database).psql(
|
60
|
-
"DELETE FROM filterings where permission_id IN (#{permission_ids.join(',')})"
|
61
|
-
)
|
62
|
-
end
|
63
|
-
|
64
|
-
def delete_permission(permission_ids)
|
65
|
-
feature(:foreman_database).psql(
|
66
|
-
"DELETE FROM permissions where id IN (#{permission_ids.join(',')})"
|
67
|
-
)
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
module Procedures::Packages
|
2
|
-
class UpdateAllConfirmation < ForemanMaintain::Procedure
|
3
|
-
metadata do
|
4
|
-
param :packages, 'List of packages to update', :array => true
|
5
|
-
|
6
|
-
description 'Confirm update all is intentional'
|
7
|
-
end
|
8
|
-
|
9
|
-
def run
|
10
|
-
if @packages.nil? || @packages.empty?
|
11
|
-
question = "\nWARNING: No specific packages to update were provided\n" \
|
12
|
-
"so we are going to update all available packages.\n" \
|
13
|
-
"It is recommended to update everything only as part of upgrade\n" \
|
14
|
-
"of the #{feature(:instance).product_name} to the next version. \n" \
|
15
|
-
"To Upgrade to next version use 'foreman-maintain upgrade'.\n\n" \
|
16
|
-
"NOTE: --assumeyes is not applicable for this check\n\n" \
|
17
|
-
"Do you want to proceed with update of everything regardless\n" \
|
18
|
-
'of the recommendations?'
|
19
|
-
answer = ask_decision(question, 'y(yes), q(quit)', ignore_assumeyes: true)
|
20
|
-
abort! unless answer == :yes
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|