Bug 1889971 - redhat-certification-backend checks wrong service name "rpcbindd.service"
Summary: redhat-certification-backend checks wrong service name "rpcbindd.service"
Keywords:
Status: NEW
Alias: None
Product: Red Hat Certification Program
Classification: Red Hat
Component: redhat-certification-cloud
Version: 1.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Greg Nichols
QA Contact: rhcert qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-21 06:44 UTC by Xiao, Liang
Modified: 2020-10-21 14:46 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)

Description Xiao, Liang 2020-10-21 06:44:42 UTC
rhcert suite(redhat-certification-backend-7.18-20201006.1.el8.noarch.rpm) is trying to find a wrong service name "rpcbindd.service", it should be "rpcbind.service"

Below is error log:
Enter the choice number or the choice value: 1
response: 10.22.1.60
Picked 10.22.1.60
error: file /usr/lib/systemd/system/rpcbindd.service: No such file or directory
Displaying Open Ports Information:
NOTE: Allowed Open Ports: ['80', '8009', '22', '443']

The code logic is as below, it is not accurate to append 'd' to the service name from 'nmap' output.

def get_service_source_package(self, service):

        if self.release == 6:
            service_dir = self.rhel6_service_dir + service
        elif self.release == 7:
            service_dir = self.rhel7_service_dir + service + "d.service"
        elif self.release == 8:
            service_dir = self.rhel8_service_dir + service + "d.service"

Below is manually check:
# nmap -Pn 10.22.1.60
Starting Nmap 7.70 ( https://nmap.org ) at 2020-10-21 06:29 UTC
Nmap scan report for ip-10-22-1-60.us-west-2.compute.internal (10.22.1.60)
Host is up (0.0000070s latency).
Not shown: 998 closed ports
PORT    STATE SERVICE
22/tcp  open  ssh
111/tcp open  rpcbind
[root@ip-10-22-1-60 rhcert]# ls -l /usr/lib/systemd/system/rpcbindd.service
ls: cannot access '/usr/lib/systemd/system/rpcbindd.service': No such file or directory
[root@ip-10-22-1-60 rhcert]# ls -l /usr/lib/systemd/system/rpcbind.service
-rw-r--r--. 1 root root 544 Feb  6  2020 /usr/lib/systemd/system/rpcbind.service
[root@ip-10-22-1-60 rhcert]# systemctl status rpcbind.service
● rpcbind.service - RPC Bind
   Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-10-21 05:32:31 UTC; 59min ago
     Docs: man:rpcbind(8)
 Main PID: 826 (rpcbind)
    Tasks: 1 (limit: 48940)
   Memory: 2.1M
   CGroup: /system.slice/rpcbind.service
           └─826 /usr/bin/rpcbind -w -f

Oct 21 05:32:31 ip-10-22-1-60.us-west-2.compute.internal systemd[1]: Starting RPC Bind...
Oct 21 05:32:31 ip-10-22-1-60.us-west-2.compute.internal systemd[1]: Started RPC Bind.

Version-Release number of selected components (if applicable):

RHEL Version:
RHEL-8.4(4.18.0-193.28.1.el8_2.x86_64)

How reproducible:
100%

Steps to Reproduce:
1. Start a RHEL-8.2 instance
2. Install redhat-certification-cloud and other required pkgs.
3. Run cert test.

Actual results:
Wrong service name detected.

Expected results:
Correct service name detected.

Additional info:
- N/A


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