Description of problem: ovirt-node-upgrade is used when RHEV-M is used for upgrading a RHEV-H. It works by copying an iso to the rhevh host and the passing it to ovirt-node-upgrade. To catch the case where the iso get's corrupted while beeing copied from rhevm to rhevh, checkisomd5 should be run as part of the upgrade process. Version-Release number of selected component (if applicable): 3.5 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
The reason for this RFE is that we had cases where the ISO used for upgrading got corrupted while being copied from RHEV-M to RHEV-H, possibly due to network problems. This RFE can be tested by: 1. Install rhevh iso rpm on Engine 1.a Corrupt the iso on the engine using: dd if=/dev/urandom bs=1c count=1 conv=notrunc seek=$RANDOM of=<rhevh-iso-filename> 1.b Verify that the iso is corrupted by running: checkisomd5 <rhevh-iso-filename> (it should FAIL) 2. Start the upgrade 3. The upgrade should fail, noting that the iso is corrupted
Hi QE, Below the sanity test from the patch testing, please also trigger the upgrade from RHEV-M during the official tests, it should go without any issue as it calls the ovirt-node-upgrade tool. # cat /etc/redhat-release oVirt Node Hypervisor 3.5 (0.999.201504271901.el6) Generating bad iso as Fabian pointed in comment#1 =================================================== dd if=/dev/urandom bs=1c count=1 conv=notrunc seek=12345 of=ovirt-node-bad.iso Scenario 1 - failing in the upgrade ============================================ # ovirt-node-upgrade.py --reboot=0 --iso=./ovirt-node-bad.iso ovirt-node-upgrade.UpgradeTool: INFO Temporary Directory is: /data/tmp9sPdaD ovirt-node-upgrade.LockFile: INFO Acquiring Lock ovirt-node-upgrade.UpgradeTool: INFO Checking iso md5 ovirt-node-upgrade.UpgradeTool: ERROR Error: Upgrade Failed: Command Failed: '('checkisomd5', './1ovirt-node-apr23.iso')' [u'Press [Esc] to abort check.'] Traceback (most recent call last): File "./ovirt-node-upgrade.py", line 368, in run self._checkisomd5(self._options.iso_file) File "./ovirt-node-upgrade.py", line 323, in _checkisomd5 self._system("checkisomd5", isofile) File "./ovirt-node-upgrade.py", line 145, in _system raise RuntimeError("Command Failed: '%s' %s" % (command, output)) RuntimeError: Command Failed: '('checkisomd5', './1ovirt-node-apr23.iso')' [u'Press [Esc] to abort check.'] ovirt-node-upgrade.UpgradeTool: INFO Running rollback hooks ovirt-node-upgrade.UpgradeTool: INFO rollback hooks completed ovirt-node-upgrade.UpgradeTool: INFO Warning: /data/tmp9sPdaD/rootfs/usr/libexec/ovirt-node/hooks/rollback does not exist ovirt-node-upgrade.UpgradeTool: INFO Upgrade Failed, Rollback Completed ovirt-node-upgrade.UpgradeTool: INFO Cleaning up temporary directory ovirt-node-upgrade.UpgradeTool: WARNING Cleanup Failed Scenario 2 - ISO OK ========================= # python ./ovirt-node-upgrade.py --reboot=0 --iso=./ovirt-node.iso ovirt-node-upgrade.UpgradeTool: INFO Temporary Directory is: /data/tmpSK3qZw ovirt-node-upgrade.LockFile: INFO Acquiring Lock ovirt-node-upgrade.UpgradeTool: INFO Checking iso md5 ^^^^^ <--- new item ovirt-node-upgrade.UpgradeTool: INFO Running pre-upgrade hooks ovirt-node-upgrade.UpgradeTool: INFO pre-upgrade hooks completed ovirt-node-upgrade.UpgradeTool: INFO Running pre-upgrade hooks ovirt-node-upgrade.UpgradeTool: INFO pre-upgrade hooks completed ovirt-node-upgrade.UpgradeTool: INFO hooks: False ovirt-node-upgrade.UpgradeTool: INFO Installing Bootloader ovirt-node-upgrade.UpgradeTool: INFO Running post-upgrade hooks ovirt-node-upgrade.UpgradeTool: INFO post-upgrade hooks completed ovirt-node-upgrade.UpgradeTool: INFO Running post-upgrade hooks ovirt-node-upgrade.UpgradeTool: INFO post-upgrade hooks completed ovirt-node-upgrade.UpgradeTool: INFO Upgrade Completed ovirt-node-upgrade.UpgradeTool: INFO Cleaning up temporary directory
Test version: rhev-hypervisor7-7.2-20151025.0.el7ev ovirt-node-3.3.0-0.18.20151022git82dc52c.el7ev.noarch Test steps: Scenario1: 1. Clean install rhev-hypervisor7-7.2-20151025.0.el7ev 2. Drop to shell and run #dd if=/dev/urandom bs=1c count=1 conv=notrunc seek=12345 of=ovirt-node-bad.iso # ovirt-node-upgrade --reboot=0 --iso=ovirt-node-bad.iso Test result: 1. # ovirt-node-upgrade --reboot=0 --iso=ovirt-node-bad.iso ovirt-node-upgrade.UpgradeTool: INFO Temporary Directory is: /data/tmp0hDi82 ovirt-node-upgrade.LockFile: INFO Acquiring Lock ovirt-node-upgrade.UpgradeTool: INFO Checking iso md5 ovirt-node-upgrade.UpgradeTool: ERROR Error: Upgrade Failed: Command Failed: '('checkisomd5', 'ovirt-node-bad.iso')' [u'Press [Esc] to abort check.'] Traceback (most recent call last): File "/sbin/ovirt-node-upgrade", line 368, in run self._checkisomd5(self._options.iso_file) File "/sbin/ovirt-node-upgrade", line 323, in _checkisomd5 self._system("checkisomd5", isofile) File "/sbin/ovirt-node-upgrade", line 145, in _system raise RuntimeError("Command Failed: '%s' %s" % (command, output)) RuntimeError: Command Failed: '('checkisomd5', 'ovirt-node-bad.iso')' [u'Press [Esc] to abort check.'] ovirt-node-upgrade.UpgradeTool: INFO Running rollback hooks ovirt-node-upgrade.UpgradeTool: INFO rollback hooks completed ovirt-node-upgrade.UpgradeTool: INFO Warning: /data/tmp0hDi82/rootfs/usr/libexec/ovirt-node/hooks/rollback does not exist ovirt-node-upgrade.UpgradeTool: INFO Upgrade Failed, Rollback Completed ovirt-node-upgrade.UpgradeTool: INFO Cleaning up temporary directory ovirt-node-upgrade.UpgradeTool: WARNING Cleanup Failed Scenario2: 1. Copy a create iso to rhevh first 2. # ovirt-node-upgrade --reboot=0 --iso=rhevh-7.2-20151025.0.el7ev.iso Test result: 1. Upgrade succeed. So this issue is fixed in ovirt-node-3.3.0-0.18.20151022git82dc52c.el7ev.noarch. Change the status to verified.
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://rhn.redhat.com/errata/RHBA-2016-0378.html