- 30 Oct, 2018 40 commits
-
-
Radostin Stoyanov authored
Auto-detected with pylint. Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Andrei Vagin authored
Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Radostin Stoyanov authored
CPython currently uses a reference-counting scheme with (optional) delayed detection of cyclically linked garbage, which collects most objects as soon as they become unreachable, but is not guaranteed to collect garbage containing circular references. Some objects contain references to "external" resources such as open files. It is understood that these resources are freed when the object is garbage-collected, but since garbage collection is not guaranteed to happen, such objects also provide an explicit way to release the external resource, usually a close() method. Programs are strongly recommended to explicitly close such objects. Reference: https://docs.python.org/3.6/reference/datamodel.htmlSigned-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Radostin Stoyanov authored
Add hostname resolution in setup_tcp_client(). This change allows a valid hostname to be provided as value for --address option when connecting to page server. This change is needed for the following path which removes setup_TCP_client_socket() from img-proxy.c. In this function the hostname resolution was implemented using gethostbyname() However, here we use `getaddrinfo` instead because gethostbyname() is marked obsolescent in POSIX.1-2001 and is removed in POSIX.1-2008 specifications. Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Radostin Stoyanov authored
When --remote-lazy-pages is used the address option was not specified. Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Radostin Stoyanov authored
The function `setup_TCP_server_socket` (defined in img-remote.c) and `setup_tcp_server` (defined in util.c) have very similar functionality. Replace setup_TCP_server_socket() with setup_tcp_server() to reduce code duplication and to enable IPv6 support for the image-cache action of CRIU. We set SO_REUSEADDR flag to allow reuse of local addresses. Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
We don't have rights to print anything into standard descriptors and we want to have all output in a specified log file. Reviewed-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Reviewed-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Service descriptors are a set of file descriptors which isn't intercepted with restored file descriptors. In all cases, when we don't need to restore file descriptors, we can skip all magic of service-fd and just save descriptor numbers in a static array. Reviewed-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Do someone remember why we are doing this? Reviewed-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Currently, install_service_fd() always creates a new file descriptor, but it is going to be reworked to reuse a file descriptor when it is possible. Reviewed-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Otherwise files from a previous build can affect the current one. Reported-by: Mr Jenkins Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
For a long time we've been demanding from cpus to be compatible on fpu frame level, but growing list of cpu features triggers inability for restored programs to proceed after restore due to specific intructions execution (such as avx2). Note the fpu frame may carry same size but not on instruction level where SIGILL may happen after the restore. Thus lets require instruction mode to be set and verified by default. Still one can drop this option via command line or rpc request. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Since we're using bintmaps for options don't exit early if --cpu-cap=ins specified because there might be a combination of options. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Since now validation is bit based there is no longer need to exit early if fpu matches, we rather need over all possible options where several capability modes can be set. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
To preserve backward compatibility because strict mode now lays under own block. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Current scheme of when to write and verify cpuinfo images is unclear: we define default mode to 'fpu' and this implies that no cpuinfo image get written on dump and read on restore. In turn if 'cpu' or 'ins' mode specified in command line we write and verify this image. This is all wrong -- we need to produce image if any mode ecxept 'none' is specified. The 'none' mode is designed exactly for skipping cpuinfo image production or verification. Because any non-default mode requires explicit --cpu-cap option to be passed we can use this and setup new CPU_CAP_IMAGE telling criu to write or read this image. Note the default mode doesn't break backward compatibility because by default we don't write or read the image at all. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
It should be there from the beginning but happen to escape. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
xsave sizes should sit in fpu capability block because instruction and strick mode checkig is a different thing. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Usually people simply leave cpu checkin in default mode (which is fpu level) but idea was to be able to compose a mixture of settings, for this sake CPU_CAP_ constants are bit shifts. Thus use bitwise operator for this. Same time define CPU_CAP_ as bit shifts explicitly and use explicit CPU_CAP_NONE compare where needed. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
No func changes. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Keep xsave sizes in image to be sure that on restore the application won't override memory out of xsave frame size if been calling xsave instruction directly. Here are some details: while been testing vz7 containers migration we've noticed that sometime applications do crash after restore, what is worse such execution abort may happen not immediately after the restore but after passing some time. After spending a lot of time we discovered that it is due to the fact that the migration is directed from an old cpu to a modern one which has extensions such as mpx. In result libc has cached small xsave size and then after restore any direct call to xsave instruction overwrite memory which is allocated with size less than needed. Thus we save xsave frame size in image and require it to match to prevent such situation. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
Before fix issubpath("./zdtm/static/mntns_shared_vs_private.test", "./") returned false, though should return true. Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
colon operators are there obviously by mistake instead of semicolons Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
As mnt_roots always has a slash at the beginning we don't need another: (00.156035) 1: mnt: Move the root to //tmp/.criu.mntns.ZKVJHl/15-0000000000 Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
for i in $(find . -name "*.[ch]" -type f); do sed -i 's/\(pr_warn(".*[^n]\)\("[),]\)/\1\\n\2/' $i done Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Adrian Reber authored
In RPC mode the log_level was always reset to the default log level of 2, if no configuration file was used. This saves the log level set via RPC in opts.log_level and a configuration file can overwrite it later, but if it is only set via RPC this value is not ignored now. Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-