capistrano-karaf 1.6.14 → 1.6.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -83,9 +83,9 @@ module Capistrano_Karaf
|
|
83
83
|
#
|
84
84
|
# Returns nothing
|
85
85
|
def feature_uninstall(name, version=nil)
|
86
|
-
|
87
86
|
# Keep track of the bundles that are part of the feature
|
88
87
|
feature_bundle_urls = feature_bundles(name, version).collect {|b| b[:url]}
|
88
|
+
puts "Bundles in feature: #{feature_bundle_urls}"
|
89
89
|
|
90
90
|
if version.nil? then
|
91
91
|
execute(:features_uninstall, "#{name}")
|
@@ -96,6 +96,7 @@ module Capistrano_Karaf
|
|
96
96
|
# Verify all bundles have been uninstalled and remove the bundle if not
|
97
97
|
list_bundle_locations.each do |installed_bundle|
|
98
98
|
if feature_bundle_urls.include? installed_bundle[:url] then
|
99
|
+
puts "Uninstall bundle #{installed_bundle}"
|
99
100
|
uninstall installed_bundle[:id]
|
100
101
|
end
|
101
102
|
end
|
@@ -382,6 +383,7 @@ module Capistrano_Karaf
|
|
382
383
|
|
383
384
|
def extract_bundles_from_feature (data)
|
384
385
|
bundles = []
|
386
|
+
|
385
387
|
data.lines.each do |l|
|
386
388
|
m = l.match(/mvn:(?<GroupId>[\w\.]+)\/(?<ArtifactId>[-\w\.]+)\/(?<Version>[-\d\w\.]+)/)
|
387
389
|
if m then
|
@@ -88,9 +88,12 @@ module Capistrano_Karaf
|
|
88
88
|
args = {:timeout => 60, :sleeptime => 5}.merge(args)
|
89
89
|
timeout = Time.now + args[:timeout]
|
90
90
|
|
91
|
-
|
92
|
-
|
91
|
+
bundles = list_bundles
|
92
|
+
until Time.now > timeout or bundles.all? { |b| pred.call b}
|
93
|
+
failing_bundles = bundles.select { |b| !pred.call b }
|
94
|
+
puts "Some bundles are still failing the predicate #{pred}: #{failing_bundles}"
|
93
95
|
sleep args[:sleeptime]
|
96
|
+
bundles = list_bundles
|
94
97
|
end
|
95
98
|
|
96
99
|
raise "Not all bundles pass the predicate within the timeout of #{args[:timeout]} seconds" unless list_bundles.all? { |b| pred.call b }
|
@@ -78,7 +78,10 @@ module Install
|
|
78
78
|
def upgrade (projects, args={})
|
79
79
|
args = {:startlevel_before_upgrade => 60, :startlevel_after_upgrade => 100}.merge(args)
|
80
80
|
features = list_features
|
81
|
+
puts "Features #{features}"
|
81
82
|
to_uninstall, to_install = calculate_upgrade_actions(projects, features)
|
83
|
+
puts "To uninstall #{to_uninstall}"
|
84
|
+
puts "To install #{to_install}"
|
82
85
|
|
83
86
|
begin
|
84
87
|
# decrease the start level
|
@@ -257,8 +260,9 @@ module Install
|
|
257
260
|
def ensure_all_bundles_are_restarted (level_before_upgrade, initial_level)
|
258
261
|
wait_for_all_bundles(:timeout => 600, :sleeptime => 10) do |b|
|
259
262
|
if (b[:level].to_i > level_before_upgrade and
|
260
|
-
b[:level].to_i <= initial_level
|
261
|
-
|
263
|
+
b[:level].to_i <= initial_level and
|
264
|
+
b[:name] != 'activemq-blueprint')
|
265
|
+
["Active","Failed"].include? b[:status]
|
262
266
|
else
|
263
267
|
true
|
264
268
|
end
|