Bug 1469909

Summary: HE upgrade (3.6->4.0) fails with Permission denied on NFS
Product: [oVirt] ovirt-hosted-engine-setup Reporter: Roman Hodain <rhodain>
Component: Plugins.NFSAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED DUPLICATE QA Contact: meital avital <mavital>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.1.3CC: bugs, dfediuck, didi, rhodain
Target Milestone: ---Flags: rhodain: planning_ack?
rhodain: devel_ack?
rhodain: testing_ack?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-13 09:27:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roman Hodain 2017-07-12 05:22:03 UTC
Description of problem:
When upgrading hosted engine 3.6 to 4.0 appliance by running

    hosted-engine --upgrade-appliance

Installation fails with 

    [ ERROR ] Failed to execute stage 'Misc configuration': /rhev/data-center/mnt/rhodain-rhel7-36-upgrade.sbr-virt.gsslab.brq.redhat.com:_mnt_hesd/69f996c8-a955-4fb7-88b5-0e14fe9d4007/images/c6bdbd64-e7f1-4ce8-ac3a-194bf6d07158/cae51e67-bbf9-4637-98b0-7c94e1cb288c: Permission denied


Version-Release number of selected component (if applicable):
    ovirt-hosted-engine-setup-2.1.3.3-1.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install 3.6 HE on NFS and do not set no_root_squash or any other user ID modification
    /mount/point	*(rw)
2. Start upgrade
    hosted-engine --upgrade-appliance

Actual results:
2017-07-11 15:58:01 INFO otopi.plugins.gr_he_common.vm.boot_disk boot_disk.commit:221 Injecting engine backup
2017-07-11 15:58:01 DEBUG otopi.context context._executeMethod:142 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/otopi/context.py", line 132, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/gr-he-common/vm/boot_disk.py", line 788, in _misc
    ohostedcons.Upgrade.BACKUP_FILE
  File "/usr/lib/python2.7/site-packages/otopi/transaction.py", line 156, in __exit__
    self.commit()
  File "/usr/lib/python2.7/site-packages/otopi/transaction.py", line 148, in commit
    element.commit()
  File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/gr-he-common/vm/boot_disk.py", line 222, in commit
    self._injectBackup()
  File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/gr-he-common/vm/boot_disk.py", line 157, in _injectBackup
    g.add_drive_opts(filename=destination, format='raw', readonly=0)
  File "/usr/lib64/python2.7/site-packages/guestfs.py", line 559, in add_drive
    r = libguestfsmod.add_drive (self._o, filename, readonly, format, iface, name, label, protocol, server, username, secret, cachemode, discard, copyonread)
RuntimeError: /rhev/data-center/mnt/rhodain-rhel7-36-upgrade.sbr-virt.gsslab.brq.**FILTERED**.com:_mnt_hesd/69f996c8-a955-4fb7-88b5-0e14fe9d4007/images/c6bdbd64-e7f1-4ce8-ac3a-194bf6d07158/cae51e67-bbf9-4637-98b0-7c94e1cb288c: Permission denied
2017-07-11 15:58:01 ERROR otopi.context context._executeMethod:151 Failed to execute stage 'Misc configuration': /rhev/data-center/mnt/rhodain-rhel7-36-upgrade.sbr-virt.gsslab.brq.**FILTERED**.com:_mnt_hesd/69f996c8-a955-4fb7-88b5-0e14fe9d4007/images/c6bdbd64-e7f1-4ce8-ac
3a-194bf6d07158/cae51e67-bbf9-4637-98b0-7c94e1cb288c: Permission denied


Expected results:
All operations on the HE SD are done via userid/groupid 36/36

Comment 3 Roman Hodain 2017-07-12 05:28:15 UTC
The system which was used is nested is running as nested virtualization and the HE SD is located the same system to make the testing easier, but it should not have any impact to the result.

Comment 4 Yedidyah Bar David 2017-07-13 09:23:52 UTC
Seems like a duplicate of bug 1467813, no?

Comment 5 Doron Fediuck 2017-07-13 09:27:23 UTC
(In reply to Yedidyah Bar David from comment #4)
> Seems like a duplicate of bug 1467813, no?

root_squash is the default on RHEL, which means this is indeed a duplicate issue.
Marking accordingly.

*** This bug has been marked as a duplicate of bug 1467813 ***

Comment 6 Roman Hodain 2017-07-18 13:02:03 UTC
Yes it is