Permalink
Browse files

Merge branch 'services-r9'

Change-Id: I3d889cd543bdded14b8bac5e5c766cccc68c09e1
  • Loading branch information...
2 parents cd74fa6 + 8d21b04 commit fb5fdf4c41828a6263faff04a467afb8987129d5 @kushmerick kushmerick committed Mar 22, 2012
Showing with 2,567 additions and 1,313 deletions.
  1. +1 −1 Rakefile
  2. +1 −1 atmos/Gemfile.lock
  3. BIN atmos/vendor/cache/vcap_services_base-0.1.7.gem
  4. BIN atmos/vendor/cache/vcap_services_base-0.1.8.gem
  5. +4 −3 base/Gemfile.lock
  6. +0 −5 base/lib/base/base.rb
  7. +14 −4 base/lib/base/datamapper_l.rb
  8. +0 −1 base/lib/base/gateway.rb
  9. +8 −10 base/lib/base/node.rb
  10. +6 −2 base/lib/base/node_bin.rb
  11. +53 −59 base/lib/base/provisioner.rb
  12. +1 −1 base/lib/base/version.rb
  13. +2 −6 base/spec/helper/node_spec_helper.rb
  14. +5 −8 base/spec/helper/provision_spec_helper.rb
  15. +13 −2 base/spec/node_spec.rb
  16. +38 −31 base/spec/provision_spec.rb
  17. +1 −1 filesystem/Gemfile.lock
  18. BIN filesystem/vendor/cache/vcap_services_base-0.1.7.gem
  19. BIN filesystem/vendor/cache/vcap_services_base-0.1.8.gem
  20. +1 −1 mongodb/Gemfile.lock
  21. +0 −1 mongodb/bin/mongodb_node
  22. +1 −1 mongodb/config/mongodb_node.yml
  23. +26 −27 mongodb/lib/mongodb_service/mongodb_node.rb
  24. +1 −1 mongodb/spec/config/mongodb_backup.yml.erb
  25. +66 −48 mongodb/spec/mongodb_backup_spec.rb
  26. +16 −14 mongodb/spec/mongodb_provision_spec.rb
  27. +0 −142 mongodb/spec/mongodb_recovery_spec.rb
  28. +14 −2 mongodb/spec/spec_helper.rb
  29. BIN mongodb/vendor/cache/vcap_services_base-0.1.7.gem
  30. BIN mongodb/vendor/cache/vcap_services_base-0.1.8.gem
  31. +1 −1 mysql/Gemfile.lock
  32. +1 −0 mysql/bin/mysql_node
  33. +2 −0 mysql/config/mysql_node.yml
  34. +31 −26 mysql/lib/mysql_service/node.rb
  35. +17 −15 mysql/lib/mysql_service/storage_quota.rb
  36. +13 −7 mysql/lib/mysql_service/util.rb
  37. +52 −1 mysql/spec/mysql_connection_pool_spec.rb
  38. +25 −37 mysql/spec/mysql_node_spec.rb
  39. BIN mysql/vendor/cache/vcap_services_base-0.1.7.gem
  40. BIN mysql/vendor/cache/vcap_services_base-0.1.8.gem
  41. +1 −1 neo4j/Gemfile.lock
  42. +0 −1 neo4j/bin/neo4j_node
  43. +3 −1 neo4j/config/neo4j_node.yml
  44. +27 −41 neo4j/lib/neo4j_service/neo4j_node.rb
  45. +0 −3 neo4j/lib/neo4j_service/neo4j_provisioner.rb
  46. +0 −2 neo4j/spec/neo4j_node_bind_spec.rb
  47. +3 −17 neo4j/spec/neo4j_node_provision_spec.rb
  48. +7 −2 neo4j/spec/spec_helper.rb
  49. BIN neo4j/vendor/cache/vcap_services_base-0.1.7.gem
  50. BIN neo4j/vendor/cache/vcap_services_base-0.1.8.gem
  51. +1 −1 postgresql/Gemfile.lock
  52. +1 −0 postgresql/config/postgresql_node.yml
  53. +16 −23 postgresql/lib/postgresql_service/node.rb
  54. +13 −49 postgresql/spec/postgresql_node_spec.rb
  55. BIN postgresql/vendor/cache/vcap_services_base-0.1.7.gem
  56. BIN postgresql/vendor/cache/vcap_services_base-0.1.8.gem
  57. +2 −1 rabbit/Gemfile
  58. +13 −9 rabbit/Gemfile.lock
  59. +7 −6 rabbit/bin/rabbit_gateway
  60. +12 −8 rabbit/bin/rabbit_node
  61. +15 −5 rabbit/config/rabbit_gateway.yml
  62. +16 −6 rabbit/config/rabbit_node.yml
  63. +21 −20 rabbit/lib/rabbit_service/rabbit_error.rb
  64. +327 −301 rabbit/lib/rabbit_service/rabbit_node.rb
  65. +0 −4 rabbit/lib/rabbit_service/rabbit_provisioner.rb
  66. +136 −0 rabbit/lib/rabbit_service/util.rb
  67. +4 −0 rabbit/resources/rabbitmq.config.erb
  68. +110 −317 rabbit/spec/node_spec.rb
  69. +11 −3 rabbit/spec/provisioner_spec.rb
  70. +94 −7 rabbit/spec/spec_helper.rb
  71. BIN rabbit/vendor/cache/json_pure-1.6.4.gem
  72. BIN rabbit/vendor/cache/json_pure-1.6.5.gem
  73. BIN rabbit/vendor/cache/mime-types-1.17.2.gem
  74. BIN rabbit/vendor/cache/nats-0.4.22.beta.4.gem
  75. BIN rabbit/vendor/cache/nats-0.4.22.beta.8.gem
  76. BIN rabbit/vendor/cache/rest-client-1.6.7.gem
  77. BIN rabbit/vendor/cache/vcap_common-1.0.4.gem
  78. BIN {service_broker → rabbit}/vendor/cache/vcap_common-1.0.8.gem
  79. BIN rabbit/vendor/cache/vcap_services_base-0.1.5.gem
  80. BIN rabbit/vendor/cache/vcap_services_base-0.1.8.gem
  81. +1 −1 redis/Gemfile.lock
  82. +1 −0 redis/config/redis_node.yml
  83. +10 −16 redis/lib/redis_service/redis_node.rb
  84. +6 −5 redis/spec/node_spec.rb
  85. BIN redis/vendor/cache/vcap_services_base-0.1.7.gem
  86. BIN redis/vendor/cache/vcap_services_base-0.1.8.gem
  87. +2 −2 service_broker/Gemfile.lock
  88. +2 −2 service_broker/lib/service_broker/async_gateway.rb
  89. BIN service_broker/vendor/cache/vcap_common-1.0.10.gem
  90. BIN service_broker/vendor/cache/vcap_services_base-0.1.7.gem
  91. BIN service_broker/vendor/cache/vcap_services_base-0.1.8.gem
  92. +25 −0 vblob/Gemfile
  93. +169 −0 vblob/Gemfile.lock
  94. +39 −0 vblob/Rakefile
  95. +28 −0 vblob/bin/vblob_gateway
  96. +36 −0 vblob/bin/vblob_node
  97. +28 −0 vblob/config/vblob_gateway.yml
  98. +23 −0 vblob/config/vblob_node.yml
  99. +12 −0 vblob/lib/vblob_service/common.rb
  100. +504 −0 vblob/lib/vblob_service/vblob_node.rb
  101. +9 −0 vblob/lib/vblob_service/vblob_provisioner.rb
  102. +29 −0 vblob/resources/vblob.conf.erb
  103. +41 −0 vblob/spec/Rakefile
  104. +97 −0 vblob/spec/spec_helper.rb
  105. +105 −0 vblob/spec/vblob_bind_spec.rb
  106. +42 −0 vblob/spec/vblob_orphan_spec.rb
  107. +104 −0 vblob/spec/vblob_provision_spec.rb
  108. BIN vblob/vendor/cache/addressable-2.2.6.gem
  109. BIN vblob/vendor/cache/bcrypt-ruby-2.1.4.gem
  110. BIN vblob/vendor/cache/builder-3.0.0.gem
  111. BIN vblob/vendor/cache/ci_reporter-1.6.9.gem
  112. BIN vblob/vendor/cache/curb-0.7.16.gem
  113. BIN vblob/vendor/cache/daemons-1.1.5.gem
  114. BIN vblob/vendor/cache/data_objects-0.10.7.gem
  115. BIN vblob/vendor/cache/datamapper-1.1.0.gem
  116. BIN vblob/vendor/cache/diff-lcs-1.1.3.gem
  117. BIN vblob/vendor/cache/dm-aggregates-1.1.0.gem
  118. BIN vblob/vendor/cache/dm-constraints-1.1.0.gem
  119. BIN vblob/vendor/cache/dm-core-1.1.0.gem
  120. BIN vblob/vendor/cache/dm-do-adapter-1.1.0.gem
  121. BIN vblob/vendor/cache/dm-migrations-1.1.0.gem
  122. BIN vblob/vendor/cache/dm-serializer-1.1.0.gem
  123. BIN vblob/vendor/cache/dm-sqlite-adapter-1.1.0.gem
  124. BIN vblob/vendor/cache/dm-timestamps-1.1.0.gem
  125. BIN vblob/vendor/cache/dm-transactions-1.1.0.gem
  126. BIN vblob/vendor/cache/dm-types-1.1.0.gem
  127. BIN vblob/vendor/cache/dm-validations-1.1.0.gem
  128. BIN vblob/vendor/cache/do_sqlite3-0.10.7.gem
  129. BIN vblob/vendor/cache/em-http-request-0.3.0.gem
  130. BIN vblob/vendor/cache/escape_utils-0.2.4.gem
  131. BIN vblob/vendor/cache/eventmachine-0.12.11.cloudfoundry.3.gem
  132. BIN vblob/vendor/cache/eventmachine_httpserver-0.2.1.gem
  133. BIN vblob/vendor/cache/fastercsv-1.5.4.gem
  134. BIN vblob/vendor/cache/json-1.4.6.gem
  135. BIN vblob/vendor/cache/json_pure-1.6.5.gem
  136. BIN vblob/vendor/cache/little-plugger-1.1.3.gem
  137. BIN vblob/vendor/cache/logging-1.6.1.gem
  138. BIN vblob/vendor/cache/macaddr-1.5.0.gem
  139. BIN vblob/vendor/cache/multi_json-1.0.4.gem
  140. BIN vblob/vendor/cache/nats-0.4.22.beta.8.gem
  141. BIN vblob/vendor/cache/posix-spawn-0.3.6.gem
  142. BIN vblob/vendor/cache/rack-1.4.0.gem
  143. BIN vblob/vendor/cache/rake-0.9.2.2.gem
  144. BIN vblob/vendor/cache/rcov-0.9.11.gem
  145. BIN vblob/vendor/cache/redis-2.2.2.gem
  146. BIN vblob/vendor/cache/redis-namespace-1.0.3.gem
  147. BIN vblob/vendor/cache/redisk-0.2.2.gem
  148. BIN vblob/vendor/cache/resque-1.19.0.gem
  149. BIN vblob/vendor/cache/resque-status-0.2.4.gem
  150. BIN vblob/vendor/cache/rspec-2.7.0.gem
  151. BIN vblob/vendor/cache/rspec-core-2.7.1.gem
  152. BIN vblob/vendor/cache/rspec-expectations-2.7.0.gem
  153. BIN vblob/vendor/cache/rspec-mocks-2.7.0.gem
  154. BIN vblob/vendor/cache/ruby-hmac-0.4.0.gem
  155. BIN vblob/vendor/cache/sinatra-1.2.7.gem
  156. BIN vblob/vendor/cache/stringex-1.2.2.gem
  157. BIN vblob/vendor/cache/systemu-2.4.2.gem
  158. BIN vblob/vendor/cache/thin-1.3.1.gem
  159. BIN vblob/vendor/cache/tilt-1.3.3.gem
  160. BIN vblob/vendor/cache/uuid-2.3.4.gem
  161. BIN vblob/vendor/cache/uuidtools-2.1.2.gem
  162. BIN vblob/vendor/cache/vcap_common-1.0.8.gem
  163. BIN vblob/vendor/cache/vcap_logging-0.1.3.gem
  164. BIN vblob/vendor/cache/vcap_services_base-0.1.8.gem
  165. BIN vblob/vendor/cache/vegas-0.1.8.gem
  166. BIN vblob/vendor/cache/yajl-ruby-0.8.3.gem
View
@@ -1,4 +1,4 @@
-SERVICES_DIR = %w(atmos filesystem mongodb mysql neo4j postgresql rabbit redis service_broker)
+SERVICES_DIR = %w(atmos filesystem mongodb mysql neo4j postgresql rabbit redis service_broker vblob)
desc "Run integration tests."
task "tests" do |t|
View
@@ -123,7 +123,7 @@ GEM
thin (~> 1.3.1)
yajl-ruby (~> 0.8.3)
vcap_logging (0.1.3)
- vcap_services_base (0.1.7)
+ vcap_services_base (0.1.8)
curb (~> 0.7.16)
datamapper (~> 1.1.0)
do_sqlite3 (~> 0.10.3)
Binary file not shown.
Binary file not shown.
View
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- vcap_services_base (0.1.7)
+ vcap_services_base (0.1.8)
curb (~> 0.7.16)
datamapper (~> 1.1.0)
do_sqlite3 (~> 0.10.3)
@@ -131,13 +131,14 @@ GEM
uuid (2.3.4)
macaddr (~> 1.0)
uuidtools (2.1.2)
- vcap_common (1.0.8)
+ vcap_common (1.0.10)
eventmachine (~> 0.12.11.cloudfoundry.3)
nats (~> 0.4.22.beta.8)
posix-spawn (~> 0.3.6)
thin (~> 1.3.1)
yajl-ruby (~> 0.8.3)
- vcap_logging (0.1.3)
+ vcap_logging (1.0.0)
+ rake
vegas (0.1.8)
rack (>= 1.0.0)
yajl-ruby (0.8.3)
View
@@ -85,10 +85,6 @@ def update_varz()
}
end
- def update_healthz()
- VCAP::Component.healthz = Yajl::Encoder.encode(healthz_details, :pretty => true, :terminator => "\n")
- end
-
def shutdown()
@logger.info("#{service_description}: Shutting down")
@node_nats.close if @node_nats
@@ -147,7 +143,6 @@ def group_handles_in_json(instances_list, bindings_list, size_limit)
abstract :on_connect_node
abstract :flavor # "Provisioner" or "Node"
abstract :varz_details
- abstract :healthz_details
# Service Provisioner and Node classes must implement the following
# method
@@ -45,10 +45,6 @@ def synchronize
# The following code will overwrite DataMapper's functions, and replace
# them with a synchronized version of the same function.
- #
- # NOTICE: some functions will be called twice, for instance, save a resource
- # with foreign keys, so the synchronize function needs to be careful on
- # deadlock.
module Resource
alias original_save save
alias original_destroy destroy
@@ -86,6 +82,8 @@ def all(*args)
class Collection
alias original_each each
alias original_at []
+ alias original_get get
+ alias original_empty? empty?
def each(&block)
instances = []
@@ -102,6 +100,18 @@ def [](*args)
original_at(*args)
end
end
+
+ def get(*args)
+ LOCK.synchronize do
+ original_get(*args)
+ end
+ end
+
+ def empty?()
+ LOCK.synchronize do
+ original_empty?()
+ end
+ end
end
# For auto_upgrade!
View
@@ -90,7 +90,6 @@ def start
:mbus => @config[:mbus],
:node_timeout => node_timeout,
:z_interval => @config[:z_interval],
- :allow_over_provisioning => @config[:allow_over_provisioning],
:max_nats_payload => @config[:max_nats_payload],
:additional_options => additional_options,
:status => @config[:status],
View
@@ -2,6 +2,7 @@
require 'nats/client'
require 'vcap/component'
require 'fileutils'
+require 'socket'
$:.unshift(File.dirname(__FILE__))
require 'base'
@@ -18,15 +19,16 @@ def initialize(options)
@max_capacity = @capacity
@capacity_lock = Mutex.new
@migration_nfs = options[:migration_nfs]
+ @fqdn_hosts = options[:fqdn_hosts]
z_interval = options[:z_interval] || 30
EM.add_periodic_timer(z_interval) do
- EM.defer { update_varz; update_healthz }
+ EM.defer { update_varz }
end
# Defer 5 seconds to give service a change to wake up
EM.add_timer(5) do
- EM.defer { update_varz; update_healthz }
+ EM.defer { update_varz }
end
end
@@ -293,14 +295,6 @@ def varz_details()
return announcement
end
- def healthz_details()
- # Service Node subclasses may want to override this method to
- # provide service specific data
- healthz = {
- :self => "ok"
- }
- end
-
def capacity_unit
# subclasses could overwrite this method to re-define
# the capacity unit decreased/increased by provision/unprovision
@@ -322,6 +316,10 @@ def encode_failure(response, error=nil)
response.encode
end
+ def get_host
+ @fqdn_hosts ? Socket.gethostname : @local_ip
+ end
+
# Service Node subclasses must implement the following methods
# provision(plan) --> {name, host, port, user, password}
@@ -20,13 +20,16 @@ module Base
end
end
-
class VCAP::Services::Base::NodeBin
abstract :default_config_file
abstract :node_class
abstract :additional_config
+ module Boolean; end
+ class ::TrueClass; include Boolean; end
+ class ::FalseClass; include Boolean; end
+
def start
config_file = default_config_file
@@ -59,7 +62,8 @@ def start
:mbus => parse_property(config, "mbus", String),
:local_db => parse_property(config, "local_db", String),
:migration_nfs => parse_property(config, "migration_nfs", String, :optional => true),
- :max_nats_payload => parse_property(config, "max_nats_payload", Integer, :optional => true)
+ :max_nats_payload => parse_property(config, "max_nats_payload", Integer, :optional => true),
+ :fqdn_hosts => parse_property(config, "fqdn_hosts", Boolean, :optional => true, :default => false)
}
VCAP::Logging.setup_from_config(config["logging"])
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
# Copyright (c) 2009-2011 VMware, Inc.
require "pp"
require "set"
@@ -25,6 +26,7 @@ def initialize(options)
@version = options[:version]
@node_timeout = options[:node_timeout]
@nodes = {}
+ @provision_refs = Hash.new(0)
@prov_svcs = {}
@handles_for_check_orphan = {}
@plan_mgmt = options[:plan_management] && options[:plan_management][:plans] || {}
@@ -33,12 +35,12 @@ def initialize(options)
z_interval = options[:z_interval] || 30
EM.add_periodic_timer(z_interval) do
- update_varz; update_healthz
+ update_varz
end
# Defer 5 seconds to give service a change to wake up
EM.add_timer(5) do
- update_varz; update_healthz
+ update_varz
end
EM.add_periodic_timer(60) { process_nodes }
@@ -79,13 +81,17 @@ def update_handles(handles)
def find_all_bindings(name)
res = []
@prov_svcs.each do |k,v|
- res << v[:credentials] if v[:credentials]["name"] == name && v[:service_id] != name
+ res << v if v[:credentials]["name"] == name && v[:service_id] != name
end
res
end
def process_nodes
- @nodes.delete_if {|_, node| Time.now.to_i - node["time"] > 300}
+ @nodes.delete_if do |id, node|
+ stale = (Time.now.to_i - node["time"]) > 300
+ @provision_refs.delete(id) if stale
+ stale
+ end
end
def pre_send_announcement
@@ -104,7 +110,14 @@ def on_connect_node
def on_announce(msg, reply=nil)
@logger.debug("[#{service_description}] Received node announcement: #{msg}")
announce_message = Yajl::Parser.parse(msg)
- @nodes[announce_message["id"]] = announce_message.merge({"time" => Time.now.to_i}) if announce_message["id"]
+ if announce_message["id"]
+ id = announce_message["id"]
+ announce_message["time"] = Time.now.to_i
+ if @provision_refs[id] > 0
+ announce_message['available_capacity'] = @nodes[id]['available_capacity']
+ end
+ @nodes[id] = announce_message
+ end
end
# query all handles for a given instance
@@ -113,7 +126,7 @@ def on_handles(instance, reply)
if instance.empty?
res = Yajl::Encoder.encode(@prov_svcs)
else
- handles = find_all_bindings(msg)
+ handles = find_all_bindings(instance)
res = Yajl::Encoder.encode(handles)
end
@node_nats.publish(reply, res)
@@ -227,8 +240,8 @@ def unprovision_service(instance_id, &blk)
@logger.debug("[#{service_description}] Unprovisioning instance #{instance_id} from #{node_id}")
request = UnprovisionRequest.new
request.name = instance_id
- request.bindings = bindings
- @logger.debug("[#{service_description}] Sending reqeust #{request}")
+ request.bindings = bindings.map{|h| h[:credentials]}
+ @logger.debug("[#{service_description}] Sending request #{request}")
subscription = nil
timer = EM.add_timer(@node_timeout) {
@node_nats.unsubscribe(subscription)
@@ -267,49 +280,29 @@ def provision_service(request, prov_handle=nil, &blk)
@logger.debug("[#{service_description}] Attempting to provision instance (request=#{request.extract})")
subscription = nil
plan = request.plan || "free"
- plan_nodes = @nodes.select{ |_, node| node["plan"] == plan }
- @logger.debug("Going to query nodes #{plan_nodes}")
+ plan_nodes = @nodes.select{ |_, node| node["plan"] == plan }.values
+ @logger.debug("Pick best nodes from: #{plan_nodes}")
if plan_nodes.count > 0
- barrier = VCAP::Services::Base::Barrier.new(:timeout => BARRIER_TIMEOUT, :callbacks => plan_nodes.length) do |responses|
- @logger.debug("[#{service_description}] Found the following nodes: #{responses.inspect}")
- @node_nats.unsubscribe(subscription)
- provision_node(request, responses, prov_handle, blk) unless responses.empty?
- end
- req = Yajl::Encoder.encode({"plan" => plan})
- subscription = @node_nats.request("#{service_name}.discover", req) {|msg| barrier.call(msg)}
- else
- @logger.error("Unknown plan(#{plan})")
- blk.call(failure(ServiceError.new(ServiceError::UNKNOWN_PLAN, plan)))
- end
- rescue => e
- @logger.warn("Exception at provision_service #{e}")
- blk.call(internal_fail)
- end
-
- def provision_node(request, node_msgs, prov_handle, blk)
- @logger.debug("[#{service_description}] Provisioning node (request=#{request.extract}, nnodes=#{node_msgs.length})")
- plan = request.plan
- nodes = node_msgs.map { |msg| Yajl::Parser.parse(msg.first) }
- allow_over_provisioning = @plan_mgmt[plan.to_sym] && @plan_mgmt[plan.to_sym][:allow_over_provisioning] || false
- @logger.debug("Pick best node from: #{nodes}")
- best_node = nodes.max_by { |node| node_score(node) }
- if best_node && ( allow_over_provisioning || node_score(best_node) > 0 )
- best_node = best_node["id"]
- @logger.debug("[#{service_description}] Provisioning on #{best_node}")
- prov_req = ProvisionRequest.new
- prov_req.plan = plan
- # use old credentials to provision a service if provided.
- prov_req.credentials = prov_handle["credentials"] if prov_handle
- subscription = nil
- timer = EM.add_timer(@node_timeout) {
- @node_nats.unsubscribe(subscription)
- blk.call(timeout_fail)
- }
- subscription =
- @node_nats.request(
- "#{service_name}.provision.#{best_node}",
- prov_req.encode
- ) do |msg|
+ allow_over_provisioning = @plan_mgmt[plan.to_sym] && @plan_mgmt[plan.to_sym][:allow_over_provisioning] || false
+ best_node = plan_nodes.max_by { |node| node_score(node) }
+ if best_node && ( allow_over_provisioning || node_score(best_node) > 0 )
+ best_node = best_node["id"]
+ @logger.debug("[#{service_description}] Provisioning on #{best_node}")
+ prov_req = ProvisionRequest.new
+ prov_req.plan = plan
+ # use old credentials to provision a service if provided.
+ prov_req.credentials = prov_handle["credentials"] if prov_handle
+ @provision_refs[best_node] += 1
+ @nodes[best_node]['available_capacity'] -= @nodes[best_node]['capacity_unit']
+ subscription = nil
+ timer = EM.add_timer(@node_timeout) {
+ @provision_refs[best_node] -= 1
+ @node_nats.unsubscribe(subscription)
+ blk.call(timeout_fail)
+ }
+ subscription =
+ @node_nats.request("#{service_name}.provision.#{best_node}", prov_req.encode) do |msg|
+ @provision_refs[best_node] -= 1
EM.cancel_timer(timer)
@node_nats.unsubscribe(subscription)
response = ProvisionResponse.decode(msg)
@@ -328,11 +321,18 @@ def provision_node(request, node_msgs, prov_handle, blk)
blk.call(wrap_error(response))
end
end
+ else
+ # No resources
+ @logger.warn("[#{service_description}] Could not find a node to provision")
+ blk.call(internal_fail)
+ end
else
- # No resources
- @logger.warn("[#{service_description}] Could not find a node to provision")
- blk.call(internal_fail)
+ @logger.error("Unknown plan(#{plan})")
+ blk.call(failure(ServiceError.new(ServiceError::UNKNOWN_PLAN, plan)))
end
+ rescue => e
+ @logger.warn("Exception at provision_service #{e}")
+ blk.call(internal_fail)
end
def bind_instance(instance_id, binding_options, bind_handle=nil, &blk)
@@ -752,12 +752,6 @@ def varz_details()
@logger.warn("Exception at varz_details #{e}")
end
- def healthz_details()
- healthz = {
- :self => "ok"
- }
- end
-
########
# Helpers
########
View
@@ -1,7 +1,7 @@
module VCAP
module Services
module Base
- VERSION = "0.1.7"
+ VERSION = "0.1.8"
end
end
end
Oops, something went wrong.

0 comments on commit fb5fdf4

Please sign in to comment.