foreman_maintain 1.0.1 → 1.0.2

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: e70bdc300a891fd04cb9e489737a0a96a46d83977f192eddc1ee14a8deff7b9b
4
- data.tar.gz: ac5dc055fc90930f91c844f7c7bd411d156c943d911b56d9df5aafab4262481a
3
+ metadata.gz: 65892e9e2d93db0e9b4793b00743b75474ce7900cb425abe85e006cf7b6190ad
4
+ data.tar.gz: ee0ddd71d2dbb04805e080c60bff8a4b943122d6dd0e4c96b14401cf731fe7bf
5
5
  SHA512:
6
- metadata.gz: ce61614ae7a224595e48ef2cf4a8e0f268e3a7f1f59b8bc67af8ea19c7926ee6fe2d1f6474a8a13fb758627e7c2aa87d272163a064298c208a97e6e3279978da
7
- data.tar.gz: 983efdf31d1fdfc9dedca4c66374d178ef34310da40900e60af7f85550627d0416f88713316c93551f66c75bc775d7a533524b38b1e28e603944c6edf3d8bb6d
6
+ metadata.gz: df314cd4b969b7e9a71dfc3255ee6bd54ce598a42b26596ec499b866385b0838f8c455a4adc5e74acafbfd7cc733c63f072ada1d2d2af5b5473f8ba329ab77a2
7
+ data.tar.gz: 41f7380430eb839081e4fa70610b0ef87b733d08acfaa3573a8a4750d2e4880e650a91e415c4a04e4be9c28e828dd4e2c9d9245839a4891c50690247c62697a5
@@ -2,13 +2,13 @@ module Checks
2
2
  module Pulpcore
3
3
  class GroupOwnershipCheck < ForemanMaintain::Check
4
4
  metadata do
5
- description 'Check the group owner of /var/lib/pulp directory'
5
+ description 'Check the group owner of /var/lib/pulp/content directory'
6
6
  label :group_ownership_check_of_pulp_content
7
7
  manual_detection
8
8
  end
9
9
 
10
10
  def run
11
- group_id = File.stat('/var/lib/pulp/').gid
11
+ group_id = File.stat('/var/lib/pulp/content/').gid
12
12
  if Etc.getgrgid(group_id).name != 'pulp'
13
13
  fail! "Please run 'foreman-maintain prep-6.10-upgrade' prior to upgrading."
14
14
  end
@@ -10,15 +10,23 @@ module Procedures::Puppet
10
10
  end
11
11
 
12
12
  def run
13
- services = feature(:foreman_server).services + feature(:dynflow_sidekiq).services
14
- Procedures::Service::Stop.new(:only => services)
15
- execute!('foreman-rake db:migrate VERSION=0 SCOPE=foreman_puppet') if server_with_puppet?
13
+ stop_applicable_services
14
+ if server_with_puppet? && feature(:foreman_server)
15
+ execute!('foreman-rake db:migrate VERSION=0 SCOPE=foreman_puppet')
16
+ end
16
17
  feature(:installer).run(installer_arguments_disabling_puppet.join(' '), :interactive => false)
17
18
  packages_action(:remove, packages_to_remove, :assumeyes => true)
18
19
  end
19
20
 
20
21
  private
21
22
 
23
+ def stop_applicable_services
24
+ services = []
25
+ services = feature(:foreman_server).services if feature(:foreman_server)
26
+ services << feature(:dynflow_sidekiq).services if feature(:dynflow_sidekiq)
27
+ Procedures::Service::Stop.new(:only => services) unless services.empty?
28
+ end
29
+
22
30
  def server_with_puppet?
23
31
  find_package(foreman_plugin_name('foreman_puppet'))
24
32
  end
@@ -1,7 +1,7 @@
1
1
  module Procedures::Repositories
2
2
  class Disable < ForemanMaintain::Procedure
3
3
  metadata do
4
- param :repos, 'List of repositories to disable'
4
+ param :repos, 'Array of repositories to disable'
5
5
  description 'Disable repositories'
6
6
  end
7
7
  def run
@@ -1,7 +1,7 @@
1
1
  module Procedures::Repositories
2
2
  class Enable < ForemanMaintain::Procedure
3
3
  metadata do
4
- param :repos, 'List of repositories to enable'
4
+ param :repos, 'Array of repositories to enable'
5
5
  description 'Enable repositories'
6
6
  end
7
7
  def run
@@ -30,7 +30,7 @@ module ForemanMaintain
30
30
  execute!(%(subscription-manager register #{org_options}\
31
31
  --activationkey #{shellescape(activation_key)} --force))
32
32
  else
33
- repository_manager.rhsm_disable_repos('*')
33
+ repository_manager.rhsm_disable_repos(['*'])
34
34
  repository_manager.rhsm_enable_repos(rh_repos(version))
35
35
  end
36
36
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanMaintain
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.0.2'.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.1
4
+ version: 1.0.2
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: 2021-12-13 00:00:00.000000000 Z
11
+ date: 2022-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clamp