Bug 1601633 - If upgrading fails, the new LV should be removed in the RPM %post script
Summary: If upgrading fails, the new LV should be removed in the RPM %post script
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: imgbased
Classification: oVirt
Component: General
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.2.6
: ---
Assignee: Yuval Turgeman
QA Contact: Yaning Wang
URL:
Whiteboard:
Depends On:
Blocks: 1622025
TreeView+ depends on / blocked
 
Reported: 2018-07-16 23:18 UTC by Ryan Barry
Modified: 2021-09-09 15:04 UTC (History)
11 users (show)

Fixed In Version: imgbased-1.0.24
Doc Type: Bug Fix
Doc Text:
Cause: When upgrading an ovirt-node-ng image, imgbased creates LVs for the new layer and for some NIST partitions when necessary. If the upgrade fails, those LVs will remain on the system. Consequence: Trying to reapply an image-update rpm will fail on existing LVs Fix: imgbased registers every LV it creates in the upgrade process, so if it fails it will delete those stale LVs Result: No unused LVs are left on the system.
Clone Of:
Environment:
Last Closed: 2018-09-03 15:08:08 UTC
oVirt Team: Node
Embargoed:
rule-engine: ovirt-4.2+
cshao: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHV-43554 0 None None None 2021-09-09 15:04:38 UTC
oVirt gerrit 93164 0 master MERGED core: remove lvs after a failed upgrade 2018-08-07 05:46:50 UTC
oVirt gerrit 93545 0 ovirt-4.2 MERGED core: remove lvs after a failed upgrade 2018-08-08 12:55:10 UTC

Description Ryan Barry 2018-07-16 23:18:47 UTC
Description of problem:
If upgrading to the newest version of Node fails, the LV created to hold the new layer is left on the system.

This means that subsequent updates may fail (either because the new LV already exists, or because /etc remediation may copy problematic files from /etc to a newer layer)

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

How reproducible:
100%

Steps to Reproduce:
1. Fail an upgrade to a newer version of Node (unmounted but extant /var/crash, for example)

Actual results:
The new LV is present

Expected results:
The new LV should be removed on failure

Additional info:

Comment 1 Yaning Wang 2018-08-27 07:50:46 UTC
Verified Steps:

1. fresh install rhvh-4.2.3-20180531
2. umount /var/crash
3. upgrade to rhvh-4.2-20180815.0
4. upgrade failed

Actual results:

The new LV should be removed on failure

# imgbase w
You are on rhvh-4.2.3.1-0.20180531.0+1


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