- 16 Jan, 2017 38 commits
-
-
Mike Rapoport authored
travis-ci: success for scripts/install-debian-packages: add libnet-dev Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
These hooks opens inetsk.img, but it doesn't exist if processes were pre-dumped. travis-ci: success for test: skip pre-dump images in socket-tcp*.hook Reported-by:
Pavel Emelyanov <xemul@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
They have to be the same on each iteration. travis-ci: success for series starting with [01/21] build: install libnet-dev Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
travis-ci: success for series starting with [01/21] build: install libnet-dev Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
Check source and destination addresses for closed tcp sockets. travis-ci: success for series starting with [01/21] build: install libnet-dev Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
Check source and destination addresses for closed tcp sockets. travis-ci: success for series starting with [01/21] build: install libnet-dev Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrey Vagin authored
TCP_CLOSING both sides have shutdown but we still have data we have to finish sending travis-ci: success for series starting with [01/21] build: install libnet-dev Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrey Vagin authored
TCP_CLOSE_WAIT remote side has shutdown and is waiting for us to finish writing our data and to shutdown (we have to close() to move on to LAST_ACK) TCP_LAST_ACK out side has shutdown after remote has shutdown. There may still be data in our buffer that we have to finish sending travis-ci: success for series starting with [01/21] build: install libnet-dev Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrey Vagin authored
TCP_FIN_WAIT1 our side has shutdown, waiting to complete transmission of remaining buffered data TCP_FIN_WAIT2 all buffered data sent, waiting for remote to shutdown travis-ci: success for series starting with [01/21] build: install libnet-dev Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
libsoccr knows how to restore these sockets. travis-ci: success for series starting with [01/21] build: install libnet-dev Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
soccr already knows how to restore this sockets. CRIU has to ...: * unlock all packets with the SOCCR_MARK mark * request half-closed socket via socket_diag * transpit src and dst addresses to libsoccr v2: remove SOCCR_FLAGS_ACKED_FIN travis-ci: success for series starting with [01/21] build: install libnet-dev Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
If a socket has been closed, it still has both addresses and we need to dump them. travis-ci: success for series starting with [01/21] build: install libnet-dev Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
For that we restore all sockets properties and then disable the repair mode before calling connect() and the kernel will sent a syn packet and move the socket into the sys-sent state. travis-ci: success for series starting with [01/21] build: install libnet-dev Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
A socket is in one of half-closed states, if it sent a fin packet or it received a fin packet. CRIU plays with fin packets to restore half-closed states too. When we need to sent a fin packet from a socket, we can call shutdown(SHUT_WR). When a fin packet has to be restore in a received queue, criu generate a fin packet and send it via a raw ip socket. A raw packet is sent with the SOCCR_MARK mark to be able to not block it. v2: remove the SOCCR_FLAGS_ACKED_FIN flag introduce sets of bits for different actions with fin packets travis-ci: success for series starting with [01/21] build: install libnet-dev Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
We will need to disable the repair mode before connect() to restore syn-sent sockets. And even now connect() looks like a part of internal logic of libsoccr. travis-ci: success for series starting with [01/21] build: install libnet-dev v2: remove libsoccr_set_sk_data_unbound() from soccr.h Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
These addresses will be used to restore half-closed sockets, we will need to send a fake fin packet for that. And in the next patch connect() will be moved into soccr. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
loge() will start a message with "Error:" and logd() will start a message with "Debug:". logerr() will add strerror(errno) to the end of messages. travis-ci: success for series starting with [01/21] build: install libnet-dev Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
We get sockets from task_diag, then we block network and dump sockets. A socket state can be changed between first two steps, so lets get a socket state on the third step and dump it. travis-ci: success for series starting with [01/21] build: install libnet-dev Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
Without this patch when we change libsoccr, criu isn't rebuilt. travis-ci: success for series starting with [01/21] build: install libnet-dev Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
Originally the repair mode could be enable only for sockets in closed and established states. Starting with the 4.10 kernel, it is possible to enable the repair mode for all connected sockets and now we can dump syn-sent and half closed sockets. travis-ci: success for series starting with [01/21] build: install libnet-dev Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
It will be used to generate tcp packets for restoring half-closed sockets. travis-ci: success for series starting with [01/21] build: install libnet-dev Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Adrian Reber authored
Some of the loge messages where missing a '\n'. For consistency this adds '\n' to all messages which were missing it. travis-ci: success for libsoccr debug/info messages (rev2) Signed-off-by:
Adrian Reber <areber@redhat.com> Reviewed-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Initialize logging function and log_level for libsoccr. Otherwise all soccr messages are skipped. travis-ci: success for libsoccr debug/info messages Reported-by:
Adrian Reber <adrian@lisas.de> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Without this, any rebuild fails with: make[1]: Entering directory '/home/ubuntu/criu' make[1]: Entering directory '/home/ubuntu/criu' GEN .gitid GEN criu/include/config.h GEN /home/ubuntu/criu/criu/include/version.h make[1]: 'compel/plugins/std.built-in.o' is up to date. make[1]: Leaving directory '/home/ubuntu/criu' ln: failed to create symbolic link '/home/ubuntu/criu/soccr/config.h': File exists Makefile:217: recipe for target '/home/ubuntu/criu/soccr/config.h' failed make: *** [/home/ubuntu/criu/soccr/config.h] Error 1 make: *** Waiting for unfinished jobs.... make[1]: Entering directory '/home/ubuntu/criu' make[1]: 'compel/compel-host' is up to date. make[1]: Leaving directory '/home/ubuntu/criu' make[1]: Leaving directory '/home/ubuntu/criu' Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Reviewed-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
Otherwise there is a broken symlink which makes tags/etags unhappy. travis-ci: success for soccr: Generate config.h dynamically (rev5) Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> [extended .gitignore, maked link relative to sources] Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
Made a symlink to CRIU's generated config.h, played with moving some code to soccr.h header. Changed types from u32 to uint32_t, otherwise we should include CRIU's "int.h" in soccr, but I'm lazy to add that. Cc: Pavel Emelyanov <xemul@virtuozzo.com> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
TODO: Write proper man page/doc. TODO: Document that the library spoils the reuseaddrs option on socket. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
For now we only support ESTABLISHED state, so this is mostly a preparation for the future extention. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
With window parameters, we have stuff to restore before queues and after queues. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
In TCP repair some stuff should be restored before calling connect/bind on socker and some -- after it. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
As an API for dumping and restoring the data the structure with __u32-s is used. Getting one (and restoring) also involve the size of the structure so that both -- caller and library -- can know which "version" of it the other one is using. As a starting point all the fields that tcp_entry carries are used. Also note, that only tcp connection info is handled by the library. Stuff like addresses and ports, socket options and other are left for the caller to care for. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
The calls put socket into a mode where it can be saved or restored. Add take one out of this mode. TODO: In criu we turn repair off (resume the socket) from restorer blob that cannot use the library. Need to somehow fix it. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
In order to get messages from libsoccr I propose to introduce a printing callback that can be set by library user and that will be called by libsoccr. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
For now build the .a library not to produce criu wrappers. Next version should include the .so library as well. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 12 Jan, 2017 2 commits
-
-
Kirill Tkhai authored
Function has unsigned int return value, and error is coded by 0, not -1. travis-ci: success for ns: Fix error return value in __get_ns_id() Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
The man page says, it's not optional argument: The application shall ensure that the infop argument points to a siginfo_t structure. Fixes: Test output: ================================ 17:40:26.128: 5: FAIL: helper_zombie_child.c:33: waitid (errno = 14 (Bad address)) 17:40:26.128: 4: FAIL: helper_zombie_child.c:78: read (errno = 2 (No such file or directory)) 17:40:26.129: 3: ERR: test.c:229: Test exited unexpectedly with code 1 Test output: ================================ 15:30:49.021: 30: ERR: sigpending.c:213: waitid (errno = 14 (Bad address)) 15:30:49.021: 29: ERR: test.c:229: Test exited unexpectedly with code 1 and etc. travis-ci: success for 32-bit tests fixes Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-