foreman_maintain 1.0.18 → 1.0.19

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: c1567588355faeafabafe49dfee31db43eeb6c652b61d27ad6041eddb1b6a993
4
- data.tar.gz: '0722639fa591f720708cb5bed060416e43a5d5e0312b1dc49d31db2f08a1c061'
3
+ metadata.gz: 16cb6948c9fce9920fd8916aba9c0ecb641b6acfee457aa984599976287e097b
4
+ data.tar.gz: ed5f56c95835b3c742323686d4207c33d9c5c1d37a9760013bb3810597f6296b
5
5
  SHA512:
6
- metadata.gz: c95a6a85ac2ae259a6d7c4f51a86c2b96c53441c9cb6e0762154c04d3122475963615749669b96bf8766136903b96de5da4f33051a23dc9eb6c6db0e2dd31e7a
7
- data.tar.gz: 8c92687da1590f99d477a074837ed15745db6b505aac339f9621d1e91cffbbdaa783e091a85d3441935327be7714af8a8289c30b9779549d736e736ff204c816
6
+ metadata.gz: e6daa7f789d47bf1d810f9974a34955695151f4481db5b0d5628de85fe97ede1dd7202985de28e8ca2d010abdef02b51509aa242abce37773daf8afda135b67c
7
+ data.tar.gz: fc1e55d663a20afa249d409318800282a78b652b9ebc1cb1bb5655a9ef608d79be1c5434421dfcbd3d3906b156d5262aca8dbcfb05b0de61b8342ef8ffb9e87f
@@ -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.0.18'.freeze
2
+ VERSION = '1.0.19'.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.0.18
4
+ version: 1.0.19
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: 2022-10-07 00:00:00.000000000 Z
11
+ date: 2023-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp
@@ -325,6 +325,7 @@ files:
325
325
  - definitions/procedures/restore/postgres_owner.rb
326
326
  - definitions/procedures/restore/pulpcore_dump.rb
327
327
  - definitions/procedures/restore/regenerate_queues.rb
328
+ - definitions/procedures/restore/reindex_databases.rb
328
329
  - definitions/procedures/selinux/set_file_security.rb
329
330
  - definitions/procedures/service/base.rb
330
331
  - definitions/procedures/service/daemon_reload.rb
@@ -482,7 +483,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
482
483
  - !ruby/object:Gem::Version
483
484
  version: '0'
484
485
  requirements: []
485
- rubygems_version: 3.2.33
486
+ rubygems_version: 3.3.26
486
487
  signing_key:
487
488
  specification_version: 4
488
489
  summary: Foreman maintenance tool belt