foreman_maintain 1.6.9 → 1.6.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/definitions/checks/foreman/validate_external_db_version.rb +3 -3
- data/definitions/features/katello.rb +0 -4
- data/definitions/procedures/hammer_setup.rb +5 -1
- data/definitions/procedures/packages/update_all_confirmation.rb +12 -5
- data/definitions/procedures/pulpcore/container_handle_image_metadata.rb +0 -3
- data/definitions/procedures/repositories/index_katello_repositories_container_metadata.rb +17 -0
- data/definitions/scenarios/backup.rb +1 -3
- data/definitions/scenarios/foreman_upgrade.rb +2 -1
- data/definitions/scenarios/satellite_upgrade.rb +2 -1
- data/lib/foreman_maintain/update_runner.rb +1 -1
- data/lib/foreman_maintain/version.rb +1 -1
- data/lib/foreman_maintain.rb +4 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d9b63f8c0c837772d8b3970d21f05e1b1a10a8b4a85784c4aca8cf337668dd1
|
4
|
+
data.tar.gz: 97034a6b9d3afef56fe2e996d7704e46c4eed61d9f86fc5cf9e9b62ddc425b96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf9b2cf09d804f042cabb04f2215b088776ceee4987fb1aef6be1e09e19207e949b8fc028792729eef29445c8946c3103999bc4f43b07d4509106a1079f49cb0
|
7
|
+
data.tar.gz: f50fc364c0d8d1bfd1dc14764381cabdcde43483e302571a96cc171b4a9c607fad71251424211ed771ebd17cce80559a396ed0345d2a998d26d3239877988d21
|
@@ -12,15 +12,15 @@ module Checks
|
|
12
12
|
|
13
13
|
def run
|
14
14
|
current_db_version = feature(:foreman_database).db_version
|
15
|
-
fail!(db_upgrade_message(current_db_version)) if current_db_version.major <
|
15
|
+
fail!(db_upgrade_message(current_db_version)) if current_db_version.major < 13
|
16
16
|
end
|
17
17
|
|
18
18
|
def db_upgrade_message(db_version)
|
19
19
|
product_name = feature(:instance).product_name
|
20
20
|
|
21
21
|
"\n\n*** ERROR: Server is running on PostgreSQL #{db_version} database.\n"\
|
22
|
-
"*** Newer version of #{product_name} supports only PostgreSQL version
|
23
|
-
"*** Before proceeding further, you must upgrade database to PostgreSQL
|
22
|
+
"*** Newer version of #{product_name} supports only PostgreSQL version 13.\n"\
|
23
|
+
"*** Before proceeding further, you must upgrade database to PostgreSQL 13.\n"
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -8,11 +8,18 @@ module Procedures::Packages
|
|
8
8
|
|
9
9
|
def run
|
10
10
|
if @packages.nil? || @packages.empty?
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
command = ForemanMaintain.command_name
|
12
|
+
|
13
|
+
question = <<~MSG
|
14
|
+
WARNING: No specific packages to update were provided
|
15
|
+
so we are going to update all available packages. We
|
16
|
+
recommend using the update command to update to a minor
|
17
|
+
version and/or operating system using '#{command} update'.
|
18
|
+
To upgrade to the next #{feature(:instance).product_name} version use '#{command} upgrade'.
|
19
|
+
Do you want to proceed with update of everything regardless of
|
20
|
+
the recommendations?
|
21
|
+
MSG
|
22
|
+
|
16
23
|
answer = ask_decision(question, actions_msg: 'y(yes), q(quit)')
|
17
24
|
abort! unless answer == :yes
|
18
25
|
end
|
@@ -17,9 +17,6 @@ module Procedures::Pulpcore
|
|
17
17
|
spinner.update('Adding image metadata to pulp. You can continue using the ' \
|
18
18
|
'system normally while the task runs in the background.')
|
19
19
|
execute!(pulpcore_manager('container-handle-image-data'))
|
20
|
-
spinner.update('Adding image metadata to katello. You can continue using the ' \
|
21
|
-
'system normally while the task runs in the background.')
|
22
|
-
execute!('foreman-rake katello:import_container_manifest_labels')
|
23
20
|
end
|
24
21
|
end
|
25
22
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Procedures::Repositories
|
2
|
+
class IndexKatelloRepositoriesContainerMetatdata < ForemanMaintain::Procedure
|
3
|
+
metadata do
|
4
|
+
description 'Import container manifest metadata'
|
5
|
+
confine do
|
6
|
+
feature(:katello)
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def run
|
11
|
+
with_spinner(('Adding image metadata. You can continue using the ' \
|
12
|
+
'system normally while the task runs in the background.')) do
|
13
|
+
execute!('foreman-rake katello:import_container_manifest_labels')
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -81,15 +81,13 @@ module ForemanMaintain::Scenarios
|
|
81
81
|
include_dumps if include_db_dumps?
|
82
82
|
add_step_with_context(Procedures::ForemanProxy::Features, :load_only => true)
|
83
83
|
add_steps_with_context(
|
84
|
-
find_procedures(:maintenance_mode_on),
|
85
84
|
Procedures::Service::Stop,
|
86
85
|
Procedures::Backup::ConfigFiles,
|
87
86
|
Procedures::Backup::Pulp,
|
88
87
|
Procedures::Backup::Offline::CandlepinDB,
|
89
88
|
Procedures::Backup::Offline::ForemanDB,
|
90
89
|
Procedures::Backup::Offline::PulpcoreDB,
|
91
|
-
Procedures::Service::Start
|
92
|
-
find_procedures(:maintenance_mode_off)
|
90
|
+
Procedures::Service::Start
|
93
91
|
)
|
94
92
|
end
|
95
93
|
|
@@ -135,7 +135,8 @@ module Scenarios::ForemanUpgrade
|
|
135
135
|
Checks::ServicesUp,
|
136
136
|
Checks::SystemRegistration,
|
137
137
|
Procedures::Packages::CheckForReboot,
|
138
|
-
Procedures::Pulpcore::ContainerHandleImageMetadata
|
138
|
+
Procedures::Pulpcore::ContainerHandleImageMetadata,
|
139
|
+
Procedures::Repositories::IndexKatelloRepositoriesContainerMetatdata
|
139
140
|
)
|
140
141
|
end
|
141
142
|
end
|
@@ -4,7 +4,7 @@ module Scenarios::Satellite
|
|
4
4
|
metadata do
|
5
5
|
tags :upgrade_scenario
|
6
6
|
confine do
|
7
|
-
(feature(:
|
7
|
+
(feature(:instance).downstream.current_minor_version == '6.15' || \
|
8
8
|
ForemanMaintain.upgrade_in_progress == '6.16')
|
9
9
|
end
|
10
10
|
instance_eval(&block)
|
@@ -99,6 +99,7 @@ module Scenarios::Satellite
|
|
99
99
|
add_steps(find_checks(:post_upgrade))
|
100
100
|
add_step(Procedures::Packages::CheckForReboot)
|
101
101
|
add_step(Procedures::Pulpcore::ContainerHandleImageMetadata)
|
102
|
+
add_step(Procedures::Repositories::IndexKatelloRepositoriesContainerMetatdata)
|
102
103
|
end
|
103
104
|
end
|
104
105
|
end
|
data/lib/foreman_maintain.rb
CHANGED
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.6.
|
4
|
+
version: 1.6.10
|
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: 2024-06-
|
11
|
+
date: 2024-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -284,6 +284,7 @@ files:
|
|
284
284
|
- definitions/procedures/repositories/backup_enabled_repos.rb
|
285
285
|
- definitions/procedures/repositories/disable.rb
|
286
286
|
- definitions/procedures/repositories/enable.rb
|
287
|
+
- definitions/procedures/repositories/index_katello_repositories_container_metadata.rb
|
287
288
|
- definitions/procedures/repositories/setup.rb
|
288
289
|
- definitions/procedures/restore/candlepin_dump.rb
|
289
290
|
- definitions/procedures/restore/configs.rb
|