diff options
author | Peter Volkov <pva@gentoo.org> | 2009-03-31 09:16:33 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2009-03-31 09:16:33 +0000 |
commit | 39831cc85a6ca9fb77c14a9cd6d2691530c0a70e (patch) | |
tree | f3e0e23f7ff3e48781614a66a5460141d16de05b /sys-cluster/vzctl | |
parent | Fix files/awk/fixlafiles.awk-no_gcc_la for POSIX shell compliant. (diff) | |
download | historical-39831cc85a6ca9fb77c14a9cd6d2691530c0a70e.tar.gz historical-39831cc85a6ca9fb77c14a9cd6d2691530c0a70e.tar.bz2 historical-39831cc85a6ca9fb77c14a9cd6d2691530c0a70e.zip |
Backport some fixes from git, update patches to be likely included (or already included) by upstream. Remove old. Stabilize 3.0.22-r2.
Package-Manager: portage-2.2_rc28/cvs/Linux i686
Diffstat (limited to 'sys-cluster/vzctl')
15 files changed, 710 insertions, 201 deletions
diff --git a/sys-cluster/vzctl/ChangeLog b/sys-cluster/vzctl/ChangeLog index 15ce3df58951..12b189b37a74 100644 --- a/sys-cluster/vzctl/ChangeLog +++ b/sys-cluster/vzctl/ChangeLog @@ -1,6 +1,24 @@ # ChangeLog for sys-cluster/vzctl -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/ChangeLog,v 1.60 2008/11/15 13:01:30 pva Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/ChangeLog,v 1.61 2009/03/31 09:16:33 pva Exp $ + +*vzctl-3.0.23-r1 (31 Mar 2009) + + 31 Mar 2009; Peter Volkov <pva@gentoo.org> + +files/vzctl-3.0.23-UBC-parameter-swappages.patch, + +files/vzctl-3.0.23-cronjobs-issue-warning.patch, + +files/vzctl-3.0.23-cronjobs-typo-fix.patch, + +files/vzctl-3.0.23-debian-CT-ipv6-fix.patch, + +files/vzctl-3.0.23-forwarding-issue-warning.patch, + -files/vzctl-3.0.23-ipforwarding-on-start.patch, + +files/vzctl-3.0.23-ppp-feature.patch, + -files/vzctl-3.0.23-set-cron-jobs.patch, + files/vzctl-3.0.23-ve-unlimited.conf-sample.patch, + +files/vzctl-3.0.23-vzarp-on-ifup.patch, + +files/vzctl-3.0.23-vznetaddbr.in-no-bashisms.patch, + vzctl-3.0.22-r2.ebuild, -vzctl-3.0.23.ebuild, +vzctl-3.0.23-r1.ebuild: + Backport some fixes from git, update patches to be likely included (or + already included) by upstream. Remove old. Stabilize 3.0.22-r2. *vzctl-3.0.23 (15 Nov 2008) diff --git a/sys-cluster/vzctl/Manifest b/sys-cluster/vzctl/Manifest index 49d2cdccb27e..3ea0f58fee72 100644 --- a/sys-cluster/vzctl/Manifest +++ b/sys-cluster/vzctl/Manifest @@ -3,13 +3,19 @@ AUX vzctl-3.0.22-capability-fix.patch 1037 RMD160 d244af55f1eaf249d1db04e53ab452 AUX vzctl-3.0.22-document-disable-modules.patch 843 RMD160 635e9417e3bbdef88d447f65e7d8007b89ba52ad SHA1 b6c1bc340ed29efe9ebf99d50b214b4c03e23379 SHA256 e2f4d5b3d3447eb6a4086ec3ff1ab5e8cc10797afe4febc3f06847a94430e6d5 AUX vzctl-3.0.22-glibc28.patch 758 RMD160 633a9feb1a7101a166aa8e090fac4b5720546d0c SHA1 d19fb01c59366eb97da8178864ddda88010b7110 SHA256 36021ca9dabe548075ca016db047131f3536f916b2fa620ed61b00c41545e19e AUX vzctl-3.0.22-workaround-gentoo-add_ip.patch 1250 RMD160 d77d99b74ed55894a947d6651f3a8471f3f582ff SHA1 a3da293f85076cc8c86f68c128733e57ddba8b56 SHA256 b5d52398a85d947ceebcd7db17fbd6ec602bb03c338ec4af5b202a814e226730 -AUX vzctl-3.0.23-ipforwarding-on-start.patch 1274 RMD160 51a5b0ffb9fccfa275059a9a1f9515f5ac4b2669 SHA1 d7c931858c84202ede88f7e07e36cfa0ad579dcd SHA256 5404038ce614ec224ec5c634559e250d5020c91b056c445814664e64ff3c6f45 -AUX vzctl-3.0.23-set-cron-jobs.patch 1919 RMD160 1fb8adb60ab7503444d1f0b3f4625828d10dafd9 SHA1 538273d8982018426e78ec491f2ce50846bdf13c SHA256 e2634efc003d0f6dd614758e3f0dc28d934dc512c4101e89c7c74686b559f400 -AUX vzctl-3.0.23-ve-unlimited.conf-sample.patch 7093 RMD160 b593112e798280c45c4fdaf04e17b05e16842798 SHA1 62707930776226ba5676b2e38e6f711881bfa068 SHA256 bad86e985fd7cb81261dd69a44b7c2618d6fca1f967228f9157658fea62a1207 +AUX vzctl-3.0.23-UBC-parameter-swappages.patch 5482 RMD160 81ec766ef3263caf59e3e1c6048f632498949f5d SHA1 d1b0462ced780602cfcb850993f75a8a724b299d SHA256 c4ce00e8cddc8f3334847a3f8e700ab34a39b5dbfff8613a145de0f68147b2b0 +AUX vzctl-3.0.23-cronjobs-issue-warning.patch 1567 RMD160 016c173d75e910e76aaa2b782de726b9209b2eba SHA1 47563dbb5bd724d8f2d572b93a3ff7cd76f21500 SHA256 851974e6a4c62f521aae23479ddb9d6c454b6a7dd3aeec31de20985291870825 +AUX vzctl-3.0.23-cronjobs-typo-fix.patch 1245 RMD160 0223c824fa7aca9f068c467a3249908d1a87998e SHA1 ba0581fc88b0fc96bc2f1b7ff6cb5dbc5cddcb94 SHA256 d80ec64e83bf56742567855b24c1dbdefcf1f5f52f7f2f35f8fb6d30d79af8de +AUX vzctl-3.0.23-debian-CT-ipv6-fix.patch 891 RMD160 5610360392dec91ce24bd810d70541ae81f21bb1 SHA1 bad520de9e46491c2eebeb765a9719618ee35b12 SHA256 c4cc9a343faccb322e62a0166f6bf01d2073c29c444e236eaf30439f5cd530ab +AUX vzctl-3.0.23-forwarding-issue-warning.patch 902 RMD160 17fd5c6d70acd9c8899bc0148a66dd5351c6428a SHA1 9b0fd5844f84537c81744d3ddfd85d8336f0a5c5 SHA256 2aaf9294ec640e31b741f9b3886ba1022706abbe5300b238eb0a54440c74b079 +AUX vzctl-3.0.23-ppp-feature.patch 1648 RMD160 371662db2df2f9308a10a07469b00fc8a02f630e SHA1 40e4b653065fd4a904daeef7a746acdef21ad17e SHA256 e21c74505660d0a26b2803ce1bd86ac3c45d60f2d44a46327bf0fd4934699eaf +AUX vzctl-3.0.23-ve-unlimited.conf-sample.patch 6820 RMD160 22f36eb040cc0d7c4e5234202d5f6ac8e30dadfb SHA1 bec42c124cb4770aa68c798f8f1e1c9ce5adc40a SHA256 33727682809532feb195249f655759468da05ef879d854c841de98e5cfa3b192 +AUX vzctl-3.0.23-vzarp-on-ifup.patch 3404 RMD160 d08123addc176a5532bfd8b264b4e5470fd49b72 SHA1 39c7254e2e0e0800e3714eaadd9c8cb26e2508c7 SHA256 ddaed5b15ad397f29643fec51b0720b0bf1ca1fcb218613c05c9d115f46b6ce7 +AUX vzctl-3.0.23-vznetaddbr.in-no-bashisms.patch 2773 RMD160 f808e49ad253124bb1edf32ff31773eb2f3026ab SHA1 59845fa8f10fcda7f2a390205858ccb032eaaf6b SHA256 2225bcf154ca629ce9ef5d390eed19b5fbdbee4b902e203cfca9854c951a3035 DIST vzctl-3.0.22.tar.bz2 360012 RMD160 53353981fefea94d997b3555600583f4c5818833 SHA1 58e5c55855aebf9e4ca032b325d8960a3836d648 SHA256 20f75e8342b85909d6bf01d0db47acaa088125da7f203b5e6e6169aa4c139166 DIST vzctl-3.0.23.tar.bz2 361403 RMD160 6436843d4d7de8c98de3ec57c8003e3b625529ef SHA1 b94545dd5608bb48389abcb93e3fc8c91141461a SHA256 3ca7da609ee07b0a8d6b21f05c76b35ba8febc6b5c251b67c759bcbb3bf76eea EBUILD vzctl-3.0.22-r1.ebuild 2585 RMD160 3a26d40c46dc4e7052184eaf9fb7f96bb1cbdf76 SHA1 0e673748b748658799e7e4646c789e73fc44161f SHA256 be918b625ea4a3c411402f596a04939912e82c6de1a173fb9f86180fc08e9b73 -EBUILD vzctl-3.0.22-r2.ebuild 2635 RMD160 1af38bcd6d72c810e7114a957a49fc9c71c9d2ce SHA1 4569beda0805201dc597bb1376549dfd3977091c SHA256 2a1fe5bc22628b4063c287aa7adb1f7633da0f84989337e73fc15de6613897f8 -EBUILD vzctl-3.0.23.ebuild 3081 RMD160 6a0c36ce327b32fc4a5057646ff8ede1041b0ea4 SHA1 747251a6aafe2aec487ce4ab5a49ed1f567a7703 SHA256 bf6484d3531fc1cf5f5af30d608e405f0d409a0fb19acb637322a673f629edac -MISC ChangeLog 11906 RMD160 c7a0aa74b91c19abdd69be545c5411c60e20cb86 SHA1 e106364ec827b15745bb63eefb66a1ee55d3f64f SHA256 319754b9fb0bb7fe523df038b4221dfe4552b433ff64c86a97c3e711bf0a561b +EBUILD vzctl-3.0.22-r2.ebuild 2633 RMD160 416a8558e8c3b288b881471afc0993d100f3dcd7 SHA1 c42b7522a90ec4ef62c25e46c5b1714cd5f1c9c9 SHA256 90515e307ea9a494a6e3b726967117f14b5013ab9e8282925948ff7857c35281 +EBUILD vzctl-3.0.23-r1.ebuild 2930 RMD160 9333e930c6ec4f5030cede9cc0bc5ad3e0a8d1cf SHA1 8f612e888a6b3b6238716fd6838de0a39c8b2e60 SHA256 8e78c20a4aaf246cc40d6e10adf246ed61bc838f5d5b8e02a350b4640afecee1 +MISC ChangeLog 12736 RMD160 9b41d3a4f4bbdfa9eb8cda8b0bc2380d85ffdd58 SHA1 d0e02ab2e91cade0f48683702c87069c25b43506 SHA256 d3dc0824eaade15a91781c9e45cba19caaa315511d7ed9d0320727f38c7c2398 MISC metadata.xml 332 RMD160 b40e74088fb74ddb66a5eda7f46bf63742e2258a SHA1 719e3d0e91af2df78aa7478990ef65c307fb0c31 SHA256 30e1f46e13b10bc59d15c29e986bf8d8aab98ce8338c33d6f37650f399ebb4b2 diff --git a/sys-cluster/vzctl/files/vzctl-3.0.23-UBC-parameter-swappages.patch b/sys-cluster/vzctl/files/vzctl-3.0.23-UBC-parameter-swappages.patch new file mode 100644 index 000000000000..6d89cba37fa3 --- /dev/null +++ b/sys-cluster/vzctl/files/vzctl-3.0.23-UBC-parameter-swappages.patch @@ -0,0 +1,170 @@ +From: Igor Sukhih <igor@openvz.org> +Date: Tue, 10 Feb 2009 16:45:49 +0000 (+0300) +Subject: Added new UBC parameter: swappages +X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=6b819fb60634a109200b7a749aa40d595fcd4895 + +Added new UBC parameter: swappages + +[kir@openvz.org: man page modifications] +--- + +diff --git a/include/ub.h b/include/ub.h +index 35868aa..e6f0bf3 100644 +--- a/include/ub.h ++++ b/include/ub.h +@@ -97,6 +97,9 @@ + #ifndef UB_IPTENTRIES + #define UB_IPTENTRIES 23 /* Number of iptables rules */ + #endif ++#ifndef UB_SWAPPAGES ++#define UB_SWAPPAGES 24 ++#endif + #define UB_DUMMY 255 + + /** Data structure for UBC parameter. +@@ -130,6 +133,7 @@ struct ub_struct { + unsigned long *dcachesize; + unsigned long *numiptent; + unsigned long *avnumproc; ++ unsigned long *swappages; + }; + typedef struct ub_struct ub_param; + +diff --git a/include/vzctl_param.h b/include/vzctl_param.h +index 83919e8..afb8898 100644 +--- a/include/vzctl_param.h ++++ b/include/vzctl_param.h +@@ -134,6 +134,7 @@ + #define PARAM_NETIF_MAC_FILTER 360 + #define PARAM_NETIF_BRIDGE 361 + #define PARAM_DESCRIPTION 362 ++#define PARAM_SWAPPAGES 363 + + #define PARAM_LINE "e:p:f:t:i:l:k:a:b:n:x:h" + #endif +diff --git a/man/vzctl.8 b/man/vzctl.8 +index 92d49e3..01c9d59 100644 +--- a/man/vzctl.8 ++++ b/man/vzctl.8 +@@ -315,6 +315,15 @@ This is currently an accounting-only parameter. It shows the usage of RAM + by this container. Barrier should be set to 0, and limit should be set to + \fBunlimited\fR. + .TP ++\fB--swappages\fR \fIpages\fR[:\fIpages\fR] ++The limit, if set, is used to show a total amount of swap space available ++inside the container. The barrier of this parameter is currently ignored. ++The default value is \fBunlimited\fR, meaning total swap will be reported ++as 0. ++ ++Note that in order for the value to be shown as total swap space, ++\fB--meminfo\fR parameter should be set to value other than \fBnone\fR. ++.TP + \fBCPU fair scheduler parameters\fR + + These parameters control CPU usage by container. +@@ -345,7 +354,8 @@ This parameter control output of /proc/meminfo inside a container + No /proc/meminfo virtualization (the same as on host system). + .IP "\fB--meminfo\fR \fImode\fR:\fIvalue\fR" + Configure total memory output in a container. Reported free memory is evaluated +-accordingly to the mode being set. ++accordingly to the mode being set. Reported swap is evaluated ++according to the settings of \fB--swappages\fR parameter. + .br + You can use the following modes for \fImode\fR: + .br +diff --git a/src/lib/config.c b/src/lib/config.c +index bb8953f..a16fe54 100644 +--- a/src/lib/config.c ++++ b/src/lib/config.c +@@ -83,6 +83,7 @@ static vps_config config[] = { + {"NUMIPTENT", NULL, PARAM_NUMIPTENT}, + {"IPTENTRIES", "NUMIPTENT", -1}, + {"AVNUMPROC", NULL, PARAM_AVNUMPROC}, ++{"SWAPPAGES", NULL, PARAM_SWAPPAGES}, + /* Capability */ + {"CAPABILITY", NULL, PARAM_CAP}, + /* Network */ +@@ -163,6 +164,7 @@ static struct option set_opt[] = { + {"dcachesize", required_argument, NULL, PARAM_DCACHESIZE}, + {"numiptent", required_argument, NULL, PARAM_NUMIPTENT}, + {"avnumproc", required_argument, NULL, PARAM_AVNUMPROC}, ++{"swappages", required_argument, NULL, PARAM_SWAPPAGES}, + /* Capability */ + {"capability", required_argument, NULL, PARAM_CAP}, + /* Network */ +@@ -685,6 +687,7 @@ if (ub->res != NULL) { \ + ADD_UB_PARAM(dcachesize, PARAM_DCACHESIZE) + ADD_UB_PARAM(numiptent, PARAM_NUMIPTENT) + ADD_UB_PARAM(avnumproc, PARAM_AVNUMPROC) ++ ADD_UB_PARAM(swappages, PARAM_SWAPPAGES) + #undef ADD_UB_PARAM + + return 0; +@@ -1933,6 +1936,7 @@ static int parse(envid_t veid, vps_param *vps_p, char *val, int id) + case PARAM_PHYSPAGES: + case PARAM_VMGUARPAGES: + case PARAM_OOMGUARPAGES: ++ case PARAM_SWAPPAGES: + ret = parse_ub(vps_p, val, id, _page_size); + break; + case PARAM_NUMPROC: +diff --git a/src/lib/ub.c b/src/lib/ub.c +index a50a1dc..f25522f 100644 +--- a/src/lib/ub.c ++++ b/src/lib/ub.c +@@ -61,6 +61,7 @@ static struct ubname2id { + {"DCACHESIZE", PARAM_DCACHESIZE}, + {"NUMIPTENT", PARAM_NUMIPTENT}, + {"AVNUMPROC", PARAM_AVNUMPROC}, ++ {"SWAPPAGES", PARAM_SWAPPAGES}, + {NULL, 0}, + }; + +@@ -128,6 +129,7 @@ inline static int is_ub_empty(ub_param *ub) + CHECK_UB(numfile) + CHECK_UB(dcachesize) + CHECK_UB(numiptent) ++ CHECK_UB(swappages) + #undef CHECK_UB + + return 1; +@@ -185,6 +187,16 @@ if (ub->name != NULL) { \ + SET_UB_LIMIT(numfile, UB_NUMFILE) + SET_UB_LIMIT(dcachesize, UB_DCACHESIZE) + SET_UB_LIMIT(numiptent, UB_IPTENTRIES) ++ if (ub->swappages && ++ setublimit(veid, UB_SWAPPAGES, ub->swappages) == -1) ++ { ++ if (errno == EINVAL) { ++ logger(-1, ENOSYS, "failed to set swappages"); ++ } else { ++ logger(-1, errno, "failed to set swappages"); ++ return VZ_SETUBC_ERROR; ++ } ++ } + #undef SET_UB_LIMIT + + return 0; +@@ -327,6 +339,7 @@ if ((src->x) != NULL) { \ + MERGE_P2(dcachesize) + MERGE_P2(numiptent) + MERGE_P2(avnumproc) ++ MERGE_P2(swappages) + #undef MERGE_P2 + } + +diff --git a/src/vzctl.c b/src/vzctl.c +index 448b83a..58715ae 100644 +--- a/src/vzctl.c ++++ b/src/vzctl.c +@@ -91,7 +91,9 @@ void usage(int rc) + " --oomguarpages P[:P] --lockedpages P[:P] --privvmpages P[:P]\n" + " --shmpages P[:P] --numfile N[:N] --numflock N[:N]\n" + " --numpty N[:N] --numsiginfo N[:N] --dcachesize N[:N]\n" +-" --numiptent N[:N] --physpages P[:P] --avnumproc N[:N]\n"); ++" --numiptent N[:N] --physpages P[:P] --avnumproc N[:N]\n" ++" --swappages P[:P]\n" ++); + memset(&mod, 0, sizeof(mod)); + set_log_level(0); + init_modules(&mod, NULL); diff --git a/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-issue-warning.patch b/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-issue-warning.patch new file mode 100644 index 000000000000..5c9bd9225dae --- /dev/null +++ b/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-issue-warning.patch @@ -0,0 +1,36 @@ +commit 5f0d3dbcdb5f1f1f9d019619c4e3dd3b2f2d29f3 +Author: Peter Volkov <pva@gentoo.org> +Date: Tue Mar 31 12:31:01 2009 +0400 + + Issue warning if cronjobs aren't automatically set + + Init script is supposed to set cronjobs automatically on start and remove + them on stop. This works only with cron daemons that may hook at runtime + scripts at ${DST_CRONSCRIPT_DIR} (e.g. sys-process/vixie-cron can). For + other cron daemons it's safer to warn users to set cronjobs manually. + +diff --git a/etc/init.d/vz-gentoo.in b/etc/init.d/vz-gentoo.in +index 97ea313..dc87d41 100755 +--- a/etc/init.d/vz-gentoo.in ++++ b/etc/init.d/vz-gentoo.in +@@ -57,7 +57,19 @@ check_config() { + setup_cron() + { + [ -z "$SRC_CRONSCRIPT_DIR" ] && return +- [ -d "$DST_CRONSCRIPT_DIR" ] || return ++ if [ ! -d "${DST_CRONSCRIPT_DIR}" ]; then ++ if [ "x${SKIP_CRON_WARNINGS}" != "xyes" ]; then ++ ewarn "Automatic setup of cron jobs works only if a system cron daemon can use" ++ ewarn "\${DST_CRONSCRIPT_DIR} (${DST_CRONSCRIPT_DIR}) as a spool directory" ++ ewarn "(e.g. sys-process/vixie-cron can). On your system ${DST_CRONSCRIPT_DIR}" ++ ewarn "is not a directory even, thus you need manually set the following cron jobs:" ++ ewarn "*/5 * * * * root @PKGDATADIR@/scripts/vpsnetclean" ++ ewarn "*/5 * * * * root @PKGDATADIR@/scripts/vpsreboot" ++ ewarn "If you already did that and wish to avoid this warning put" ++ ewarn "SKIP_CRON_WARNINGS=yes into /etc/conf.d/vz." ++ fi ++ return ++ fi + install -m644 -o root -g root $SRC_CRONSCRIPT_DIR/vz \ + $DST_CRONSCRIPT_DIR + } diff --git a/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-typo-fix.patch b/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-typo-fix.patch new file mode 100644 index 000000000000..038b7a21cde8 --- /dev/null +++ b/sys-cluster/vzctl/files/vzctl-3.0.23-cronjobs-typo-fix.patch @@ -0,0 +1,38 @@ +commit b57ce68fae2ce2642a36746b8e7b7216a02bfc8c +Author: Peter Volkov <pva@gentoo.org> +Date: Sun Feb 22 19:40:34 2009 +0300 + + vz-gentoo.in typo: check for DST_CRONSCRIPT_DIR + + Fixed indentation and typo to make script really check for + $DST_CRONSCRIPT_DIR directory existence. + +diff --git a/etc/init.d/vz-gentoo.in b/etc/init.d/vz-gentoo.in +index 005813f..97ea313 100755 +--- a/etc/init.d/vz-gentoo.in ++++ b/etc/init.d/vz-gentoo.in +@@ -56,17 +56,17 @@ check_config() { + # being enabled or not. + setup_cron() + { +- [ -z "$SRC_CRONSCRIPT_DIR" ] && return +- [ -d "$SRC_CRONSCRIPT_DIR" ] || return +- install -m644 -o root -g root $SRC_CRONSCRIPT_DIR/vz \ +- $DST_CRONSCRIPT_DIR ++ [ -z "$SRC_CRONSCRIPT_DIR" ] && return ++ [ -d "$DST_CRONSCRIPT_DIR" ] || return ++ install -m644 -o root -g root $SRC_CRONSCRIPT_DIR/vz \ ++ $DST_CRONSCRIPT_DIR + } + + remove_cron() + { +- [ -z "$SRC_CRONSCRIPT_DIR" ] && return +- [ -d "$SRC_CRONSCRIPT_DIR" ] || return +- cat > $DST_CRONSCRIPT_DIR/vz <<EOF ++ [ -z "$SRC_CRONSCRIPT_DIR" ] && return ++ [ -d "$DST_CRONSCRIPT_DIR" ] || return ++ cat > $DST_CRONSCRIPT_DIR/vz <<EOF + # DO NOT EDIT THIS FILE! + # + # Contents of this file managed by /etc/init.d/vz script diff --git a/sys-cluster/vzctl/files/vzctl-3.0.23-debian-CT-ipv6-fix.patch b/sys-cluster/vzctl/files/vzctl-3.0.23-debian-CT-ipv6-fix.patch new file mode 100644 index 000000000000..eec864c90a01 --- /dev/null +++ b/sys-cluster/vzctl/files/vzctl-3.0.23-debian-CT-ipv6-fix.patch @@ -0,0 +1,24 @@ +From: mathgl <mathgl@freesurf.fr> +Date: Mon, 17 Nov 2008 18:27:19 +0000 (+0300) +Subject: Fix IPv6 configuration on a debian lenny container +X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=9fe02f4a9a42d8d608c401d2508da01f2a07a13e + +Fix IPv6 configuration on a debian lenny container + +http://bugzilla.openvz.org/show_bug.cgi?id=824 +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=505792 +--- + +diff --git a/etc/dists/scripts/debian-add_ip.sh b/etc/dists/scripts/debian-add_ip.sh +index ca87137..b9bda3e 100755 +--- a/etc/dists/scripts/debian-add_ip.sh ++++ b/etc/dists/scripts/debian-add_ip.sh +@@ -79,7 +79,7 @@ iface ${VENET_DEV}:${ifnum} inet static + " >> ${CFGFILE}.bak + + else +- sed -i -e "s/netmask\ 128/netmask\ 128\n\tup ifconfig venet0 add ${ip}/" ${CFGFILE}.bak ++ sed -i -e "s/netmask\ 128/netmask\ 128\n\tup ifconfig venet0 add ${ip}\/0/" ${CFGFILE}.bak + fi + + } diff --git a/sys-cluster/vzctl/files/vzctl-3.0.23-forwarding-issue-warning.patch b/sys-cluster/vzctl/files/vzctl-3.0.23-forwarding-issue-warning.patch new file mode 100644 index 000000000000..8c93a513517b --- /dev/null +++ b/sys-cluster/vzctl/files/vzctl-3.0.23-forwarding-issue-warning.patch @@ -0,0 +1,25 @@ +commit 78ef67a523e7f2589e49a082376ee56ce1a5d76e +Author: Peter Volkov <pva@gentoo.org> +Date: Tue Mar 31 13:03:44 2009 +0400 + + Issue warning if forwarding is disabled + + In case forwarding is disabled let's warn user about that. This is + alternative solution for http://bugzilla.openvz.org/show_bug.cgi?id=1079 + +diff --git a/etc/init.d/vz-gentoo.in b/etc/init.d/vz-gentoo.in +index dc87d41..7c57370 100755 +--- a/etc/init.d/vz-gentoo.in ++++ b/etc/init.d/vz-gentoo.in +@@ -128,6 +128,11 @@ start_net() { + ebegin "Configuring interface ${VZDEV}" + /sbin/sysctl -q -w net.ipv4.conf.${VZDEV}.send_redirects=0 + eend $? ++ ++ if [ "x$(/sbin/sysctl net.ipv4.ip_forward 2>/dev/null | awk '{print $3}')" = "x0" ]; then ++ ewarn "It looks like you have ip forwarding disabled. To make networking" ++ ewarn "available for containers, please, run sysctl -w net.ipv4.ip_forward=1" ++ fi + } + + stop_net() { diff --git a/sys-cluster/vzctl/files/vzctl-3.0.23-ipforwarding-on-start.patch b/sys-cluster/vzctl/files/vzctl-3.0.23-ipforwarding-on-start.patch deleted file mode 100644 index b07a5b301b62..000000000000 --- a/sys-cluster/vzctl/files/vzctl-3.0.23-ipforwarding-on-start.patch +++ /dev/null @@ -1,43 +0,0 @@ -=== modified file 'etc/init.d/vz-gentoo.in' ---- etc/init.d/vz-gentoo.in 2008-11-15 09:57:13 +0000 -+++ etc/init.d/vz-gentoo.in 2008-11-15 11:35:03 +0000 -@@ -116,6 +116,11 @@ - ebegin "Configuring interface ${VZDEV}" - /sbin/sysctl -q -w net.ipv4.conf.${VZDEV}.send_redirects=0 - eend $? -+ if [ "${ENABLE_FORWARDING}" = "yes" ]; then -+ ebegin "Enabling system wide forwading (\$ENABLE_FORWARDING is set to yes)..." -+ sysctl -w "net.ipv4.ip_forward=1" -+ eend $? -+ fi - } - - stop_net() { -@@ -131,6 +136,11 @@ - for mod in ${NET_MODULES}; do - /sbin/modprobe -r ${mod} > /dev/null 2>&1 - done -+ if [ "${ENABLE_FORWARDING}" = "yes" ]; then -+ ebegin "Disabling system wide forwading (\$ENABLE_FORWARDING is set to yes)..." -+ sysctl -w "net.ipv4.ip_forward=0" -+ eend $? -+ fi - } - - start_ve() { - -=== modified file 'etc/vz.conf' ---- etc/vz.conf 2008-11-15 09:57:13 +0000 -+++ etc/vz.conf 2008-11-15 09:58:22 +0000 -@@ -21,6 +21,10 @@ - # By default automatically assigned. - #VE_ROUTE_SRC_DEV="eth0" - -+# Uncomment to enable forwarding automatically during /etc/init.d/vz start -+# (Calls sysctl -w "net.ipv4.ip_forward=1" on start and revert on stop) -+#ENABLE_FORWARDING="yes" -+ - # Controls which interfaces to send ARP requests and modify APR tables on. - NEIGHBOUR_DEVS=detect - - diff --git a/sys-cluster/vzctl/files/vzctl-3.0.23-ppp-feature.patch b/sys-cluster/vzctl/files/vzctl-3.0.23-ppp-feature.patch new file mode 100644 index 000000000000..9eab5d02d959 --- /dev/null +++ b/sys-cluster/vzctl/files/vzctl-3.0.23-ppp-feature.patch @@ -0,0 +1,49 @@ +From: Cyrill Gorcunov <gorcunov@openvz.org> +Date: Tue, 3 Feb 2009 19:45:36 +0000 (+0300) +Subject: Introduce new "ppp" feature +X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=d78a7653d983269553763d536f69de0bb5109353 + +Introduce new "ppp" feature + +Allow an user to turn "ppp" feature on and off. + +Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> +--- + +diff --git a/include/linux/vzcalluser.h b/include/linux/vzcalluser.h +index 045a0e1..66d61cd 100644 +--- a/include/linux/vzcalluser.h ++++ b/include/linux/vzcalluser.h +@@ -202,6 +202,7 @@ struct env_create_param3 { + #define VE_FEATURE_DEF_PERMS (1ULL << 2) + #define VE_FEATURE_SIT (1ULL << 3) + #define VE_FEATURE_IPIP (1ULL << 4) ++#define VE_FEATURE_PPP (1ULL << 5) + + #define VE_FEATURES_OLD (VE_FEATURE_SYSFS) + #define VE_FEATURES_DEF (VE_FEATURE_SYSFS | \ +diff --git a/man/vzctl.8 b/man/vzctl.8 +index 85d3b0d..92d49e3 100644 +--- a/man/vzctl.8 ++++ b/man/vzctl.8 +@@ -446,7 +446,7 @@ designated by its \fImajor\fR and \fIminor\fR numbers. Device file have to be cr + .TP + \fB--features\fR \fIname\fR:\fBon|off\fR + Enable or disable a specific container feature. +-Known features are: \fIsysfs\fR, \fInfs\fR, \fIsit\fR, \fIipip\fR. ++Known features are: \fIsysfs\fR, \fInfs\fR, \fIsit\fR, \fIipip\fR, \fIppp\fR. + .TP + \fBApply config\fR + .TP +diff --git a/src/lib/vzfeatures.c b/src/lib/vzfeatures.c +index 2f5596a..c6af929 100644 +--- a/src/lib/vzfeatures.c ++++ b/src/lib/vzfeatures.c +@@ -27,6 +27,7 @@ static struct feature_s features[] = { + { "nfs", 0, VE_FEATURE_NFS }, + { "sit", 0, VE_FEATURE_SIT}, + { "ipip", 0, VE_FEATURE_IPIP}, ++ { "ppp", 0, VE_FEATURE_PPP}, + { NULL} + }; + diff --git a/sys-cluster/vzctl/files/vzctl-3.0.23-set-cron-jobs.patch b/sys-cluster/vzctl/files/vzctl-3.0.23-set-cron-jobs.patch deleted file mode 100644 index eacf6a05db98..000000000000 --- a/sys-cluster/vzctl/files/vzctl-3.0.23-set-cron-jobs.patch +++ /dev/null @@ -1,53 +0,0 @@ -=== modified file 'etc/init.d/vz-gentoo.in' ---- etc/init.d/vz-gentoo.in 2008-11-15 11:39:55 +0000 -+++ etc/init.d/vz-gentoo.in 2008-11-15 12:28:43 +0000 -@@ -56,17 +56,29 @@ - # being enabled or not. - setup_cron() - { -- [ -z "$SRC_CRONSCRIPT_DIR" ] && return -- [ -d "$SRC_CRONSCRIPT_DIR" ] || return -- install -m644 -o root -g root $SRC_CRONSCRIPT_DIR/vz \ -- $DST_CRONSCRIPT_DIR -+ [ -z "${SRC_CRONSCRIPT_DIR}" ] && return -+ if [ ! -d "${DST_CRONSCRIPT_DIR}" ]; then -+ if [ "${SKIP_CRON_WARNINGS}" == "no" ]; then -+ ewarn "Automatic setup of cron jobs works only if a system cron daemon can use" -+ ewarn "\${DST_CRONSCRIPT_DIR} (${DST_CRONSCRIPT_DIR}) as a spool directory" -+ ewarn "(e.g. sys-process/vixie-cron can). On your system ${DST_CRONSCRIPT_DIR}" -+ ewarn "is even not a directory, thus set the following cron jobs, please:" -+ ewarn "*/5 * * * * root /usr/share/vzctl/scripts/vpsnetclean" -+ ewarn "*/5 * * * * root /usr/share/vzctl/scripts/vpsreboot" -+ ewarn "If you already did that and wish to avoid this warning edit /etc/conf.d/vz" -+ ewarn "and either comment SKIP_CRON_WARNINGS variable or set its value to yes." -+ fi -+ return -+ fi -+ install -m644 -o root -g root $SRC_CRONSCRIPT_DIR/vz \ -+ ${DST_CRONSCRIPT_DIR} - } - - remove_cron() - { -- [ -z "$SRC_CRONSCRIPT_DIR" ] && return -- [ -d "$SRC_CRONSCRIPT_DIR" ] || return -- cat > $DST_CRONSCRIPT_DIR/vz <<EOF -+ [ -z "${SRC_CRONSCRIPT_DIR}" ] && return -+ [ -d "${DST_CRONSCRIPT_DIR}" ] || return -+ cat > ${DST_CRONSCRIPT_DIR}/vz <<EOF - # DO NOT EDIT THIS FILE! - # - # Contents of this file managed by /etc/init.d/vz script - -=== modified file 'etc/vz.conf' ---- etc/vz.conf 2008-11-15 11:39:55 +0000 -+++ etc/vz.conf 2008-11-15 12:10:13 +0000 -@@ -9,6 +9,7 @@ - LOGFILE=/var/log/vzctl.log - LOG_LEVEL=0 - VERBOSE=0 -+SKIP_CRON_WARNINGS=no - - ## Disk quota parameters - DISK_QUOTA=yes - diff --git a/sys-cluster/vzctl/files/vzctl-3.0.23-ve-unlimited.conf-sample.patch b/sys-cluster/vzctl/files/vzctl-3.0.23-ve-unlimited.conf-sample.patch index 1a4761a716db..d3c803ee4307 100644 --- a/sys-cluster/vzctl/files/vzctl-3.0.23-ve-unlimited.conf-sample.patch +++ b/sys-cluster/vzctl/files/vzctl-3.0.23-ve-unlimited.conf-sample.patch @@ -1,6 +1,28 @@ -=== modified file 'etc/conf/Makefile.am' ---- etc/conf/Makefile.am 2008-11-15 09:57:13 +0000 -+++ etc/conf/Makefile.am 2008-11-15 10:44:26 +0000 +From: Peter Volkov <pva@gentoo.org> +Date: Sun, 30 Nov 2008 13:48:39 +0000 (+0300) +Subject: Added unlimited CT config +X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=c8dc6e5a60137eafca882c39ffbeb0177e65a064 + +Added unlimited CT config + +This implements (again thank Daniel Robbins for suggestion and initial +work) ve-unlimited.conf-sample configuration file. It sets CT resources +to unlimited values. Not to repeating his reasoning I cite him here: + +"I think that adding this to the /etc/vz/conf directory would be a big +step forward. I think that OpenVZ is going to be used more and more for +single-developer workstations where developers want to use containers to +create test environments. In these single-user situations, resource limits +just get in the way." + +I tend to aggree. If you just want to use containers like very smart +chroots resource limits just make things harder. +--- + +diff --git a/etc/conf/Makefile.am b/etc/conf/Makefile.am +index 963abdc..52c16e8 100644 +--- a/etc/conf/Makefile.am ++++ b/etc/conf/Makefile.am @@ -18,7 +18,7 @@ include $(top_srcdir)/paths.am @@ -10,11 +32,12 @@ if ARCH_IA64 VECONFIG_EXT = .ia64 - -=== added file 'etc/conf/ve-unlimited.conf-sample.ia64' ---- etc/conf/ve-unlimited.conf-sample.ia64 1970-01-01 00:00:00 +0000 -+++ etc/conf/ve-unlimited.conf-sample.ia64 2008-11-15 10:43:49 +0000 -@@ -0,0 +1,50 @@ +diff --git a/etc/conf/ve-unlimited.conf-sample b/etc/conf/ve-unlimited.conf-sample +new file mode 100644 +index 0000000..2b9febd +--- /dev/null ++++ b/etc/conf/ve-unlimited.conf-sample +@@ -0,0 +1,51 @@ +# Copyright (C) 2000-2008, Parallels, Inc. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify @@ -38,38 +61,40 @@ + +# UBC parameters (in form of barrier:limit) +# Primary parameters -+AVNUMPROC="9223372036854775807:9223372036854775807" -+NUMPROC="9223372036854775807:9223372036854775807" -+NUMTCPSOCK="9223372036854775807:9223372036854775807" -+NUMOTHERSOCK="9223372036854775807:9223372036854775807" -+VMGUARPAGES="9223372036854775807:9223372036854775807" ++AVNUMPROC="unlimited" ++NUMPROC="unlimited" ++NUMTCPSOCK="419430" ++NUMOTHERSOCK="419430" ++VMGUARPAGES="unlimited" +# Secondary parameters -+KMEMSIZE="9223372036854775807:9223372036854775807" -+TCPSNDBUF="9223372036854775807:9223372036854775807" -+TCPRCVBUF="9223372036854775807:9223372036854775807" -+OTHERSOCKBUF="9223372036854775807:9223372036854775807" -+DGRAMRCVBUF="9223372036854775807:9223372036854775807" -+OOMGUARPAGES="9223372036854775807:9223372036854775807" ++KMEMSIZE="unlimited" ++#TCPSNDBUF="2147483647:2147483647" ++TCPSNDBUF="1073741823:2147483647" ++TCPRCVBUF="1073741823:2147483647" ++OTHERSOCKBUF="1073741823:2147483647" ++DGRAMRCVBUF="unlimited" ++OOMGUARPAGES="unlimited" +# Auxiliary parameters -+LOCKEDPAGES="9223372036854775807:9223372036854775807" -+SHMPAGES="9223372036854775807:9223372036854775807" -+PRIVVMPAGES="9223372036854775807:9223372036854775807" -+NUMFILE="9223372036854775807:9223372036854775807" -+NUMFLOCK="9223372036854775807:9223372036854775807" -+NUMPTY="9223372036854775807:9223372036854775807" -+NUMSIGINFO="9223372036854775807:9223372036854775807" -+DCACHESIZE="9223372036854775807:9223372036854775807" ++LOCKEDPAGES="unlimited" ++SHMPAGES="unlimited" ++PRIVVMPAGES="unlimited" ++NUMFILE="unlimited" ++NUMFLOCK="unlimited" ++NUMPTY="unlimited" ++NUMSIGINFO="unlimited" ++DCACHESIZE="unlimited" + -+PHYSPAGES="9223372036854775807:9223372036854775807" -+NUMIPTENT="9223372036854775807:9223372036854775807" ++PHYSPAGES="0:unlimited" ++NUMIPTENT="unlimited" + +# Disk quota parameters (in form of softlimit:hardlimit) +DISK_QUOTA="no" - -=== added file 'etc/conf/ve-unlimited.conf-sample.x86' ---- etc/conf/ve-unlimited.conf-sample.x86 1970-01-01 00:00:00 +0000 -+++ etc/conf/ve-unlimited.conf-sample.x86 2008-11-15 10:43:15 +0000 -@@ -0,0 +1,50 @@ +diff --git a/etc/conf/ve-unlimited.conf-sample.ia64 b/etc/conf/ve-unlimited.conf-sample.ia64 +new file mode 100644 +index 0000000..42fd7f6 +--- /dev/null ++++ b/etc/conf/ve-unlimited.conf-sample.ia64 +@@ -0,0 +1,51 @@ +# Copyright (C) 2000-2008, Parallels, Inc. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify @@ -93,38 +118,40 @@ + +# UBC parameters (in form of barrier:limit) +# Primary parameters -+AVNUMPROC="2147483647:2147483647" -+NUMPROC="2147483647:2147483647" -+NUMTCPSOCK="2147483647:2147483647" -+NUMOTHERSOCK="2147483647:2147483647" -+VMGUARPAGES="2147483647:2147483647" ++AVNUMPROC="unlimited" ++NUMPROC="unlimited" ++NUMTCPSOCK="1801439850948198" ++NUMOTHERSOCK="1801439850948198" ++VMGUARPAGES="unlimited" +# Secondary parameters -+KMEMSIZE="2147483647:2147483647" -+TCPSNDBUF="2147483647:2147483647" -+TCPRCVBUF="2147483647:2147483647" -+OTHERSOCKBUF="2147483647:2147483647" -+DGRAMRCVBUF="2147483647:2147483647" -+OOMGUARPAGES="2147483647:2147483647" ++KMEMSIZE="unlimited" ++#TCPSNDBUF="2147483647:2147483647" ++TCPSNDBUF="4611686018427387903:9223372036854775807" ++TCPRCVBUF="4611686018427387903:9223372036854775807" ++OTHERSOCKBUF="4611686018427387903:9223372036854775807" ++DGRAMRCVBUF="unlimited" ++OOMGUARPAGES="unlimited" +# Auxiliary parameters -+LOCKEDPAGES="2147483647:2147483647" -+SHMPAGES="2147483647:2147483647" -+PRIVVMPAGES="2147483647:2147483647" -+NUMFILE="2147483647:2147483647" -+NUMFLOCK="2147483647:2147483647" -+NUMPTY="2147483647:2147483647" -+NUMSIGINFO="2147483647:2147483647" -+DCACHESIZE="2147483647:2147483647" ++LOCKEDPAGES="unlimited" ++SHMPAGES="unlimited" ++PRIVVMPAGES="unlimited" ++NUMFILE="unlimited" ++NUMFLOCK="unlimited" ++NUMPTY="unlimited" ++NUMSIGINFO="unlimited" ++DCACHESIZE="unlimited" + -+PHYSPAGES="2147483647:2147483647" -+NUMIPTENT="2147483647:2147483647" ++PHYSPAGES="0:unlimited" ++NUMIPTENT="unlimited" + +# Disk quota parameters (in form of softlimit:hardlimit) +DISK_QUOTA="no" - -=== added file 'etc/conf/ve-unlimited.conf-sample.x86_64' ---- etc/conf/ve-unlimited.conf-sample.x86_64 1970-01-01 00:00:00 +0000 -+++ etc/conf/ve-unlimited.conf-sample.x86_64 2008-11-15 10:43:59 +0000 -@@ -0,0 +1,50 @@ +diff --git a/etc/conf/ve-unlimited.conf-sample.x86_64 b/etc/conf/ve-unlimited.conf-sample.x86_64 +new file mode 100644 +index 0000000..42fd7f6 +--- /dev/null ++++ b/etc/conf/ve-unlimited.conf-sample.x86_64 +@@ -0,0 +1,51 @@ +# Copyright (C) 2000-2008, Parallels, Inc. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify @@ -148,31 +175,31 @@ + +# UBC parameters (in form of barrier:limit) +# Primary parameters -+AVNUMPROC="9223372036854775807:9223372036854775807" -+NUMPROC="9223372036854775807:9223372036854775807" -+NUMTCPSOCK="9223372036854775807:9223372036854775807" -+NUMOTHERSOCK="9223372036854775807:9223372036854775807" -+VMGUARPAGES="9223372036854775807:9223372036854775807" ++AVNUMPROC="unlimited" ++NUMPROC="unlimited" ++NUMTCPSOCK="1801439850948198" ++NUMOTHERSOCK="1801439850948198" ++VMGUARPAGES="unlimited" +# Secondary parameters -+KMEMSIZE="9223372036854775807:9223372036854775807" -+TCPSNDBUF="9223372036854775807:9223372036854775807" -+TCPRCVBUF="9223372036854775807:9223372036854775807" -+OTHERSOCKBUF="9223372036854775807:9223372036854775807" -+DGRAMRCVBUF="9223372036854775807:9223372036854775807" -+OOMGUARPAGES="9223372036854775807:9223372036854775807" ++KMEMSIZE="unlimited" ++#TCPSNDBUF="2147483647:2147483647" ++TCPSNDBUF="4611686018427387903:9223372036854775807" ++TCPRCVBUF="4611686018427387903:9223372036854775807" ++OTHERSOCKBUF="4611686018427387903:9223372036854775807" ++DGRAMRCVBUF="unlimited" ++OOMGUARPAGES="unlimited" +# Auxiliary parameters -+LOCKEDPAGES="9223372036854775807:9223372036854775807" -+SHMPAGES="9223372036854775807:9223372036854775807" -+PRIVVMPAGES="9223372036854775807:9223372036854775807" -+NUMFILE="9223372036854775807:9223372036854775807" -+NUMFLOCK="9223372036854775807:9223372036854775807" -+NUMPTY="9223372036854775807:9223372036854775807" -+NUMSIGINFO="9223372036854775807:9223372036854775807" -+DCACHESIZE="9223372036854775807:9223372036854775807" ++LOCKEDPAGES="unlimited" ++SHMPAGES="unlimited" ++PRIVVMPAGES="unlimited" ++NUMFILE="unlimited" ++NUMFLOCK="unlimited" ++NUMPTY="unlimited" ++NUMSIGINFO="unlimited" ++DCACHESIZE="unlimited" + -+PHYSPAGES="9223372036854775807:9223372036854775807" -+NUMIPTENT="9223372036854775807:9223372036854775807" ++PHYSPAGES="0:unlimited" ++NUMIPTENT="unlimited" + +# Disk quota parameters (in form of softlimit:hardlimit) +DISK_QUOTA="no" - diff --git a/sys-cluster/vzctl/files/vzctl-3.0.23-vzarp-on-ifup.patch b/sys-cluster/vzctl/files/vzctl-3.0.23-vzarp-on-ifup.patch new file mode 100644 index 000000000000..a0d020d409c6 --- /dev/null +++ b/sys-cluster/vzctl/files/vzctl-3.0.23-vzarp-on-ifup.patch @@ -0,0 +1,122 @@ +http://556.bugzilla.openvz.org/attachment.cgi?id=829 + +We need to test this patch. Hey, anybody? + +diff --git a/Makefile.am b/Makefile.am +index 3b67cd8..ae05b3b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -53,6 +53,7 @@ DISTRO_TARGETS = \ + + $(DISTRO_TARGETS): + $(MAKE) $(AM_MAKEFLAGS) -C etc $@ ++ $(MAKE) $(AM_MAKEFLAGS) -C scripts $@ + + install-data-hook: + @echo +diff --git a/scripts/Makefile.am b/scripts/Makefile.am +index a2bde7e..85ea8fd 100644 +--- a/scripts/Makefile.am ++++ b/scripts/Makefile.am +@@ -22,7 +22,8 @@ vzlib_SCRIPTS = \ + vps-functions \ + vps-net_add \ + vps-net_del \ +- vps-stop ++ vps-stop \ ++ ifup-vz-arp + + vzcron_SCRIPTS = \ + vpsnetclean \ +@@ -35,3 +36,36 @@ EXTRA_DIST = \ + CLEANFILES = \ + $(vzlib_SCRIPTS) \ + $(vzcron_SCRIPTS) ++ ++# FIXME: what to do in case DESTDIR is set? I guess nothing... ++install-redhat: ++ if [ ! -e /sbin/ifup-local ]; then \ ++ ln -sf @PKGLIBDIR@/scripts/ifup-vz-arp /sbin/ifup-local; \ ++ else \ ++ @echo; \ ++ @echo " ***************************************************"; \ ++ @echo " WARNING: /sbin/ifup-local is present!"; \ ++ @echo " You have to manually edit /sbin/ifup-local so that "; \ ++ @echo " @PKGLIBDIR@/scripts/ifup-vz-arp"; \ ++ @echo " is called from it."; \ ++ @echo " ***************************************************"; \ ++ @echo; \ ++ fi ++ ++ ++install-suse: ++ ln -sf @PKGLIBDIR@/scripts/ifup-vz-arp /etc/sysconfig/network/if-up.d/ ++ ++install-debian: ++ ln -sf @PKGLIBDIR@/scripts/ifup-vz-arp /etc/network/if-up.d/ ++ ++install-gentoo: ++ @echo ++ @echo " ***************************************************" ++ @echo " Please add the following code to /etc/conf.d/net:" ++ @echo ++ @echo "postup() {" ++ @echo " @PKGLIBDIR@/scripts/ifup-vz-arp" '"${IFACE}"' ++ @echo "}" ++ @echo " ***************************************************" ++ @echo +diff --git a/scripts/ifup-vz-arp.in b/scripts/ifup-vz-arp.in +new file mode 100755 +index 0000000..7e2346b +--- /dev/null ++++ b/scripts/ifup-vz-arp.in +@@ -0,0 +1,25 @@ ++#!/bin/bash ++# Copyright (C) 2008, Parallels, Inc. All rights reserved. ++# ++# Update ARP table for all containers on interface up ++ ++[ ! -f /proc/vz/veinfo ] && exit 0 ++ ++test -f @PKGLIBDIR@/scripts/vps-functions || exit 1 ++test -f @PKGCONFDIR@/vz.conf || exit 1 ++. @PKGLIBDIR@/scripts/vps-functions ++. @PKGCONFDIR@/vz.conf ++ ++update_arp() ++{ ++ local veip ++ for veip in $(awk '!/^Version/ { print $1 }' /proc/vz/veip); do ++ vzarp add ${veip} ++ done ++} ++ ++DEV=$1 ++[ -z "${DEV}" ] && exit 0 ++NETDEVICES="${DEV}" ++update_arp ++exit 0 +diff --git a/vzctl.spec b/vzctl.spec +index ae3ed8c..adc6702 100644 +--- a/vzctl.spec ++++ b/vzctl.spec +@@ -108,6 +108,7 @@ rm -rf $RPM_BUILD_ROOT + %attr(755,root,root) %{_sbindir}/vzmigrate + %attr(755,root,root) %{_scriptdir}/vpsreboot + %attr(755,root,root) %{_scriptdir}/vpsnetclean ++%attr(755,root,root) %{_scriptdir}/ifup-vz-arp + %attr(644,root,root) %{_logrdir}/vzctl + %attr(644,root,root) %{_distconfdir}/distribution.conf-template + %attr(644,root,root) %{_distconfdir}/default +@@ -161,6 +162,11 @@ if [ -f /etc/SuSE-release ]; then + for file in ${NET_CFG}; do + ln -sf /etc/sysconfig/network-scripts/${file} /etc/sysconfig/network/scripts/${file} + done ++ ln -sf /usr/share/vzctl/scripts/ifup-vz-arp /etc/sysconfig/network/if-up.d/ifup-arp ++else # RedHat/Fedora/CentOS case ++ if [ ! -e /sbin/ifup-local ]; then ++ ln -sf /usr/share/vzctl/scripts/ifup-vz-arp /sbin/ifup-local ++ fi + fi + + %preun diff --git a/sys-cluster/vzctl/files/vzctl-3.0.23-vznetaddbr.in-no-bashisms.patch b/sys-cluster/vzctl/files/vzctl-3.0.23-vznetaddbr.in-no-bashisms.patch new file mode 100644 index 000000000000..b8361e487349 --- /dev/null +++ b/sys-cluster/vzctl/files/vzctl-3.0.23-vznetaddbr.in-no-bashisms.patch @@ -0,0 +1,92 @@ +From: Dmitry V. Levin <ldv@altlinux.org> +Date: Fri, 31 Oct 2008 11:54:47 +0000 (+0000) +Subject: vznetaddbr.in: Rewrite without bash-isms and ifconfig +X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=93ef4d978a8c609cc04c53f39bc4fe674a089811 + +vznetaddbr.in: Rewrite without bash-isms and ifconfig + +Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> +--- + +diff --git a/bin/vznetaddbr.in b/bin/vznetaddbr.in +index eb2ba70..e8599e9 100755 +--- a/bin/vznetaddbr.in ++++ b/bin/vznetaddbr.in +@@ -1,53 +1,39 @@ +-#!/bin/bash ++#!/bin/sh + # + # Add virtual network interfaces (veth's) in a container to a bridge on CT0 + + CONFIGFILE=@PKGCONFDIR@/conf/$VEID.conf + . $CONFIGFILE + +-NETIFLIST=$(echo $NETIF | sed 's/;/\n/g') ++NETIFLIST=$(printf %s "$NETIF" |tr ';' '\n') + +-if [ ! -n "$NETIFLIST" ]; then +- echo "According to $CONFIGFILE, CT$VEID has no veth interface configured." ++if [ -z "$NETIFLIST" ]; then ++ echo >&2 "According to $CONFIGFILE, CT$VEID has no veth interface configured." + exit 1 + fi + +-IFACES=$(echo $NETIFLIST | sed 's/;/\n/g') +-for tmp in $IFACES; do +- CTIFNAME= +- CTBRIDGE= +- VZHOSTIF= +- +- NETIF_OPTIONS=$(echo $tmp | sed 's/,/\n/g') +- for str in $NETIF_OPTIONS; do +- # getting 'ifname' parameter value +- if [[ "$str" =~ ^ifname= ]]; then +- # remove the parameter name from the string (along with '=') +- CTIFNAME=${str#*=} +- fi +- if [[ "$str" =~ ^bridge= ]]; then +- # remove the parameter name from the string (along with '=') +- CTBRIDGE=${str#*=} +- fi +- # getting 'host_ifname' parameter value +- if [[ "$str" =~ ^host_ifname= ]]; then +- # remove the parameter name from the string (along with '=') +- VZHOSTIF=${str#*=} +- fi ++for iface in $NETIFLIST; do ++ bridge= ++ host_ifname= ++ ++ for str in $(printf %s "$iface" |tr ',' '\n'); do ++ case "$str" in ++ bridge=*|host_ifname=*) ++ eval "${str%%=*}=\${str#*=}" ;; ++ esac + done + +- if [ "$VZHOSTIF" != "$3" ]; then +- continue +- fi +- if [ ! -n "$CTBRIDGE" ]; then +- CTBRIDGE=vmbr0 +- fi +- +- echo "Adding interface $VZHOSTIF to bridge $CTBRIDGE on CT0 for CT$VEID" +- /sbin/ifconfig $VZHOSTIF 0 +- echo 1 > /proc/sys/net/ipv4/conf/$VZHOSTIF/proxy_arp +- echo 1 > /proc/sys/net/ipv4/conf/$VZHOSTIF/forwarding +- /usr/sbin/brctl addif $CTBRIDGE $VZHOSTIF ++ [ "$host_ifname" = "$3" ] || ++ continue ++ ++ [ -n "$bridge" ] || ++ bridge=vmbr0 ++ ++ echo "Adding interface $host_ifname to bridge $bridge on CT0 for CT$VEID" ++ ip addr add 0 dev "$host_ifname" ++ echo 1 >"/proc/sys/net/ipv4/conf/$host_ifname/proxy_arp" ++ echo 1 >"/proc/sys/net/ipv4/conf/$host_ifname/forwarding" ++ brctl addif "$bridge" "$host_ifname" + + break + done diff --git a/sys-cluster/vzctl/vzctl-3.0.22-r2.ebuild b/sys-cluster/vzctl/vzctl-3.0.22-r2.ebuild index 9f637386dd7c..b40a01a78b5a 100644 --- a/sys-cluster/vzctl/vzctl-3.0.22-r2.ebuild +++ b/sys-cluster/vzctl/vzctl-3.0.22-r2.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/vzctl-3.0.22-r2.ebuild,v 1.1 2008/11/08 19:41:59 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/vzctl-3.0.22-r2.ebuild,v 1.2 2009/03/31 09:16:33 pva Exp $ inherit bash-completion eutils @@ -10,7 +10,7 @@ SRC_URI="http://download.openvz.org/utils/${PN}/${PV}/src/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~amd64 ~ia64 ~ppc64 ~sparc ~x86" +KEYWORDS="amd64 ~ia64 ~ppc64 ~sparc x86" IUSE="bash-completion logrotate" RDEPEND="logrotate? ( app-admin/logrotate ) diff --git a/sys-cluster/vzctl/vzctl-3.0.23.ebuild b/sys-cluster/vzctl/vzctl-3.0.23-r1.ebuild index 5c6f2e2717ef..6dd372383c73 100644 --- a/sys-cluster/vzctl/vzctl-3.0.23.ebuild +++ b/sys-cluster/vzctl/vzctl-3.0.23-r1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/vzctl-3.0.23.ebuild,v 1.1 2008/11/15 13:01:30 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/vzctl/vzctl-3.0.23-r1.ebuild,v 1.1 2009/03/31 09:16:33 pva Exp $ inherit bash-completion eutils autotools @@ -29,9 +29,15 @@ pkg_setup() { src_unpack() { unpack ${A} cd "${S}" - epatch "${FILESDIR}/${P}-ipforwarding-on-start.patch" + epatch "${FILESDIR}/${P}-vznetaddbr.in-no-bashisms.patch" epatch "${FILESDIR}/${P}-ve-unlimited.conf-sample.patch" - epatch "${FILESDIR}/${P}-set-cron-jobs.patch" + epatch "${FILESDIR}/${P}-debian-CT-ipv6-fix.patch" + epatch "${FILESDIR}/${P}-cronjobs-typo-fix.patch" + epatch "${FILESDIR}/${P}-cronjobs-issue-warning.patch" + epatch "${FILESDIR}/${P}-vzarp-on-ifup.patch" + epatch "${FILESDIR}/${P}-ppp-feature.patch" + epatch "${FILESDIR}/${P}-UBC-parameter-swappages.patch" + epatch "${FILESDIR}/${P}-forwarding-issue-warning.patch" eautomake } @@ -80,12 +86,4 @@ pkg_postinst() { ewarn ewarn "The old vzctl behavior can be restored by setting NEIGHBOUR_DEVS to any" ewarn 'value other than "detect" in /etc/vz/vz.conf.' - einfo - ewarn "NOTE2: Starting with vzctl-3.0.22-r10 we support openrc inside VE." - ewarn "Regretfully openrc has bug which cause broken networking if you rely" - ewarn "on iputils to setup network inside container. To solve this issue" - ewarn "either install iproute2 inside container or use patch provided in:" - ewarn "http://bugs.gentoo.org/245810 . This patch will be included in" - ewarn ">=openrc-0.3.0-r1 so upgrading openrc (if available) fixes this" - ewarn "issue too." } |