-
Notifications
You must be signed in to change notification settings - Fork 977
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
feat: support vc-scheduler loading custom plugins (#1215) #1218
Conversation
Signed-off-by: Xu ZhengYu <zen-xu@outlook.com>
Signed-off-by: ZhengYu, Xu <zen-xu@outlook.com>
Signed-off-by: Xu ZhengYu <zen-xu@outlook.com>
Signed-off-by: Xu ZhengYu <zen-xu@outlook.com>
We will use musl-gcc to build scheduler, so it can run in `alpine` when CGO enabled Signed-off-by: Xu ZhengYu <zen-xu@outlook.com>
Signed-off-by: Xu ZhengYu <zen-xu@outlook.com>
Signed-off-by: Xu ZhengYu <zen-xu@outlook.com>
example/custom-plugin/README.md
Outdated
# Build plugin | ||
|
||
## In docker | ||
Plugin must use `musl-gcc` to build. The best choose is build it in the docker. |
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.
hm... IMO, the compiler of plugin and scheduler should be the same; as some users may build scheduler themself.
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.
because we use alpine as base image,which only has musl-libc
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.
yes, that's ok in our case. But if someone want to build scheduler themself, it's better to highlight that; or add add a reference about the limitation of Plugin
.
LGTM overall :) |
Signed-off-by: Xu ZhengYu <zen-xu@outlook.com>
Signed-off-by: Xu ZhengYu <zen-xu@outlook.com>
Signed-off-by: Xu ZhengYu <zen-xu@outlook.com>
Signed-off-by: Xu ZhengYu <zen-xu@outlook.com>
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: k82cn, zen-xu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
done | ||
|
||
# scheduler need cgo enabled to support plugin | ||
CC=${CC} CGO_ENABLED=1 $(GOBIN)/gox -osarch=${REL_OSARCH} -ldflags ${LD_FLAGS} -output ${BIN_DIR}/${REL_OSARCH}/vc-scheduler ./cmd/scheduler; |
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.
hi @zen-xu , it will cause some problem using gcc
with CGO enabled, l think it will be better to specify the musl-gcc
in Makefile.
FYI: l just ran make images
directly to build images and there's something wrong.
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's the wrong message?
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.
standard_init_linux.go:211: exec user process caused "no such file or directory"
It should be a cross compilation problem with CGO enabled
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.
yes, I know the reason
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.
Since CI use ubuntu, so I think scheduler should also use ubuntu
.
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.
Makefile
is not only used by CI, but users on different platforms may use it.
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.
If you use gcc
build the scheduler, you should promise your container has gnu-libc
If you use musl-gcc
build the scheduler, you should promise your container has musl-libc
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.
But this is a strong assumption. The compilation method needs to be changed according to the environment in which the image is deployed. E.g. I am currently on ubuntu, and I just want to compile vc-scheduler image(with alpine as basic image) through make images
, but it doesn't work and you don't even tell me to use musl-gcc
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.
I have written a design doc, But has not been merged yet.
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.
okay, now l got it.. but it is still confusing if someone doesn't use the Custom Plugin
need to know that)
Signed-off-by: Xu ZhengYu zen-xu@outlook.com