Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly quote Synchronize #241

Merged

Conversation

tadeboro
Copy link
Contributor

@tadeboro tadeboro commented Aug 4, 2021

SUMMARY

The synchronize action plugin and module were a bit sloppy when it came to the command-line parameter quoting and that caused failure on some systems (for example, on Fedora 34).

This commit makes sure any arguments with potentially problematic characters are quoted before being used.

Fixes #242

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

synchronize

The synchronize action plugin and module were a bit sloppy when it
came to the command-line parameter quoting and that caused failuer on
some systems (for example, on Fedora 34).

This commit makes sure any argumnts with potentially problematic
characters are quoted before being used.
@tadeboro tadeboro marked this pull request as ready for review August 4, 2021 11:39
@tadeboro
Copy link
Contributor Author

tadeboro commented Aug 4, 2021

/cc @sshnaidm

@sshnaidm
Copy link
Contributor

sshnaidm commented Aug 4, 2021

I have a following error on f33:

    "rc": 14
}

MSG:

rsync: [sender] Failed to exec podman exec -i: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.2.3]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in IPC code (code 14) at io.c(228) [sender=3.2.3]

@tadeboro
Copy link
Contributor Author

tadeboro commented Aug 4, 2021

I have a following error on f33:

    "rc": 14
}

MSG:

rsync: [sender] Failed to exec podman exec -i: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.2.3]
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in IPC code (code 14) at io.c(228) [sender=3.2.3]

Ugh, this might be "fun" since it looks like that by making f34 happy, I broke f33 (and probably a few systems more). But looking at the output of the task, I see that Ansible executed the following command:

/usr/bin/rsync --delay-updates -F --compress --archive --blocking-io --rsh='podman exec -i' --out-format='<<CHANGED>>%i %n%L' /home/tadej/steampunk/collections/ansible.posix/ansible_collections testpod:/tmp/collections

And by looking at the rsync man page, this should be a valid command. Let me try wake my f33 up and see what command I see there.

@tadeboro
Copy link
Contributor Author

tadeboro commented Aug 4, 2021

The new code works for me on my old Fedora 33 and the main branch fails exactly the same on my f33 as it does on f34. So now I am really puzzled about what is going on here. So I guess there is something different between my and @sshnaidm machine. Now we just need to figure out whose machine is messed up and what that mess actually is ;)

@sshnaidm
Copy link
Contributor

sshnaidm commented Aug 8, 2021

On fresh fedora33 and CentOS 8 works fine. LGTM

Copy link
Member

@Akasurde Akasurde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Andersson007
Copy link
Contributor

@saito-hideki this PR got 2 approvals, can we gate this?

@Akasurde Akasurde added the gate Gate PR in Zuul CI (Obsolete: Please set "mergeit" instead of "gate") label Aug 9, 2021
Copy link
Contributor

@ansible-zuul ansible-zuul bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gate Gate PR in Zuul CI (Obsolete: Please set "mergeit" instead of "gate")
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The synchronize module has issues on Fedora 34
4 participants