Reload SCS binary when updating security-containers 90/21390/5
authorLukasz Kostyra <l.kostyra@samsung.com>
Mon, 28 Apr 2014 11:06:41 +0000 (13:06 +0200)
committerLukasz Kostyra <l.kostyra@samsung.com>
Tue, 20 May 2014 10:21:18 +0000 (12:21 +0200)
commit6e86807780dceb3b2978bf5169fc604b27748d45
treeebf15ec47169b8953d8a40a5cddcb186fa31f8bd
parent19282cc1abb625731e094ebf73bc3984ccc92947
Reload SCS binary when updating security-containers

[Feature]       Reload SCS without turning containers off when binary is updated.
[Cause]         When updating SCS we don't want to restart containers, only SCS itself.
[Solution]      Add SIGUSR1 handling which will tell SCS to keep containers alive when exiting.
                Add check in ContainerConnectionTransport if containers are running to skip remount
                of tmpfs when it is not needed.
[Verification]  Build, install, reboot target. Test the following when SCS is running together with
                containers active:
                  * Call "systemctl stop security-containers". SCS should turn off and containers
                    should turn off as well. Call "systemctl start security-containers", SCS and
                    containers should start up.
                  * Simulate update by calling "kill -USR1 `pidof security-containers-server`". SCS
                    should properly reload, however containers should stay on. (note - the best way
                    to check it would be by verifying logs in journalctl).

Change-Id: I3a6d0fb25a4579208ad0f6d0de00e2755548230e
Signed-off-by: Lukasz Kostyra <l.kostyra@samsung.com>
13 files changed:
common/utils/fs.cpp
common/utils/fs.hpp
server/container-admin.cpp
server/container-admin.hpp
server/container-connection-transport.cpp
server/container-connection-transport.hpp
server/container.cpp
server/container.hpp
server/containers-manager.cpp
server/containers-manager.hpp
server/main.cpp
server/server.cpp
server/server.hpp