• Adrian Reber's avatar
    cr-service: add support for configuration files in RPC mode · 99d52ec7
    Adrian Reber authored
    With this commit it is possible to specify a configuration file via
    RPC. In python this would look like this:
    
     req.opts.config_file = 'path/to/config_file'
    
    With this commit CRIU's configuration file handling works like this:
    
     * apply_config(global_conf)
     * apply_config(user_conf)
     * apply_config(environment variable)
     * apply_config(config file via CLI)
     * apply_rpc_options() or apply_cli_options()
     * apply_config(rpc_conf) (only for RPC)
    
    This is at least (probably) the third iteration of the RPC configuration
    file code and it still is complicated.
    
    Most CRIU options are correctly used by just writing the new values to
    the corresponding fields of the opts structure. For the RPC case there
    are, however, a few options (output, work_dir, imgs_dir) which need
    special handling.
    
    So the RPC configuration file is parsed twice. First time to get output,
    work_dir and imgs_dir. Once those are read and correctly used, the RPC
    code overwrites all options again by values set by the RPC interface. At
    the end the RPC configuration file is read a second time and finally
    overwrites the values set via RPC.
    Signed-off-by: 's avatarAdrian Reber <areber@redhat.com>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    99d52ec7
Name
Last commit
Last update
..
google/protobuf Loading commit data...
Makefile Loading commit data...
autofs.proto Loading commit data...
binfmt-misc.proto Loading commit data...
cgroup.proto Loading commit data...
core-aarch64.proto Loading commit data...
core-arm.proto Loading commit data...
core-ppc64.proto Loading commit data...
core-s390.proto Loading commit data...
core-x86.proto Loading commit data...
core.proto Loading commit data...
cpuinfo.proto Loading commit data...
creds.proto Loading commit data...
eventfd.proto Loading commit data...
eventpoll.proto Loading commit data...
ext-file.proto Loading commit data...
fdinfo.proto Loading commit data...
fh.proto Loading commit data...
fifo.proto Loading commit data...
file-lock.proto Loading commit data...
fown.proto Loading commit data...
fs.proto Loading commit data...
fsnotify.proto Loading commit data...
ghost-file.proto Loading commit data...
inventory.proto Loading commit data...
ipc-desc.proto Loading commit data...
ipc-msg.proto Loading commit data...
ipc-sem.proto Loading commit data...
ipc-shm.proto Loading commit data...
ipc-var.proto Loading commit data...
macvlan.proto Loading commit data...
mm.proto Loading commit data...
mnt.proto Loading commit data...
netdev.proto Loading commit data...
ns.proto Loading commit data...
opts.proto Loading commit data...
packet-sock.proto Loading commit data...
pagemap.proto Loading commit data...
pipe-data.proto Loading commit data...
pipe.proto Loading commit data...
pstree.proto Loading commit data...
regfile.proto Loading commit data...
remap-file-path.proto Loading commit data...
rlimit.proto Loading commit data...
rpc.proto Loading commit data...
sa.proto Loading commit data...
seccomp.proto Loading commit data...
siginfo.proto Loading commit data...
signalfd.proto Loading commit data...
sit.proto Loading commit data...
sk-inet.proto Loading commit data...
sk-netlink.proto Loading commit data...
sk-opts.proto Loading commit data...
sk-packet.proto Loading commit data...
sk-unix.proto Loading commit data...
stats.proto Loading commit data...
sysctl.proto Loading commit data...
tcp-stream.proto Loading commit data...
time.proto Loading commit data...
timer.proto Loading commit data...
timerfd.proto Loading commit data...
tty.proto Loading commit data...
tun.proto Loading commit data...
userns.proto Loading commit data...
utsns.proto Loading commit data...
vma.proto Loading commit data...