manageiq-appliance_console 5.0.2 → 5.0.3

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: 9c5168ad0ac52d8c3087b0e176f55df074a0e68ab71cfff2fa826bcc00554f20
4
- data.tar.gz: 1efbf237b1c20ff978b1c5e7b26a3f478dc1f38e013641d3ad3dce313ac7b3d3
3
+ metadata.gz: 4baaae9e551222520424d741df95ce3dc1649b18303ef9fd873c9964177da440
4
+ data.tar.gz: b40882a8c0ac7f02cde200cbde365c3cc51f46a1a83608d9bde769ce77355138
5
5
  SHA512:
6
- metadata.gz: cdf1815a6d86a9dca9cd8abf65d7de9c44967c9276ebd962caecf0a218e006a8c82100387d28189d52fb4ffd34cf692d96affc8d22a9c017070a26082e982cad
7
- data.tar.gz: 1d93ef6b02710ee53f0b932436953434cdae061551c530bcc8fe2a195cc0c051791c4147ec2f98aeb5f649abb0becf5d2247b17c1516c52fa2a3499752cf160f
6
+ metadata.gz: 79ed5ef8f7b163a48925057baf5f7938167a35e381b5fbdb114c07630ed412aa93a846bd99980e3728016ae5029b6c0d0dc9c87653a7184b00a05ca5f5ae8768
7
+ data.tar.gz: 4e541333c7e5eb1a1d77aba86e2a865317ac95a2822b31d2520b893c3a04434a6745f2f5fc249fd462a62c5c94534a13aaa80b2c8f3f9e19df8d724b434dcfae
@@ -10,6 +10,8 @@ end
10
10
 
11
11
  module ManageIQ
12
12
  module ApplianceConsole
13
+ class CliError < StandardError; end
14
+
13
15
  class Cli
14
16
  attr_accessor :options
15
17
 
@@ -176,6 +178,10 @@ module ApplianceConsole
176
178
  install_certs if certs?
177
179
  extauth_opts if extauth_opts?
178
180
  set_server_state if set_server_state?
181
+ rescue CliError => e
182
+ say(e.message)
183
+ say("")
184
+ exit(1)
179
185
  rescue AwesomeSpawn::CommandResultError => e
180
186
  say e.result.output
181
187
  say e.result.error
@@ -214,16 +220,12 @@ module ApplianceConsole
214
220
  # initdb, relabel log directory for selinux, update configs,
215
221
  # start pg, create user, create db update the rails configuration,
216
222
  # verify, set up the database with region. activate does it all!
217
- unless config.activate
218
- say "Failed to configure internal database"
219
- return
220
- end
223
+ raise CliError, "Failed to configure internal database" unless config.activate
221
224
 
222
225
  # enable/start related services
223
226
  config.post_activation
224
227
  rescue RuntimeError => e
225
- say e.message
226
- say "Failed to configure internal database"
228
+ raise CliError, "Failed to configure internal database #{e.message}"
227
229
  end
228
230
 
229
231
  def set_external_db
@@ -239,10 +241,7 @@ module ApplianceConsole
239
241
  }.delete_if { |_n, v| v.nil? })
240
242
 
241
243
  # call create_or_join_region (depends on region value)
242
- unless config.activate
243
- say "Failed to configure external database"
244
- return
245
- end
244
+ raise CliError, "Failed to configure external database" unless config.activate
246
245
 
247
246
  # enable/start related services
248
247
  config.post_activation
@@ -1,5 +1,5 @@
1
1
  module ManageIQ
2
2
  module ApplianceConsole
3
- VERSION = '5.0.2'.freeze
3
+ VERSION = '5.0.3'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manageiq-appliance_console
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.2
4
+ version: 5.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ManageIQ Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-14 00:00:00.000000000 Z
11
+ date: 2019-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -315,8 +315,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
315
315
  - !ruby/object:Gem::Version
316
316
  version: '0'
317
317
  requirements: []
318
- rubyforge_project:
319
- rubygems_version: 2.7.6.2
318
+ rubygems_version: 3.0.6
320
319
  signing_key:
321
320
  specification_version: 4
322
321
  summary: ManageIQ Appliance Console