Shared instance ports preparation#3
Closed
ZiedZinelabidine wants to merge 3 commits intoshared-instance-portsfrom
Closed
Shared instance ports preparation#3ZiedZinelabidine wants to merge 3 commits intoshared-instance-portsfrom
ZiedZinelabidine wants to merge 3 commits intoshared-instance-portsfrom
Conversation
Member
|
Please remove update of src/cf-redis-broker from this PR, so that we can instead have the pivotal team commit themselves the dependency bump at the right time for them. |
Member
|
Manually Merged by @ArthurHlt into shared-instance-ports branch |
Scenario: shared instance uses a port in the preferred range
Test:$ cf cs redis shared-vm myredis
$ cf create-service-key myredis mykey
Creating service key mykey for service instance myredis as ahalet...
OK
$ cf service-key myredis mykey
Getting key mykey for service instance myredis as ahalet...
{
"host": "10.234.250.160",
"password": "9babfc50-630e-4f26-bbee-97f1b16ff2a3",
"port": 60000
}Result: OKScenario: shared instances rejects service binding when not available port in the preferred range, providing clear error message to service operators and possibly end-users
Test:$ cf cs redis shared-vm myredis
Creating service instance myredis in org dfy / space etherpad as ahalet...
OK
$ cf cs redis shared-vm myredis2
Creating service instance myredis2 in org dfy / space etherpad as ahalet...
FAILED
Server error, status code: 502, error code: 10001, message: Service broker error: No port is available in the range. Please ask help to your OperatorResult: OKScenario: operator misconfigurations of preferred port range, fail deployment with clear error message.
Test:Deploying
---------
bosh-master$ bosh deploy
[...]
Started updating instance cf-redis-broker > cf-redis-broker/e54249ca-63a8-467a-869c-9c0c992ee26e (0) (canary). Failed: 'cf-redis-broker/0 (e54249ca-63a8-467a-869c-9c0c992ee26e)' is not running after update. Review logs for failed jobs: process-watcher, cf-redis-broker, broker-nginx, route_registrar, syslog-configurator (00:01:58)
Error 400007: 'cf-redis-broker/0 (e54249ca-63a8-467a-869c-9c0c992ee26e)' is not running after update. Review logs for failed jobs: process-watcher, cf-redis-broker, broker-nginx, route_registrar, syslog-configurator
bosh-master$ bosh ssh cf-redis-broker/0
redis-broker$ cat /var/vcap/sys/log/cf-redis-broker/cf-redis-configmigrator.stderr.log
[...]
panic: Not valid range port: minimum port is higher than maximum portResult: OKScenario: User ask multiple redis
Test:$ cf cs redis shared-vm myredis
Creating service instance myredis in org dfy / space etherpad as ahalet...
OK
$ cf cs redis shared-vm myredis2
Creating service instance myredis2 in org dfy / space etherpad as ahalet...
OK
$ cf create-service-key myredis mykey
Creating service key mykey for service instance myredis as ahalet...
OK
$ cf create-service-key myredis2 mykey
Creating service key mykey for service instance myredis2 as ahalet...
OK
$ cf service-key myredis mykey
Getting key mykey for service instance myredis as ahalet...
{
"host": "10.234.250.160",
"password": "e062facf-f591-49c0-b75b-d7b474fc70c6",
"port": 1024
}
$ cf service-key myredis2 mykey
Getting key mykey for service instance myredis2 as ahalet...
{
"host": "10.234.250.160",
"password": "c712a7ce-0fcd-477f-afc2-568bb0b2ea3e",
"port": 1025
}Result: OK |
Member
|
Closing now that pivotal-cf/cf-redis-broker#3 was submitted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As documented in vmware-archive#36, this PR adds control to the choice of the port in the precise range.
Details over the end-to-end tests performed:
Scenario: shared instance uses a port in the preferred range
Scenario: shared instances rejects service binding when not available port in the preferred range, providing clear error message to service operators and possibly end-users
cf bind-service redis-instance2 appfails with error messageScenario: operator misconfigurations of preferred port range, fail deployment with clear error message.