Bug 2104939 - Export OVA when using host with port other than 22
Summary: Export OVA when using host with port other than 22
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.5.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.5.2
: ---
Assignee: Dana
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-07 14:07 UTC by amashah
Modified: 2022-09-08 17:40 UTC (History)
7 users (show)

Fixed In Version: ovirt-engine-4.5.2.2
Doc Type: Enhancement
Doc Text:
With this release, OVA export or import works on hosts with a non-standard SSH port.
Clone Of:
Environment:
Last Closed: 2022-09-08 11:28:53 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github oVirt ovirt-engine pull 550/files 0 None None None 2022-07-24 09:22:46 UTC
Github oVirt ovirt-engine pull 560 0 None open add ssh port to inventory 2022-08-03 13:17:31 UTC
Red Hat Issue Tracker RHV-47010 0 None None None 2022-07-07 14:09:29 UTC
Red Hat Product Errata RHSA-2022:6393 0 None None None 2022-09-08 11:29:26 UTC

Description amashah 2022-07-07 14:07:56 UTC
Description of problem:
When attempted to export an OVA, in an environment where hosts are configured with a non-standard SSH port fail.

e.g. host is configured for SSH over port 1216

Version-Release number of selected component (if applicable):
4.5.0.7

How reproducible:
100%

Steps to Reproduce:
1. Add a host using SSH port other than 22
2. Try to export a VM as OVA


Actual results:

Export fails with:

~~~
2022-07-05 12:16:27,351+02 INFO  [org.ovirt.engine.core.bll.exportimport.ExportVmToOvaCommand] (default task-55) [e46a652c-2d4d-4b67-9aa5-ebd226aa2914] Lock Acquired to object 'EngineLock:{exclusiveLocks='[f51bc833-3b70-4b5f-9d68-60d98da5200f=VM]', sharedLocks=''}'
2022-07-05 12:16:30,616+02 WARN  [org.ovirt.engine.core.bll.exportimport.ExportVmToOvaCommand] (default task-55) [e46a652c-2d4d-4b67-9aa5-ebd226aa2914] Validation of action 'ExportVmToOva' failed for user xxxxxx. Reasons: VAR__ACTION__EXPORT,VAR__TYPE__VM,ACTION_TYPE_FAILED_INVALID_OVA_DESTINATION_FOLDER,$vdsName rhevh1.example.com,$directory /rhev/data-center/mnt/dlstorage:_data2_iso/ova
2022-07-05 12:16:30,616+02 INFO  [org.ovirt.engine.core.bll.exportimport.ExportVmToOvaCommand] (default task-55) [e46a652c-2d4d-4b67-9aa5-ebd226aa2914] Lock freed to object 'EngineLock:{exclusiveLocks='[f51bc833-3b70-4b5f-9d68-60d98da5200f=VM]', sharedLocks=''}'
2022-07-05 12:16:30,660+02 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-55) [] Operation Failed: [Cannot export VM. Invalid target folder: /rhev/data-center/mnt/dlstorage:_data2_iso/ova on Host rhevh1.example.com. You may refer to the engine.log file for further details.]
~~~

In /var/log/ovirt-engine/ova/
~~~
2022-07-05 12:16:30 CEST - TASK [python-ver-detect : Run import yaml on py3] ******************************
2022-07-05 12:16:30 CEST - {
  "uuid" : "40b894d7-88e0-449f-8d97-046f10861d52",
  "counter" : 6,
  "stdout" : "fatal: [rhevh1.example.com]: UNREACHABLE! => {\"changed\": false, \"msg\": \"Failed to connect to the host via ssh: ssh: connect to host rhevh1.example.com port 22: No route to host\", \"unreachable\": true}",
~~~


We can see it tries to reach the host over port 22, even though the host is configured with port 1216.


Expected results:

The export should work, and the playbook should use port 1216 (or whatever port the host is configured with)


Additional info:
This worked in 4.4, and broken in 4.5.
Possibly related to changes of BZ 2052690

Logs will be attached soon


Is there somewhere we can configure the port as a workaround?

Comment 2 Arik 2022-07-14 11:03:06 UTC
it doesn't seem to be specific to export-OVA, it would probably also affect the image-measure playbook
we better have the port set by infrastructure to cover everything

Comment 3 Martin Perina 2022-07-22 12:33:07 UTC
Dana, is this fixed by changes from BZ2096523?

Comment 4 Dana 2022-07-24 08:44:09 UTC
No, OVA commands sets the play variables in its designated classes
working on a fix now

Comment 7 Nisim Simsolo 2022-08-16 14:11:07 UTC
Verified:
ovirt-engine-4.5.2.2-0.1.el8ev
vdsm-4.50.2.2-1.el8ev.x86_64
libvirt-8.0.0-5.3.module+el8.6.0+16162+08e7975b.x86_64
qemu-kvm-6.2.0-11.module+el8.6.0+15668+464a1f31.2.x86_64

Verification scenario:
1. Add a host using SSH port other than 22
2. Export a VM as OVA
Verify VM exported as OVA successfully.
3. Import OVA.
Verify OVA imported successfully
4. Run VM.
Verify VM is running and functional.

Comment 11 errata-xmlrpc 2022-09-08 11:28:53 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 (Important: RHV Manager (ovirt-engine) [ovirt-4.5.2] bug fix and security update), 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-2022:6393


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