foreman_maintain 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/definitions/checks/foreman_proxy/check_tftp_storage.rb +2 -6
- data/definitions/features/foreman_proxy.rb +1 -1
- data/definitions/features/foreman_tasks.rb +2 -0
- data/definitions/procedures/restore/reindex_databases.rb +22 -0
- data/definitions/scenarios/restore.rb +5 -0
- data/lib/foreman_maintain/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8dea59abb9dd938c046267a9561ec9e6b67b1982b63ceb098842726b50dba2f
|
4
|
+
data.tar.gz: 44bb1053c3b8a810d4ec27c531d182fc83118635bf5e1d9f16ab6e6b55bd46a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a18584dc4a419be407d39587193735f66e8497ba6dbcb3670e786eca21abb0860da885267005ba351ab01aa5c3e5eee79b6ec9bc2d0763ed997779d7a011e492
|
7
|
+
data.tar.gz: '08e82fd2c29f07da6be8d9d302714d5aeaf9b7f208924f9a211aa133ab8bb7b9c769eec7495e94f5008a3d6dfd806dabccaffa1c8b98f6f3ec93ff75bdf1b661'
|
@@ -42,12 +42,8 @@ module Checks::ForemanProxy
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def lookup_token_duration
|
45
|
-
data = feature(:
|
46
|
-
|
47
|
-
where category IN ('Setting::Provisioning','Setting') \
|
48
|
-
and name = 'token_duration'")
|
49
|
-
|
50
|
-
YAML.load(data[0]['value'] || data[0]['default'])
|
45
|
+
data = feature(:hammer).run('--output yaml settings info --id token_duration')
|
46
|
+
YAML.load(data)['Value']
|
51
47
|
end
|
52
48
|
end
|
53
49
|
end
|
@@ -144,7 +144,7 @@ class Features::ForemanProxy < ForemanMaintain::Feature
|
|
144
144
|
|
145
145
|
cmd = "curl -w '\n%{http_code}' -s "
|
146
146
|
cmd += format_shell_args('--cert' => ssl_cert, '--key' => ssl_key, '--cacert' => ssl_ca)
|
147
|
-
cmd += " https
|
147
|
+
cmd += " https://#{hostname}:#{proxy_settings[:https_port]}"
|
148
148
|
cmd
|
149
149
|
end
|
150
150
|
|
@@ -17,6 +17,7 @@ class Features::ForemanTasks < ForemanMaintain::Feature
|
|
17
17
|
Actions::Candlepin::ListenOnCandlepinEvents
|
18
18
|
Actions::Katello::EventQueue::Monitor
|
19
19
|
Actions::Insights::EmailPoller
|
20
|
+
ForemanInventoryUpload::Async::GenerateAllReportsJob
|
20
21
|
ForemanInventoryUpload::Async::GenerateReportJob
|
21
22
|
ForemanInventoryUpload::Async::QueueForUploadJob
|
22
23
|
ForemanInventoryUpload::Async::UploadReportJob
|
@@ -24,6 +25,7 @@ class Features::ForemanTasks < ForemanMaintain::Feature
|
|
24
25
|
InsightsCloud::Async::InsightsFullSync
|
25
26
|
InsightsCloud::Async::InsightsResolutionsSync
|
26
27
|
InsightsCloud::Async::InsightsRulesSync
|
28
|
+
InsightsCloud::Async::InsightsScheduledSync
|
27
29
|
InventorySync::Async::InventoryFullSync
|
28
30
|
InventorySync::Async::InventoryHostsSync
|
29
31
|
InventorySync::Async::InventoryScheduledSync
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Procedures::Restore
|
2
|
+
class ReindexDatabases < ForemanMaintain::Procedure
|
3
|
+
include ForemanMaintain::Concerns::SystemService
|
4
|
+
|
5
|
+
metadata do
|
6
|
+
description 'REINDEX databases'
|
7
|
+
|
8
|
+
confine do
|
9
|
+
feature(:instance).postgresql_local?
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def run
|
14
|
+
with_spinner('Reindexing the databases') do |spinner|
|
15
|
+
feature(:service).handle_services(spinner, 'start', :only => ['postgresql'])
|
16
|
+
|
17
|
+
spinner.update('Reindexing the databases')
|
18
|
+
execute!('runuser - postgres -c "reindexdb -a"')
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -45,6 +45,11 @@ module ForemanMaintain::Scenarios
|
|
45
45
|
add_step(Procedures::Service::Stop.new(:only => ['postgresql']))
|
46
46
|
end
|
47
47
|
restore_mongo_dump(backup)
|
48
|
+
|
49
|
+
if feature(:instance).postgresql_local? && !backup.online_backup?
|
50
|
+
add_step_with_context(Procedures::Restore::ReindexDatabases)
|
51
|
+
end
|
52
|
+
|
48
53
|
add_steps_with_context(Procedures::Pulp::Migrate,
|
49
54
|
Procedures::Pulpcore::Migrate,
|
50
55
|
Procedures::Restore::CandlepinResetMigrations)
|
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.2.
|
4
|
+
version: 1.2.4
|
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-01
|
11
|
+
date: 2023-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -324,6 +324,7 @@ files:
|
|
324
324
|
- definitions/procedures/restore/postgres_owner.rb
|
325
325
|
- definitions/procedures/restore/pulpcore_dump.rb
|
326
326
|
- definitions/procedures/restore/regenerate_queues.rb
|
327
|
+
- definitions/procedures/restore/reindex_databases.rb
|
327
328
|
- definitions/procedures/selinux/set_file_security.rb
|
328
329
|
- definitions/procedures/service/base.rb
|
329
330
|
- definitions/procedures/service/daemon_reload.rb
|