TomasTomecek / sen

Terminal User Interface for containers.
MIT License
990 stars 61 forks source link

Bug: After pausing a container, view doesn't refresh #143

Closed pcgeek86 closed 5 years ago

pcgeek86 commented 5 years ago

When I stop or start a container, the main view refreshes normally, as you would expect. However, when I pause or unpause a container, the view does not refresh as I would expect it to. Manually refreshing the view, using the @ command works just fine. It'd be cool if this was fixed though!

TomasTomecek commented 5 years ago

Yeah, that sounds like a bug. What version of dockerd are you running? $ docker version

Sen listens to events from dockerd. If sen doesn't receive those regarding the pause/unpause actions, it won't update the main UI.

TomasTomecek commented 5 years ago

Okay, I can reproduce locally. I hope it's just an issue of sen and dockerd doesn't have anything to do with it.

I'll try to fix it & release in coming days or week.

TomasTomecek commented 5 years ago

I finally found time to look into this: the problem is that dockerd is not sending a real-time event when the container is in paused state. It sends the event when you ask it to pause.

I created a terrible workaround: sleep for a second when the events pause/unpause; no idea if that would work for machines with higher load. On my current laptop with 5 images and 2 containers it worked well. I don't use docker lately much.

TomasTomecek commented 5 years ago

I'll cut a new release in coming days, feel free to reopen if the problem persists

pcgeek86 commented 5 years ago

@TomasTomecek Nice, thank you sir.