Description of problem: SSA - if there is not net-tools package installed, rlWaitForSocket fails; it does not get installed on RHEL-7 unless it is explicitly required by some beaker test Version-Release number of selected component (if applicable): beakerlib-1.10-2.el7eso.noarch How reproducible: always Steps to Reproduce: 1. create test using rlWaitForSocket 2. run it on clean RHEL-7 machine Actual results: :: [ 13:20:20 ] :: [ INFO ] :: rlWaitForSocket: Waiting max 20s for socket `6608' to start listening /usr/share/beakerlib/synchronisation.sh: line 190: netstat: command not found Expected results: rlWaitForSocket works as expected Additional info: I suggest to consider adding net-tools package to beakerlib dependencies
I already have patches that use `ss` to enumerate sockets and if it is not available, falls back to netstat. I'll submit them later.
Created attachment 1014897 [details] Implement fallback to netstat in case ss is missing Fix for bug
Does that really solve the reported problem? If there is no netstat binary, how does fallback to netstat help? Am I missing something?
Solution of this bug would be to add either net-tools or iproute rpm dependency. If we decide to add one of them I would go for iproute. However I would like to avoid it at all if there is a possibility to get those information from /proc or /sys.
*** Bug 1208586 has been marked as a duplicate of this bug. ***
on RHEL4, 5 and 6 netstat is installed by default, on RHEL 7 ss is installed by default, IIRC the same situation is on Fedora, for our purposes it fixes the issue parsing /proc or /sys would be really ugly that being said, a dependency on "iproute _or_ net-tools" would be good, dunno if rpm supports that...
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle. Changing version to '23'. (As we did not run this process for some time, it could affect also pre-Fedora 23 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23
Dalibor, can we get some decision on this? This buggy code is rather irritating, especially given that the fix is so simple. I'm very much against reimplementing netstat or ss in bash - it's reinventing the wheel, poorly at that. So either remove this functionality, so that we can create a library that implements this or merge this patch.
Sorry the bug was a bit out of sight because it has got wrong status. I though about it again and I think the patch is ok but it needs to be extended by specifying the requirement in rpm. It would be net-tools for RHEL5 and iproute for RHEL6 and newer and Fedora. I am assigning the bug back to me so I have it as reminder for adding the requirements.
I have rethought it and thinking of protocols support I just add net-tools and netstat is also capable of sctp. Fixed by http://pkgs.fedoraproject.org/cgit/beakerlib.git/commit/?id=bf63f0f0232ab20e65a128f298f3f8603d4e1cf1
beakerlib-1.11-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-f36ff57e84
beakerlib-1.11-1.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'dnf --enablerepo=updates-testing update beakerlib' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-4c96e73472
beakerlib-1.11-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'dnf --enablerepo=updates-testing update beakerlib' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-ba802d1bd6
beakerlib-1.11-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'dnf --enablerepo=updates-testing update beakerlib' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-7ab9feeb42
beakerlib-1.11-1.el5 has been pushed to the Fedora EPEL 5 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'yum --enablerepo=epel-testing update beakerlib' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-0e03df1475
beakerlib-1.11-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'yum --enablerepo=epel-testing update beakerlib' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8f65d5290a
beakerlib-1.11-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'yum --enablerepo=epel-testing update beakerlib' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-f36ff57e84
Seems to be working OK - TJ#1138144
beakerlib-1.11-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
beakerlib-1.11-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
beakerlib-1.11-1.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.
beakerlib-1.11-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
beakerlib-1.11-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
beakerlib-1.11-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.