Fix errors for /bin/sh with the xtrabackup cron#1222
Merged
ThoughtCrhyme merged 2 commits intopuppetlabs:masterfrom Aug 12, 2019
Merged
Fix errors for /bin/sh with the xtrabackup cron#1222ThoughtCrhyme merged 2 commits intopuppetlabs:masterfrom
ThoughtCrhyme merged 2 commits intopuppetlabs:masterfrom
Conversation
4d4e112 to
351a091
Compare
Contributor
Author
|
Now with updated spec tests. |
…ore consistent behavior. See https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html#tag_23_02_06_03 for more details
351a091 to
14bee21
Compare
Percent-signs (%) in the command, unless escaped with backslash \, will be changed into newline characters, and all data after the first % will be sent to the command as standard input.
14bee21 to
8e6eef0
Compare
Contributor
Author
|
Well a bunch of tests fail because GitHub is unstable and cloning repositories fail. Could someone with permissions on this project restart the Travis jobs for me? |
Contributor
Author
|
Well, I forced Travis to run again, sorry for closing/reopening but that was the only solution I had. This seems ready for review :) |
ThoughtCrhyme
approved these changes
Aug 12, 2019
Contributor
ThoughtCrhyme
left a comment
There was a problem hiding this comment.
Hi @baldurmen thanks for the fix! Looks good to me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using Debian's default shell for cron (
/bin/sh), the xtrabackup incremental cron was failing for me with an error message like:This is caused by percent-signs (
%) not being escaped. With/bin/sh, percent-signs (%) in the command, unless escaped with backslash , will be changed into newline characters, and all data after the first % will be sent to the command as standard input. Thus the EOF error.I also made another small commit to convert backtiks (`) into $(), which is the prefered POSIX way. https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html#tag_23_02_06_03 has a good writeup on it.
Happy to make modifications if required.