Description of problem: Usually when starting network servers in the background, especially if used together with valgrind, there can be few second pause between the command is executed and when the server starts listening for new connections. The usual solution for that is to use "sleep n" command, but it may fail if the system is slower than usual and leads to unnecessary delays on fast systems Version-Release number of selected component (if applicable): beakerlib-1.8-1.fc19 Proposition: Provide a set of beakerlib commands that allow for waiting for specific things to happen before continuing script execution. I propose following ones: * rlWaitForCmd - a generic interface to run any command, see bug 970143 * rlWaitForSocket - waiting for a socket to start listening for new connections * rlWaitForFile - wait until a specific file is created * rlWaitForGrep - wait until a file contains a specific string
Created attachment 826142 [details] 0001-new-routines-for-socket-based-synchronisation Add new function, rlWaitForSocket, that can wait for a network service to start. To be used instead of `sleep' when testing network-centric services.
Created attachment 826144 [details] 0002-add-synchronisation-to-system-library Make beakerlib load and install synchronisation related routines by default.
Comment on attachment 826142 [details] 0001-new-routines-for-socket-based-synchronisation https://lists.fedorahosted.org/pipermail/beakerlib-devel/2013-November/000040.html
New set of patches posted: https://lists.fedorahosted.org/pipermail/beakerlib-devel/2013-November/000043.html
*** Bug 970143 has been marked as a duplicate of this bug. ***
Final set of patches posted: https://lists.fedorahosted.org/pipermail/beakerlib-devel/2013-November/000050.html
Also, a small bash "wait" wrapper https://lists.fedorahosted.org/pipermail/beakerlib-devel/2013-November/000058.html
And another addition: https://lists.fedorahosted.org/pipermail/beakerlib-devel/2013-November/000060.html Waiting for the socket to stop listening. implements rlWaitForSocket --close option
beakerlib-1.9-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/beakerlib-1.9-1.fc20
Package beakerlib-1.9-1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing beakerlib-1.9-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-7442/beakerlib-1.9-1.fc20 then log in and leave karma (feedback).
beakerlib-1.9-2.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/beakerlib-1.9-2.fc20
Please consider the package fixing this bug available in Fedora stable repos once bz1116308 is closed and RHEL stable repos once bz1116317 is closed. Fixed in: beakerlib-1.9-2.fc19 beakerlib-1.9-2.fc20 beakerlib-1.9-2.fc21 beakerlib-1.9-3.el5 beakerlib-1.9-2.el6 beakerlib-1.9-2.el7
beakerlib-1.9-3.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/beakerlib-1.9-3.fc20
beakerlib-1.9-3.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.