Re: [Devel] [PATCH] ve: add ability to set offset for monotonic time

2015-12-01 Thread Igor
On 11/30/2015 07:25 PM, Cyrill Gorcunov wrote: As far as I understand we need to save current time somewhere, then somehow pass it to destination machine and setup an offset. In pcs6 all this were saved in checkpoint image file and restored back by the kernel itself (so we only need to move the

Re: [Devel] [Q] migrating inotify assigned on ploop device

2016-01-12 Thread Igor
On 01/12/2016 11:57 AM, Cyrill Gorcunov wrote: On Tue, Jan 12, 2016 at 12:20:34AM +0300, Cyrill Gorcunov wrote: Hi guys, today I've been investigating a problem of container's migration with inotify assigned on /dev/ploop10308p1 device. The main problem is that the mark is set to devtmpfs where

Re: [Devel] [Q] migrating inotify assigned on ploop device

2016-01-12 Thread Igor
On 01/12/2016 12:59 PM, Cyrill Gorcunov wrote: On Tue, Jan 12, 2016 at 12:51:05PM +0300, Igor wrote: On 01/12/2016 12:42 PM, Cyrill Gorcunov wrote: On Tue, Jan 12, 2016 at 12:26:09PM +0300, Igor wrote: Been talking to Pavel and the proper general solutions is "device namespace" whi

Re: [Devel] [Q] migrating inotify assigned on ploop device

2016-01-12 Thread Igor
On 01/12/2016 12:42 PM, Cyrill Gorcunov wrote: On Tue, Jan 12, 2016 at 12:26:09PM +0300, Igor wrote: Been talking to Pavel and the proper general solutions is "device namespace" which require significant kernel update/rework so I don't consider it as a solution which could be i

Re: [Devel] [Q] migrating inotify assigned on ploop device

2016-01-13 Thread Igor
On 01/13/2016 07:25 PM, Cyrill Gorcunov wrote: On Wed, Jan 13, 2016 at 07:14:18PM +0400, Nikita Spiridonov wrote: Lets try to fix bug using workaround in libvzctl and criu hooks. Images recoding/patching too hard to implement for now; we can return to it later. Which exactly workaround you mean

Re: [Devel] [Q] migrating inotify assigned on ploop device

2016-01-13 Thread Igor
On 01/13/2016 07:46 PM, Cyrill Gorcunov wrote: On Wed, Jan 13, 2016 at 07:40:55PM +0300, Igor wrote: On 01/13/2016 07:25 PM, Cyrill Gorcunov wrote: On Wed, Jan 13, 2016 at 07:14:18PM +0400, Nikita Spiridonov wrote: Lets try to fix bug using workaround in libvzctl and criu hooks. Images

Re: [Devel] [PATCH libvzctl] scripts: vz-cpt, vz-rst -- Setup CRIU verbosity back to maximum

2016-06-30 Thread Igor Sukhih
On 06/29/2016 10:51 AM, Cyrill Gorcunov wrote: On Mon, Jun 27, 2016 at 01:29:04PM +0300, Cyrill Gorcunov wrote: We're reworking our logging engine in criu so until vz7-Update1 lefts carry debug loglevel. https://jira.sw.ru/browse/PSBM-48923 Signed-off-by: Cyrill Gorcunov Ping? available in

Re: [Devel] [PATCH libvzctl 0/2] Update scripts to fit CRIU-2.4

2016-08-04 Thread Igor Sukhih
On 08/02/2016 09:11 PM, Cyrill Gorcunov wrote: Igor, please take a look. And please note that this patches require *new* CRIU, thus we need to update libvzctl spec to require criu-2.4.0.1-1.vz7 and above. https://jira.sw.ru/browse/PSBM-50551 Cyrill Gorcunov (2): scripts: vz-rst-action

[Devel] [PATCH] kernel: add kcov code coverage

2016-10-17 Thread Igor Redko
Alexander Potapenko Cc: Kees Cook Cc: Bjorn Helgaas Cc: Sasha Levin Cc: David Drysdale Cc: Ard Biesheuvel Cc: Andrey Ryabinin Cc: Kirill A. Shutemov Cc: Jiri Slaby Cc: Ingo Molnar Cc: Thomas Gleixner Cc: "H. Peter Anvin" Signed-off-by: Andrew Morton Signed-off-by: Li

[Devel] [PATCH] tty: Fix unsafe ldisc reference via ioctl(TIOCGETD)

2016-10-25 Thread Igor Redko
ine reference (just like read() or write()) to retrieve the "current" line discipline id. Cc: Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman Signed-off-by: Igor Redko --- drivers/tty/tty_io.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-)

[Devel] [PATCH] proc_keys_show: fix for buffer overflow

2016-10-25 Thread Igor Redko
rendered as weeks. --- It isn't in upstream for now, but seems to be trivial. Signed-off-by: Igor Redko --- security/keys/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/keys/proc.c b/security/keys/proc.c index 88e9a46..350f5f6 100644 --- a/security/keys/p

[Devel] [PATCH 2/3] netlink: have netlink per-protocol bind function return an error code.

2016-10-25 Thread Igor Redko
per-protocol bind function. Signed-off-by: Richard Guy Briggs Signed-off-by: David S. Miller Signed-off-by: Igor Redko --- include/linux/netlink.h | 3 +- net/netfilter/nfnetlink.c | 3 +- net/netlink/af_netlink.c | 70 +-- net/netlink/af_netlink.h

[Devel] [PATCH 3/3] netfilter: nfnetlink: fix insufficient validation in nfnetlink_bind

2016-10-25 Thread Igor Redko
_netlink.c:1483) [ 180.211495] SYSC_bind (net/socket.c:1541) Moreover, define the missing nf_tables and nf_acct multicast groups too. Reported-by: Andrey Ryabinin Signed-off-by: Pablo Neira Ayuso Signed-off-by: Igor Redko --- net/netfilter/nfnetlink.c | 11 ++- 1 file changed, 10

[Devel] [PATCH 1/3] netlink: simplify nfnetlink_bind

2016-10-25 Thread Igor Redko
. Miller Signed-off-by: Igor Redko --- net/netfilter/nfnetlink.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c index e009087..48cf7a1 100644 --- a/net/netfilter/nfnetlink.c +++ b/net/netfilter/nfnetlink.c @@ -406,12

Re: [Devel] [PATCH 3/3] netfilter: nfnetlink: fix insufficient validation in nfnetlink_bind

2016-11-28 Thread Igor Redko
On 25.10.2016 16:33, Igor Redko wrote: From: Pablo Neira Ayuso PSBM-54189 Changed from upstream commit: - drop NFNLGRP_ACCT_QUOTA type since we didn't backport it upstream: 97840cb67ff5ac8add836684f011fd838518d698 Make sure the netlink group exists, otherwise you can trigger an out of

Re: [Devel] [PATCH rh7] ext4: add generic uevent infrastructure

2017-06-14 Thread Igor Sukhih
rced after error\n", sb->s_id); + ext4_send_uevent(sb, EXT4_UA_ERROR); Pls make high rate protection for EXT4_UA_ERROR. It would be great to emit single fserror event on remount to RO -- Igor. ___ Devel mailing lis

Re: [Devel] [PATCH libvzctl v2] Suppress SUNRPC traffic on "fast stop".

2017-07-05 Thread Igor Sukhih
On 07/04/2017 06:01 PM, Stanislav Kinsburskiy wrote: Igor, could you please review? 26.06.2017 17:04, Stanislav Kinsburskiy пишет: This is needed to break infinite loop in SUNRPC state machine, leading to unstoppable container in case of unreachable network. https://jira.sw.ru/browse/PSBM

Re: [Devel] [libvzctl PATCH] fast stop: suppress SUNRPC per task

2017-08-21 Thread Igor Sukhih
How it going to work if Ct stop initiated not by vzctl but by OOM, halt, kill? -- Igor. ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

Re: [Devel] [Q] Connecting a physical HDD/partition to a container

2016-01-27 Thread Igor Sukhih
to open /sys/dev/block/8:17, indeed. This file is present on the host but not in the CT. Expectable. Then you have to expose sysfs for this device to the container. Igor, could you advice, please? Lets try to use secondary disk feature first vzctl set VEID --device-add hdd --device /dev/sda

Re: [Devel] [Q] Connecting a physical HDD/partition to a container

2016-01-27 Thread Igor Sukhih
.0.172 commit 591231bfb0104047030469123e7ca1bab567129e Author: Igor Sukhih Date: Wed Jan 27 14:59:32 2016 +0300 Failed to add secondary disk by device $ vzctl set VEID --device-add hdd --device /dev/sda --save Can't open /sys/class/block/ploop0p1/uevent for writing: No such file or dir use real partition

Re: [Devel] [Q] Connecting a physical HDD/partition to a container

2016-01-27 Thread Igor Sukhih
On 01/27/2016 06:02 PM, Evgenii Shatokhin wrote: 27.01.2016 16:38, Igor Sukhih пишет: On 01/27/2016 04:29 PM, Stanislav Kinsburskiу wrote: 27 янв. 2016 г. 14:24 пользователь Evgenii Shatokhin написал: I created it with vzctl set 101 --devnodes sdb1:rw --save The node is now present in the

Re: [Devel] [RFC libvzctl] Add ability to restore @real_start_timespec and @start_timespec

2016-02-08 Thread Igor Sukhih
On 02/08/2016 04:53 PM, Cyrill Gorcunov wrote: On Mon, Feb 08, 2016 at 04:46:22PM +0300, Igor Sukhih wrote: On 02/08/2016 12:34 PM, Cyrill Gorcunov wrote: Guys, here is a problem I would like to discuss. For containers transparent transition we've to make monotonic clocks to consider the

Re: [Devel] [RFC libvzctl] Add ability to restore @real_start_timespec and @start_timespec

2016-02-08 Thread Igor Sukhih
Why this functionality done outside of criu. is it workaround? Can criu detect c/r monotonic feature and process internally? --- Igor. ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

Re: [Devel] [PATCH rh7 v2] ve: Add interface for @start_timespec and @real_start_timespec adjustmen

2016-02-09 Thread Igor Sukhih
On 02/09/2016 04:56 PM, Cyrill Gorcunov wrote: On Tue, Feb 09, 2016 at 04:43:53PM +0300, Cyrill Gorcunov wrote: This two members represent monotonic and bootbased clocks for container's uptime. When container is in suspended state (or moving to another node) we trest monotonic and bootbased cloc

Re: [Devel] [PATCH rh7 v2] ve: Add interface for @start_timespec and @real_start_timespec adjustmen

2016-02-09 Thread Igor Sukhih
On 02/09/2016 06:51 PM, Cyrill Gorcunov wrote: On Tue, Feb 09, 2016 at 06:46:07PM +0300, Igor Sukhih wrote: Guys if we agree on this, I'll send updated variant for libvzctl. it not needed to update libvzctl. it should be custom vz specific patch to criu to handle time specific cgroups nat

Re: [Devel] [PATCH libvzctl] scripts: vz-rst-action -- Clear @pseudosuper at the very late stage

2016-03-19 Thread Igor Sukhih
On 03/16/2016 02:02 PM, Konstantin Khorenko wrote: Igor, AFAIK it has not been committed yet, please, consider. commit 6bb968ac available in libvzctl-7.0.166 -- Best regards, Konstantin Khorenko, Virtuozzo Linux Kernel Team On 03/16/2016 01:25 PM, Cyrill Gorcunov wrote: On Wed, Mar 16

Re: [Devel] [PATCH libvzctl] scripts: vz_ -- Checkpoint and restore clock offsets

2016-04-08 Thread Igor Sukhih
On 04/08/2016 10:49 AM, Cyrill Gorcunov wrote: On Tue, Apr 05, 2016 at 12:05:17PM +0300, Cyrill Gorcunov wrote: To make transition of containers between nodes shoveless we provide offsets for monotonic clocks. The kernel use these values to zap the time difference between nodes when setups timer

Re: [Devel] [PATCH libvzctl v2] scripts: vz_ -- Checkpoint and restore AIO staistics

2016-04-10 Thread Igor Sukhih
On 04/09/2016 07:35 PM, Cyrill Gorcunov wrote: To checkpoint and restore fs.aio-max-nr sysctl entry. https://jira.sw.ru/browse/PSBM-45644 Signed-off-by: Cyrill Gorcunov --- scripts/vz-cpt.in| 2 ++ scripts/vz-rst-action.in | 1 + scripts/vz-rst.in| 1 + 3 files changed, 4

Re: [Devel] [PATCH libvzctl v2] scripts: vz_ -- Checkpoint and restore AIO staistics

2016-04-11 Thread Igor Sukhih
On 04/11/2016 10:07 AM, Cyrill Gorcunov wrote: On Mon, Apr 11, 2016 at 09:39:18AM +0300, Igor Sukhih wrote: cgget -n -v -r ve.clock_bootbased $VEID > $1/vz_clock_bootbased.img cgget -n -v -r ve.clock_monotonic $VEID > $1/vz_clock_monoton

Re: [Devel] [PATCH libvzctl] scripts: vz-rst -- Add action scripts for AutoFS sake

2016-04-16 Thread Igor Sukhih
On 04/15/2016 09:22 PM, Cyrill Gorcunov wrote: Will need it to restore AutoFS. https://jira.sw.ru/browse/PSBM-46249 Signed-off-by: Cyrill Gorcunov --- Igor, Stas, take a look please. The criu-2.1.0.4-vz7 will install systemd-autofs-restart.sh into /usr/libexec/criu/scripts/ directory. So we

Re: [Devel] [PATCH libvzctl] scripts: vz-rst -- Add action scripts for AutoFS sake

2016-04-16 Thread Igor Sukhih
On 04/16/2016 12:57 PM, Cyrill Gorcunov wrote: On Sat, Apr 16, 2016 at 11:58:37AM +0300, Igor Sukhih wrote: +# AutoFS actions +autofs_actions_path=/usr/libexec/criu/scripts/systemd-autofs-restart.sh +if [ -f "$autofs_actions_path" ]; then + autofs_actions="

Re: [Devel] [PATCH libvzctl v2 0/3] NFS migration precursor patches

2016-05-19 Thread Igor Sukhih
On 05/18/2016 07:43 PM, Stanislav Kinsburskiy wrote: This patch set is required to allow criu to migrate NFS mounts and processes, using it. comited, will be available libvzctl-7.0.211 -- Igor ___ Devel mailing list Devel@openvz.org https

Re: [Devel] [PATCH] scripts: add /usr/libexec/criu/scripts/spfs-release-replace.sh to vz-rst

2016-05-26 Thread Igor Sukhih
on-script $spfs_release_replace" fi Pls redo to use 'for s in $spf_scripts; do' -- Igor ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

Re: [Devel] [PATCH v2] scripts: add /usr/libexec/criu/scripts/spfs-release-replace.sh to vz-rst

2016-05-27 Thread Igor Sukhih
er scripts commited, libvzctl-7.0.217 -- Igor. ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

[Devel] Live migration of CT with kernel NFS server

2012-11-27 Thread Igor Liška
Hello, I'd like to know whether there is any development regarding the topic of live migration of CTs with kernel nfs server running in them. I'd like to implement this feature so I'm searching for any progress in this area. Regar

[Devel] bitbucket.org/poige/vzctl

2013-04-28 Thread Igor Podlesny
http://bitbucket.org/poige/vzctl Igor Podlesny (15): Make "if (...) SOME_MACRO(); else" compile fix extra \-continuation Backup VE's network config file if it lacks of DON'T EDIT warning Using Here-doc instead of echo "..." In C we can use "foo =

[Devel] Make "if (...) SOME_MACRO(); else" compile

2013-04-28 Thread Igor Podlesny
Otherwise it would expand to: "if (...) do { ... } while(0); ; else" which obviously is syntax error. --- include/image.h |2 +- src/vzcfgscale.c | 18 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/image.h b/include/image.h index 2dc679c..98563e

[Devel] fix extra \-continuation

2013-04-28 Thread Igor Podlesny
--- src/vzcfgscale.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vzcfgscale.c b/src/vzcfgscale.c index 3376d70..d226d6a 100644 --- a/src/vzcfgscale.c +++ b/src/vzcfgscale.c @@ -56,7 +56,7 @@ do { \ free(param->name); \ param->name = NU

[Devel] Backup VE's network config file if it lacks of DON'T EDIT warning

2013-04-28 Thread Igor Podlesny
--- etc/dists/scripts/debian-add_ip.sh | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/etc/dists/scripts/debian-add_ip.sh b/etc/dists/scripts/debian-add_ip.sh index 0fb1f36..80e8e73 100755 --- a/etc/dists/scripts/debian-add_ip.sh +++ b/etc/dists/scripts/debian-ad

[Devel] Using Here-doc instead of echo "..."

2013-04-28 Thread Igor Podlesny
-- Here-doc is generally more readable/writeable way to implement "patterns" in SHELL. --- etc/dists/scripts/debian-add_ip.sh |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/etc/dists/scripts/debian-add_ip.sh b/etc/dists/scripts/debian-add_ip.sh index 80e8e73..d38e

[Devel] In C we can use "foo = bar = ...; " and it's more readable actually

2013-04-28 Thread Igor Podlesny
--- src/lib/util.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/util.c b/src/lib/util.c index 75a2fe7..9d47dec 100644 --- a/src/lib/util.c +++ b/src/lib/util.c @@ -48,8 +48,7 @@ static const char *unescapestr(char *src) if (src == NULL)

[Devel] Variable declaration with initialization is preferred

2013-04-28 Thread Igor Podlesny
--- src/lib/util.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/util.c b/src/lib/util.c index 9d47dec..b09edfe 100644 --- a/src/lib/util.c +++ b/src/lib/util.c @@ -44,12 +44,11 @@ static const char *unescapestr(char *src) { char *p1, *p2; - int f

[Devel] Declare const

2013-04-28 Thread Igor Podlesny
--- src/lib/util.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/util.c b/src/lib/util.c index b09edfe..a835da9 100644 --- a/src/lib/util.c +++ b/src/lib/util.c @@ -41,7 +41,7 @@ #define NR_OPEN 1024 #endif -static const char *unescapestr(char *src) +static con

[Devel] Moved increment in both condition branches out of them

2013-04-28 Thread Igor Podlesny
--- src/lib/util.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/util.c b/src/lib/util.c index a835da9..17f618e 100644 --- a/src/lib/util.c +++ b/src/lib/util.c @@ -52,12 +52,12 @@ static const char *unescapestr(char *const src) while (*p2) {

[Devel] C's post-increment syntax does really fit here

2013-04-28 Thread Igor Podlesny
--- src/lib/util.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/util.c b/src/lib/util.c index 17f618e..cc42d7e 100644 --- a/src/lib/util.c +++ b/src/lib/util.c @@ -53,8 +53,7 @@ static const char *unescapestr(char *const src) if (*p2 == '\\' && !

[Devel] Now it's good call for for()

2013-04-28 Thread Igor Podlesny
--- src/lib/util.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/util.c b/src/lib/util.c index cc42d7e..8cc066b 100644 --- a/src/lib/util.c +++ b/src/lib/util.c @@ -48,15 +48,14 @@ static const char *unescapestr(char *const src) if (src == NULL)

[Devel] General handling of special cases if perferred

2013-04-28 Thread Igor Podlesny
--- src/lib/util.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/lib/util.c b/src/lib/util.c index 8cc066b..420a574 100644 --- a/src/lib/util.c +++ b/src/lib/util.c @@ -46,18 +46,17 @@ static const char *unescapestr(char *const src) char *p1

[Devel] Variable declaration with initialization is preferred

2013-04-28 Thread Igor Podlesny
--- src/vzctl-actions.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vzctl-actions.c b/src/vzctl-actions.c index 8201f9e..e0cd261 100644 --- a/src/vzctl-actions.c +++ b/src/vzctl-actions.c @@ -1468,10 +1468,9 @@ int run_action(envid_t veid, act_t action, vps_param

[Devel] refac opt_size

2013-04-28 Thread Igor Podlesny
--- src/lib/modules.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib/modules.c b/src/lib/modules.c index c7f984f..301571e 100644 --- a/src/lib/modules.c +++ b/src/lib/modules.c @@ -54,13 +54,12 @@ int mod_parse(envid_t veid, struct mod_action *action, cons

[Devel] Self-comment code

2013-04-28 Thread Igor Podlesny
--- src/lib/fs_simfs.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lib/fs_simfs.c b/src/lib/fs_simfs.c index bc4bf9f..438c1f1 100644 --- a/src/lib/fs_simfs.c +++ b/src/lib/fs_simfs.c @@ -31,34 +31,35 @@ int vps_is_mounted(const char *root, const char

[Devel] Move variables into a scope where they're used indeed

2013-04-28 Thread Igor Podlesny
--- src/lib/util.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/util.c b/src/lib/util.c index 420a574..cfdca31 100644 --- a/src/lib/util.c +++ b/src/lib/util.c @@ -43,10 +43,10 @@ static const char *unescapestr(char *const src) { - char *p1, *p2; -

[Devel] Moved vzstat's stuff under /etc/vz/vzstats/

2013-04-28 Thread Igor Podlesny
-- So it doesn't float around anymore. Encapsulation is a good way to reduce entropy in general. --- vzstats |6 +++--- vzstats.spec |6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vzstats b/vzstats index ddf7f04..d53a877 100755 --- a/vzstats +++ b/vzstats @@

[Devel] [PATCH] Backup network config file if it lacks of warning

2013-04-30 Thread Igor Podlesny
We do warn a user to not edit network config file since it can be overwritten, but we do this placing our warning inside overwritten file -- it's too late. Let's at least make a copy. --- etc/dists/scripts/debian-add_ip.sh | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff -

[Devel] [PATCH] Using Here-doc instead of echo "..."

2013-04-30 Thread Igor Podlesny
-- Here-doc is generally more readable/writeable way to implement "patterns" in SHELL. --- etc/dists/scripts/debian-add_ip.sh |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/etc/dists/scripts/debian-add_ip.sh b/etc/dists/scripts/debian-add_ip.sh index 2ba555a..153e

[Devel] [PATCH] Using Here-doc instead of echo "..."

2013-04-30 Thread Igor Podlesny
-- Here-doc is generally more readable/writeable way to implement "patterns" in SHELL. --- etc/dists/scripts/debian-add_ip.sh | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/etc/dists/scripts/debian-add_ip.sh b/etc/dists/scripts/debian-add_ip.sh index 2ba555a..4f0

[Devel] .gitignore can borrow lots of different stuff from kernel's one

2013-04-30 Thread Igor Podlesny
But at least I find very inconvenient to have vim swap files not ignored: Igor Podlesny (1): Ignore vim swp files .gitignore |1 + 1 file changed, 1 insertion(+) -- 1.7.9.5 ___ Devel mailing list Devel@openvz.org https://lists.openvz.org

[Devel] [PATCH] Ignore vim swp files

2013-04-30 Thread Igor Podlesny
--- .gitignore |1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8088803..c8f7b0d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ TAGS tags cscope.out autom4te.cache +*.swp *.tar.gz *.tar.bz2 Makefile.in -- 1.7.9.5 ___

[Devel] [PATCH 00/10] bitbucket.org/poige/vzctl/commits/branch/p_nifty

2013-05-06 Thread Igor Podlesny
https://bitbucket.org/poige/vzctl/commits/branch/p_nifty Igor Podlesny (10): get_date() gets shorter logger() gets shorter vzctl_init_ploop_log() gets shorter Dont-Repeat-Yourself: refer variable only once max_netmask(): switch fits better get_pagesize(): init var @ declaration and

[Devel] [PATCH 01/10] get_date() gets shorter

2013-05-06 Thread Igor Podlesny
--- src/lib/logger.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lib/logger.c b/src/lib/logger.c index 6727d0f..af18f26 100644 --- a/src/lib/logger.c +++ b/src/lib/logger.c @@ -55,11 +55,8 @@ static int ploop_log = 0; static inline void get_date(char *buf,

[Devel] [PATCH 02/10] logger() gets shorter

2013-05-06 Thread Igor Podlesny
--- src/lib/logger.c |7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/lib/logger.c b/src/lib/logger.c index af18f26..9cf9ee9 100644 --- a/src/lib/logger.c +++ b/src/lib/logger.c @@ -66,14 +66,9 @@ void logger(int log_level, int err_no, const char *format, ...)

[Devel] [PATCH 03/10] vzctl_init_ploop_log() gets shorter

2013-05-06 Thread Igor Podlesny
--- src/lib/logger.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lib/logger.c b/src/lib/logger.c index 9cf9ee9..247adec 100644 --- a/src/lib/logger.c +++ b/src/lib/logger.c @@ -191,11 +191,8 @@ void vzctl_init_ploop_log(void) { ploop.set_log_file(g_lo

[Devel] [PATCH 04/10] Dont-Repeat-Yourself: refer variable only once

2013-05-06 Thread Igor Podlesny
--- src/vzctl-actions.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/vzctl-actions.c b/src/vzctl-actions.c index e0cd261..2f7e162 100644 --- a/src/vzctl-actions.c +++ b/src/vzctl-actions.c @@ -1490,13 +1490,14 @@ int run_action(envid_t veid, act_t actio

[Devel] [PATCH 05/10] max_netmask(): switch fits better

2013-05-06 Thread Igor Podlesny
--- src/lib/util.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/lib/util.c b/src/lib/util.c index 61ce5df..febb676 100644 --- a/src/lib/util.c +++ b/src/lib/util.c @@ -383,12 +383,11 @@ int get_netaddr(const char *ip_str, void *ip) static inline int max_

[Devel] [PATCH 06/10] get_pagesize(): init var @ declaration and simplify

2013-05-06 Thread Igor Podlesny
--- src/lib/util.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/util.c b/src/lib/util.c index febb676..9d8912e 100644 --- a/src/lib/util.c +++ b/src/lib/util.c @@ -472,11 +472,10 @@ char *subst_VEID(envid_t veid, char *src) int get_pagesize() { - lo

[Devel] [PATCH 07/10] In C func() is to be func(void) generally

2013-05-07 Thread Igor Podlesny
--- include/util.h |4 ++-- src/lib/util.c |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/util.h b/include/util.h index 045dcb3..ff23804 100644 --- a/include/util.h +++ b/include/util.h @@ -48,11 +48,11 @@ int get_addr_family(const char *addr); int get_net

[Devel] [PATCH 08/10] get_num_cpu(): got rid of hardcoded string length

2013-05-07 Thread Igor Podlesny
--- src/lib/util.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/util.c b/src/lib/util.c index 2345d1f..66c78df 100644 --- a/src/lib/util.c +++ b/src/lib/util.c @@ -547,7 +547,8 @@ int get_num_cpu(void) return 1; } while (fgets(str

[Devel] [PATCH 09/10] get_num_cpu(): Use PROCCPU macros for "/proc/cpuinfo"

2013-05-07 Thread Igor Podlesny
--- include/util.h |1 + src/lib/util.c |4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/util.h b/include/util.h index ff23804..0f87e6e 100644 --- a/include/util.h +++ b/include/util.h @@ -26,6 +26,7 @@ #define DESTR 1 #define PROCMEM

[Devel] [PATCH 10/10] get_num_cpu(): refactored

2013-05-07 Thread Igor Podlesny
1) Macro MAX_OF(a, b) introduced; 2) FILE *fd init when declaring; 3) When comparing variable to const, put const first, then variable -- to reduce typo risk of unintended assignment; 4) Buffer moved into closer scope. --- include/util.h |2 ++ src/lib/util.c | 22 +++

[Devel] [PATCH] get_pagesize(): init var @ declaration and simplify

2013-05-07 Thread Igor Podlesny
--- src/lib/util.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/util.c b/src/lib/util.c index febb676..19884c9 100644 --- a/src/lib/util.c +++ b/src/lib/util.c @@ -472,11 +472,10 @@ char *subst_VEID(envid_t veid, char *src) int get_pagesize() { - lo

[Devel] [PATCH] max_netmask(): switch fits better

2013-05-07 Thread Igor Podlesny
--- src/lib/util.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib/util.c b/src/lib/util.c index 61ce5df..4d3bdae 100644 --- a/src/lib/util.c +++ b/src/lib/util.c @@ -383,12 +383,14 @@ int get_netaddr(const char *ip_str, void *ip) static inline int max_net

[Devel] [PATCH] run_action(): refer variable only once

2013-05-07 Thread Igor Podlesny
--- src/vzctl-actions.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/vzctl-actions.c b/src/vzctl-actions.c index e0cd261..055c6f0 100644 --- a/src/vzctl-actions.c +++ b/src/vzctl-actions.c @@ -1490,13 +1490,14 @@ int run_action(envid_t veid, act_t actio

[Devel] [PATCH] RFC: rewrite lots of strcmps at array lookup

2013-05-09 Thread Igor Podlesny
--- src/vzctl.c | 149 --- 1 file changed, 80 insertions(+), 69 deletions(-) diff --git a/src/vzctl.c b/src/vzctl.c index 359bcde..37fda15 100644 --- a/src/vzctl.c +++ b/src/vzctl.c @@ -123,18 +123,79 @@ static void usage(int rc) ex

[Devel] [PATCH 0/7] RFC: bitbucket.org/poige/vzctl/commits/all/tip/p_scale

2013-05-13 Thread Igor Podlesny
https://bitbucket.org/poige/vzctl/commits/all/tip/p_scale Igor Podlesny (7): SCALE_UBC: to support terminating ; properly SCALE_PARAM: to support terminating ; properly scale(): undefine macroses bound to local variables SCALE_PARAM, SCALE_UBC gets shorter Major rewrite of scale() with

[Devel] [PATCH 1/7] SCALE_UBC: to support terminating ; properly

2013-05-13 Thread Igor Podlesny
-- Similar to commit 670b1af07e5d0402b139e5678651118567695275 Also since lots of lines were touched anyway I aligned second arguments to increase code readability. --- src/vzcfgscale.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --g

[Devel] [PATCH 2/7] SCALE_PARAM: to support terminating ; properly

2013-05-13 Thread Igor Podlesny
-- Similar to commit 670b1af07e5d0402b139e5678651118567695275 --- src/vzcfgscale.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vzcfgscale.c b/src/vzcfgscale.c index d78e40b..55fd25e 100644 --- a/src/vzcfgscale.c +++ b/src/vzcfgscale.c @@ -103,7 +103,7 @@ do { \

[Devel] [PATCH 3/7] scale(): undefine macroses bound to local variables

2013-05-13 Thread Igor Podlesny
--- src/vzcfgscale.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vzcfgscale.c b/src/vzcfgscale.c index 55fd25e..99f871d 100644 --- a/src/vzcfgscale.c +++ b/src/vzcfgscale.c @@ -153,6 +153,9 @@ do { \ *p->val2 = LONG_MAX; } }

[Devel] [PATCH 4/7] SCALE_PARAM, SCALE_UBC gets shorter

2013-05-13 Thread Igor Podlesny
Both macroses started with framing if() so we don't have to bring in artificial do {} while (0) "loop" --- src/vzcfgscale.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/vzcfgscale.c b/src/vzcfgscale.c index 99f871d..414aec5 100644 --- a/src/vzcfgscale.c ++

[Devel] [PATCH 5/7] Major rewrite of scale() with new macro MUL_BOUND

2013-05-13 Thread Igor Podlesny
-- 2 new macroses brought in: MIN_OF and MUL_BOUND; -- Actually NOT needed local variables removed. --- include/util.h |5 + src/vzcfgscale.c | 34 ++ 2 files changed, 11 insertions(+), 28 deletions(-) diff --git a/include/util.h b/include/util.h index

[Devel] [PATCH 6/7] scale(): got rid of awkward continue in loop

2013-05-13 Thread Igor Podlesny
As a side edit: init in declaration and not needed {} removal --- src/vzcfgscale.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/vzcfgscale.c b/src/vzcfgscale.c index 7fc466a..36db710 100644 --- a/src/vzcfgscale.c +++ b/src/vzcfgscale.c @@ -118,14 +118,11 @@

[Devel] [PATCH 7/7] Now it's obvious SCALE_UBC and SCALE_PARAM are aliases

2013-05-13 Thread Igor Podlesny
Lets use SCALE_PARAM since it's more general --- src/vzcfgscale.c | 49 + 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/src/vzcfgscale.c b/src/vzcfgscale.c index 36db710..0504218 100644 --- a/src/vzcfgscale.c +++ b/src/vzcfgscale.

[Devel] [PATCH] RFC: rewrite vzctl acction strcmp()s as array lookup

2013-05-13 Thread Igor Podlesny
--- src/vzctl.c | 149 --- 1 file changed, 80 insertions(+), 69 deletions(-) diff --git a/src/vzctl.c b/src/vzctl.c index 359bcde..37fda15 100644 --- a/src/vzctl.c +++ b/src/vzctl.c @@ -123,18 +123,79 @@ static void usage(int rc) ex

[Devel] [PATCH 0/4] another patch set reducing LOCs and de-copy-paste

2013-05-14 Thread Igor Podlesny
Igor Podlesny (4): get_dist_name() gets shorter Using preprocessor for tedious SOME_CONST to string add_dist_action(): shorter re-write w/o copy-paste read_dist_actions(): remove needless code src/lib/dist.c | 88 1 file changed

[Devel] [PATCH 1/4] get_dist_name() gets shorter

2013-05-14 Thread Igor Podlesny
--- src/lib/dist.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/lib/dist.c b/src/lib/dist.c index bde94ab..2b7fdf3 100644 --- a/src/lib/dist.c +++ b/src/lib/dist.c @@ -205,13 +205,7 @@ int read_dist_actions(char *dist_name, char *dir, dist_actions *actions)

[Devel] [PATCH 2/4] Using preprocessor for tedious SOME_CONST to string

2013-05-14 Thread Igor Podlesny
This reduces copy-paste amount and reduces typos chances. --- src/lib/dist.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/lib/dist.c b/src/lib/dist.c index 2b7fdf3..1ab263d 100644 --- a/src/lib/dist.c +++ b/src/lib/dist.c @@ -30,13 +30,15 @@ static str

[Devel] [PATCH 3/4] add_dist_action(): shorter re-write w/o copy-paste

2013-05-14 Thread Igor Podlesny
--- src/lib/dist.c | 57 +++- 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/src/lib/dist.c b/src/lib/dist.c index 1ab263d..3ed7347 100644 --- a/src/lib/dist.c +++ b/src/lib/dist.c @@ -51,10 +51,25 @@ static int get_action_id(c

[Devel] [PATCH 4/4] read_dist_actions(): remove needless code

2013-05-14 Thread Igor Podlesny
We don't need to call feof() on each and every line since fgets() already handles it by itself. There's also no point in pre-setting buf[0] -- fgets() would overwrite it anyways if successfull. --- src/lib/dist.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/lib/d

[Devel] [PATCH] vzpid: option "-p" added to show internal PID(s)

2013-10-28 Thread Igor Podlesny
New command line option '-p' means show corresponding internal PID(s) as well: # vzpid -p 2129 Pid CT/Pid CTIDName 2129333 1020mysqld --- bin/vzpid.in | 33 +++-- man/vzpid.8.in | 6 +- 2 files changed, 32 insertions(

[Devel] [PATCH] vzpid: new option "-p" to show in-container PID(s)

2013-10-28 Thread Igor Podlesny
New command line option "-p" means show additionaly the corresponding in-container PID(s), note CT/Pid column in the following example: # vzpid -p 2129 Pid CT/Pid CTIDName 2129333 1020mysqld --- bin/vzpid.in | 33 +++-- ma

[Devel] [PATCH v3] vzpid: new option "-p" to show in-container PID(s)

2013-10-28 Thread Igor Podlesny
This is the 3rd (and the last I hope) revision without needless square brackets around "-p" in OPTIONS section of the man page. ___ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel

[Devel] [PATCH] vzpid: new option "-p" to show in-container PID(s)

2013-10-28 Thread Igor Podlesny
New command line option "-p" means show additionaly the corresponding in-container PID(s), note CT/Pid column in the following example: # vzpid -p 2129 Pid CT/Pid CTIDName 2129333 1020mysqld --- bin/vzpid.in | 33 +++-- ma

[Devel] [PATCH] vzmigrate: don't use blowfish by default anymore

2014-01-24 Thread Igor Podlesny
While blowfish is indeed faster than 3des, ssh "-c" option is related to outdated SSH proto 1. Nowadays proto 2 is in broad use and "-c blowfish" effctively overrides proto 2 defaults which are usually faster (than blowfish). --- bin/vzmigrate.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletion

Re: [Devel] General handling of special cases if perferred

2013-04-28 Thread Igor M Podlesny
On 29 April 2013 12:43, Kir Kolyshkin wrote: > On 04/28/2013 08:31 PM, Igor Podlesny wrote: >> >> --- >> src/lib/util.c | 19 +-- >> 1 file changed, 9 insertions(+), 10 deletions(-) >> >> diff --git a/src/lib/util.c b/src/lib/util.c &g

Re: [Devel] Moved vzstat's stuff under /etc/vz/vzstats/

2013-04-28 Thread Igor M Podlesny
On 29 April 2013 13:06, Kir Kolyshkin wrote: > On 04/28/2013 08:48 PM, Igor Podlesny wrote: [...] > Currently we have about 60 users, and I don't see that you are covering > their their upgrade > from the existing version. Once you start taking care about that, moving > e

Re: [Devel] Declare const

2013-04-28 Thread Igor M Podlesny
On 29 April 2013 13:10, Kir Kolyshkin wrote: [...] > Applied. Please make subjects more informative, > for example in this case it could be something like: > > unescapestr(): declare src argument as const > > (I actually fixed it that way) Oookay, actually sometimes I did it alike -- verbose,

Re: [Devel] Declare const

2013-04-28 Thread Igor M Podlesny
On 29 April 2013 13:32, Kir Kolyshkin wrote: > On 04/28/2013 10:19 PM, Igor M Podlesny wrote: […] >> Oookay, actually sometimes I did it alike -- verbose, but then >> started to think that it's kinda redundant since anyway there's a >> commit body describing w

Re: [Devel] [PATCH] Using Here-doc instead of echo "..."

2013-04-30 Thread Igor M Podlesny
On 1 May 2013 08:09, Kir Kolyshkin wrote: > On 04/30/2013 04:58 PM, Igor Podlesny wrote: >> >> -- Here-doc is generally more readable/writeable way to implement >> "patterns" in SHELL. > > indeed > […] >> - echo " >>

Re: [Devel] [PATCH 10/10] get_num_cpu(): refactored

2013-05-07 Thread Igor M Podlesny
On 7 May 2013 16:36, Andrew Vagin wrote: > On Tue, May 07, 2013 at 02:42:12PM +0800, Igor Podlesny wrote: […] >> + FILE *fd = fopen(PROCCPU, "r"); > > Usually if a function can return an error, it does not used in > declarations. It's declaration And init

[Devel] >> Why do we need one more indent here instead of returning 1 in the

2013-05-07 Thread Igor M Podlesny
On 7 May 2013 18:17, Igor M Podlesny wrote: > On 7 May 2013 16:36, Andrew Vagin wrote: [...] >> Why do we need one more indent here instead of returning 1 in the >> previous block? I am not sure that this version is more readable... 1) Single return point is easier to

Re: [Devel] [PATCH 10/10] get_num_cpu(): refactored

2013-05-07 Thread Igor M Podlesny
On 7 May 2013 20:00, Kir Kolyshkin wrote: > On 05/07/2013 03:17 AM, Igor M Podlesny wrote: >> On 7 May 2013 16:36, Andrew Vagin wrote: >>> On Tue, May 07, 2013 at 02:42:12PM +0800, Igor Podlesny wrote: [...] >> It's declaration And initialization, BTW. I

Re: [Devel] [PATCH 00/10] bitbucket.org/poige/vzctl/commits/branch/p_nifty

2013-05-07 Thread Igor M Podlesny
On 7 May 2013 20:21, Kir Kolyshkin wrote: > On 05/06/2013 11:42 PM, Igor Podlesny wrote: >> >> https://bitbucket.org/poige/vzctl/commits/branch/p_nifty >> >> Igor Podlesny (10): applied { >>get_date() gets shorter >>logger() gets shorter &g

  1   2   >