Hide Forgot
What problem/issue/behavior are you having trouble with? What do you expect to see? 1. Proposed title of this feature request Ability to use synchronous writes in sudo i/o logs. Customer is willing to disable compression to achieve synchronous writes to io_logs. 3. What is the nature and description of the request? According to https://www.sudo.ws/man/1.8.17/sudoers.man.html "All files other than log are compressed in gzip format unless the compress_io option has been disabled. Due to buffering, the I/O log data will not be complete until the sudo command has completed." Seems anyway that I/O logs are buffered if compressed, but for compliance reasons is more important for the customer to be sure those writes synchronous. According to Jatin Nansi, "Disabling compression is only a prerequisite. We still need code change to get an option for synchronous writes to iolog files." 4. Why does the customer need this? (List the business requirements here) We need to use I/O logs for compliance, therefore we need to have the possibility to write log in synchronous mode. 5. How would the customer like to achieve this? (List the functional requirements here) We would like to have one flag to have synchronous logs enabled. 6. For each functional requirement listed in question 5, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented. - enable the flag - start sudo session - kill -9 the sudo command - open the log and verify the content 8. Does the customer have any specific timeline dependencies? End of 2016 9. Is the sales team involved in this request and do they have any additional input? no 11. Would the customer be able to assist in testing this functionality if implemented? Yes, sure Where are you experiencing the behavior? What environment? PROD When does the behavior occur? Frequently? Repeatedly? At certain times? Always What information can you provide around timeframes and urgency? Not urgent but important.
Hi Andrea, it seems sudo io writes are synchronous when the sudo command is killed. I tried it myself and you can also check the conversation with upstream here: https://www.sudo.ws/pipermail/sudo-workers/2017-March/001055.html. They changed documentation a little bit so it is more clear now. If I am wrong how did the customer reproduce these non-synchronous writes exactly? What did he mean by logs to be complete? I tried it with a program which prints a string to stdout every x seconds, where x is a very small time period, killed the command with kill -9, then checked logs with sudoreplay. The output was correct every time.
(In reply to Tomas Sykora from comment #5) > it seems sudo io writes are synchronous when the sudo command is killed. Hi Tomas, thanks for updating and sharing the upstream conversation. The use case that the customer want to achieve is a little bit more extreme: to be sure that all writes are commited despite any kind of external event, like fencing or power loss. So I think we can move on explaining that scenario to Todd Miller, or presenting it to him as "watch the logs in real-time" ;-)
Upstream implemented a new option for this use case: https://www.sudo.ws/repos/sudo/rev/96baa17409cf, if it is ok with the customer we can backport it.
Created attachment 1265819 [details] Patch derived from upstream.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:2017