Thread compute cluster through Fenzo #1136
Thread compute cluster through Fenzo #1136
Conversation
… of getting it via the global.
(defn get-default-cluster-name-for-legacy | ||
"What cluster name to put on for legacy jobs when generating their compute-cluster." | ||
[] | ||
@default-cluster-name-for-legacy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get rid of the atom and just have this read the config? This shouldn't change over the lifetime of the process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I'll make a parallel change in the new patch. :)
; A hack to store the mesos cluster name, until we refactor the code so that we support multiple clusters. In the long term future | ||
; this is probably replaced with a function from driver->cluster-id, or the cluster name is propagated by function arguments and | ||
; closed over. | ||
(def mesos-cluster-name-hack (atom nil)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this in addition to get-default-cluster-name-for-legacy
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mesos-cluster-name-hack is a hack that will go away when we restructure the initialization. get-default-cluster-for-legacy will exist forever in order to back-patch a cluster into legacy task structures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I buy that. Same comment as above, though: can we replace the atom with a string read from config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
Changes proposed in this PR
Why are we making these changes?
This ensures that the compute cluster is attached to the offer, an enabling refactor for supporting more than one cluster. Now we know to whom to send the response.