Bug 1205330 - rlWaitForSocket fails due to missing netstat (net-tools package) on RHEL-7
Summary: rlWaitForSocket fails due to missing netstat (net-tools package) on RHEL-7
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: beakerlib
Version: 23
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Dalibor Pospíšil
QA Contact: Stanislav Zidek
URL:
Whiteboard:
: 1208586 (view as bug list)
Depends On:
Blocks: 1173652 Fedora-beakerlib
TreeView+ depends on / blocked
 
Reported: 2015-03-24 17:21 UTC by Stanislav Zidek
Modified: 2015-12-08 08:45 UTC (History)
8 users (show)

Fixed In Version: beakerlib-1.11-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1208586 (view as bug list)
Environment:
Last Closed: 2015-12-08 08:45:05 UTC


Attachments (Terms of Use)
Implement fallback to netstat in case ss is missing (1.51 KB, patch)
2015-04-15 16:09 UTC, Hubert Kario
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1208586 None None None Never

Internal Links: 1208586

Description Stanislav Zidek 2015-03-24 17:21:35 UTC
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

Comment 1 Hubert Kario 2015-04-15 15:32:21 UTC
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.

Comment 2 Hubert Kario 2015-04-15 16:09:23 UTC
Created attachment 1014897 [details]
Implement fallback to netstat in case ss is missing

Fix for bug

Comment 3 Stanislav Zidek 2015-04-16 07:52:06 UTC
Does that really solve the reported problem? If there is no netstat binary, how does fallback to netstat help? Am I missing something?

Comment 4 Dalibor Pospíšil 2015-04-16 08:20:16 UTC
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.

Comment 5 Dalibor Pospíšil 2015-04-16 08:24:01 UTC
*** Bug 1208586 has been marked as a duplicate of this bug. ***

Comment 6 Hubert Kario 2015-04-16 10:59:59 UTC
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...

Comment 7 Jan Kurik 2015-07-15 14:21:57 UTC
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

Comment 8 Hubert Kario 2015-07-22 12:37:38 UTC
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.

Comment 9 Dalibor Pospíšil 2015-07-22 15:32:30 UTC
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.

Comment 10 Dalibor Pospíšil 2015-10-29 08:36:05 UTC
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

Comment 11 Fedora Update System 2015-11-03 12:42:02 UTC
beakerlib-1.11-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-f36ff57e84

Comment 12 Fedora Update System 2015-11-03 18:21:12 UTC
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

Comment 13 Fedora Update System 2015-11-03 18:56:37 UTC
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

Comment 14 Fedora Update System 2015-11-03 19:52:41 UTC
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

Comment 15 Fedora Update System 2015-11-03 21:50:30 UTC
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

Comment 16 Fedora Update System 2015-11-05 17:19:35 UTC
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

Comment 17 Fedora Update System 2015-11-05 20:18:31 UTC
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

Comment 18 Stanislav Zidek 2015-11-09 14:01:29 UTC
Seems to be working OK - TJ#1138144

Comment 19 Fedora Update System 2015-11-17 15:52:15 UTC
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.

Comment 20 Fedora Update System 2015-11-17 18:24:06 UTC
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.

Comment 21 Fedora Update System 2015-11-19 16:50:22 UTC
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.

Comment 22 Fedora Update System 2015-11-20 23:25:09 UTC
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.

Comment 23 Fedora Update System 2015-11-21 14:26:24 UTC
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.

Comment 24 Fedora Update System 2015-11-21 20:30:17 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.