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 1524399 - client-info return incorrect readonly info when connected by tcp/tls in readonly mode
Summary: client-info return incorrect readonly info when connected by tcp/tls in reado...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Erik Skultety
QA Contact: Lili Zhu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-11 12:32 UTC by yalzhang@redhat.com
Modified: 2018-10-30 09:52 UTC (History)
3 users (show)

Fixed In Version: libvirt-4.3.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 09:52:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:3113 0 None None None 2018-10-30 09:52:59 UTC

Comment 2 Erik Skultety 2017-12-13 15:49:13 UTC
patch posted upstream: https://www.redhat.com/archives/libvir-list/2017-December/msg00465.html

Comment 3 Erik Skultety 2018-01-03 11:46:37 UTC
Fixed upstream by:

commit a8582e3656d626a0728bbbfb4fd715aa51676522
Refs: v3.10.0-76-ga8582e365
Author:     Erik Skultety <eskultet>
AuthorDate: Wed Dec 13 14:39:40 2017 +0100
Commit:     Erik Skultety <eskultet>
CommitDate: Mon Dec 18 08:42:29 2017 +0100

    admin: Use the connection to determine a client is connected readonly

    Prior to this change, we relied solely on the inherited readonly
    attribute of a service's socket. This only worked for our UNIX sockets
    (and only to some degree), but doesn't work for TCP sockets which are RW
    by default, but such connections support RO as well. This patch forces
    an update on the client object once we have established a connection to
    reflect the nature of the connection itself rather than relying on the
    underlying socket's attributes.
    Clients connected to the admin server have always been connected as RW
    only.

    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1524399
    Signed-off-by: Erik Skultety <eskultet>

Comment 5 Lili Zhu 2018-06-22 06:21:02 UTC
Verify this bug with 
libvirt-4.4.0-2.el7.x86_64

tcp connection:
1. configure in server host in /etc/libvirt/libvirtd.conf
listen_tls = 0
listen_tcp = 1
auth_tcp = "none"

and in /etc/sysconfig/libvirtd uncomment the
LIBVIRTD_ARGS="--listen"

2. on client host, connect to the server by tcp in readonly mode
# virsh -c qemu+tcp://server-hostname/system -r 
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh > 

3. on server host, check the connection info
# virt-admin client-list libvirtd
 Id    Transport       Connected since
--------------------------------------------------
 1     tcp             2018-06-21 23:31:42-0400

# virt-admin client-info libvirtd 1
id             : 1
connection_time: 2018-06-21 23:31:42-0400
transport      : tcp
readonly       : **yes**
sock_addr      : *client-ip*:33200

tls connection:
1. on client host, connect to the server by tls in readonly mode
# virsh -c qemu+tls://server-hostname/system -r 
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh > 

2. check the connection using virt-admin cmd
# virt-admin client-info libvirtd 2
id             : 2
connection_time: 2018-06-22 01:42:02-0400
transport      : tls
readonly       : **yes**
sock_addr      : *client-ip*:38098
tls_x509_dname : CN=10.66.5.24,O=Red Hat,L=London,ST=London,C=GB

As the now the readonly attribute of both tls and tcp connection are correct,
mark this bug as verified.

Comment 7 errata-xmlrpc 2018-10-30 09:52:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:3113


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