Skip to content

Commit

Permalink
chore(libsinsp): fix linking issue
Browse files Browse the repository at this point in the history
Signed-off-by: Roberto Scolaro <[email protected]>
  • Loading branch information
therealbobo committed Dec 17, 2024
1 parent 42f6fdf commit 3978470
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions userspace/libsinsp/container_engine/containerd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ using namespace libsinsp::runc;
constexpr const cgroup_layout CONTAINERD_CGROUP_LAYOUT[] = {{"/default/", ""}, {nullptr, nullptr}};

constexpr const std::string_view CONTAINERD_SOCKETS[] = {
"/run/host-containerd/containerd.sock", // bottlerocket host containers socket
"/run/containerd/runtime2/containerd.sock", // tmp
"/run/host-containerd/containerd.sock", // bottlerocket host containers socket
};

bool containerd_async_source::is_ok() {

Check warning on line 36 in userspace/libsinsp/container_engine/containerd.cpp

View check run for this annotation

Codecov / codecov/patch

userspace/libsinsp/container_engine/containerd.cpp#L36

Added line #L36 was not covered by tests
Expand Down Expand Up @@ -110,11 +109,11 @@ libsinsp::container_engine::containerd::containerd(container_cache_interface &ca
}

container_cache_interface *cache_interface = &container_cache();
m_containerd_info_source =
std::make_unique<containerd_async_source>(socket_path,
containerd_async_source::NO_WAIT_LOOKUP,
10000,
cache_interface);
auto src = new containerd_async_source(socket_path,

Check warning on line 112 in userspace/libsinsp/container_engine/containerd.cpp

View check run for this annotation

Codecov / codecov/patch

userspace/libsinsp/container_engine/containerd.cpp#L112

Added line #L112 was not covered by tests
containerd_async_source::NO_WAIT_LOOKUP,
10000,
cache_interface);
m_containerd_info_source.reset(src);
if(!m_containerd_info_source->is_ok()) {
m_containerd_info_source.reset(nullptr);
continue;

Check warning on line 119 in userspace/libsinsp/container_engine/containerd.cpp

View check run for this annotation

Codecov / codecov/patch

userspace/libsinsp/container_engine/containerd.cpp#L118-L119

Added lines #L118 - L119 were not covered by tests
Expand Down

0 comments on commit 3978470

Please sign in to comment.