jmunixusers / cs-vm-build

Ansible playbook for configuring the JMU CS VM provided by the UUG
https://w3.cs.jmu.edu/uug/
MIT License
12 stars 13 forks source link

Fix Python buffering in wrapper #404

Closed laurelmay closed 3 years ago

laurelmay commented 4 years ago

As pointed out during the review of #389, the output is really "laggy". This is new behavior on Mint 20/Ubuntu 20.04. It's the same with spawn_sync and spawn_async. We should try and clean that up so that it scrolls smoothly prior to shipping in the fall.

tuckerzp commented 3 years ago

@kylelaker Has this been looked into more since issue was opened?

laurelmay commented 3 years ago

@tuckerzp Nope! We're still seeing lots of buffering in the wrapper application and you'd see the same buffering if you ran the Ansible command directly. If you set PYTHONUNBUFFERED=1 you can see that the output looks like you'd expect but polkit limits the environment variables that get retained in the child process. You'll have to dive into this function and possibly toggle the way that the subprocess gets invoked in the call to pkexec. It's also possible we'll need to find a way to call/spawn pkexec through a more Python-friendly API. Or we may need to modify our custom policy.

ripleymj commented 3 years ago

@tuckerzp if this is something you want to work on, I just put a test VM image up that you can use https://w3.cs.jmu.edu/uug/testing/image-fa21.ova