foreman_maintain 0.8.21 → 0.8.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/definitions/checks/pulpcore/group_ownership_check.rb +18 -0
- data/definitions/procedures/pulp/remove.rb +12 -0
- data/definitions/scenarios/upgrade_to_satellite_6_10.rb +1 -8
- data/lib/foreman_maintain/version.rb +1 -1
- metadata +3 -6
- data/lib/foreman_maintain/concerns/el_repos_manager_common.rb +0 -20
- data/lib/foreman_maintain/repos_manager/dnf_config_manager.rb +0 -13
- data/lib/foreman_maintain/repos_manager/el_common.rb +0 -0
- data/lib/foreman_maintain/repos_manager/yum_config_manager.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 197a1b9603612e47c37ae3a24fec9362d70eb50447144ea599b612571565ea3b
|
4
|
+
data.tar.gz: d100893294ab1e960e3e7f93cdca402ffbfc5f64c0f51d19f7aa074ee0b18b1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72d0e0a9f785ea86cb69e7ef2b12c26d7e9ae3777347ec29780395bd32539e08e8c8344242a3c6974518a5ed4df03585b6817b0e08d9491aa8d0f87076ceb8aa
|
7
|
+
data.tar.gz: d7bcef48c7493525577c010f40079d33b3bcd834d370bbba2e298592562eff57acc79e8c0bb6eb80925bd15a28d13c39e827195fc1cd1a8a08a4f28c7d02a6df
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Checks
|
2
|
+
module Pulpcore
|
3
|
+
class GroupOwnershipCheck < ForemanMaintain::Check
|
4
|
+
metadata do
|
5
|
+
description 'Check the group owner of /var/lib/pulp directory'
|
6
|
+
label :group_ownership_check_of_pulp_content
|
7
|
+
manual_detection
|
8
|
+
end
|
9
|
+
|
10
|
+
def run
|
11
|
+
group_id = File.stat('/var/lib/pulp/').gid
|
12
|
+
if Etc.getgrgid(group_id).name != 'pulp'
|
13
|
+
fail! "Please run 'foreman-maintain prep-6.10-upgrade' prior to upgrading."
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -86,6 +86,8 @@ module Procedures::Pulp
|
|
86
86
|
drop_migrations
|
87
87
|
|
88
88
|
delete_pulp_data(rm_cmds) if rm_cmds.any?
|
89
|
+
|
90
|
+
restart_pulpcore_services
|
89
91
|
end
|
90
92
|
|
91
93
|
def remove_pulp
|
@@ -168,5 +170,15 @@ module Procedures::Pulp
|
|
168
170
|
spinner.update('Done deleting pulp2 data directories')
|
169
171
|
end
|
170
172
|
end
|
173
|
+
|
174
|
+
def restart_pulpcore_services
|
175
|
+
with_spinner('Restarting pulpcore services') do |spinner|
|
176
|
+
pulp_services = feature(:pulpcore).services
|
177
|
+
|
178
|
+
feature(:service).handle_services(spinner, 'stop', :only => pulp_services)
|
179
|
+
feature(:service).handle_services(spinner, 'start', :only => pulp_services)
|
180
|
+
spinner.update('Done restarting pulpcore services')
|
181
|
+
end
|
182
|
+
end
|
171
183
|
end
|
172
184
|
end
|
@@ -25,6 +25,7 @@ module Scenarios::Satellite_6_10
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def compose
|
28
|
+
add_step(Checks::Pulpcore::GroupOwnershipCheck)
|
28
29
|
add_step(Checks::Puppet::WarnAboutPuppetRemoval)
|
29
30
|
add_step(Checks::CheckForNewerPackages.new(:packages => [foreman_plugin_name('katello'),
|
30
31
|
'python3-pulp-2to3-migration'],
|
@@ -61,13 +62,6 @@ module Scenarios::Satellite_6_10
|
|
61
62
|
context.map(:assumeyes, Procedures::Installer::Upgrade => :assumeyes)
|
62
63
|
end
|
63
64
|
|
64
|
-
def check_var_lib_pulp
|
65
|
-
group_id = File.stat('/var/lib/pulp/').gid
|
66
|
-
if Etc.getgrgid(group_id).name != 'pulp'
|
67
|
-
raise "Please run 'foreman-maintain prep-6.10-upgrade' prior to upgrading."
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
65
|
def pulp3_switchover_steps
|
72
66
|
add_step(Procedures::Service::Enable.
|
73
67
|
new(:only => Features::Pulpcore.pulpcore_migration_services))
|
@@ -79,7 +73,6 @@ module Scenarios::Satellite_6_10
|
|
79
73
|
end
|
80
74
|
|
81
75
|
def compose
|
82
|
-
check_var_lib_pulp
|
83
76
|
unless check_min_version(foreman_plugin_name('katello'), '4.0')
|
84
77
|
pulp3_switchover_steps
|
85
78
|
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.8.
|
4
|
+
version: 0.8.22
|
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-
|
11
|
+
date: 2021-12-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -154,6 +154,7 @@ files:
|
|
154
154
|
- definitions/checks/original_assets.rb
|
155
155
|
- definitions/checks/package_manager/yum/validate_yum_config.rb
|
156
156
|
- definitions/checks/pulpcore/db_up.rb
|
157
|
+
- definitions/checks/pulpcore/group_ownership_check.rb
|
157
158
|
- definitions/checks/puppet/provide_upgrade_guide.rb
|
158
159
|
- definitions/checks/puppet/verify_no_empty_cacert_requests.rb
|
159
160
|
- definitions/checks/puppet/warn_about_puppet_removal.rb
|
@@ -359,7 +360,6 @@ files:
|
|
359
360
|
- lib/foreman_maintain/concerns/base_database.rb
|
360
361
|
- lib/foreman_maintain/concerns/directory_marker.rb
|
361
362
|
- lib/foreman_maintain/concerns/downstream.rb
|
362
|
-
- lib/foreman_maintain/concerns/el_repos_manager_common.rb
|
363
363
|
- lib/foreman_maintain/concerns/finders.rb
|
364
364
|
- lib/foreman_maintain/concerns/hammer.rb
|
365
365
|
- lib/foreman_maintain/concerns/logger.rb
|
@@ -387,9 +387,6 @@ files:
|
|
387
387
|
- lib/foreman_maintain/procedure.rb
|
388
388
|
- lib/foreman_maintain/reporter.rb
|
389
389
|
- lib/foreman_maintain/reporter/cli_reporter.rb
|
390
|
-
- lib/foreman_maintain/repos_manager/dnf_config_manager.rb
|
391
|
-
- lib/foreman_maintain/repos_manager/el_common.rb
|
392
|
-
- lib/foreman_maintain/repos_manager/yum_config_manager.rb
|
393
390
|
- lib/foreman_maintain/runner.rb
|
394
391
|
- lib/foreman_maintain/runner/execution.rb
|
395
392
|
- lib/foreman_maintain/runner/stored_execution.rb
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module ForemanMaintain
|
2
|
-
module Concerns
|
3
|
-
module ElReposManagerCommon
|
4
|
-
include ForemanMaintain::Concerns::OsFacts
|
5
|
-
|
6
|
-
def package_manager
|
7
|
-
return 'dnf' if el8?
|
8
|
-
|
9
|
-
'yum'
|
10
|
-
end
|
11
|
-
|
12
|
-
def enabled_repos_hash
|
13
|
-
repos = execute("#{package_manager} repolist enabled -d 6 -e 0 2> /dev/null | grep -E 'Repo-id|Repo-baseurl'")
|
14
|
-
return {} if repos.empty?
|
15
|
-
|
16
|
-
Hash[*repos.delete!(' ').split("\n")]
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
module ForemanMaintain::ReposManager
|
2
|
-
class DnfConfigManager
|
3
|
-
include ForemanMaintain::Concerns::ElReposManagerCommon
|
4
|
-
|
5
|
-
def disable_repos(repo_ids)
|
6
|
-
execute!("dnf config-manager --set-disabled #{repo_ids.join(',')}")
|
7
|
-
end
|
8
|
-
|
9
|
-
def enable_repos(repo_ids)
|
10
|
-
execute!("dnf config-manager --set-enabled #{repo_ids.join(',')}")
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
File without changes
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module ForemanMaintain::ReposManager
|
2
|
-
class YumConfigManager
|
3
|
-
include ForemanMaintain::Concerns::ElReposManagerCommon
|
4
|
-
|
5
|
-
def disable_repos(repo_ids)
|
6
|
-
execute!("yum-config-manager --disable #{repo_ids.join(',')}")
|
7
|
-
end
|
8
|
-
|
9
|
-
def enable_repos(repo_ids)
|
10
|
-
execute!("yum-config-manager --enable #{repo_ids.join(',')}")
|
11
|
-
end
|
12
|
-
|
13
|
-
def enabled_repos_hash
|
14
|
-
repos = execute("yum repolist enabled -d 6 -e 0 2> /dev/null | grep -E 'Repo-id|Repo-baseurl'")
|
15
|
-
return {} if repos.empty?
|
16
|
-
|
17
|
-
Hash[*repos.delete!(' ').split("\n")]
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|