Skip to content

Commit

Permalink
fix(container_engine): explicitely set lookup state for all engines
Browse files Browse the repository at this point in the history
Signed-off-by: Melissa Kilby <[email protected]>
  • Loading branch information
incertum committed Mar 25, 2024
1 parent b033ecc commit a68fce9
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions userspace/libsinsp/container_engine/bpm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ bool bpm::resolve(sinsp_threadinfo *tinfo, bool query_os_for_missing_info)
if(container_cache().should_lookup(container_info.m_id, CT_BPM))
{
container_info.m_name = container_info.m_id;
container_info.set_lookup_status(sinsp_container_lookup::state::SUCCESSFUL);
container_cache().add_container(std::make_shared<sinsp_container_info>(container_info), tinfo);
container_cache().notify_new_container(container_info, tinfo);
}
Expand Down
1 change: 1 addition & 0 deletions userspace/libsinsp/container_engine/docker/base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ docker_base::resolve_impl(sinsp_threadinfo *tinfo, const docker_lookup_request&
auto container = sinsp_container_info();
container.m_type = request.container_type;
container.m_id = request.container_id;
container.set_lookup_status(sinsp_container_lookup::state::SUCCESSFUL);
cache->notify_new_container(container, tinfo);
return true;
}
Expand Down
1 change: 1 addition & 0 deletions userspace/libsinsp/container_engine/libvirt_lxc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ bool libvirt_lxc::resolve(sinsp_threadinfo *tinfo, bool query_os_for_missing_inf
if(container_cache().should_lookup(container.m_id, CT_LIBVIRT_LXC))
{
container.m_name = container.m_id;
container.set_lookup_status(sinsp_container_lookup::state::SUCCESSFUL);
container_cache().add_container(std::make_shared<sinsp_container_info>(container), tinfo);
container_cache().notify_new_container(container, tinfo);
}
Expand Down
1 change: 1 addition & 0 deletions userspace/libsinsp/container_engine/lxc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ bool lxc::resolve(sinsp_threadinfo *tinfo, bool query_os_for_missing_info)
if (container_cache().should_lookup(container.m_id, CT_LXC))
{
container.m_name = container.m_id;
container.set_lookup_status(sinsp_container_lookup::state::SUCCESSFUL);
container_cache().add_container(std::make_shared<sinsp_container_info>(container), tinfo);
container_cache().notify_new_container(container, tinfo);
}
Expand Down
1 change: 1 addition & 0 deletions userspace/libsinsp/container_engine/mesos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ bool libsinsp::container_engine::mesos::resolve(sinsp_threadinfo* tinfo, bool qu
if(container_cache().should_lookup(container.m_id, CT_MESOS))
{
container.m_name = container.m_id;
container.set_lookup_status(sinsp_container_lookup::state::SUCCESSFUL);
container_cache().add_container(std::make_shared<sinsp_container_info>(container), tinfo);
container_cache().notify_new_container(container, tinfo);
}
Expand Down
1 change: 1 addition & 0 deletions userspace/libsinsp/container_engine/rkt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ bool rkt::rkt::resolve(sinsp_threadinfo* tinfo, bool query_os_for_missing_info)

if (have_rkt)
{
container.set_lookup_status(sinsp_container_lookup::state::SUCCESSFUL);
cache->add_container(std::make_shared<sinsp_container_info>(container), tinfo);
cache->notify_new_container(container, tinfo);
return true;
Expand Down

0 comments on commit a68fce9

Please sign in to comment.