Investigate: parallel upload of askpass file
See original GitHub issueDescribe the bug
From discord:
Hello, I’m a new user of pyinfra, and I have an issue with the sudo mechanism, but most probably there is a problem with my config. In the inventory.py I have a home group, and running only one operation:
files.directory(
name="Ensure /etc/nebula exists",
path="/etc/nebula",
present=True,
sudo=True,
use_sudo_password=host.data.sudo_password,
)
sudo_password is part of the inventory config. It’s working fine, if I have only one machine in inventory which needs sudo. When I’m adding a second one, there is an error with the sudo command:
[machine.local] >>> env SUDO_ASKPASS=pyinfra-sudo-askpass *** sudo -H -A -k sh -c '! test -e /etc/nebula || (stat -c '"'"'user=%U group=%G mode=%A atime=%X mtime=%Y ctime=%Z size=%s %N'"'"' /etc/nebula 2> /dev/null || stat -f '"'"'user=%Su group=%Sg mode=%Sp atime=%a mtime=%m ctime=%c size=%z %N%SY'"'"' /etc/nebula)'
[machine.local] sudo: unable to run pyinfra-sudo-askpass: Exec format error
[machine.local] sudo: no password was provided
[machine.local] sudo: a password is required
It doesn’t matter if theay are in the same group or not. One additional info: They are using the same user, same password, one machine is using a key, the other one is using password for the ssh connection. It’s working with both of them separately, but not together…
With PARALLEL = 1 config it works like a charm, but I’m not sure why.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
InputFile handle multiple files in parallel - Stack Overflow
I want to be able to upload multiple files via FileInput but got stuck when it comes to parallelism. I simply want to...
Read more >Parallel composite uploads | Cloud Storage
One strategy for uploading large files is called parallel composite uploads. In such an upload, a file is divided into up to 32...
Read more >Parallel Upload to Improve Performance - YouTube
In this episode of Cloud Storage Bytes, we walk you through how to improve your small file upload performance by using parallel uploads....
Read more >bulk-upload — OCI CLI Command Reference 2.7.0 ...
Uploads all files in a given directory and all subdirectories. ... in multiple parts, this option disables those parts from being uploaded in...
Read more >Sending files by using myFileGateway 2.0 - IBM
In myFileGateway 2.0 , click Uploads from the IBM myFileGateway menu. Select the mailbox path where you want to upload files. Drag the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fix confirmed. Deploys no longer need PARALLEL=1 to work properly.
Finally got to the bottom of this - reuse of the same
StringIO
object; fixed in https://github.com/Fizzadar/pyinfra/commit/07f9d6c80612f12e0faf394d54c9cb1929c42577 & released just now inv1.4.5
!