Skip to content

Conversation

@accelazh
Copy link

@accelazh accelazh commented Mar 1, 2016

  1. Fix mesos.Credential.secret type mismatch
  2. Enable setting published address

Details in each commit message.

An Jan.16 2016 update of mesos/mesos-go changes type of
mesos.Credential.secret from bytes to string.

    mesos/mesos-go@7870a46#diff-8b984a6759078d3bd0e4a27e90ab541dR1239

This results a type mismatch at scheduler/init.go:50. Error
message below

    cannot use secret (type []byte) as type *string in field value

This patch fixes it by converting `secret` from []byte to string
before passing it to mesos.Credential.
In scheduler/init.go::26 we use parameter `address` to tell both
where auctioneer should listen to locally, and which address the
mesos master should connect to our scheduler.

    https://github.com/mesos/cloudfoundry-mesos/blob/e7448b44fbb1eef76d5099df227efc906cb7aaee/scheduler/init.go#L26

The former is called binding address, the later is called
published address. The mesos/mesos-go/scheduler/scheduler.go
DriverConfig supports both, and we should be able to use different
addresses for them.

    https://github.com/mesos/mesos-go/blob/7bcc067c99c88099eeffeff5a64659fe3baf925b/scheduler/scheduler.go#L100-L102

Our mesos master and diego auctioneer reside on different network.
Auctioneer listens to its local address, and expose its floating
ip to mesos master. To make them both side connectable, we do need
to specify different addresses for binding address and published
address.

This patch enables setting different addresses for binding address
and published address. It adds the extra command option
`published_address` and pass it to sched.DriverConfig.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant