BuildRequires: pkgconfig(libSimpleDbus)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libsystemd-journal)
- BuildRequires: pkgconfig(libvirt-glib-1.0)
+BuildRequires: pkgconfig(libsystemd-daemon)
BuildRequires: pkgconfig(sqlite3)
- Requires: libvirt-daemon >= 1.2.4
Requires(post): libcap-tools
+ Requires: bridge-utils
%description
This package provides a daemon used to manage containers - start, stop and switch
## Link libraries ##############################################################
FIND_PACKAGE(Boost COMPONENTS program_options system filesystem regex)
- PKG_CHECK_MODULES(SERVER_DEPS REQUIRED libvirt libvirt-glib-1.0 json gio-2.0 libsystemd-journal
- libcap-ng libLogger libSimpleDbus libConfig libsystemd-daemon)
-PKG_CHECK_MODULES(SERVER_DEPS REQUIRED lxc json gio-2.0 libsystemd-journal
++PKG_CHECK_MODULES(SERVER_DEPS REQUIRED lxc json gio-2.0 libsystemd-journal libsystemd-daemon
+ libcap-ng libLogger libSimpleDbus libConfig)
INCLUDE_DIRECTORIES(${COMMON_FOLDER})
INCLUDE_DIRECTORIES(SYSTEM ${SERVER_DEPS_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
LOGI("Generating config from " << configPath << " to " << newConfigPath);
generateNewConfig(id, configPath, newConfigPath);
- LOGI("Generating config from " << libvirtConfigPath << " to " << newLibvirtConfigPath);
- generateNewConfig(id, libvirtConfigPath, newLibvirtConfigPath);
-
- LOGI("Generating config from " << libvirtNetworkPath << " to " << newLibvirtNetworkPath);
- generateNewConfig(id, libvirtNetworkPath, newLibvirtNetworkPath);
-
- LOGI("Generating config from " << libvirtNetworkFilterPath << " to " << newLibvirtNetworkFilterPath);
- generateNewConfig(id, libvirtNetworkFilterPath, newLibvirtNetworkFilterPath);
} catch (SecurityContainersException& e) {
LOGE(e.what());
- removeAllWrapper(containerPathStr);
+ utils::launchAsRoot(std::bind(removeAllWrapper, containerPathStr));
result->setError(api::host::ERROR_CONTAINER_CREATE_FAILED, e.what());
return;
}
## Link libraries ##############################################################
FIND_PACKAGE (Boost COMPONENTS unit_test_framework system filesystem regex)
- PKG_CHECK_MODULES(UT_SERVER_DEPS REQUIRED libvirt libvirt-glib-1.0 json gio-2.0
- libsystemd-journal libcap-ng libLogger libSimpleDbus libConfig
- libsystemd-daemon)
-PKG_CHECK_MODULES(UT_SERVER_DEPS REQUIRED lxc json gio-2.0
++PKG_CHECK_MODULES(UT_SERVER_DEPS REQUIRED lxc json gio-2.0 libsystemd-daemon
+ libsystemd-journal libcap-ng libLogger libSimpleDbus libConfig)
INCLUDE_DIRECTORIES(${COMMON_FOLDER} ${SERVER_FOLDER} ${UNIT_TESTS_FOLDER} ${CLIENT_FOLDER})
INCLUDE_DIRECTORIES(SYSTEM ${UT_SERVER_DEPS_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(${UT_SERVER_CODENAME} ${UT_SERVER_DEPS_LIBRARIES} ${Boost_LIBRARIES})
const std::string TEST_DBUS_CONFIG_PATH =
SC_TEST_CONFIG_INSTALL_DIR "/client/ut-client/test-dbus-daemon.conf";
+ const std::string CONTAINERS_PATH = "/tmp/ut-containers"; // the same as in daemon.conf
struct Loop {
- Loop() { sc_start_glib_loop(); }
- ~Loop() { sc_stop_glib_loop(); }
+ Loop()
+ {
+ vsm_start_glib_loop();
+ }
+ ~Loop()
+ {
+ vsm_stop_glib_loop();
+ }
};
struct Fixture {
const int EVENT_TIMEOUT = 5000; ///< ms
const std::map<std::string, std::string> EXPECTED_DBUSES_STARTED = {
- {"ut-containers-manager-console1-dbus",
- "unix:path=/tmp/ut-run1/dbus/system_bus_socket"},
- {"ut-containers-manager-console2-dbus",
- "unix:path=/tmp/ut-run2/dbus/system_bus_socket"},
- {"ut-containers-manager-console3-dbus",
- "unix:path=/tmp/ut-run3/dbus/system_bus_socket"}};
-
-void convertDictToMap(ScArrayString keys,
- ScArrayString values,
+ {
+ "ut-containers-manager-console1-dbus",
- "unix:path=/tmp/ut-containers-manager/console1-dbus/dbus/system_bus_socket"
++ "unix:path=/tmp/ut-run1/dbus/system_bus_socket"
+ },
+ {
+ "ut-containers-manager-console2-dbus",
- "unix:path=/tmp/ut-containers-manager/console2-dbus/dbus/system_bus_socket"
++ "unix:path=/tmp/ut-run2/dbus/system_bus_socket"
+ },
+ {
+ "ut-containers-manager-console3-dbus",
- "unix:path=/tmp/ut-containers-manager/console3-dbus/dbus/system_bus_socket"
++ "unix:path=/tmp/ut-run3/dbus/system_bus_socket"
+ }
+};
+
+void convertDictToMap(VsmArrayString keys,
+ VsmArrayString values,
std::map<std::string, std::string>& ret)
{
- ScArrayString iKeys;
- ScArrayString iValues;
+ VsmArrayString iKeys;
+ VsmArrayString iValues;
for (iKeys = keys, iValues = values; *iKeys && *iValues; iKeys++, iValues++) {
ret.insert(std::make_pair(*iKeys, *iValues));
}