manageiq-appliance_console 3.3.2 → 3.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/manageiq/appliance_console/cli.rb +9 -10
- data/lib/manageiq/appliance_console/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1778c8d617691aa881a998d7d106d8062d6f6e1ae21f64286f5cc6e784366eb4
|
4
|
+
data.tar.gz: feed3c1a56f14984c3f062591c6275f4ba687b0c77b3a7a10c9e25b8e4da5c5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e3d29649b362700a9d9f94083e51f0531e99efc6aae2fc67af2286692d267e1fb5c9e031c9050e08311f4f207a52098843a0d5fbf7ec0b9451a621a5b2343b1
|
7
|
+
data.tar.gz: 7073df17678575318c597b655ab657d5927d4492bd71eda802df52a6f065b0fd8c57083ddd415a615e9a687f7f3886911f8ed80aed6b72b42ebaba63c45731a1
|
@@ -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
|
|
@@ -178,6 +180,10 @@ module ApplianceConsole
|
|
178
180
|
install_certs if certs?
|
179
181
|
extauth_opts if extauth_opts?
|
180
182
|
set_server_state if set_server_state?
|
183
|
+
rescue CliError => e
|
184
|
+
say(e.message)
|
185
|
+
say("")
|
186
|
+
exit(1)
|
181
187
|
rescue AwesomeSpawn::CommandResultError => e
|
182
188
|
say e.result.output
|
183
189
|
say e.result.error
|
@@ -216,16 +222,12 @@ module ApplianceConsole
|
|
216
222
|
# initdb, relabel log directory for selinux, update configs,
|
217
223
|
# start pg, create user, create db update the rails configuration,
|
218
224
|
# verify, set up the database with region. activate does it all!
|
219
|
-
unless config.activate
|
220
|
-
say "Failed to configure internal database"
|
221
|
-
return
|
222
|
-
end
|
225
|
+
raise CliError, "Failed to configure internal database" unless config.activate
|
223
226
|
|
224
227
|
# enable/start related services
|
225
228
|
config.post_activation
|
226
229
|
rescue RuntimeError => e
|
227
|
-
|
228
|
-
say "Failed to configure internal database"
|
230
|
+
raise CliError, "Failed to configure internal database #{e.message}"
|
229
231
|
end
|
230
232
|
|
231
233
|
def set_external_db
|
@@ -241,10 +243,7 @@ module ApplianceConsole
|
|
241
243
|
}.delete_if { |_n, v| v.nil? })
|
242
244
|
|
243
245
|
# call create_or_join_region (depends on region value)
|
244
|
-
unless config.activate
|
245
|
-
say "Failed to configure external database"
|
246
|
-
return
|
247
|
-
end
|
246
|
+
raise CliError, "Failed to configure external database" unless config.activate
|
248
247
|
|
249
248
|
# enable/start related services
|
250
249
|
config.post_activation
|
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: 3.3.
|
4
|
+
version: 3.3.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-
|
11
|
+
date: 2019-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -301,8 +301,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
301
301
|
- !ruby/object:Gem::Version
|
302
302
|
version: '0'
|
303
303
|
requirements: []
|
304
|
-
|
305
|
-
rubygems_version: 2.7.6.2
|
304
|
+
rubygems_version: 3.0.6
|
306
305
|
signing_key:
|
307
306
|
specification_version: 4
|
308
307
|
summary: ManageIQ Appliance Console
|