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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cdc12ecbef4e02dd8b77b3c4888623c13e418b7435a53f8dc1d280b9faf0b699
4
- data.tar.gz: 4d75194cf9184f68be21cbc55cba1def43d76eff4cfc1bc92a091b93662c3371
3
+ metadata.gz: a8dea59abb9dd938c046267a9561ec9e6b67b1982b63ceb098842726b50dba2f
4
+ data.tar.gz: 44bb1053c3b8a810d4ec27c531d182fc83118635bf5e1d9f16ab6e6b55bd46a2
5
5
  SHA512:
6
- metadata.gz: 26f3e34a2670e7b92ddeb1db1107446fb71ded2d1cbe5b79afa259a3a13a5d87e8d45a63f7ba235fa485099689c30eee366bd7bace95d52db7f28cb0dcad5d35
7
- data.tar.gz: 217124b53d7294d7d4be7c6be9a1a7e6fb43e58190c30abdcbcb9e48daf0e0e3164ca9e5b617e3c08add2a83d722dac7f5dd91f8163b400008ac748f8e32d56d
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(:foreman_database). \
46
- query("select s.value, s.default from settings s \
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://$(hostname):#{proxy_settings[:https_port]}"
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)
@@ -1,3 +1,3 @@
1
1
  module ForemanMaintain
2
- VERSION = '1.2.3'.freeze
2
+ VERSION = '1.2.4'.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.2.3
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-05 00:00:00.000000000 Z
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