foreman_maintain 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -4
- data/bin/foreman-maintain +1 -1
- data/bin/foreman-maintain-complete +5 -5
- data/definitions/checks/candlepin/db_up.rb +1 -1
- data/definitions/checks/candlepin/validate_db.rb +2 -9
- data/definitions/checks/check_for_newer_packages.rb +5 -5
- data/definitions/checks/check_hotfix_installed.rb +3 -7
- data/definitions/checks/disk/available_space_postgresql12.rb +3 -2
- data/definitions/checks/disk/performance.rb +3 -3
- data/definitions/checks/foreman/check_corrupted_roles.rb +2 -4
- data/definitions/checks/foreman/check_duplicate_permission.rb +1 -1
- data/definitions/checks/foreman/check_duplicate_roles.rb +1 -1
- data/definitions/checks/foreman/check_tuning_requirements.rb +1 -1
- data/definitions/checks/foreman/db_up.rb +1 -1
- data/definitions/checks/foreman/facts_names.rb +4 -4
- data/definitions/checks/foreman_openscap/invalid_report_associations.rb +4 -4
- data/definitions/checks/foreman_proxy/check_tftp_storage.rb +4 -4
- data/definitions/checks/foreman_proxy/verify_dhcp_config_syntax.rb +1 -2
- data/definitions/checks/foreman_tasks/invalid/check_old.rb +2 -2
- data/definitions/checks/foreman_tasks/invalid/check_pending_state.rb +2 -2
- data/definitions/checks/foreman_tasks/invalid/check_planning_state.rb +2 -2
- data/definitions/checks/foreman_tasks/not_paused.rb +2 -2
- data/definitions/checks/foreman_tasks/not_running.rb +6 -6
- data/definitions/checks/original_assets.rb +3 -3
- data/definitions/checks/package_manager/yum/validate_yum_config.rb +1 -1
- data/definitions/checks/pulpcore/db_up.rb +1 -1
- data/definitions/checks/repositories/check_upstream_repository.rb +2 -2
- data/definitions/checks/repositories/validate.rb +2 -2
- data/definitions/checks/restore/validate_backup.rb +2 -2
- data/definitions/checks/restore/validate_hostname.rb +2 -2
- data/definitions/checks/restore/validate_interfaces.rb +2 -2
- data/definitions/checks/restore/validate_postgresql_dump_permissions.rb +31 -0
- data/definitions/checks/services_up.rb +2 -2
- data/definitions/features/apache.rb +1 -1
- data/definitions/features/candlepin.rb +1 -1
- data/definitions/features/candlepin_database.rb +2 -4
- data/definitions/features/cron.rb +3 -5
- data/definitions/features/dynflow_sidekiq.rb +2 -2
- data/definitions/features/foreman_cockpit.rb +1 -1
- data/definitions/features/foreman_database.rb +1 -1
- data/definitions/features/foreman_proxy.rb +1 -1
- data/definitions/features/foreman_server.rb +2 -2
- data/definitions/features/foreman_tasks.rb +9 -12
- data/definitions/features/gofer.rb +1 -1
- data/definitions/features/hammer.rb +4 -4
- data/definitions/features/installer.rb +4 -5
- data/definitions/features/instance.rb +12 -14
- data/definitions/features/katello.rb +8 -12
- data/definitions/features/pulpcore.rb +5 -3
- data/definitions/features/pulpcore_database.rb +3 -1
- data/definitions/features/puppet_server.rb +1 -1
- data/definitions/features/redis.rb +2 -18
- data/definitions/features/salt_server.rb +1 -1
- data/definitions/features/service.rb +4 -48
- data/definitions/features/sync_plans.rb +2 -2
- data/definitions/features/tar.rb +4 -3
- data/definitions/procedures/backup/compress_data.rb +0 -1
- data/definitions/procedures/backup/config_files.rb +6 -5
- data/definitions/procedures/backup/prepare_directory.rb +0 -2
- data/definitions/procedures/backup/pulp.rb +3 -3
- data/definitions/procedures/backup/snapshot/clean_mount.rb +1 -1
- data/definitions/procedures/backup/snapshot/logical_volume_confirmation.rb +1 -2
- data/definitions/procedures/backup/snapshot/mount_pulp.rb +2 -2
- data/definitions/procedures/foreman/fix_corrupted_roles.rb +3 -3
- data/definitions/procedures/foreman_tasks/delete.rb +3 -3
- data/definitions/procedures/hammer_setup.rb +1 -1
- data/definitions/procedures/knowledge_base_article.rb +3 -4
- data/definitions/procedures/packages/enable_modules.rb +1 -1
- data/definitions/procedures/packages/install.rb +1 -1
- data/definitions/procedures/packages/uninstall.rb +1 -1
- data/definitions/procedures/packages/update.rb +1 -1
- data/definitions/procedures/remote_execution/remove_existing_settingsd.rb +2 -2
- data/definitions/procedures/repositories/enable.rb +1 -1
- data/definitions/procedures/repositories/setup.rb +2 -2
- data/definitions/procedures/restore/candlepin_dump.rb +2 -2
- data/definitions/procedures/restore/configs.rb +3 -10
- data/definitions/procedures/restore/drop_databases.rb +2 -2
- data/definitions/procedures/restore/extract_files.rb +4 -17
- data/definitions/procedures/restore/foreman_dump.rb +2 -2
- data/definitions/procedures/restore/installer_reset.rb +1 -2
- data/definitions/procedures/restore/postgres_owner.rb +2 -2
- data/definitions/procedures/restore/pulpcore_dump.rb +2 -2
- data/definitions/procedures/selinux/set_file_security.rb +2 -2
- data/definitions/procedures/service/restart.rb +1 -1
- data/definitions/scenarios/backup.rb +44 -61
- data/definitions/scenarios/packages.rb +9 -9
- data/definitions/scenarios/restore.rb +24 -40
- data/definitions/scenarios/self_upgrade.rb +7 -11
- data/definitions/scenarios/services.rb +17 -17
- data/extras/foreman_protector/foreman-protector.whitelist +0 -6
- data/lib/foreman_maintain/cli/advanced/prebuild_bash_completion.rb +1 -1
- data/lib/foreman_maintain/cli/advanced_command.rb +2 -2
- data/lib/foreman_maintain/cli/backup_command.rb +17 -17
- data/lib/foreman_maintain/cli/base.rb +13 -13
- data/lib/foreman_maintain/cli/maintenance_mode_command.rb +1 -1
- data/lib/foreman_maintain/cli/plugin_command.rb +1 -1
- data/lib/foreman_maintain/cli/restore_command.rb +4 -4
- data/lib/foreman_maintain/cli/self_upgrade_command.rb +2 -2
- data/lib/foreman_maintain/cli/service_command.rb +2 -2
- data/lib/foreman_maintain/cli/transform_clamp_options.rb +1 -1
- data/lib/foreman_maintain/cli/upgrade_command.rb +7 -7
- data/lib/foreman_maintain/cli.rb +1 -11
- data/lib/foreman_maintain/concerns/base_database.rb +8 -17
- data/lib/foreman_maintain/concerns/downstream.rb +6 -64
- data/lib/foreman_maintain/concerns/firewall/iptables_maintenance_mode.rb +1 -1
- data/lib/foreman_maintain/concerns/foreman_and_katello_version_map.rb +1 -1
- data/lib/foreman_maintain/concerns/os_facts.rb +0 -8
- data/lib/foreman_maintain/concerns/primary_checks.rb +6 -5
- data/lib/foreman_maintain/concerns/pulp_common.rb +1 -8
- data/lib/foreman_maintain/concerns/system_helpers.rb +3 -6
- data/lib/foreman_maintain/concerns/upstream.rb +3 -3
- data/lib/foreman_maintain/config.rb +6 -6
- data/lib/foreman_maintain/core_ext.rb +2 -2
- data/lib/foreman_maintain/executable.rb +7 -9
- data/lib/foreman_maintain/package_manager/apt.rb +2 -2
- data/lib/foreman_maintain/package_manager/base.rb +0 -2
- data/lib/foreman_maintain/package_manager/dnf.rb +2 -2
- data/lib/foreman_maintain/package_manager/yum.rb +2 -3
- data/lib/foreman_maintain/package_manager.rb +1 -3
- data/lib/foreman_maintain/param.rb +2 -2
- data/lib/foreman_maintain/reporter/cli_reporter.rb +6 -7
- data/lib/foreman_maintain/reporter.rb +15 -10
- data/lib/foreman_maintain/repository_manager/el.rb +2 -10
- data/lib/foreman_maintain/repository_manager.rb +2 -1
- data/lib/foreman_maintain/runner.rb +5 -5
- data/lib/foreman_maintain/scenario.rb +4 -2
- data/lib/foreman_maintain/upgrade_runner.rb +0 -2
- data/lib/foreman_maintain/utils/backup.rb +27 -111
- data/lib/foreman_maintain/utils/bash.rb +18 -19
- data/lib/foreman_maintain/utils/command_runner.rb +5 -9
- data/lib/foreman_maintain/utils/hash_tools.rb +5 -5
- data/lib/foreman_maintain/utils/response.rb +1 -0
- data/lib/foreman_maintain/utils/service/remote_db.rb +1 -0
- data/lib/foreman_maintain/utils/service/systemd.rb +3 -5
- data/lib/foreman_maintain/utils/service.rb +1 -1
- data/lib/foreman_maintain/utils.rb +0 -1
- data/lib/foreman_maintain/version.rb +1 -1
- data/lib/foreman_maintain/yaml_storage.rb +1 -0
- data/lib/foreman_maintain.rb +3 -3
- metadata +29 -78
- data/definitions/checks/foreman/check_https_proxies.rb +0 -34
- data/definitions/checks/mongo/db_up.rb +0 -33
- data/definitions/checks/mongo/tools_installed.rb +0 -31
- data/definitions/checks/pulpcore/group_ownership_check.rb +0 -18
- data/definitions/checks/puppet/provide_upgrade_guide.rb +0 -35
- data/definitions/checks/puppet/warn_about_puppet_removal.rb +0 -35
- data/definitions/checks/remote_execution/verify_settings_file_already_exists.rb +0 -42
- data/definitions/features/mongo.rb +0 -217
- data/definitions/features/pulp2.rb +0 -35
- data/definitions/procedures/backup/offline/mongo.rb +0 -56
- data/definitions/procedures/backup/online/mongo.rb +0 -21
- data/definitions/procedures/backup/snapshot/mount_mongo.rb +0 -43
- data/definitions/procedures/candlepin/delete_orphaned_records_from_env_content.rb +0 -40
- data/definitions/procedures/content/fix_pulpcore_artifact_permissions.rb +0 -31
- data/definitions/procedures/content/migration_reset.rb +0 -12
- data/definitions/procedures/content/migration_stats.rb +0 -12
- data/definitions/procedures/content/prepare.rb +0 -17
- data/definitions/procedures/content/prepare_abort.rb +0 -12
- data/definitions/procedures/content/switchover.rb +0 -41
- data/definitions/procedures/prep_6_10_upgrade.rb +0 -29
- data/definitions/procedures/pulp/cleanup_old_metadata_files.rb +0 -75
- data/definitions/procedures/pulp/migrate.rb +0 -23
- data/definitions/procedures/pulp/print_remove_instructions.rb +0 -16
- data/definitions/procedures/pulp/remove.rb +0 -222
- data/definitions/procedures/restore/ensure_mongo_engine_matches.rb +0 -35
- data/definitions/procedures/restore/mongo_dump.rb +0 -41
- data/definitions/procedures/restore/regenerate_queues.rb +0 -69
- data/definitions/scenarios/content.rb +0 -158
- data/definitions/scenarios/prep_6_10_upgrade.rb +0 -13
- data/definitions/scenarios/upgrade_to_capsule_6_10.rb +0 -89
- data/definitions/scenarios/upgrade_to_capsule_6_10_z.rb +0 -88
- data/definitions/scenarios/upgrade_to_capsule_6_11.rb +0 -91
- data/definitions/scenarios/upgrade_to_capsule_6_11_z.rb +0 -90
- data/definitions/scenarios/upgrade_to_capsule_6_12.rb +0 -92
- data/definitions/scenarios/upgrade_to_capsule_6_12_z.rb +0 -92
- data/definitions/scenarios/upgrade_to_capsule_6_13.rb +0 -92
- data/definitions/scenarios/upgrade_to_capsule_6_13_z.rb +0 -92
- data/definitions/scenarios/upgrade_to_capsule_6_8.rb +0 -88
- data/definitions/scenarios/upgrade_to_capsule_6_8_z.rb +0 -88
- data/definitions/scenarios/upgrade_to_capsule_6_9.rb +0 -88
- data/definitions/scenarios/upgrade_to_capsule_6_9_z.rb +0 -88
- data/definitions/scenarios/upgrade_to_satellite_6_10.rb +0 -113
- data/definitions/scenarios/upgrade_to_satellite_6_10_z.rb +0 -89
- data/definitions/scenarios/upgrade_to_satellite_6_11.rb +0 -96
- data/definitions/scenarios/upgrade_to_satellite_6_11_z.rb +0 -91
- data/definitions/scenarios/upgrade_to_satellite_6_12.rb +0 -95
- data/definitions/scenarios/upgrade_to_satellite_6_12_z.rb +0 -94
- data/definitions/scenarios/upgrade_to_satellite_6_13.rb +0 -95
- data/definitions/scenarios/upgrade_to_satellite_6_13_z.rb +0 -94
- data/definitions/scenarios/upgrade_to_satellite_6_2.rb +0 -88
- data/definitions/scenarios/upgrade_to_satellite_6_2_z.rb +0 -88
- data/definitions/scenarios/upgrade_to_satellite_6_3.rb +0 -89
- data/definitions/scenarios/upgrade_to_satellite_6_3_z.rb +0 -88
- data/definitions/scenarios/upgrade_to_satellite_6_4.rb +0 -89
- data/definitions/scenarios/upgrade_to_satellite_6_4_z.rb +0 -88
- data/definitions/scenarios/upgrade_to_satellite_6_5.rb +0 -88
- data/definitions/scenarios/upgrade_to_satellite_6_5_z.rb +0 -88
- data/definitions/scenarios/upgrade_to_satellite_6_6.rb +0 -90
- data/definitions/scenarios/upgrade_to_satellite_6_6_z.rb +0 -90
- data/definitions/scenarios/upgrade_to_satellite_6_7.rb +0 -88
- data/definitions/scenarios/upgrade_to_satellite_6_7_z.rb +0 -88
- data/definitions/scenarios/upgrade_to_satellite_6_8.rb +0 -91
- data/definitions/scenarios/upgrade_to_satellite_6_8_z.rb +0 -89
- data/definitions/scenarios/upgrade_to_satellite_6_9.rb +0 -91
- data/definitions/scenarios/upgrade_to_satellite_6_9_z.rb +0 -89
- data/lib/foreman_maintain/cli/content_command.rb +0 -69
- data/lib/foreman_maintain/utils/mongo_core.rb +0 -86
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.3.
|
4
|
+
version: 1.3.1
|
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: 2023-
|
11
|
+
date: 2023-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: minitest-reporters
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: minitest-stub-const
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -95,21 +95,35 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: mocha
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0
|
103
|
+
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0
|
110
|
+
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: rake
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: theforeman-rubocop
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
129
|
- - ">="
|
@@ -159,7 +173,6 @@ files:
|
|
159
173
|
- definitions/checks/foreman/check_corrupted_roles.rb
|
160
174
|
- definitions/checks/foreman/check_duplicate_permission.rb
|
161
175
|
- definitions/checks/foreman/check_duplicate_roles.rb
|
162
|
-
- definitions/checks/foreman/check_https_proxies.rb
|
163
176
|
- definitions/checks/foreman/check_puppet_capsules.rb
|
164
177
|
- definitions/checks/foreman/check_tuning_requirements.rb
|
165
178
|
- definitions/checks/foreman/db_up.rb
|
@@ -175,23 +188,18 @@ files:
|
|
175
188
|
- definitions/checks/foreman_tasks/not_paused.rb
|
176
189
|
- definitions/checks/foreman_tasks/not_running.rb
|
177
190
|
- definitions/checks/maintenance_mode/check_consistency.rb
|
178
|
-
- definitions/checks/mongo/db_up.rb
|
179
|
-
- definitions/checks/mongo/tools_installed.rb
|
180
191
|
- definitions/checks/non_rh_packages.rb
|
181
192
|
- definitions/checks/original_assets.rb
|
182
193
|
- definitions/checks/package_manager/yum/validate_yum_config.rb
|
183
194
|
- definitions/checks/pulpcore/db_up.rb
|
184
|
-
- definitions/checks/pulpcore/group_ownership_check.rb
|
185
|
-
- definitions/checks/puppet/provide_upgrade_guide.rb
|
186
195
|
- definitions/checks/puppet/verify_no_empty_cacert_requests.rb
|
187
|
-
- definitions/checks/puppet/warn_about_puppet_removal.rb
|
188
|
-
- definitions/checks/remote_execution/verify_settings_file_already_exists.rb
|
189
196
|
- definitions/checks/repositories/check_non_rh_repository.rb
|
190
197
|
- definitions/checks/repositories/check_upstream_repository.rb
|
191
198
|
- definitions/checks/repositories/validate.rb
|
192
199
|
- definitions/checks/restore/validate_backup.rb
|
193
200
|
- definitions/checks/restore/validate_hostname.rb
|
194
201
|
- definitions/checks/restore/validate_interfaces.rb
|
202
|
+
- definitions/checks/restore/validate_postgresql_dump_permissions.rb
|
195
203
|
- definitions/checks/root_user.rb
|
196
204
|
- definitions/checks/server_ping.rb
|
197
205
|
- definitions/checks/services_up.rb
|
@@ -216,10 +224,8 @@ files:
|
|
216
224
|
- definitions/features/iptables.rb
|
217
225
|
- definitions/features/katello.rb
|
218
226
|
- definitions/features/katello_install.rb
|
219
|
-
- definitions/features/mongo.rb
|
220
227
|
- definitions/features/mosquitto.rb
|
221
228
|
- definitions/features/nftables.rb
|
222
|
-
- definitions/features/pulp2.rb
|
223
229
|
- definitions/features/pulpcore.rb
|
224
230
|
- definitions/features/pulpcore_database.rb
|
225
231
|
- definitions/features/puppet_server.rb
|
@@ -236,11 +242,9 @@ files:
|
|
236
242
|
- definitions/procedures/backup/metadata.rb
|
237
243
|
- definitions/procedures/backup/offline/candlepin_db.rb
|
238
244
|
- definitions/procedures/backup/offline/foreman_db.rb
|
239
|
-
- definitions/procedures/backup/offline/mongo.rb
|
240
245
|
- definitions/procedures/backup/offline/pulpcore_db.rb
|
241
246
|
- definitions/procedures/backup/online/candlepin_db.rb
|
242
247
|
- definitions/procedures/backup/online/foreman_db.rb
|
243
|
-
- definitions/procedures/backup/online/mongo.rb
|
244
248
|
- definitions/procedures/backup/online/pulpcore_db.rb
|
245
249
|
- definitions/procedures/backup/online/safety_confirmation.rb
|
246
250
|
- definitions/procedures/backup/prepare_directory.rb
|
@@ -250,17 +254,9 @@ files:
|
|
250
254
|
- definitions/procedures/backup/snapshot/mount_base.rb
|
251
255
|
- definitions/procedures/backup/snapshot/mount_candlepin_db.rb
|
252
256
|
- definitions/procedures/backup/snapshot/mount_foreman_db.rb
|
253
|
-
- definitions/procedures/backup/snapshot/mount_mongo.rb
|
254
257
|
- definitions/procedures/backup/snapshot/mount_pulp.rb
|
255
258
|
- definitions/procedures/backup/snapshot/mount_pulpcore_db.rb
|
256
259
|
- definitions/procedures/backup/snapshot/prepare_mount.rb
|
257
|
-
- definitions/procedures/candlepin/delete_orphaned_records_from_env_content.rb
|
258
|
-
- definitions/procedures/content/fix_pulpcore_artifact_permissions.rb
|
259
|
-
- definitions/procedures/content/migration_reset.rb
|
260
|
-
- definitions/procedures/content/migration_stats.rb
|
261
|
-
- definitions/procedures/content/prepare.rb
|
262
|
-
- definitions/procedures/content/prepare_abort.rb
|
263
|
-
- definitions/procedures/content/switchover.rb
|
264
260
|
- definitions/procedures/crond/start.rb
|
265
261
|
- definitions/procedures/crond/stop.rb
|
266
262
|
- definitions/procedures/files/remove.rb
|
@@ -295,11 +291,6 @@ files:
|
|
295
291
|
- definitions/procedures/packages/unlock_versions.rb
|
296
292
|
- definitions/procedures/packages/update.rb
|
297
293
|
- definitions/procedures/packages/update_all_confirmation.rb
|
298
|
-
- definitions/procedures/prep_6_10_upgrade.rb
|
299
|
-
- definitions/procedures/pulp/cleanup_old_metadata_files.rb
|
300
|
-
- definitions/procedures/pulp/migrate.rb
|
301
|
-
- definitions/procedures/pulp/print_remove_instructions.rb
|
302
|
-
- definitions/procedures/pulp/remove.rb
|
303
294
|
- definitions/procedures/pulpcore/migrate.rb
|
304
295
|
- definitions/procedures/pulpcore/trim_rpm_changelogs.rb
|
305
296
|
- definitions/procedures/puppet/delete_empty_ca_cert_request_files.rb
|
@@ -316,14 +307,11 @@ files:
|
|
316
307
|
- definitions/procedures/restore/configs.rb
|
317
308
|
- definitions/procedures/restore/confirmation.rb
|
318
309
|
- definitions/procedures/restore/drop_databases.rb
|
319
|
-
- definitions/procedures/restore/ensure_mongo_engine_matches.rb
|
320
310
|
- definitions/procedures/restore/extract_files.rb
|
321
311
|
- definitions/procedures/restore/foreman_dump.rb
|
322
312
|
- definitions/procedures/restore/installer_reset.rb
|
323
|
-
- definitions/procedures/restore/mongo_dump.rb
|
324
313
|
- definitions/procedures/restore/postgres_owner.rb
|
325
314
|
- definitions/procedures/restore/pulpcore_dump.rb
|
326
|
-
- definitions/procedures/restore/regenerate_queues.rb
|
327
315
|
- definitions/procedures/restore/reindex_databases.rb
|
328
316
|
- definitions/procedures/selinux/set_file_security.rb
|
329
317
|
- definitions/procedures/service/base.rb
|
@@ -338,56 +326,18 @@ files:
|
|
338
326
|
- definitions/procedures/sync_plans/disable.rb
|
339
327
|
- definitions/procedures/sync_plans/enable.rb
|
340
328
|
- definitions/scenarios/backup.rb
|
341
|
-
- definitions/scenarios/content.rb
|
342
329
|
- definitions/scenarios/maintenance_mode.rb
|
343
330
|
- definitions/scenarios/packages.rb
|
344
|
-
- definitions/scenarios/prep_6_10_upgrade.rb
|
345
331
|
- definitions/scenarios/puppet.rb
|
346
332
|
- definitions/scenarios/restore.rb
|
347
333
|
- definitions/scenarios/self_upgrade.rb
|
348
334
|
- definitions/scenarios/services.rb
|
349
|
-
- definitions/scenarios/upgrade_to_capsule_6_10.rb
|
350
|
-
- definitions/scenarios/upgrade_to_capsule_6_10_z.rb
|
351
|
-
- definitions/scenarios/upgrade_to_capsule_6_11.rb
|
352
|
-
- definitions/scenarios/upgrade_to_capsule_6_11_z.rb
|
353
|
-
- definitions/scenarios/upgrade_to_capsule_6_12.rb
|
354
|
-
- definitions/scenarios/upgrade_to_capsule_6_12_z.rb
|
355
|
-
- definitions/scenarios/upgrade_to_capsule_6_13.rb
|
356
|
-
- definitions/scenarios/upgrade_to_capsule_6_13_z.rb
|
357
335
|
- definitions/scenarios/upgrade_to_capsule_6_14.rb
|
358
336
|
- definitions/scenarios/upgrade_to_capsule_6_14_z.rb
|
359
|
-
- definitions/scenarios/upgrade_to_capsule_6_8.rb
|
360
|
-
- definitions/scenarios/upgrade_to_capsule_6_8_z.rb
|
361
|
-
- definitions/scenarios/upgrade_to_capsule_6_9.rb
|
362
|
-
- definitions/scenarios/upgrade_to_capsule_6_9_z.rb
|
363
337
|
- definitions/scenarios/upgrade_to_foreman_nightly.rb
|
364
338
|
- definitions/scenarios/upgrade_to_katello_nightly.rb
|
365
|
-
- definitions/scenarios/upgrade_to_satellite_6_10.rb
|
366
|
-
- definitions/scenarios/upgrade_to_satellite_6_10_z.rb
|
367
|
-
- definitions/scenarios/upgrade_to_satellite_6_11.rb
|
368
|
-
- definitions/scenarios/upgrade_to_satellite_6_11_z.rb
|
369
|
-
- definitions/scenarios/upgrade_to_satellite_6_12.rb
|
370
|
-
- definitions/scenarios/upgrade_to_satellite_6_12_z.rb
|
371
|
-
- definitions/scenarios/upgrade_to_satellite_6_13.rb
|
372
|
-
- definitions/scenarios/upgrade_to_satellite_6_13_z.rb
|
373
339
|
- definitions/scenarios/upgrade_to_satellite_6_14.rb
|
374
340
|
- definitions/scenarios/upgrade_to_satellite_6_14_z.rb
|
375
|
-
- definitions/scenarios/upgrade_to_satellite_6_2.rb
|
376
|
-
- definitions/scenarios/upgrade_to_satellite_6_2_z.rb
|
377
|
-
- definitions/scenarios/upgrade_to_satellite_6_3.rb
|
378
|
-
- definitions/scenarios/upgrade_to_satellite_6_3_z.rb
|
379
|
-
- definitions/scenarios/upgrade_to_satellite_6_4.rb
|
380
|
-
- definitions/scenarios/upgrade_to_satellite_6_4_z.rb
|
381
|
-
- definitions/scenarios/upgrade_to_satellite_6_5.rb
|
382
|
-
- definitions/scenarios/upgrade_to_satellite_6_5_z.rb
|
383
|
-
- definitions/scenarios/upgrade_to_satellite_6_6.rb
|
384
|
-
- definitions/scenarios/upgrade_to_satellite_6_6_z.rb
|
385
|
-
- definitions/scenarios/upgrade_to_satellite_6_7.rb
|
386
|
-
- definitions/scenarios/upgrade_to_satellite_6_7_z.rb
|
387
|
-
- definitions/scenarios/upgrade_to_satellite_6_8.rb
|
388
|
-
- definitions/scenarios/upgrade_to_satellite_6_8_z.rb
|
389
|
-
- definitions/scenarios/upgrade_to_satellite_6_9.rb
|
390
|
-
- definitions/scenarios/upgrade_to_satellite_6_9_z.rb
|
391
341
|
- extras/foreman-maintain.sh
|
392
342
|
- extras/foreman_protector/dnf/foreman-protector.py
|
393
343
|
- extras/foreman_protector/foreman-protector.conf
|
@@ -405,7 +355,6 @@ files:
|
|
405
355
|
- lib/foreman_maintain/cli/advanced_command.rb
|
406
356
|
- lib/foreman_maintain/cli/backup_command.rb
|
407
357
|
- lib/foreman_maintain/cli/base.rb
|
408
|
-
- lib/foreman_maintain/cli/content_command.rb
|
409
358
|
- lib/foreman_maintain/cli/health_command.rb
|
410
359
|
- lib/foreman_maintain/cli/maintenance_mode_command.rb
|
411
360
|
- lib/foreman_maintain/cli/packages_command.rb
|
@@ -472,7 +421,6 @@ files:
|
|
472
421
|
- lib/foreman_maintain/utils/disk/nil_device.rb
|
473
422
|
- lib/foreman_maintain/utils/disk/stats.rb
|
474
423
|
- lib/foreman_maintain/utils/hash_tools.rb
|
475
|
-
- lib/foreman_maintain/utils/mongo_core.rb
|
476
424
|
- lib/foreman_maintain/utils/response.rb
|
477
425
|
- lib/foreman_maintain/utils/service.rb
|
478
426
|
- lib/foreman_maintain/utils/service/abstract.rb
|
@@ -493,7 +441,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
493
441
|
requirements:
|
494
442
|
- - ">="
|
495
443
|
- !ruby/object:Gem::Version
|
496
|
-
version: '
|
444
|
+
version: '2.7'
|
445
|
+
- - "<"
|
446
|
+
- !ruby/object:Gem::Version
|
447
|
+
version: '4'
|
497
448
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
498
449
|
requirements:
|
499
450
|
- - ">="
|
@@ -1,34 +0,0 @@
|
|
1
|
-
module Checks
|
2
|
-
class CheckHttpsProxies < ForemanMaintain::Check
|
3
|
-
metadata do
|
4
|
-
label :https_proxies
|
5
|
-
for_feature :foreman_database
|
6
|
-
description 'Check for HTTPS proxies from the database'
|
7
|
-
manual_detection
|
8
|
-
end
|
9
|
-
|
10
|
-
def run
|
11
|
-
https_proxies = find_https_proxies
|
12
|
-
unless https_proxies.empty?
|
13
|
-
https_proxy_names = https_proxies.map { |proxy| proxy['name'] }
|
14
|
-
question = "Syncing repositories through an 'HTTP Proxy' that uses the HTTPS\n"\
|
15
|
-
"protocol is not supported directly with Satellite 6.10.\n"\
|
16
|
-
"The following proxies use HTTPS: #{https_proxy_names.join(', ')}.\n"\
|
17
|
-
"For a suggested solution see https://access.redhat.com/solutions/6414991\n"\
|
18
|
-
'Continue upgrade?'
|
19
|
-
answer = ask_decision(question, actions_msg: 'y(yes), q(quit)')
|
20
|
-
abort! if answer != :yes
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def find_https_proxies
|
25
|
-
feature(:foreman_database).query(self.class.query_to_get_https_proxies)
|
26
|
-
end
|
27
|
-
|
28
|
-
def self.query_to_get_https_proxies
|
29
|
-
<<-SQL
|
30
|
-
SELECT \"http_proxies\".* FROM \"http_proxies\" WHERE (http_proxies.url ilike 'https://%')
|
31
|
-
SQL
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
module Checks
|
2
|
-
module Mongo
|
3
|
-
class DBUp < ForemanMaintain::Check
|
4
|
-
metadata do
|
5
|
-
description 'Make sure Mongo DB is up'
|
6
|
-
label :mongo_db_up
|
7
|
-
for_feature :mongo
|
8
|
-
end
|
9
|
-
|
10
|
-
def run
|
11
|
-
status = false
|
12
|
-
if feature(:mongo).mongo_cmd_available?
|
13
|
-
with_spinner('Checking connection to the Mongo DB') do
|
14
|
-
status = feature(:mongo).ping
|
15
|
-
end
|
16
|
-
assert(status, 'Mongo DB is not responding. ' \
|
17
|
-
'It needs to be up and running to perform the following steps.',
|
18
|
-
:next_steps => start_mongodb)
|
19
|
-
else
|
20
|
-
feature(:mongo).raise_mongo_client_missing_error
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def start_mongodb
|
25
|
-
if feature(:mongo).local?
|
26
|
-
[Procedures::Service::Start.new(:only => feature(:mongo).services)]
|
27
|
-
else
|
28
|
-
[] # there is nothing we can do for remote db
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
module Checks::Mongo
|
2
|
-
class ToolsInstalled < ForemanMaintain::Check
|
3
|
-
metadata do
|
4
|
-
manual_detection
|
5
|
-
description 'Checks whether the tools for Mongo DB are installed'
|
6
|
-
for_feature :mongo
|
7
|
-
end
|
8
|
-
|
9
|
-
def run
|
10
|
-
if feature(:mongo).server_version =~ /^3\.4/
|
11
|
-
tools_pkg = 'rh-mongodb34-mongo-tools'
|
12
|
-
result = find_package(tools_pkg)
|
13
|
-
else
|
14
|
-
result = execute?('which mongodump')
|
15
|
-
tools_pkg = 'mongodb'
|
16
|
-
end
|
17
|
-
handle_result(result, tools_pkg)
|
18
|
-
end
|
19
|
-
|
20
|
-
private
|
21
|
-
|
22
|
-
def handle_result(result, tools_pkg)
|
23
|
-
assert(result,
|
24
|
-
"#{tools_pkg} was not found among installed package.\nThis package is needed to " \
|
25
|
-
'do various operations such as backup, restore and import with Mongo DB.',
|
26
|
-
:next_steps => [
|
27
|
-
Procedures::Packages::Install.new(:packages => [tools_pkg])
|
28
|
-
])
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Checks
|
2
|
-
module Pulpcore
|
3
|
-
class GroupOwnershipCheck < ForemanMaintain::Check
|
4
|
-
metadata do
|
5
|
-
description 'Check the group owner of /var/lib/pulp/content directory'
|
6
|
-
label :group_ownership_check_of_pulp_content
|
7
|
-
manual_detection
|
8
|
-
end
|
9
|
-
|
10
|
-
def run
|
11
|
-
group_id = File.stat('/var/lib/pulp/content/').gid
|
12
|
-
if Etc.getgrgid(group_id).name != 'pulp'
|
13
|
-
fail! "Please run 'foreman-maintain prep-6.10-upgrade' prior to upgrading."
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
module Checks::Puppet
|
2
|
-
class ProvideUpgradeGuide < ForemanMaintain::Check
|
3
|
-
metadata do
|
4
|
-
description 'Verify puppet and provide upgrade guide for it'
|
5
|
-
tags :puppet_upgrade_guide
|
6
|
-
confine do
|
7
|
-
feature(:instance).downstream &&
|
8
|
-
feature(:instance).downstream.current_minor_version == '6.3' &&
|
9
|
-
find_package('puppet')
|
10
|
-
end
|
11
|
-
manual_detection
|
12
|
-
end
|
13
|
-
|
14
|
-
def run
|
15
|
-
with_spinner('Verifying puppet version before upgrade') do |spinner|
|
16
|
-
puppet_package = find_package('puppet')
|
17
|
-
spinner.update "current puppet version: #{puppet_package}"
|
18
|
-
curr_sat_version = feature(:instance).downstream.current_minor_version
|
19
|
-
assert(
|
20
|
-
(puppet_package !~ /puppet-3/),
|
21
|
-
'Before continuing with upgrade, please make sure you finish puppet upgrade.',
|
22
|
-
:next_steps => [
|
23
|
-
Procedures::KnowledgeBaseArticle.new(:doc => doc_ids_by_sat_versions[curr_sat_version])
|
24
|
-
]
|
25
|
-
)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
private
|
30
|
-
|
31
|
-
def doc_ids_by_sat_versions
|
32
|
-
{ '6.3' => 'upgrade_puppet_guide_for_sat63' }
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
module Checks::Puppet
|
2
|
-
class WarnAboutPuppetRemoval < ForemanMaintain::Check
|
3
|
-
metadata do
|
4
|
-
description 'Warn about Puppet content removal prior to 6.10 upgrade'
|
5
|
-
label :warn_before_puppet_removal
|
6
|
-
confine do
|
7
|
-
feature(:instance).downstream &&
|
8
|
-
feature(:instance).downstream.current_minor_version == '6.9'
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def run
|
13
|
-
message = "Puppet repositories found!\n"\
|
14
|
-
"Upgrading to 6.10 will delete the Puppet repositories\n"\
|
15
|
-
"if any of the following conditions are met,\n"\
|
16
|
-
"1. Any Puppet repositories in Library lifecycle environment.\n"\
|
17
|
-
"2. Unpublished content view's Puppet repositories.\n\n"\
|
18
|
-
"Note: Any Puppet content that is in use by hosts will not be deleted.\n"\
|
19
|
-
"After the upgrade, hosts will continue to use the Puppet modules,\n"\
|
20
|
-
'but future Puppet content management '\
|
21
|
-
"must be handled outside of the Satellite!\n\n"\
|
22
|
-
'Do you want to proceed?'
|
23
|
-
if puppet_repos_available?
|
24
|
-
answer = ask_decision(message, actions_msg: 'y(yes), n(no)')
|
25
|
-
exit 0 unless answer == :yes
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def puppet_repos_available?
|
30
|
-
hammer_cmd = '--output json repository list --fields name --content-type puppet'
|
31
|
-
puppet_repos = feature(:hammer).run(hammer_cmd)
|
32
|
-
!JSON.parse(puppet_repos).empty?
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
module Checks::RemoteExecution
|
2
|
-
class VerifySettingsFileAlreadyExists < ForemanMaintain::Check
|
3
|
-
metadata do
|
4
|
-
description 'Check to verify remote_execution_ssh settings already exist'
|
5
|
-
|
6
|
-
confine do
|
7
|
-
feature(:instance).downstream &&
|
8
|
-
feature(:instance).downstream.current_minor_version == '6.2' &&
|
9
|
-
find_package(proxy_plugin_name('dynflow_core')) &&
|
10
|
-
file_exists?('/etc/smart_proxy_dynflow_core')
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def run
|
15
|
-
if file_exists?(settingd_dir_path)
|
16
|
-
symlinks = find_symlinks(settingd_dir_path)
|
17
|
-
assert(
|
18
|
-
symlinks.empty?,
|
19
|
-
failure_msg(settingd_dir_path, symlinks),
|
20
|
-
:next_steps => [
|
21
|
-
Procedures::RemoteExecution::RemoveExistingSettingsd.new(
|
22
|
-
:dirpath => settingd_dir_path
|
23
|
-
)
|
24
|
-
]
|
25
|
-
)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
private
|
30
|
-
|
31
|
-
def failure_msg(dir_path, symlinks)
|
32
|
-
'Settings related to remote_execution_ssh are already present'\
|
33
|
-
" under #{dir_path} and " \
|
34
|
-
"\nit would conflict with the installer from the next version." \
|
35
|
-
"\nsymlinks available - #{symlinks.join(', ')}"
|
36
|
-
end
|
37
|
-
|
38
|
-
def settingd_dir_path
|
39
|
-
'/etc/smart_proxy_dynflow_core/settings.d'
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|