-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for multiple disks resources #314
Conversation
Thanks for the PR! Would you mind fleshing out |
Hi, I've put the tests in |
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.
Thanks for the additional changes! Couple of minor comments.
api/v1/lib/resources.go
Outdated
buf.WriteString(m.GetRoot()) | ||
} | ||
default: | ||
buf.WriteString("(ROOT:") |
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 ROOT:
output here? I'd like for the output to be mostly consistent with https://github.com/apache/mesos/blob/1.2.x/src/common/resources.cpp#L1922
@@ -72,7 +72,7 @@ func Reservation(ri *mesos.Resource_ReservationInfo) Opt { | |||
} | |||
} | |||
|
|||
func Disk(persistenceID, containerPath string) Opt { | |||
func Disk(persistenceID, containerPath, source string, sourceType mesos.Resource_DiskInfo_Source_Type) Opt { |
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.
nit: would rather have left the params for Disk
alone and created a new DiskWithSource
func w/ the extended params. Callers of Disk(x, y, "", 0)
shouldn't actually need to bother with the additional params.
thanks, lgtm |
Disk source should also be checked. Otherwise it will cause a mistaken resource comparison when using multiple disks.