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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cdd4ef357f342501b15fbaf461be19952c2d09fde6fb7c1f3523711201ef3faa
4
- data.tar.gz: cc9b2d323a171c5676276767f11c4a83adc5123fab01f58114d88a80a3ddba13
3
+ metadata.gz: 6d9b63f8c0c837772d8b3970d21f05e1b1a10a8b4a85784c4aca8cf337668dd1
4
+ data.tar.gz: 97034a6b9d3afef56fe2e996d7704e46c4eed61d9f86fc5cf9e9b62ddc425b96
5
5
  SHA512:
6
- metadata.gz: fffefa90d5f28514280c732cb232003acb543420a9ca9fd5a9cf77749beecb1533a05d71bb6b7c5db1e3e06dcb5909a5fa3e8f85ef3a98ae369f090cef84c052
7
- data.tar.gz: cb4997dcbb7eba53f9e4d82445ad327316e3a1ace686e62ffd0b3f4a63ecd418542d73c42d7fe10692fb48054dc902b42faaff2772c744e91c421160210fec13
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 < 12
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 12.\n"\
23
- "*** Before proceeding further, you must upgrade database to PostgreSQL 12.\n"
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
@@ -9,10 +9,6 @@ class Features::Katello < ForemanMaintain::Feature
9
9
  end
10
10
  end
11
11
 
12
- def data_dirs
13
- @dirs ||= ['/var/lib/pulp', '/var/lib/pgsql']
14
- end
15
-
16
12
  def current_version
17
13
  @current_version ||= package_version('katello')
18
14
  end
@@ -18,6 +18,10 @@ class Procedures::HammerSetup < ForemanMaintain::Procedure
18
18
  end
19
19
 
20
20
  def necessary?
21
- !feature(:hammer).check_connection
21
+ if feature(:hammer)
22
+ !feature(:hammer).check_connection
23
+ else
24
+ false
25
+ end
22
26
  end
23
27
  end
@@ -8,11 +8,18 @@ module Procedures::Packages
8
8
 
9
9
  def run
10
10
  if @packages.nil? || @packages.empty?
11
- question = "\nWARNING: No specific packages to update were provided\n" \
12
- "so we are going to update all available packages.\n" \
13
- "To Upgrade to next version use 'foreman-maintain upgrade'.\n\n" \
14
- "Do you want to proceed with update of everything regardless\n" \
15
- 'of the recommendations?'
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(:downstream).current_minor_version == '6.15' || \
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
@@ -46,7 +46,7 @@ module ForemanMaintain
46
46
  def finish_update
47
47
  @finished = true
48
48
  @reporter.hline
49
- @reporter.puts("Update finished.")
49
+ @reporter.puts("Update finished.\n")
50
50
  end
51
51
 
52
52
  def storage
@@ -1,3 +1,3 @@
1
1
  module ForemanMaintain
2
- VERSION = '1.6.9'.freeze
2
+ VERSION = '1.6.10'.freeze
3
3
  end
@@ -174,6 +174,10 @@ module ForemanMaintain
174
174
  [main_package_name, 'foreman-maintain']
175
175
  end
176
176
 
177
+ def command_name
178
+ pkg_and_cmd_name[1]
179
+ end
180
+
177
181
  def perform_self_upgrade
178
182
  package_name, command = pkg_and_cmd_name
179
183
 
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.9
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 00:00:00.000000000 Z
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