-
Notifications
You must be signed in to change notification settings - Fork 40k
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
MESOS: Support a pre-installed km binary at a well known, agent-local path #28447
MESOS: Support a pre-installed km binary at a well known, agent-local path #28447
Conversation
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
4 similar comments
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
392b427
to
40b8fb4
Compare
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
4 similar comments
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
@k8s-bot ok to test |
@@ -389,7 +391,10 @@ func (s *SchedulerServer) prepareExecutorInfo(hks hyperkube.Interface) (*mesos.E | |||
} else if !hks.FindServer(hyperkube.CommandMinion) { | |||
return nil, fmt.Errorf("either run this scheduler via km or else --executor-path is required") | |||
} else { | |||
if strings.Index(s.kmPath, "://") > 0 { | |||
if s.kmLocalPath != "" { // The default value of kmLocalPath is "". | |||
// TODO(k82): Check whether `kmLocalPath` start with `file://` or `/`. |
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.
What do you think about making this a subset of the ://
case?
} else if strings.Index(s.kmPath, "://") > 0 {
if strings.startsWith(s.kmPath, "file://") {
// ... don't add this as a URI because it's local to the agent; parse the basename of kmPath and use that for ci.Valkue
// (new bits)
} else {
// ... assume this is something to be downloaded; append a URI and assume that `km` will land in the sandbox.
// (exiting bits)
}
} else if ...
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.
The idea being that people wanting to use a preinstalled km
on the agent would always have to specify a URI using the file://
form
GCE e2e build/test passed for commit 58f3048ba4fe9953acda4cac1423ca7453fba0c3. |
58f3048
to
203e1e9
Compare
Address jdef's comments. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
3 similar comments
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
GCE e2e build/test passed for commit 540de16b19524cbda6085b43bcbaf523c162ef5b. |
540de16
to
0d62260
Compare
@k8s-bot ok to test |
ci.Value = proto.String("./km") // TODO(jdef) extract constant | ||
if strings.HasPrefix(s.kmPath, "file://") { | ||
// If `kmPath` started with "file://", `km` in agent local path was used. | ||
ci.Value = proto.String(s.kmPath) |
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.
did you test this? you probably need to strip the file://
prefix in order to make this work properly
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.
"file://" is handled by Mesos Fetcher at https://github.com/apache/mesos/blob/master/src/slave/containerizer/fetcher.cpp#L199
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.
So it is -- perfect
On Wed, Jul 6, 2016 at 11:19 AM, Klaus Ma notifications@github.com wrote:
In contrib/mesos/pkg/scheduler/service/service.go
#28447 (comment)
:@@ -390,11 +390,16 @@ func (s _SchedulerServer) prepareExecutorInfo(hks hyperkube.Interface) (_mesos.E
return nil, fmt.Errorf("either run this scheduler via km or else --executor-path is required")
} else {
if strings.Index(s.kmPath, "://") > 0 {
// URI could point directly to executable, e.g. hdfs:///km
// or else indirectly, e.g. http://acmestorage/tarball.tgz
// so we assume that for this case the command will always "km"
ci.Uris = append(ci.Uris, &mesos.CommandInfo_URI{Value: proto.String(s.kmPath), Executable: proto.Bool(true)})
ci.Value = proto.String("./km") // TODO(jdef) extract constant
if strings.HasPrefix(s.kmPath, "file://") {
// If `kmPath` started with "file://", `km` in agent local path was used.
ci.Value = proto.String(s.kmPath)
"file://" is handled by Mesos Fetcher at
https://github.com/apache/mesos/blob/master/src/slave/containerizer/fetcher.cpp#L199—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/kubernetes/kubernetes/pull/28447/files/0d62260bb2fca8d34b92c647d67087951a1c21b3#r69751134,
or mute the thread
https://github.com/notifications/unsubscribe/ACPVLCqkomu4FCw0L6ZoKL_C1lFNaQZgks5qS8eZgaJpZM4JECIE
.
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.
actually I think I spoke too soon. The mesos code you're pointing at appears to be for handling URIs. Which is fine if you were copying kmPath into a URI. but here you're using it as the arg0 of a command line. so you'll want to strip the file://
prefix upon assigning it to ci.Value
.
again, have you tested this?
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.
@jdef , I think you're right, it handles the URI, not the command line. Update the code accordingly.
Re test, yes, but seems tested with old binaries :(. Sorry for the confuse.
@k82 looking better, left some comments |
GCE e2e build/test passed for commit 0d62260bb2fca8d34b92c647d67087951a1c21b3. |
GCE e2e build/test passed for commit 0d62260bb2fca8d34b92c647d67087951a1c21b3. |
0d62260
to
13dc5a0
Compare
GCE e2e build/test passed for commit 13dc5a0df58e86444285f511d54d5461605832a4. |
13dc5a0
to
b361f40
Compare
lgtm |
GCE e2e build/test passed for commit b361f40. |
Automatic merge from submit-queue |
fixes #26930