cloudfoundry-attic / bosh-init

bosh-init is a tool used to create and update the Director VM
Apache License 2.0
31 stars 33 forks source link

Errors while trying to run multiple instances of bosh-init in parallel on the same machine #75

Open zankich opened 8 years ago

zankich commented 8 years ago

For the bbl integration tests, we're trying to run multiple instances of bosh-init in parallel, but we encounter the following error message:

Starting registry... Failed (00:00:00)
Cleaning up rendered CPI jobs... Finished (00:00:00)

Command 'deploy' failed:
  Starting registry:
    Starting registry listener:
      listen tcp 127.0.0.1:6901: bind: address already in use

We see that the registry is hard coded to bind to port 6901, is there a specific reason for this?

Is it possible for this port to be randomly selected and bound? Or possibly a --registry-port flag which can be passed in?

cppforlife commented 8 years ago

@zankich currently there is no way to configure custom registry port.

Amit-PivotalLabs commented 8 years ago

Does the following describe the desired UX @cppforlife, @zankich?

$ bosh-init help deploy
NAME:
    deploy - Create or update a deployment

USAGE:
    bosh-init [global options] deploy <deployment_manifest_path> ['deploy' command options]

ENVIRONMENT VARIABLES:
    BOSH_INIT_LOG_LEVEL=debug               none, info, debug, warn, or error. Default: none
    BOSH_INIT_LOG_PATH=/path/to/file.log    The path where logs will be written. Default: standard out/err

GLOBAL OPTIONS:
    --help, -h       Show help message
    --version, -v    Show version

'deploy' COMMAND OPTIONS:
    --registry-port=, -r       Port for local registry server to bind to. Default: free TCP port automatically selected at runtime

and

$ bosh-init help delete
NAME:
    delete - Delete existing deployment

USAGE:
    bosh-init [global options] delete <deployment_manifest_path> ['delete' command options]

ENVIRONMENT VARIABLES:
    BOSH_INIT_LOG_LEVEL=debug               none, info, debug, warn, or error. Default: none
    BOSH_INIT_LOG_PATH=/path/to/file.log    The path where logs will be written. Default: standard out/err

GLOBAL OPTIONS:
    --help, -h       Show help message
    --version, -v    Show version

'delete' COMMAND OPTIONS:
    --registry-port=, -r       Port for local registry server to bind to. Default: free TCP port automatically selected at runtime
zankich commented 8 years ago

@cppforlife @Amit-PivotalLabs yes that would hopefully allow us to run multiple instances of bosh-init at the same time

voelzmo commented 8 years ago

@cppforlife how well does this go with the current ideas on using compiled releases for the CPI?