Git Product home page Git Product logo

cf-mysql-broker's Introduction

CF MySQL Broker

CF MySQL Broker provides MySQL databases as a Cloud Foundry service. This broker demonstrates the v2 services API between cloud controllers and service brokers. This API is not to be confused with the cloud controller API; for more info see Service Broker API.

The broker does not include a MySQL server. Instead, it is meant to be deployed alongside a MySQL server, which it manages, as part of cf-mysql-release. Deploying this as a standalone application to cloud foundry (e.g. via cf push) is not supported. The MySQL management tasks that the broker performs are as follows:

  • Provisioning of database instances (create)
  • Creation of credentials (bind)
  • Removal of credentials (unbind)
  • Unprovisioning of database instances (delete)

Running Tests

The CF MySQL Broker integration specs will exercise the catalog fetch, create, bind, unbind, and delete functions against its locally installed database.

  1. Run a local install MySQL server.
  • Specs have only been tested with MySQL 5.6
  • Specs assume MySQL root user without a password
  • The anonymous user (User='' and Host='localhost') must be deleted (see [spec/spec_helper])
    • delete from mysql.user where name='';
    • flush privileges
  • Specific innodb settings are required (see [spec/spec_helper])
    • innodb_stats_on_metadata = ON
      • mysql -uroot -e "SET GLOBAL innodb_stats_on_metadata=ON"
    • innodb_stats_persistent = OFF
      • mysql -uroot -e "SET GLOBAL innodb_stats_persistent=OFF"
  1. Run the following commands
$ cd cf-mysql-broker
$ bundle
$ bundle exec rake db:setup
$ bundle exec rake spec

cf-mysql-broker's People

Contributors

abg avatar acrmp avatar andrewgilbert12 avatar apshirley avatar drich10 avatar dsabeti avatar goonzoid avatar jpalermo avatar kaixiang avatar karlkfi avatar liuhewei avatar ljfranklin avatar lvarvel avatar mdelillo avatar menicosia avatar mfine30 avatar mgarciap avatar modelseer avatar ndhanushkodi avatar pcf-core-services-writer avatar plafosse-orange avatar rainmaker avatar robdimsdale avatar socalnick avatar staylor14 avatar stickfigure avatar utricularian avatar xchoi avatar zankich avatar zrob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cf-mysql-broker's Issues

cf-mysql-broker/0 is failing with quota-enforcer

Hi guys!

cf-mysql-broker/0 instance is failing with the following error:

# tail -f /var/vcap/sys/log/cf-mysql-broker/db_migrate.combined.log
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/var/vcap/packages/ruby/bin/bundle:22:in `load'
/var/vcap/packages/ruby/bin/bundle:22:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
Migrations failed at Mon Sep 11 14:58:13 UTC 2017
#<Mysql2::Error: Lost connection to MySQL server at 'handshake: waiting for inital communication packet', system error: 110>
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "database"=>"mysql_broker", "pool"=>5, "connect_timeout"=>20, "read_timeout"=>20, "reconnect"=>true, "host"=>"mysql-proxy.platform.dev.jp.XXX.org", "port"=>3306, "username"=>"cf-mysql-broker", "password"=>"XXX"}, {:charset=>"utf8", :collation=>"utf8_unicode_ci"}
(If you set the charset manually, make sure you have a matching collation)


rake aborted!
Mysql2::Error: Lost connection to MySQL server at 'handshake: waiting for inital communication packet', system error: 110
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/mysql2-0.4.4/lib/mysql2/client.rb:87:in `connect'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/mysql2-0.4.4/lib/mysql2/client.rb:87:in `initialize'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `new'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `mysql2_connection'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in `new_connection'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in `checkout_new_connection'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:571:in `retrieve_connection'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_handling.rb:87:in `connection'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:916:in `initialize'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:in `new'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:in `up'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:801:in `migrate'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
/var/vcap/packages/cf-mysql-broker/vendor/bundle/ruby/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/var/vcap/packages/ruby/bin/bundle:22:in `load'
/var/vcap/packages/ruby/bin/bundle:22:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
Migrations failed at Mon Sep 11 14:59:24 UTC 2017
#<Mysql2::Error: Lost connection to MySQL server at 'handshake: waiting for inital communication packet', system error: 110>
Couldn't create database for {"adapter"=>"mysql2", "encoding"=>"utf8", "database"=>"mysql_broker", "pool"=>5, "connect_timeout"=>20, "read_timeout"=>20, "reconnect"=>true, "host"=>"mysql-proxy.platform.dev.jp.XXX.org", "port"=>3306, "username"=>"cf-mysql-broker", "password"=>"XXX"}, {:charset=>"utf8", :collation=>"utf8_unicode_ci"}
(If you set the charset manually, make sure you have a matching collation)
rake aborted!

It is on ERT 1.11.11 and OpsMan 1.11.10.

Deploying cf-mysql-broker v8 with trusty stemcell fails compilation

Trying to deploy cf-mysql-broker from v8 tag with bosh-openstack-kvm-ubuntu-trusty-go_agent (2605) stemcell fails with compile errors like:

make[1]: *** Waiting for unfinished jobs....
/var/vcap/data/compile/mysql/mysql-5.6.13/storage/innobase/row/row0log.cc: In function 'dberr_t row_log_table_apply_ops(que_thr_t*, row_merge_dup_t*)':
/var/vcap/data/compile/mysql/mysql-5.6.13/storage/innobase/row/row0log.cc:2367:11: error: 'srv_buf_size' was not declared in this scope
      ofs, srv_buf_size);
           ^
/var/vcap/data/compile/mysql/mysql-5.6.13/storage/innobase/row/row0log.cc: In function 'dberr_t row_log_apply_ops(trx_t*, dict_index_t*, row_merge_dup_t*)':
/var/vcap/data/compile/mysql/mysql-5.6.13/storage/innobase/row/row0log.cc:3156:11: error: 'srv_buf_size' was not declared in this scope
      ofs, srv_buf_size);
           ^
/var/vcap/data/compile/mysql/mysql-5.6.13/storage/innobase/row/row0log.cc: In function 'dberr_t row_log_table_apply_ops(que_thr_t*, row_merge_dup_t*)':
/var/vcap/data/compile/mysql/mysql-5.6.13/storage/innobase/row/row0log.cc:2310:39: warning: ignoring return value of 'int ftruncate(int, __off64_t)', declared with attribute warn_unused_result [-Wunused-result]
    ftruncate(index->online_log->fd, 0);
                                       ^
/var/vcap/data/compile/mysql/mysql-5.6.13/storage/innobase/row/row0log.cc: In function 'dberr_t row_log_apply_ops(trx_t*, dict_index_t*, row_merge_dup_t*)':
/var/vcap/data/compile/mysql/mysql-5.6.13/storage/innobase/row/row0log.cc:3103:39: warning: ignoring return value of 'int ftruncate(int, __off64_t)', declared with attribute warn_unused_result [-Wunused-result]
    ftruncate(index->online_log->fd, 0);
                                       ^
make[2]: *** [storage/innobase/CMakeFiles/innobase_embedded.dir/row/row0log.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [storage/innobase/CMakeFiles/innobase_embedded.dir/all] Error 2
make: *** [all] Error 2

Is cf-mysql-broker tested with trusty or only lucid stemcells?

this broker can not be deployed as an app in Cloud Foundry with ruby buildpack https://github.com/cloudfoundry/ruby-buildpack

Here you are:
2015-03-24T22:26:18.27+0800 [API/0] OUT Updated app with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6 ({"state"=>"STOPPED"})
2015-03-24T22:26:18.75+0800 [DEA/0] OUT Got staging request for app with id 3097b670-cf96-413d-9ec3-7d5c4efe6dd6
2015-03-24T22:26:41.93+0800 [API/0] OUT Updated app with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6 ({"state"=>"STARTED"})
2015-03-24T22:26:44.47+0800 [STG/0] OUT -----> Downloaded app package (36M)
2015-03-24T22:26:46.07+0800 [STG/0] OUT -------> Buildpack version 1.1.3
2015-03-24T22:26:46.30+0800 [STG/0] OUT -----> Compiling Ruby/Rails
2015-03-24T22:26:47.82+0800 [STG/0] OUT -----> Using Ruby version: ruby-1.9.3
2015-03-24T22:26:47.92+0800 [STG/0] OUT -----> Installing dependencies using 1.6.3
2015-03-24T22:26:49.04+0800 [STG/0] OUT Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
2015-03-24T22:26:50.65+0800 [STG/0] OUT Installing minitest 4.7.5
2015-03-24T22:26:50.67+0800 [STG/0] OUT Installing i18n 0.6.5
2015-03-24T22:26:50.68+0800 [STG/0] OUT Installing rake 10.1.0
2015-03-24T22:26:50.72+0800 [STG/0] OUT Installing multi_json 1.10.1
2015-03-24T22:26:50.76+0800 [STG/0] OUT Installing builder 3.1.4
2015-03-24T22:26:50.95+0800 [STG/0] OUT Installing erubis 2.7.0
2015-03-24T22:26:51.06+0800 [STG/0] OUT Installing tzinfo 0.3.37
2015-03-24T22:26:51.08+0800 [STG/0] OUT Installing rack 1.5.2
2015-03-24T22:26:51.10+0800 [STG/0] OUT Installing polyglot 0.3.3
2015-03-24T22:26:51.11+0800 [STG/0] OUT Installing mime-types 1.25
2015-03-24T22:26:51.12+0800 [STG/0] OUT Installing activerecord-deprecated_finders 1.0.3
2015-03-24T22:26:51.18+0800 [STG/0] OUT Installing daemons 1.1.9
2015-03-24T22:26:51.21+0800 [STG/0] OUT Installing arel 4.0.0
2015-03-24T22:26:51.24+0800 [STG/0] OUT Installing hashie 2.1.1
2015-03-24T22:26:51.26+0800 [STG/0] OUT Installing hike 1.2.3
2015-03-24T22:26:51.37+0800 [STG/0] OUT Installing json_pure 1.8.1
2015-03-24T22:26:51.62+0800 [STG/0] OUT Installing atomic 1.1.14
2015-03-24T22:26:55.66+0800 [STG/0] OUT Installing mysql2 0.3.14
2015-03-24T22:26:55.66+0800 [STG/0] OUT Using bundler 1.6.3
2015-03-24T22:26:55.75+0800 [STG/0] OUT Installing thor 0.18.1
2015-03-24T22:26:55.82+0800 [STG/0] OUT Installing tilt 1.4.1
2015-03-24T22:26:59.35+0800 [STG/0] OUT Installing raindrops 0.12.0
2015-03-24T22:26:59.61+0800 [STG/0] OUT Installing sass 3.2.19
2015-03-24T22:26:59.64+0800 [STG/0] OUT Installing settingslogic 2.0.9
2015-03-24T22:26:59.71+0800 [STG/0] OUT Installing cf-uaa-lib 1.3.10
2015-03-24T22:26:59.76+0800 [STG/0] OUT Installing rack-test 0.6.2
2015-03-24T22:26:59.86+0800 [STG/0] OUT Installing treetop 1.4.15
2015-03-24T22:26:59.93+0800 [STG/0] OUT Installing omniauth 1.2.1
2015-03-24T22:27:00.03+0800 [STG/0] OUT Installing thread_safe 0.1.3
2015-03-24T22:27:00.12+0800 [STG/0] OUT Installing sprockets 2.10.0
2015-03-24T22:27:00.24+0800 [STG/0] OUT Installing mail 2.5.4
2015-03-24T22:27:00.24+0800 [STG/0] OUT omniauth-uaa-oauth2 at /tmp/staged/app/vendor/cache/omniauth-uaa-oauth2-2bbb78dc3c13 did not have a valid gemspec.
2015-03-24T22:27:00.25+0800 [STG/0] OUT This prevents bundler from installing bins or native extensions, but that may not affect its functionality.
2015-03-24T22:27:00.25+0800 [STG/0] OUT The validation message from Rubygems was:
2015-03-24T22:27:00.25+0800 [STG/0] OUT [".gitignore"] are not files
2015-03-24T22:27:00.25+0800 [STG/0] OUT Using omniauth-uaa-oauth2 0.0.3 from git://github.com/cloudfoundry/omniauth-uaa-oauth2.git (at /tmp/staged/app/vendor/cache/omniauth-uaa-oauth2-2bbb78dc3c13)
2015-03-24T22:27:00.40+0800 [STG/0] OUT Installing activesupport 4.0.0
2015-03-24T22:27:00.42+0800 [STG/0] OUT Installing kgio 2.8.1
2015-03-24T22:27:00.49+0800 [STG/0] OUT Installing activemodel 4.0.0
2015-03-24T22:27:00.61+0800 [STG/0] OUT Installing actionpack 4.0.0
2015-03-24T22:27:00.80+0800 [STG/0] OUT Installing activerecord 4.0.0
2015-03-24T22:27:00.89+0800 [STG/0] OUT Installing actionmailer 4.0.0
2015-03-24T22:27:01.14+0800 [STG/0] OUT Installing railties 4.0.0
2015-03-24T22:27:01.22+0800 [STG/0] OUT Installing sprockets-rails 2.0.0
2015-03-24T22:27:01.29+0800 [STG/0] OUT Installing rails-api 0.1.0
2015-03-24T22:27:01.66+0800 [STG/0] OUT Installing rails 4.0.2
2015-03-24T22:27:01.94+0800 [STG/0] OUT Installing sass-rails 4.0.3
2015-03-24T22:27:04.13+0800 [STG/0] OUT Installing unicorn 4.6.3
2015-03-24T22:27:05.42+0800 [STG/0] OUT Installing eventmachine 1.0.3
2015-03-24T22:27:06.35+0800 [STG/0] OUT Installing thin 1.6.1
2015-03-24T22:27:06.40+0800 [STG/0] OUT Installing nats 0.5.0.beta.12
2015-03-24T22:27:06.44+0800 [STG/0] OUT Your bundle is complete!
2015-03-24T22:27:06.44+0800 [STG/0] OUT Gems in the groups development and test were not installed.
2015-03-24T22:27:06.44+0800 [STG/0] OUT It was installed into ./vendor/bundle
2015-03-24T22:27:06.45+0800 [STG/0] OUT Bundle completed (17.41s)
2015-03-24T22:27:06.46+0800 [STG/0] OUT Cleaning up the bundler cache.
2015-03-24T22:27:07.32+0800 [STG/0] OUT -----> Writing config/database.yml to read from DATABASE_URL
2015-03-24T22:27:09.49+0800 [STG/0] OUT -----> Preparing app for Rails asset pipeline
2015-03-24T22:27:09.49+0800 [STG/0] OUT Running: rake assets:precompile
2015-03-24T22:27:12.51+0800 [STG/0] OUT I, [2015-03-24T14:27:12.515088 #1335] INFO -- : Writing /tmp/staged/app/public/assets/cf-mysql-logo-4e6709c99d7a1d80183f7da170d69865.png
2015-03-24T22:27:12.53+0800 [STG/0] OUT I, [2015-03-24T14:27:12.529058 #1335] INFO -- : Writing /tmp/staged/app/public/assets/favicon-442891d430a3db9ff19c5105fed94d77.ico
2015-03-24T22:27:41.55+0800 [STG/0] OUT I, [2015-03-24T14:27:41.553686 #1335] INFO -- : Writing /tmp/staged/app/public/assets/application-c2d4f235c30dc3f5d9829f2459bd0053.css
2015-03-24T22:27:41.62+0800 [STG/0] OUT Asset precompilation completed (32.12s)
2015-03-24T22:27:41.62+0800 [STG/0] OUT Cleaning assets
2015-03-24T22:27:41.62+0800 [STG/0] OUT Running: rake assets:clean
2015-03-24T22:27:45.08+0800 [STG/0] OUT ###### WARNING:
2015-03-24T22:27:45.08+0800 [STG/0] OUT Include 'rails_12factor' gem to enable all platform features
2015-03-24T22:27:45.08+0800 [STG/0] OUT See https://devcenter.heroku.com/articles/rails-integration-gems for more information.
2015-03-24T22:27:45.08+0800 [STG/0] OUT ###### WARNING:
2015-03-24T22:27:45.08+0800 [STG/0] OUT Removing vendor/bundle.
2015-03-24T22:27:45.08+0800 [STG/0] OUT Checking in vendor/bundle is not supported. Please remove this directory
2015-03-24T22:27:45.08+0800 [STG/0] OUT and add it to your .gitignore. To vendor your gems with Bundler, use
2015-03-24T22:27:45.08+0800 [STG/0] OUT bundle pack instead.
2015-03-24T22:27:45.08+0800 [STG/0] OUT ###### WARNING:
2015-03-24T22:27:45.08+0800 [STG/0] OUT No Procfile detected, using the default web server (webrick)
2015-03-24T22:27:45.08+0800 [STG/0] OUT https://devcenter.heroku.com/articles/ruby-default-web-server
2015-03-24T22:27:45.17+0800 [STG/0] ERR
2015-03-24T22:27:50.38+0800 [STG/0] OUT -----> Uploading droplet (25M)
2015-03-24T22:27:54.11+0800 [DEA/0] OUT Starting app instance (index 0) with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6
2015-03-24T22:27:57.80+0800 [DEA/0] ERR Instance (index 0) failed to start accepting connections
2015-03-24T22:27:57.81+0800 [API/0] OUT App instance exited with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6 payload: {"cc_partition"=>"default", "droplet"=>"3097b670-cf96-413d-9ec3-7d5c4efe6dd6", "version"=>"aec72d05-d6fb-435a-a111-875213002e38", "instance"=>"f2aad186632745c0a95d3d9eea9cff4a", "index"=>0, "reason"=>"CRASHED", "exit_status"=>127, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1427207277}
2015-03-24T22:27:57.81+0800 [API/0] OUT App instance exited with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6 payload: {"cc_partition"=>"default", "droplet"=>"3097b670-cf96-413d-9ec3-7d5c4efe6dd6", "version"=>"aec72d05-d6fb-435a-a111-875213002e38", "instance"=>"f2aad186632745c0a95d3d9eea9cff4a", "index"=>0, "reason"=>"CRASHED", "exit_status"=>127, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1427207277}
2015-03-24T22:28:37.67+0800 [DEA/0] OUT Starting app instance (index 0) with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6
2015-03-24T22:28:40.54+0800 [DEA/0] ERR Instance (index 0) failed to start accepting connections
2015-03-24T22:28:40.55+0800 [API/0] OUT App instance exited with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6 payload: {"cc_partition"=>"default", "droplet"=>"3097b670-cf96-413d-9ec3-7d5c4efe6dd6", "version"=>"aec72d05-d6fb-435a-a111-875213002e38", "instance"=>"2c154cbf0aac4b29bb2e55a8c3d185a2", "index"=>0, "reason"=>"CRASHED", "exit_status"=>127, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1427207320}
2015-03-24T22:28:40.56+0800 [API/0] OUT App instance exited with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6 payload: {"cc_partition"=>"default", "droplet"=>"3097b670-cf96-413d-9ec3-7d5c4efe6dd6", "version"=>"aec72d05-d6fb-435a-a111-875213002e38", "instance"=>"2c154cbf0aac4b29bb2e55a8c3d185a2", "index"=>0, "reason"=>"CRASHED", "exit_status"=>127, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1427207320}
2015-03-24T22:28:43.85+0800 [DEA/0] OUT Removing crash for app with id 3097b670-cf96-413d-9ec3-7d5c4efe6dd6
2015-03-24T22:28:43.85+0800 [DEA/0] OUT Stopping app instance (index 0) with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6
2015-03-24T22:28:43.85+0800 [DEA/0] OUT Stopped app instance (index 0) with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6
2015-03-24T22:29:17.68+0800 [DEA/0] OUT Starting app instance (index 0) with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6
2015-03-24T22:29:20.33+0800 [DEA/0] ERR Instance (index 0) failed to start accepting connections
2015-03-24T22:29:20.34+0800 [API/0] OUT App instance exited with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6 payload: {"cc_partition"=>"default", "droplet"=>"3097b670-cf96-413d-9ec3-7d5c4efe6dd6", "version"=>"aec72d05-d6fb-435a-a111-875213002e38", "instance"=>"c5b3ae3462a24283944b3ad56acc561d", "index"=>0, "reason"=>"CRASHED", "exit_status"=>127, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1427207360}
2015-03-24T22:29:20.34+0800 [API/0] OUT App instance exited with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6 payload: {"cc_partition"=>"default", "droplet"=>"3097b670-cf96-413d-9ec3-7d5c4efe6dd6", "version"=>"aec72d05-d6fb-435a-a111-875213002e38", "instance"=>"c5b3ae3462a24283944b3ad56acc561d", "index"=>0, "reason"=>"CRASHED", "exit_status"=>127, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1427207360}
2015-03-24T22:29:24.09+0800 [DEA/0] OUT Removing crash for app with id 3097b670-cf96-413d-9ec3-7d5c4efe6dd6
2015-03-24T22:29:24.09+0800 [DEA/0] OUT Stopping app instance (index 0) with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6
2015-03-24T22:29:24.09+0800 [DEA/0] OUT Stopped app instance (index 0) with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6
2015-03-24T22:29:57.68+0800 [DEA/0] OUT Starting app instance (index 0) with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6
2015-03-24T22:30:00.59+0800 [DEA/0] ERR Instance (index 0) failed to start accepting connections
2015-03-24T22:30:00.61+0800 [API/0] OUT App instance exited with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6 payload: {"cc_partition"=>"default", "droplet"=>"3097b670-cf96-413d-9ec3-7d5c4efe6dd6", "version"=>"aec72d05-d6fb-435a-a111-875213002e38", "instance"=>"e8519dc74657407ca19f20f402fd0b7b", "index"=>0, "reason"=>"CRASHED", "exit_status"=>127, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1427207400}
2015-03-24T22:30:00.61+0800 [API/0] OUT App instance exited with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6 payload: {"cc_partition"=>"default", "droplet"=>"3097b670-cf96-413d-9ec3-7d5c4efe6dd6", "version"=>"aec72d05-d6fb-435a-a111-875213002e38", "instance"=>"e8519dc74657407ca19f20f402fd0b7b", "index"=>0, "reason"=>"CRASHED", "exit_status"=>127, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1427207400}
2015-03-24T22:30:04.27+0800 [DEA/0] OUT Removing crash for app with id 3097b670-cf96-413d-9ec3-7d5c4efe6dd6
2015-03-24T22:30:04.27+0800 [DEA/0] OUT Stopping app instance (index 0) with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6
2015-03-24T22:30:04.27+0800 [DEA/0] OUT Stopped app instance (index 0) with guid 3097b670-cf96-413d-9ec3-7d5c4efe6dd6

Issue with--- bundle exec rake spec

Access denied for user 'root'@'localhost' (using password: YES)

I can do -- mysql -uroot and login to mysql w/o password

Thanks
Beth Tran

adding service broker

This is a noob question and probably has more to do with cloudfoundry, but I couldn't figure out a way to install this service-broker. What command do I have to issue from my CF CLI in order that I am able to use this service-broker on my apps.

a. I have a working installation of nise-bosh
b. when I do a cf create-service-broker mysql root password https://github.com/cloudfoundry/cf-mysql-broker, it says Server error, status code: 500, error code: 10001, message: The service broker API returned an error from https://github.com/cloudfoundry/cf-mysql-broker/v2/catalog: 404 Not Found
c. when I do a cf marketplace, it says No service offerings found

Is there something wrong with my installation of cf nise-bosh or is there something else that I am missing? How do I set this right?

where is the url /manage/auth/cloudfoundry

Follow is my step, please forgive me if there is something obviously.

  1. I setup mysql-broker local. (rackup -p 80)
  2. cf create broker and make plans public.
  3. cf create service.
  4. get service instance dashboard url.
  5. Browse the dashboard url.
    the mysql-broker shows:
[29/Jul/2014 19:17:07] "GET /manage/instances/ed93c2c8-b611-40b6-93a0-00adfe9be4cc HTTP/1.1" 302 - 0.3368
[29/Jul/2014 19:17:07] "GET /manage/auth/cloudfoundry HTTP/1.1" 404 17174 0.0490

How to start up this cf-mysql-broker

After tests are successful, how to run this cf-mysql-broker?
Does it have an endpoint for its services, and how to find out.

Thanks
Beth Tran

exec rake spec failing

When I run this script, it asks me to set the innodb_stats_persistent variable and provides me with two options:
Option 1 (permanent): set innodb_stats_persistent=OFF in my.cnf
Option 2 (temporary): in mysql CLI, "set global innodb_stats_persistent=OFF"

However in both the options, when I try starting mysql after I'm done with the modifications, it still says

unknown variable 'set innodb_stats_persistent=OFF'

Please help

error running - bundle exec rake spec

  1. I ran into permission issue with command = bundle exec rake db:setup, so I set the pw for root
    in config/database.yml with the new root password. This allows me to run db:setup w/o error
  2. when I run bundle exec rake spec, got the following error.
    Looking at the errors, it seems that mysql.user table does not have the user "K0KWTDuo23o21X0b", and also the table mysql.user does not have "password" column.

I tried to look closer, but I'm not familiar with ruby code (I've spent some time fixing my ruby version), and I do not want to mess up my setup any further.

Can you please give me some help.

What I want to do is to register your broker with CF environment, and see how the
SSO works with dashboard.

Thank you so much for help, I really, really appreciate this.

Sincerely
Beth Tran

Randomized with seed 42152
.......................................................................................................................................................................................F.FF.

Failures:

  1. ServiceBinding#save sets the max connections to the value specified by the plan
    Failure/Error: expect(connection.select_values("SHOW GRANTS FOR #{username}")[0]).to include(max_user_connection_sql)
    expected "GRANT USAGE ON . TO 'K0KWTDuo23o21X0b'@'%'" to include "WITH MAX_USER_CONNECTIONS 12"

    ./spec/models/service_binding_spec.rb:199:in `block (3 levels) in <top (required)>'

  2. ServiceBinding#save creates a user with a random password
    Failure/Error: connection.select_values(password_sql).count

 ActiveRecord::StatementInvalid:
   Mysql2::Error: Unknown column 'password' in 'where clause': SELECT * FROM mysql.user WHERE user = 'K0KWTDuo23o21X0b' AND password = PASSWORD('randompassword')
 # ./spec/models/service_binding_spec.rb:180:in `block (4 levels) in <top (required)>'
 # ./spec/models/service_binding_spec.rb:176:in `block (3 levels) in <top (required)>'
 # ------------------
 # --- Caused by: ---
 # Mysql2::Error:
 #   Unknown column 'password' in 'where clause'
 #   ./spec/models/service_binding_spec.rb:180:in `block (4 levels) in <top (required)>'
  1. ServiceBinding#save raises an error when creating the same user twice
    Failure/Error: expect(connection.select_values(password_sql).count).to eq(1)
 ActiveRecord::StatementInvalid:
   Mysql2::Error: Unknown column 'password' in 'where clause': SELECT * FROM mysql.user WHERE user = 'K0KWTDuo23o21X0b' AND password = PASSWORD('randompassword')
 # ./spec/models/service_binding_spec.rb:210:in `block (3 levels) in <top (required)>'
 # ------------------
 # --- Caused by: ---
 # Mysql2::Error:
 #   Unknown column 'password' in 'where clause'
 #   ./spec/models/service_binding_spec.rb:210:in `block (3 levels) in <top (required)>'

Finished in 8.26 seconds (files took 1.55 seconds to load)
188 examples, 3 failures

Failed examples:

rspec ./spec/models/service_binding_spec.rb:195 # ServiceBinding#save sets the max connections to the value specified by the plan
rspec ./spec/models/service_binding_spec.rb:175 # ServiceBinding#save creates a user with a random password
rspec ./spec/models/service_binding_spec.rb:202 # ServiceBinding#save raises an error when creating the same user twice

**ERROR** Unable to install gems: exit status 17

Environment

OS: RHEL-7.5
cf version: 6.36.1

Problem

Followed the instructions in README. All was well, until tried to do cf push:

# cf push --random-route
Pushing from manifest to org TEST / space testspace as testadmin...
Using manifest file /root/cf-mysql-broker/manifest.yml


Deprecation warning: Route component attributes 'domain', 'domains', 'host', 'hosts' and 'no-hostname' are deprecated. Found: host.
Please see http://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html#deprecated for the currently supported syntax and other app manifest deprecations. This feature will be removed in the future.


Using manifest file /root/cf-mysql-broker/manifest.yml

Updating app cfmysql in org TEST / space testspace as testadmin...
OK

Using route cfmysql.apps.lab02.localnet.net
Uploading cfmysql...
Uploading app files from: /root/cf-mysql-broker
Uploading 18.9M, 9670 files
Done uploading               
OK

Starting app cfmysql in org TEST / space testspace as testadmin...
Downloading ruby_buildpack...
Downloading java_v4_12...
Downloading binary_buildpack...
Downloading staticfile_buildpack...
Downloading nodejs_v1_6_23...
Downloaded ruby_buildpack
Downloaded staticfile_buildpack
Downloading java_buildpack_offline...
Downloading python_buildpack...
Downloaded java_v4_12
Downloading nodejs_buildpack...
Downloaded binary_buildpack
Downloading go_buildpack...
Downloaded nodejs_v1_6_23
Downloading php_buildpack...
Downloaded nodejs_buildpack
Downloaded python_buildpack
Downloading dotnet_core_buildpack...
Downloaded php_buildpack
Downloaded java_buildpack_offline
Downloaded go_buildpack
Downloaded dotnet_core_buildpack
Creating container
Successfully created container
Downloading app package...
Downloaded app package (56.5M)
-----> Ruby Buildpack version 1.7.11
-----> Supplying Ruby
-----> Installing bundler 1.16.1
       Copy [/tmp/buildpacks/4e6552371d81aaf9fec89a3e9dadac66/dependencies/1889161626702fbbe53f26972a8a4789/bundler-1.16.1-8e9f1a6e.tgz]
-----> Installing ruby 2.5.0
       Copy [/tmp/buildpacks/4e6552371d81aaf9fec89a3e9dadac66/dependencies/3b86d86f19cdfd5095896369b4802241/ruby-2.5.0-linux-x64-ca807d09.tgz]
-----> Update rubygems from 2.7.3 to 2.7.4
-----> Installing rubygems 2.7.4
       Copy [/tmp/buildpacks/4e6552371d81aaf9fec89a3e9dadac66/dependencies/2dd5f5afd453f247ad501cdb10bc1144/rubygems-2.7.4.tgz]
       **WARNING** You have the `.bundle/config` file checked into your repository
       It contains local state like the location of the installed bundle
       as well as configured git local gems, and other settings that should
       not be shared between multiple checkouts of a single repo. Please
       remove the `.bundle/` folder from your repo and add it to your `.gitignore` file.
-----> Installing dependencies using bundler 1.16.1
       Running: bundle install --without development:test --jobs=4 --retry=4 --path /tmp/contents340936106/deps/0/vendor_bundle --binstubs /tmp/contents340936106/deps/0/binstubs --deployment
       Fetching source index from https://rubygems.org/
       
       Retrying fetcher due to error (2/5): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
       Retrying fetcher due to error (3/5): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
       Retrying fetcher due to error (4/5): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
       Retrying fetcher due to error (5/5): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
       Could not fetch specs from https://rubygems.org/
       **ERROR** Unable to install gems: exit status 17
Failed to compile droplet: Failed to run all supply scripts: exit status 15
Exit status 223
Stopping instance 03689848-28c7-4665-9e19-9cb6fd9e6514
Destroying container
Successfully destroyed container

FAILED
Error restarting application: BuildpackCompileFailed

TIP: use 'cf logs cfmysql --recent' for more information

Issuing cf logs cfmysql pretty much gives you the same error:

   2018-05-18T12:12:57.10-0500 [STG/0] OUT        as well as configured git local gems, and other settings that should
   2018-05-18T12:12:57.10-0500 [STG/0] OUT        not be shared between multiple checkouts of a single repo. Please
   2018-05-18T12:12:57.10-0500 [STG/0] OUT        remove the `.bundle/` folder from your repo and add it to your `.gitignore` file.
   2018-05-18T12:12:57.96-0500 [STG/0] OUT -----> Installing dependencies using bundler 1.16.1
   2018-05-18T12:12:57.96-0500 [STG/0] OUT        Running: bundle install --without development:test --jobs=4 --retry=4 --path /tmp/contents340936106/deps/0/vendor_bundle --binstubs /tmp/contents340936106/deps/0/binstubs --deployment
   2018-05-18T12:13:18.60-0500 [STG/0] OUT        Fetching source index from https://rubygems.org/
   2018-05-18T12:14:18.61-0500 [STG/0] OUT        
   2018-05-18T12:15:18.62-0500 [STG/0] OUT        Retrying fetcher due to error (2/5): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
   2018-05-18T12:16:18.62-0500 [STG/0] OUT        Retrying fetcher due to error (3/5): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
   2018-05-18T12:17:18.63-0500 [STG/0] OUT        Retrying fetcher due to error (4/5): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
   2018-05-18T12:18:18.64-0500 [STG/0] OUT        Retrying fetcher due to error (5/5): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
   2018-05-18T12:18:18.65-0500 [STG/0] OUT        Could not fetch specs from https://rubygems.org/
   2018-05-18T12:18:18.66-0500 [STG/0] OUT        **ERROR** Unable to install gems: exit status 17
   2018-05-18T12:18:18.66-0500 [STG/0] ERR Failed to compile droplet: Failed to run all supply scripts: exit status 15
   2018-05-18T12:18:18.68-0500 [STG/0] OUT Exit status 223
   2018-05-18T12:18:18.69-0500 [STG/0] OUT Stopping instance 03689848-28c7-4665-9e19-9cb6fd9e6514
   2018-05-18T12:18:18.69-0500 [STG/0] OUT Destroying container
   2018-05-18T12:18:20.56-0500 [STG/0] OUT Successfully destroyed containe

Minor things:

I had to chmod the following directory contents to 0600:

vendor/bundle/ruby/2.3.0/gems/brakeman-4.2.0/bundle/ruby/2.3.0/gems/ruby_parser-3.11.0/lib/*
vendor/bundle/ruby/2.3.0/gems/brakeman-4.2.0/bundle/ruby/2.3.0/gems/ruby_parser-3.11.0/test/*
vendor/bundle/ruby/2.3.0/gems/brakeman-4.2.0/bundle/ruby/2.3.0/gems/sexp_processor-4.10.1/lib/*

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.