crowbar-client 3.1.6 → 3.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/crowbar/client/app/upgrade.rb +5 -5
- data/lib/crowbar/client/command/upgrade.rb +3 -3
- data/lib/crowbar/client/command/upgrade/{crowbar.rb → admin.rb} +6 -4
- data/lib/crowbar/client/command/upgrade/backup.rb +6 -2
- data/lib/crowbar/client/command/upgrade/database.rb +1 -0
- data/lib/crowbar/client/command/upgrade/nodes.rb +3 -2
- data/lib/crowbar/client/command/upgrade/prechecks.rb +4 -0
- data/lib/crowbar/client/command/upgrade/prepare.rb +4 -2
- data/lib/crowbar/client/command/upgrade/repocheck.rb +5 -2
- data/lib/crowbar/client/command/upgrade/services.rb +4 -2
- data/lib/crowbar/client/request/upgrade.rb +3 -3
- data/lib/crowbar/client/request/upgrade/{crowbar.rb → admin.rb} +2 -2
- data/lib/crowbar/client/version.rb +1 -1
- data/spec/crowbar/client/command/upgrade/{crowbar_spec.rb → admin_spec.rb} +2 -2
- data/spec/crowbar/client/request/upgrade/{crowbar_spec.rb → admin_spec.rb} +2 -2
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f864e6715677523b58fc601bce43448d4a3faa1
|
4
|
+
data.tar.gz: bbc62230ae538cdb6737677166bfcd22a4d0f210
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 160d5b924836dd0cb4fc3347b4842f86f0f6ae6e4f67f686173708adb679ab17220a483369612538041d316860ff06c5545e3d0601f2bd3b22a6eba4f3e7f048
|
7
|
+
data.tar.gz: 62e76b59a457801d66cc3c32c57c1eb07109054076a64821fb0f4b4aac0660958f2f6be50a2af43c6a543056f3d194d52333aea8a7ab525270959edfa3d85afd
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [3.1.7](https://github.com/crowbar/crowbar-client/releases/tag/v3.1.7) - 2017-01-13
|
4
|
+
|
5
|
+
* ENHANCEMENT
|
6
|
+
* Guide user through the upgrade (@MaximilianMeister)
|
7
|
+
* Internal steps of the upgrade were renamed (@MaximilianMeister)
|
8
|
+
|
3
9
|
## [3.1.6](https://github.com/crowbar/crowbar-client/releases/tag/v3.1.6) - 2017-01-05
|
4
10
|
|
5
11
|
* BUGFIX
|
@@ -169,15 +169,15 @@ module Crowbar
|
|
169
169
|
catch_errors(e)
|
170
170
|
end
|
171
171
|
|
172
|
-
desc "
|
173
|
-
"Upgrade
|
172
|
+
desc "admin",
|
173
|
+
"Upgrade Admin Server"
|
174
174
|
|
175
175
|
long_desc <<-LONGDESC
|
176
|
-
`
|
176
|
+
`admin` will upgrade the Crowbar server.
|
177
177
|
LONGDESC
|
178
178
|
|
179
|
-
def
|
180
|
-
Command::Upgrade::
|
179
|
+
def admin
|
180
|
+
Command::Upgrade::Admin.new(
|
181
181
|
*command_params
|
182
182
|
).execute
|
183
183
|
rescue => e
|
@@ -21,15 +21,15 @@ module Crowbar
|
|
21
21
|
# Module for the upgrade command implementations
|
22
22
|
#
|
23
23
|
module Upgrade
|
24
|
+
autoload :Admin,
|
25
|
+
File.expand_path("../upgrade/admin", __FILE__)
|
26
|
+
|
24
27
|
autoload :Backup,
|
25
28
|
File.expand_path("../upgrade/backup", __FILE__)
|
26
29
|
|
27
30
|
autoload :Cancel,
|
28
31
|
File.expand_path("../upgrade/cancel", __FILE__)
|
29
32
|
|
30
|
-
autoload :Crowbar,
|
31
|
-
File.expand_path("../upgrade/crowbar", __FILE__)
|
32
|
-
|
33
33
|
autoload :Database,
|
34
34
|
File.expand_path("../upgrade/database", __FILE__)
|
35
35
|
|
@@ -19,13 +19,13 @@ module Crowbar
|
|
19
19
|
module Command
|
20
20
|
module Upgrade
|
21
21
|
#
|
22
|
-
# Implementation for the upgrade
|
22
|
+
# Implementation for the upgrade admin command
|
23
23
|
#
|
24
|
-
class
|
24
|
+
class Admin < Base
|
25
25
|
include Mixin::UpgradeError
|
26
26
|
|
27
27
|
def request
|
28
|
-
@request ||= Request::Upgrade::
|
28
|
+
@request ||= Request::Upgrade::Admin.new(
|
29
29
|
args
|
30
30
|
)
|
31
31
|
end
|
@@ -35,9 +35,11 @@ module Crowbar
|
|
35
35
|
case request.code
|
36
36
|
when 200
|
37
37
|
say "Triggered Crowbar operating system upgrade"
|
38
|
+
say "Wait until the admin server is fully upgraded and rebooted."
|
39
|
+
say "Next step: 'crowbarctl upgrade database [new|connect]'"
|
38
40
|
else
|
39
41
|
err format_error(
|
40
|
-
request.parsed_response["error"], "
|
42
|
+
request.parsed_response["error"], "admin"
|
41
43
|
)
|
42
44
|
end
|
43
45
|
end
|
@@ -35,15 +35,19 @@ module Crowbar
|
|
35
35
|
case request.code
|
36
36
|
when 200
|
37
37
|
say "Successfully created backup for #{args.component}"
|
38
|
+
if args.component == "crowbar"
|
39
|
+
say "Next step: 'crowbarctl upgrade repocheck crowbar'"
|
40
|
+
end
|
41
|
+
say "Next step: 'crowbarctl upgrade nodes'" if args.component == "openstack"
|
38
42
|
else
|
39
43
|
case args.component
|
40
44
|
when "crowbar"
|
41
45
|
err format_error(
|
42
|
-
request.parsed_response["error"], "
|
46
|
+
request.parsed_response["error"], "backup_crowbar"
|
43
47
|
)
|
44
48
|
when "openstack"
|
45
49
|
err format_error(
|
46
|
-
request.parsed_response["error"], "
|
50
|
+
request.parsed_response["error"], "backup_openstack"
|
47
51
|
)
|
48
52
|
else
|
49
53
|
request.parsed_response["error"]
|
@@ -34,10 +34,11 @@ module Crowbar
|
|
34
34
|
request.process do |request|
|
35
35
|
case request.code
|
36
36
|
when 200
|
37
|
-
say "Successfully triggered the upgrade of the nodes"
|
37
|
+
say "Successfully triggered the upgrade of the nodes. " \
|
38
|
+
"Query the upgrade status to follow the process with 'crowbarctl upgrade status'."
|
38
39
|
else
|
39
40
|
err format_error(
|
40
|
-
request.parsed_response["error"], "
|
41
|
+
request.parsed_response["error"], "nodes"
|
41
42
|
)
|
42
43
|
end
|
43
44
|
end
|
@@ -48,6 +48,10 @@ module Crowbar
|
|
48
48
|
err "No checks"
|
49
49
|
else
|
50
50
|
say formatter.result
|
51
|
+
next unless provide_format == :table
|
52
|
+
say "Make sure that there are no errors for the required checks" \
|
53
|
+
" before executing the next step."
|
54
|
+
say "Next step: 'crowbarctl upgrade prepare'"
|
51
55
|
end
|
52
56
|
else
|
53
57
|
err request.parsed_response["error"]
|
@@ -34,10 +34,12 @@ module Crowbar
|
|
34
34
|
request.process do |request|
|
35
35
|
case request.code
|
36
36
|
when 200
|
37
|
-
say "Setting nodes to upgrade state"
|
37
|
+
say "Setting nodes to upgrade state." \
|
38
|
+
"Query the upgrade status to follow the process with 'crowbarctl upgrade status'."
|
39
|
+
say "Next step: 'crowbarctl upgrade backup crowbar'"
|
38
40
|
else
|
39
41
|
err format_error(
|
40
|
-
request.parsed_response["error"], "
|
42
|
+
request.parsed_response["error"], "prepare"
|
41
43
|
)
|
42
44
|
end
|
43
45
|
end
|
@@ -49,16 +49,19 @@ module Crowbar
|
|
49
49
|
err "No repochecks"
|
50
50
|
else
|
51
51
|
say formatter.result
|
52
|
+
next unless provide_format == :table
|
53
|
+
say "Next step: 'crowbarctl upgrade admin'" if args.component == "admin"
|
54
|
+
say "Next step: 'crowbarctl upgrade services'" if args.component == "nodes"
|
52
55
|
end
|
53
56
|
else
|
54
57
|
case args.component
|
55
58
|
when "crowbar"
|
56
59
|
err format_error(
|
57
|
-
request.parsed_response["error"], "
|
60
|
+
request.parsed_response["error"], "repocheck_crowbar"
|
58
61
|
)
|
59
62
|
when "nodes"
|
60
63
|
err format_error(
|
61
|
-
request.parsed_response["error"], "
|
64
|
+
request.parsed_response["error"], "repocheck_nodes"
|
62
65
|
)
|
63
66
|
else
|
64
67
|
err request.parsed_response["error"]
|
@@ -34,10 +34,12 @@ module Crowbar
|
|
34
34
|
request.process do |request|
|
35
35
|
case request.code
|
36
36
|
when 200
|
37
|
-
say "Stopping related services on all nodes"
|
37
|
+
say "Stopping related services on all nodes." \
|
38
|
+
"Query the upgrade status to follow the process with 'crowbarctl upgrade status'."
|
39
|
+
say "Next step: 'crowbarctl upgrade nodes'"
|
38
40
|
else
|
39
41
|
err format_error(
|
40
|
-
request.parsed_response["error"], "
|
42
|
+
request.parsed_response["error"], "services"
|
41
43
|
)
|
42
44
|
end
|
43
45
|
end
|
@@ -21,15 +21,15 @@ module Crowbar
|
|
21
21
|
# Module for the upgrade request implementations
|
22
22
|
#
|
23
23
|
module Upgrade
|
24
|
+
autoload :Admin,
|
25
|
+
File.expand_path("../upgrade/admin", __FILE__)
|
26
|
+
|
24
27
|
autoload :Backup,
|
25
28
|
File.expand_path("../upgrade/backup", __FILE__)
|
26
29
|
|
27
30
|
autoload :Cancel,
|
28
31
|
File.expand_path("../upgrade/cancel", __FILE__)
|
29
32
|
|
30
|
-
autoload :Crowbar,
|
31
|
-
File.expand_path("../upgrade/crowbar", __FILE__)
|
32
|
-
|
33
33
|
autoload :Database,
|
34
34
|
File.expand_path("../upgrade/database", __FILE__)
|
35
35
|
|
@@ -16,12 +16,12 @@
|
|
16
16
|
|
17
17
|
require_relative "../../../../spec_helper"
|
18
18
|
|
19
|
-
describe "Crowbar::Client::Command::Upgrade::
|
19
|
+
describe "Crowbar::Client::Command::Upgrade::Admin" do
|
20
20
|
include_context "command_context"
|
21
21
|
|
22
22
|
it_behaves_like "a command class", true do
|
23
23
|
subject do
|
24
|
-
::Crowbar::Client::Command::Upgrade::
|
24
|
+
::Crowbar::Client::Command::Upgrade::Admin.new(
|
25
25
|
stdin,
|
26
26
|
stdout,
|
27
27
|
stderr
|
@@ -17,10 +17,10 @@
|
|
17
17
|
|
18
18
|
require_relative "../../../../spec_helper"
|
19
19
|
|
20
|
-
describe "Crowbar::Client::Request::Upgrade::
|
20
|
+
describe "Crowbar::Client::Request::Upgrade::Admin" do
|
21
21
|
it_behaves_like "a request class", true do
|
22
22
|
subject do
|
23
|
-
::Crowbar::Client::Request::Upgrade::
|
23
|
+
::Crowbar::Client::Request::Upgrade::Admin.new(
|
24
24
|
attrs
|
25
25
|
)
|
26
26
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crowbar-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Boerger
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-01-
|
13
|
+
date: 2017-01-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -316,9 +316,9 @@ files:
|
|
316
316
|
- lib/crowbar/client/command/server/api.rb
|
317
317
|
- lib/crowbar/client/command/server/check.rb
|
318
318
|
- lib/crowbar/client/command/upgrade.rb
|
319
|
+
- lib/crowbar/client/command/upgrade/admin.rb
|
319
320
|
- lib/crowbar/client/command/upgrade/backup.rb
|
320
321
|
- lib/crowbar/client/command/upgrade/cancel.rb
|
321
|
-
- lib/crowbar/client/command/upgrade/crowbar.rb
|
322
322
|
- lib/crowbar/client/command/upgrade/database.rb
|
323
323
|
- lib/crowbar/client/command/upgrade/nodes.rb
|
324
324
|
- lib/crowbar/client/command/upgrade/prechecks.rb
|
@@ -417,9 +417,9 @@ files:
|
|
417
417
|
- lib/crowbar/client/request/server/api.rb
|
418
418
|
- lib/crowbar/client/request/server/check.rb
|
419
419
|
- lib/crowbar/client/request/upgrade.rb
|
420
|
+
- lib/crowbar/client/request/upgrade/admin.rb
|
420
421
|
- lib/crowbar/client/request/upgrade/backup.rb
|
421
422
|
- lib/crowbar/client/request/upgrade/cancel.rb
|
422
|
-
- lib/crowbar/client/request/upgrade/crowbar.rb
|
423
423
|
- lib/crowbar/client/request/upgrade/database.rb
|
424
424
|
- lib/crowbar/client/request/upgrade/nodes.rb
|
425
425
|
- lib/crowbar/client/request/upgrade/prechecks.rb
|
@@ -488,9 +488,9 @@ files:
|
|
488
488
|
- spec/crowbar/client/command/role/show_spec.rb
|
489
489
|
- spec/crowbar/client/command/server/api_spec.rb
|
490
490
|
- spec/crowbar/client/command/server/check_spec.rb
|
491
|
+
- spec/crowbar/client/command/upgrade/admin_spec.rb
|
491
492
|
- spec/crowbar/client/command/upgrade/backup_spec.rb
|
492
493
|
- spec/crowbar/client/command/upgrade/cancel_spec.rb
|
493
|
-
- spec/crowbar/client/command/upgrade/crowbar_spec.rb
|
494
494
|
- spec/crowbar/client/command/upgrade/database_spec.rb
|
495
495
|
- spec/crowbar/client/command/upgrade/nodes_spec.rb
|
496
496
|
- spec/crowbar/client/command/upgrade/prechecks_spec.rb
|
@@ -551,9 +551,9 @@ files:
|
|
551
551
|
- spec/crowbar/client/request/role/show_spec.rb
|
552
552
|
- spec/crowbar/client/request/server/api_spec.rb
|
553
553
|
- spec/crowbar/client/request/server/check_spec.rb
|
554
|
+
- spec/crowbar/client/request/upgrade/admin_spec.rb
|
554
555
|
- spec/crowbar/client/request/upgrade/backup_spec.rb
|
555
556
|
- spec/crowbar/client/request/upgrade/cancel_spec.rb
|
556
|
-
- spec/crowbar/client/request/upgrade/crowbar_spec.rb
|
557
557
|
- spec/crowbar/client/request/upgrade/database_spec.rb
|
558
558
|
- spec/crowbar/client/request/upgrade/nodes_spec.rb
|
559
559
|
- spec/crowbar/client/request/upgrade/prechecks_spec.rb
|
@@ -651,9 +651,9 @@ test_files:
|
|
651
651
|
- spec/crowbar/client/command/role/show_spec.rb
|
652
652
|
- spec/crowbar/client/command/server/api_spec.rb
|
653
653
|
- spec/crowbar/client/command/server/check_spec.rb
|
654
|
+
- spec/crowbar/client/command/upgrade/admin_spec.rb
|
654
655
|
- spec/crowbar/client/command/upgrade/backup_spec.rb
|
655
656
|
- spec/crowbar/client/command/upgrade/cancel_spec.rb
|
656
|
-
- spec/crowbar/client/command/upgrade/crowbar_spec.rb
|
657
657
|
- spec/crowbar/client/command/upgrade/database_spec.rb
|
658
658
|
- spec/crowbar/client/command/upgrade/nodes_spec.rb
|
659
659
|
- spec/crowbar/client/command/upgrade/prechecks_spec.rb
|
@@ -714,9 +714,9 @@ test_files:
|
|
714
714
|
- spec/crowbar/client/request/role/show_spec.rb
|
715
715
|
- spec/crowbar/client/request/server/api_spec.rb
|
716
716
|
- spec/crowbar/client/request/server/check_spec.rb
|
717
|
+
- spec/crowbar/client/request/upgrade/admin_spec.rb
|
717
718
|
- spec/crowbar/client/request/upgrade/backup_spec.rb
|
718
719
|
- spec/crowbar/client/request/upgrade/cancel_spec.rb
|
719
|
-
- spec/crowbar/client/request/upgrade/crowbar_spec.rb
|
720
720
|
- spec/crowbar/client/request/upgrade/database_spec.rb
|
721
721
|
- spec/crowbar/client/request/upgrade/nodes_spec.rb
|
722
722
|
- spec/crowbar/client/request/upgrade/prechecks_spec.rb
|