Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Conversation

@Crazykev
Copy link
Contributor

@Crazykev Crazykev commented Dec 28, 2016

this PR is IPVS service workflow in hyperstart.

  1. using ipvsadm tool to manipulate ipvs rules, ipvsadm is static built in hyper container.
    2. add two method using ipvsadm -Sn to get ipvs rules and ipvsadm -R to load ipvs rules.
    3. use ipvsadm -C to clear ipvs rules, clear is specified.

/cc @feiskyer @resouer

@Jimmy-Xu
Copy link

Can one of the admins verify this patch?

@laijs
Copy link
Contributor

laijs commented Dec 28, 2016

is hyperstart-exec(#246) suitable for it?
I will add the runv's wrapper for hyperstart-exec later.

@feiskyer
Copy link
Contributor

is hyperstart-exec(#246) suitable for it?

Agreed with this. it's better to reuse hyperstart-exec.

@Crazykev
Copy link
Contributor Author

@laijs @feiskyer Agreed. This part of code is written months ago, sorry for not keeping update with this project recently.
AFAIK, to support ipvs service feature, only need to meet

  1. exec ipvsadm in pod network namespace.
  2. exec ipvsadm with stdin attached. this is required by ipvsadm -R, will read rules from stdin.

I believe it's not hard to meet with hyperstart-exec, will read through the latest code later and find out how to achieve that, thanks.

@mqliang
Copy link

mqliang commented Dec 30, 2016

@Crazykev @feiskyer @resouer Could you guys take a look at https://github.com/mqliang/libipvs, a pure go lib work with IPVS using generic netlink socket, thus removing the runtime dependency of ipvsadm tool

@feiskyer
Copy link
Contributor

@mqliang Hmm, hyperstart is written by C. I think hyperstart-exec(#246) is enough for ipvs load balancing, so we could keep all the control logic outside of hyperstart and don't make it too heavy.

@Crazykev Crazykev changed the title Implement service with IPVS Add ipvsadm tool in favor of IPVS implement of service Jan 10, 2017
@feiskyer feiskyer closed this Jan 10, 2017
@feiskyer feiskyer reopened this Jan 10, 2017
@Jimmy-Xu
Copy link

Can one of the admins verify this patch?

@feiskyer
Copy link
Contributor

LGTM.

@laijs Do you want to have another look?

cp ../src/init /tmp/hyperstart-rootfs
cp busybox /tmp/hyperstart-rootfs
cp iptables /tmp/hyperstart-rootfs
cp ipvsadm /tmp/hyperstart-rootfs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please directly copy all the above binaries into /tmp/hyperstart-rootfs/sbin?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, is this what you want?

@Crazykev Crazykev force-pushed the ipvs branch 2 times, most recently from 53b255c to b70ef61 Compare January 10, 2017 09:17
Signed-off-by: Crazykev <crazykev@zju.edu.cn>
@Crazykev
Copy link
Contributor Author

@laijs CI green now.

@laijs laijs merged commit 8827c0a into hyperhq:master Jan 10, 2017
@Crazykev Crazykev deleted the ipvs branch January 10, 2017 11:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants