kelinger / OmniStream

Deployment and management tools for an entire streaming platform that can reside on a server (local, remote, hosted, VPS) with media files stored on cloud services like Google Drive or Dropbox.
MIT License
33 stars 10 forks source link

toggle active containers via „omni menu“ doesnt work anymore #16

Closed DPMUC closed 2 years ago

DPMUC commented 2 years ago

Hey guys - i think i found an issue in the current version… If i wanna toggle the active components via the omni menu the process get „killed“ and i get a stuck terminal which i only could deal with the ctrl+c command… and the change of the setting does not work… Maybe anyone could reproduce that.. or else its on my side… Thx for all :)

kelinger commented 2 years ago

Can you describe how I can replicate this issue? I'm enabling and disabling active components all the time in my testing and haven't run across this.

DPMUC commented 2 years ago

thats strange…

Ok, my way:

omni menu omni control omni components hit space to activate a new container when i hit „Enter“ then, it freezes my terminal…

kelinger commented 2 years ago

By any chance, are you using CloudFlare integration (where OmniStream registers/unregisters DNS entries with CF)?

DPMUC commented 2 years ago

Yes i do… - every omni up/down do this…

DPMUC commented 2 years ago

I also tried omni update/repair… - doesnt fix it…

kelinger commented 2 years ago

While I'm looking into this, you can try the o+ and o- commands to quickly enable/disable a component respectively.

Pressing tab after the command and a space, you can see the available containers. For example, o- <tab> <tab> should list the activated containers which you can disable.

The menu version that you're using is simply a front end for these commands and simply ends up calling the respective o+ and o- commands based on your menu selections. This will help me see if the commands themselves are the issue or if its the menu selection process.

Also, I'm still unable to reproduce this specifically using the menus HOWEVER it does now take a significantly longer time to enable/disable from the menu. Recently, we added a feature where the add/remove of a component updates CloudFlare if that's enabled. This was cleaner and safer than doing it simply at startup/shutdown since disabled components would no longer be listed in the active configuration and therefore weren't know to have a removal needed. Since the menu calls all the o+ and o- commands in a loop, this "slightly longer per container" change adds up to a huge delay.

On mine, the menu seemed to freeze but actually completed a minute or two later (which again, is unacceptable and will need to be fixed no matter what the outcome of your testing shows).

DPMUC commented 2 years ago

Ok, thanks thats it - if i „stay there“ for about 1-2 minutes without interacting the terminal, it works again… Thanks a lot for your explanation… :) 👍👍

kelinger commented 2 years ago

Thanks for reporting this @DPMUC. I've posted an update to OmniStream which should make the menu-version (bulk editing of components) significantly faster. Instead of processing the adds and removes each component at a time, it should now run one command to disable everything needing disabling and a second command enabling those enabled. This reduces the number of CloudFlare API hits which, not being local, is where the delays stem from. While it may not ever be as fast as it was when I wasn't updating DNS, this should be noticeably faster than it was up until yesterday.

Update OmniStream and then retry the menu-based component modifications when you have a chance.