Bug 1722735
Summary: | Fix build with current libssh | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Jiri Denemark <jdenemar> | |
Component: | libvirt | Assignee: | Pavel Hrdina <phrdina> | |
Status: | CLOSED ERRATA | QA Contact: | yafu <yafu> | |
Severity: | urgent | Docs Contact: | ||
Priority: | urgent | |||
Version: | 8.1 | CC: | chhu, dyuan, jdenemar, phrdina, rbalakri, xuzhang, yalzhang | |
Target Milestone: | rc | |||
Target Release: | 8.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | libvirt-4.5.0-27.el8 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1724678 (view as bug list) | Environment: | ||
Last Closed: | 2019-11-05 20:50:27 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: | ||||
Bug Blocks: | 1724678 |
Description
Jiri Denemark
2019-06-21 06:52:15 UTC
Upstream commit: commit e0ce339c317306711a17253f363c19ac134e9763 Author: Pavel Hrdina <phrdina> Date: Fri Jun 21 09:18:11 2019 +0200 rpc: virnetlibsshsession: update deprecated functions Reproduced with libvirt-4.5.0-25.el8. Reproduced steps: Build libvirt-4.5.0-25 with libssh-0.9.0-1 #make rpm ... rpc/virnetlibsshsession.c: In function 'virNetLibsshCheckHostKey': rpc/virnetlibsshsession.c:290:5: error: 'ssh_is_server_known' is deprecated [-Werror=deprecated-declarations] state = ssh_is_server_known(sess->session); ^~~~~ In file included from rpc/virnetlibsshsession.c:24: /usr/include/libssh/libssh.h:560:31: note: declared here SSH_DEPRECATED LIBSSH_API int ssh_is_server_known(ssh_session session); ^~~~~~~~~~~~~~~~~~~ rpc/virnetlibsshsession.c:384:13: error: 'ssh_write_knownhost' is deprecated [-Werror=deprecated-declarations] if (ssh_write_knownhost(sess->session) < 0) { ^~ In file included from rpc/virnetlibsshsession.c:24: /usr/include/libssh/libssh.h:558:31: note: declared here SSH_DEPRECATED LIBSSH_API int ssh_write_knownhost(ssh_session session); ^~~~~~~~~~~~~~~~~~~ ... Verified with libvirt-4.5.0-30.el8 Test steps: Scenario 1: Build with libssh-0.9.0-1 1.Download libvirt-4.5.0-30.module+el8.1.0+3574+3a63752b.src.rpm 2.Install the src.rpm: #rpm -ivh libvirt-4.5.0-30.module+el8.1.0+3574+3a63752b.src.rpm 3.Apply patch libvirt-rpc-virnetlibsshsession-update-deprecated-functions.patch: #cd /root/rpmbuild/ && tar xvf libvirt-4.5.0.tar.xz #cd libvirt-4.5.0/ #patch -p1 < /root/rpmbuild/SOURCES/libvirt-rpc-virnetlibsshsession-update-deprecated-functions.patch 4.Build the source code and no libssh error: #automake #./autogen.sh #make rpm Scenario 2: Build with libssh-0.8.91-0.1 Test steps and expected results are the same with scenario 1. Hi, Pavel, When connect libvirtd with libssh, it reports error if no other service has created /root/.config dir before: # virsh -c qemu+libssh://yafu-70-118/system Accept SSH host key with hash '35:f3:f4:a2:11:b5:01:0e:12:d6:7e:57:4b:b0:45:98:21:80:a7:41' for host 'yafu-70-118:22' (y/n)?: y error: failed to connect to the hypervisor error: libssh transport error: failed to write known_host file '/root/.config/libvirt/known_hosts': Cannot create /root/.config/libvirt directory. Would you help to check whether it's a issue of libvirtd please? Thanks. Hi Yan, I was checking documentation for the API we use from libssh and it doesn't says anything how it creates the directory. If libssh is able to create the /root/.config/libvirt directory it should be probably able to create /root/.config as well so I would say this is most likely BUG in libssh. Try to create a new BZ for libssh and we will see what they think about it. Did you manage to hit the same issue with older libvirt where this BZ is not fixed? (In reply to Pavel Hrdina from comment #6) > Hi Yan, > > I was checking documentation for the API we use from libssh and it doesn't > says anything > how it creates the directory. If libssh is able to create the > /root/.config/libvirt > directory it should be probably able to create /root/.config as well so I > would say > this is most likely BUG in libssh. > > Try to create a new BZ for libssh and we will see what they think about it. > > Did you manage to hit the same issue with older libvirt where this BZ is not > fixed? File a bug for libssh: https://bugzilla.redhat.com/show_bug.cgi?id=1733914 And the issue can also be reproduced with libvirt-4.5.0-23.el8.x86_64. Move the bug to verified according to comment #4. 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-2019:3345 |