Bug 1421732 - imgbase base --remove does not remove child layers
Summary: imgbase base --remove does not remove child layers
Keywords:
Status: CLOSED DUPLICATE of bug 1419535
Alias: None
Product: ovirt-node
Classification: oVirt
Component: General
Version: 4.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ovirt-4.1.2
: ---
Assignee: Yuval Turgeman
QA Contact: cshao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-13 14:45 UTC by Roman Hodain
Modified: 2017-02-14 08:07 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1421699
Environment:
Last Closed: 2017-02-14 08:07:22 UTC
oVirt Team: Node
Embargoed:
rule-engine: ovirt-4.1?
rhodain: planning_ack?
rhodain: devel_ack?
cshao: testing_ack+


Attachments (Terms of Use)
lvs taken before the removal (1.50 KB, text/plain)
2017-02-13 14:46 UTC, Roman Hodain
no flags Details
lvs taken after the removal (1.38 KB, text/plain)
2017-02-13 14:47 UTC, Roman Hodain
no flags Details
imgbase debug logs (999 bytes, text/plain)
2017-02-13 14:47 UTC, Roman Hodain
no flags Details

Description Roman Hodain 2017-02-13 14:45:38 UTC
Description of problem:

    imgbase base --remove=<BASE> doe not remove child layers.

Version-Release number of selected component (if applicable):
    imgbased-0.8.11-0.1.el7ev.noarch

How reproducible:
    100%

Steps to Reproduce:
    1. imgbase base --remove=<BASE>

Actual results:
Child layer is not removed and other commands fails due to this inconsistency:

     # imgbase --debug base --remove=rhvh-4.0-0.20161116.0

     # imgbase base --latest
            Traceback (most recent call last):
            File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
                "__main__", fname, loader, pkg_name)
            File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
                exec code in run_globals
            File "/usr/lib/python2.7/site-packages/imgbased/__main__.py", line 51, in <module>
                CliApplication()
            File "/usr/lib/python2.7/site-packages/imgbased/__init__.py", line 82, in CliApplication
                app.hooks.emit("post-arg-parse", args)
            File "/usr/lib/python2.7/site-packages/imgbased/hooks.py", line 120, in emit
                cb(self.context, *args)
            File "/usr/lib/python2.7/site-packages/imgbased/plugins/core.py", line 137, in post_argparse
                print(app.imgbase.latest_base())
            File "/usr/lib/python2.7/site-packages/imgbased/imgbase.py", line 322, in latest_base
                return self.naming.last_base()
            File "/usr/lib/python2.7/site-packages/imgbased/naming.py", line 62, in last_base
                bases = self.bases()
            File "/usr/lib/python2.7/site-packages/imgbased/naming.py", line 50, in bases
                bases = sorted(self.tree())
            File "/usr/lib/python2.7/site-packages/imgbased/naming.py", line 224, in tree
                bases[img.base.nvr].layers.append(img)
            KeyError: <NVR rhvh-4.0-0.20161116.0 />


Expected results:
    The base is removed including its layers

Comment 1 Roman Hodain 2017-02-13 14:46:46 UTC
Created attachment 1249875 [details]
lvs taken before the removal

Comment 2 Roman Hodain 2017-02-13 14:47:12 UTC
Created attachment 1249876 [details]
lvs taken after the removal

Comment 3 Roman Hodain 2017-02-13 14:47:41 UTC
Created attachment 1249877 [details]
imgbase debug logs

Comment 4 cshao 2017-02-14 06:57:15 UTC
QE can reproduce this issue.

Comment 5 Yuval Turgeman 2017-02-14 08:07:22 UTC

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


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