Skip to content

Commit 059502a

Browse files
FedeDParaujof
authored andcommitted
fix(userspace/libsinsp): added back add_container() calls for synchronous container engines.
Old behavior for sync engines was to load informations as quick as possible, without waiting for the injected event to get parsed. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
1 parent e6dd305 commit 059502a

File tree

5 files changed

+5
-0
lines changed

5 files changed

+5
-0
lines changed

userspace/libsinsp/container_engine/bpm.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ bool bpm::resolve(sinsp_threadinfo *tinfo, bool query_os_for_missing_info)
6060
if(container_cache().should_lookup(container_info.m_id, CT_BPM))
6161
{
6262
container_info.m_name = container_info.m_id;
63+
container_cache().add_container(std::make_shared<sinsp_container_info>(container_info), tinfo);
6364
container_cache().notify_new_container(container_info, tinfo);
6465
}
6566
return true;

userspace/libsinsp/container_engine/libvirt_lxc.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ bool libvirt_lxc::resolve(sinsp_threadinfo *tinfo, bool query_os_for_missing_inf
8484
if(container_cache().should_lookup(container.m_id, CT_LIBVIRT_LXC))
8585
{
8686
container.m_name = container.m_id;
87+
container_cache().add_container(std::make_shared<sinsp_container_info>(container), tinfo);
8788
container_cache().notify_new_container(container, tinfo);
8889
}
8990
return true;

userspace/libsinsp/container_engine/lxc.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ bool lxc::resolve(sinsp_threadinfo *tinfo, bool query_os_for_missing_info)
6363
if (container_cache().should_lookup(container.m_id, CT_LXC))
6464
{
6565
container.m_name = container.m_id;
66+
container_cache().add_container(std::make_shared<sinsp_container_info>(container), tinfo);
6667
container_cache().notify_new_container(container, tinfo);
6768
}
6869
return true;

userspace/libsinsp/container_engine/mesos.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ bool libsinsp::container_engine::mesos::resolve(sinsp_threadinfo* tinfo, bool qu
6161
if(container_cache().should_lookup(container.m_id, CT_MESOS))
6262
{
6363
container.m_name = container.m_id;
64+
container_cache().add_container(std::make_shared<sinsp_container_info>(container), tinfo);
6465
container_cache().notify_new_container(container, tinfo);
6566
}
6667
return true;

userspace/libsinsp/container_engine/rkt.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ bool rkt::rkt::resolve(sinsp_threadinfo* tinfo, bool query_os_for_missing_info)
189189

190190
if (have_rkt)
191191
{
192+
cache->add_container(std::make_shared<sinsp_container_info>(container), tinfo);
192193
cache->notify_new_container(container, tinfo);
193194
return true;
194195
}

0 commit comments

Comments
 (0)