foreman_maintain 0.7.0 → 0.7.1

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: 4151b9d6dbc810f7f85aa093bdcfc4f967530dbeddcf7e13e88ce998125211dc
4
- data.tar.gz: e7db5a3881d9652bae19c61f95ff95076745f36212c6e36f4cf582d4b5f33c8f
3
+ metadata.gz: 4b787c9490d94fe3a96d7b36f8faea35a8d086ae7ccee0aa23200a60fa344daa
4
+ data.tar.gz: 5102cd1826bb415b9a3a32f1bf5055ca8c13ed7c6ccdb9a7f9ab0357ca5f2d09
5
5
  SHA512:
6
- metadata.gz: 56165e03d708aa74d5b370cd7f2ca96a0121b2b97d14f326372181ef2c464eb9856dbafd1f60ad99aea89c9a610a1579a334a4a69c12abee38b70d2eb84a899a
7
- data.tar.gz: e43c42dbbe5aab6752e16429dae6fd70367510be2df57f026aa5ad53bb1efb9ef9e4eb2efc4331aef3823b93729412b789bc8c3e8396e03b4563bc82cf42199b
6
+ metadata.gz: 674907284187a7b64cbb16bd11d5718cf32dd94663eebeb1193b7c82a350359328ab59e8b1c593abed51e2d2891e16db073c3f2f87c352e25264b07600804c78
7
+ data.tar.gz: a5789c3df8d36291c0b7793eac25911921873bfb7e02ad50bc9212f4ae668059c70459d5cbc05728b5dfd5dbbee714ffc1f0b5fd942c5b62943b0c5f88efcabe
@@ -0,0 +1,15 @@
1
+ class Features::ForemanCockpit < ForemanMaintain::Feature
2
+ metadata do
3
+ label :foreman_cockpit
4
+
5
+ confine do
6
+ server? && find_package('tfm-rubygem-foreman_remote_execution-cockpit')
7
+ end
8
+ end
9
+
10
+ def services
11
+ [
12
+ system_service('foreman-cockpit')
13
+ ]
14
+ end
15
+ end
@@ -4,21 +4,25 @@ module Procedures::Backup
4
4
  metadata do
5
5
  description 'Data consistency warning'
6
6
  tags :backup
7
+ param :include_db_dumps
7
8
  end
8
9
 
9
10
  def run
10
- answer = ask_decision(
11
- "*** WARNING: The online backup is intended for making a copy of the data\n" \
11
+ answer = ask_decision(warning_message(@include_db_dumps), 'y(yes), q(quit)')
12
+ abort! unless answer == :yes
13
+ end
14
+
15
+ def warning_message(include_db_dumps)
16
+ substr = include_db_dumps ? 'database dump' : 'online backup'
17
+ "*** WARNING: The #{substr} is intended for making a copy of the data\n" \
12
18
  '*** for debugging purposes only.' \
13
19
  " The backup routine can not ensure 100% consistency while the\n" \
14
20
  "*** backup is taking place as there is a chance there may be data mismatch between\n" \
15
21
  '*** Mongo and Postgres databases while the services are live.' \
16
- " If you wish to utilize the online backup\n" \
22
+ " If you wish to utilize the #{substr}\n" \
17
23
  '*** for production use you need to ensure that there are' \
18
24
  " no modifications occurring during\n" \
19
- "*** your backup run.\n\nDo you want to proceed?", actions_msg: 'y(yes), q(quit)'
20
- )
21
- abort! unless answer == :yes
25
+ "*** your backup run.\n\nDo you want to proceed?"
22
26
  end
23
27
  end
24
28
  end
@@ -6,7 +6,8 @@ module Procedures::Content
6
6
  end
7
7
 
8
8
  def run
9
- puts execute!('foreman-rake katello:pulp3_migration')
9
+ # use interactive to get realtime output
10
+ puts execute!('foreman-rake katello:pulp3_migration', :interactive => true)
10
11
  end
11
12
  end
12
13
  end
@@ -8,6 +8,7 @@ module ForemanMaintain::PackageManager
8
8
  private
9
9
 
10
10
  def dnf_action(action, packages, with_status: false, assumeyes: false)
11
+ packages = [packages].flatten(1)
11
12
  yum_options = []
12
13
  yum_options << '-y' if assumeyes
13
14
  if with_status
@@ -163,7 +163,7 @@ module ForemanMaintain
163
163
  def validate_hostname?
164
164
  # make sure that the system hostname is the same as the backup
165
165
  config_tarball = file_map[:config_files][:path]
166
- tar_cmd = "tar zxf #{config_tarball} etc/httpd/conf/httpd.conf --to-stdout"
166
+ tar_cmd = "tar zxf #{config_tarball} etc/httpd/conf/httpd.conf --to-stdout --occurrence=1"
167
167
  status, httpd_config = execute_with_status(tar_cmd)
168
168
 
169
169
  # Incremental backups sometimes don't include httpd.conf. Since a "base" backup
@@ -1,3 +1,3 @@
1
1
  module ForemanMaintain
2
- VERSION = '0.7.0'.freeze
2
+ VERSION = '0.7.1'.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: 0.7.0
4
+ version: 0.7.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: 2020-12-02 00:00:00.000000000 Z
11
+ date: 2020-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp
@@ -170,6 +170,7 @@ files:
170
170
  - definitions/features/dynflow_sidekiq.rb
171
171
  - definitions/features/foreman_1_11_x.rb
172
172
  - definitions/features/foreman_1_7_x.rb
173
+ - definitions/features/foreman_cockpit.rb
173
174
  - definitions/features/foreman_database.rb
174
175
  - definitions/features/foreman_openscap.rb
175
176
  - definitions/features/foreman_proxy.rb