Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2128679

Summary: [RHEL9][rhel-system-roles] [WARNING]: Unable to query 'service' tool (1):
Product: Red Hat Enterprise Linux 9 Reporter: Zhang Yi <yizhan>
Component: rhel-system-rolesAssignee: Rich Megginson <rmeggins>
Status: CLOSED CURRENTRELEASE QA Contact: CS System Management SST QE <rhel-cs-system-management-subsystem-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: nhosoi, spetrosi
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: role:storage
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-06 19:59:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2128801    
Bug Blocks:    

Description Zhang Yi 2022-09-21 12:05:03 UTC
Description of problem:


Version-Release number of selected component (if applicable):
rhel-system-roles-1.20.0-1.el9.noarch

How reproducible:
100%

Steps to Reproduce:
1. run the test case and check test log

2.
3.

Actual results:


Expected results:


Additional info:
This issue can be reproduced with most of the test cases.

TASK [rhel-system-roles.storage : get service facts] ***************************
[WARNING]: Unable to query 'service' tool (1):
ok: [localhost]

Comment 1 Rich Megginson 2022-09-21 13:37:49 UTC
(In reply to Zhang Yi from comment #0)
> Description of problem:
> 
> 
> Version-Release number of selected component (if applicable):
> rhel-system-roles-1.20.0-1.el9.noarch
> 
> How reproducible:
> 100%
> 
> Steps to Reproduce:
> 1. run the test case and check test log
> 
> 2.
> 3.
> 
> Actual results:
> 
> 
> Expected results:
> 
> 
> Additional info:
> This issue can be reproduced with most of the test cases.
> 
> TASK [rhel-system-roles.storage : get service facts]
> ***************************
> [WARNING]: Unable to query 'service' tool (1):
> ok: [localhost]

Is this 9.0, 9.1, or 9.2?
What was the exact ansible-playbook command you used?
What was the inventory you used?
The fact that it says "localhost" here suggests that you are running into https://access.redhat.com/solutions/6726561 - can you read this KB article and see if following it solves the problem you are seeing?

Comment 2 Zhang Yi 2022-09-21 13:54:03 UTC
(In reply to Rich Megginson from comment #1)
> (In reply to Zhang Yi from comment #0)
> > Description of problem:
> > 
> > 
> > Version-Release number of selected component (if applicable):
> > rhel-system-roles-1.20.0-1.el9.noarch
> > 
> > How reproducible:
> > 100%
> > 
> > Steps to Reproduce:
> > 1. run the test case and check test log
> > 
> > 2.
> > 3.
> > 
> > Actual results:
> > 
> > 
> > Expected results:
> > 
> > 
> > Additional info:
> > This issue can be reproduced with most of the test cases.
> > 
> > TASK [rhel-system-roles.storage : get service facts]
> > ***************************
> > [WARNING]: Unable to query 'service' tool (1):
> > ok: [localhost]
> 
> Is this 9.0, 9.1, or 9.2?
it's 9.1

> What was the exact ansible-playbook command you used?

ansible-playbook -i inventory tests/tests_change_fs.yml

> What was the inventory you used?

[root@storageqe-62 rhel-system-roles.storage]# cat inventory 
localhost  ansible_connection=local

> The fact that it says "localhost" here suggests that you are running into
> https://access.redhat.com/solutions/6726561 - can you read this KB article
> and see if following it solves the problem you are seeing?

I've created the inventory as mentioned above, and seems the error reported is not same with above

Comment 3 Rich Megginson 2022-09-21 14:10:48 UTC
Looks like a bug with ansible-core:

# ansible --version
ansible [core 2.13.3]

# cat junk.yml 
---
- hosts: all
  become: true
  tasks:
    - name: get service facts
      service_facts:

# cat inventory 
localhost  ansible_connection=local

# ansible-playbook -i inventory junk.yml 

PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [get service facts] *******************************************************
[WARNING]: Unable to query 'service' tool (1):
ok: [localhost]

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   


NOTE that the tests succeed - the only issue is a WARNING message that could concern users.