Bug 1513481

Summary: uploading iso to glusterfs via ssh fails
Product: [oVirt] ovirt-iso-uploader Reporter: Jiri Belka <jbelka>
Component: CoreAssignee: Denis Chaplygin <dchaplyg>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: bugs, dchaplyg, jbelka, lsvaty, lveyde, sabose
Target Milestone: ovirt-4.2.2Flags: sabose: ovirt-4.2?
sabose: planning_ack?
rule-engine: devel_ack+
lsvaty: testing_ack+
Target Release: 4.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-iso-uploader-4.2.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-29 10:57:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Gluster RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1460704    

Description Jiri Belka 2017-11-15 14:03:01 UTC
Description of problem:

# ovirt-iso-uploader -vvv --iso-domain=testiso --user=admin@internal -k /etc/pki/ovirt-engine/keys/engine_id_rsa --ssh-user=root upload test.iso
Please provide the REST API password for the admin@internal oVirt Engine user (CTRL+D to abort): 
DEBUG: API Vendor(ovirt.org)    API Version(4.2.0)
DEBUG: id=3623a079-e7d5-4820-ad25-52e1adac7e8c address=brq-gluster01.example.com path=/testiso
Uploading, please wait...
INFO: Start uploading test.iso 
DEBUG: file (test.iso)
DEBUG: /usr/bin/ssh -p 22 -i /etc/pki/ovirt-engine/keys/engine_id_rsa  root.com "/usr/bin/test -e /testiso/3623a079-e7d5-4820-ad25-52e1adac7e8c/images/11111111-1111-1111-1111-111111111111/test.iso"
DEBUG: /usr/bin/ssh -p 22 -i /etc/pki/ovirt-engine/keys/engine_id_rsa  root.com "/usr/bin/test -e /testiso/3623a079-e7d5-4820-ad25-52e1adac7e8c/images/11111111-1111-1111-1111-111111111111/test.iso"
DEBUG: _cmds(['/usr/bin/ssh', '-p', '22', '-i', '/etc/pki/ovirt-engine/keys/engine_id_rsa', 'root.com', '/usr/bin/test -e /testiso/3623a079-e7d5-4820-ad25-52e1adac7e8c/images/11111111-1111-1111-1111-111111111111/test.iso'])
DEBUG: returncode(1)
DEBUG: STDOUT()
DEBUG: STDERR()
DEBUG: exists returning false
DEBUG: Mount point size test command is (/usr/bin/ssh -p 22 -i /etc/pki/ovirt-engine/keys/engine_id_rsa  root.com "/usr/bin/python -c 'import os; dir_stat = os.statvfs(\"/testiso\"); print (dir_stat.f_bavail * dir_stat.f_frsize)'" )
DEBUG: /usr/bin/ssh -p 22 -i /etc/pki/ovirt-engine/keys/engine_id_rsa  root.com "/usr/bin/python -c 'import os; dir_stat = os.statvfs(\"/testiso\"); print (dir_stat.f_bavail * dir_stat.f_frsize)'" 
DEBUG: _cmds(['/usr/bin/ssh', '-p', '22', '-i', '/etc/pki/ovirt-engine/keys/engine_id_rsa', 'root.com', '/usr/bin/python -c \'import os; dir_stat = os.statvfs("/testiso"); print (dir_stat.f_bavail * dir_stat.f_frsize)\''])
DEBUG: returncode(1)
DEBUG: STDOUT()
DEBUG: STDERR(Traceback (most recent call last):
  File "<string>", line 1, in <module>
OSError: [Errno 2] No such file or directory: '/testiso'
)
ERROR: Unable to copy test.iso to ISO storage domain on testiso.
ERROR: Error message is "unable to test the available space on /testiso"

# gluster volume info testiso | grep '^Brick[[:digit:]]:'
Brick1: brq-gluster01.example.com:/data/testiso/brick1/brick
Brick2: brq-gluster02.example.com:/data/testiso/brick1/brick
Brick3: brq-gluster03.example.com:/data/testiso/brick1/brick (arbiter)

Version-Release number of selected component (if applicable):
ovirt-iso-uploader-4.1.0-0.0.master.20171106130347.git64c591e.el7.centos.noarch

How reproducible:
100%

Steps to Reproduce:
1. ovirt-iso-uploader -vvv --iso-domain=testiso --user=admin@internal -k /etc/pki/ovirt-engine/keys/engine_id_rsa --ssh-user=root upload $isofile
2.
3.

Actual results:
failure, bad understanding what is path of glusterfs-based iso domain

Expected results:
either should work correctly or should not be supported - ssh && glusterfs

Additional info:
copy engine ssh pub key to all glusterfs bricks hosts

Comment 1 Denis Chaplygin 2017-11-16 13:31:54 UTC
IIRC it have special support for gluster, so why would you need sshd?

Comment 2 Jiri Belka 2017-11-16 14:24:50 UTC
(In reply to Denis Chaplygin from comment #1)
> IIRC it have special support for gluster, so why would you need sshd?

nothing prevents me to type it like that.

Comment 3 Denis Chaplygin 2017-11-16 15:02:51 UTC
Gluster is a very special to be used in that way, so we probably need to disable ssh support on gluster backed ISO domains.

Comment 4 Sandro Bonazzola 2017-11-17 08:16:50 UTC
(In reply to Denis Chaplygin from comment #3)
> Gluster is a very special to be used in that way, so we probably need to
> disable ssh support on gluster backed ISO domains.

ACK
iso uploader should fail if specified iso domain is gluster and ssh option is set. A meaningful error should also be printed.

Comment 5 Sandro Bonazzola 2018-01-31 09:20:40 UTC
Moving to 4.2.2, it didn't get into 4.2.1

Comment 6 Jiri Belka 2018-02-21 15:36:52 UTC
ok, ovirt-iso-uploader-4.2.0-1.el7ev.noarch

# ovirt-iso-uploader --iso-domain=jbelka-iso --user=admin@internal -k /etc/pki/ovirt-engine/keys/engine_id_rsa --ssh-user=root upload install62.iso 
Please provide the REST API password for the admin@internal oVirt Engine user (CTRL+D to abort): 
ERROR: ssh upload is not compatible with glusterfs iso domain
INFO: Use the -h option to see usage.

Comment 7 Sandro Bonazzola 2018-03-29 10:57:02 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

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