Bug 1446297 - "--scrub all" does not remove the bootsrap volume
Summary: "--scrub all" does not remove the bootsrap volume
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-27 15:34 UTC by Vít Ondruch
Modified: 2017-07-06 05:19 UTC (History)
6 users (show)

Fixed In Version: mock-1.4.2-1.fc26 mock-1.4.2-1.fc25 mock-1.4.2-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-25 16:19:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Vít Ondruch 2017-04-27 15:34:44 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Vít Ondruch 2017-04-27 16:20:33 UTC
Sorry, accidentally submitted ...

Description of problem:
Using LVM backend, the "--scrub all" option leaves the bootstrap volume behind.

~~~
$ cat ~/.config/mock.cfg 
# By default Mock use simple chroot(1). When you set this to True
# it will use systemd-nspawn(1)
config_opts['use_nspawn'] = True
# If you're using nspawn, then by default networking will be turned off
# for rpmbuild.  This helps ensure more reproducible builds.
config_opts['rpmbuild_networking'] = True


# if you want to speed up the package installation and the build process, mock
# can use nosync library to skip fsync and related calls from programs called
# from within mock. It needs nosync library to be installed and for multilib
# target, it requires both architectures of nosync to be present. If these
# conditions aren't met, it won't be enabled
config_opts['nosync'] = True


config_opts['plugin_conf']['root_cache_enable'] = False


# lvm_root plugin is not enabled by default and is distributed in separate
# subpackage mock-lvm. If you want to use it, it's recommended to disable the
# root_cache plugin, otherwise you'd be caching twice.
config_opts['plugin_conf']['lvm_root_enable'] = True
# config_opts['plugin_conf']['lvm_root_opts'] = {}
# You need to give it a volume group with sufficient space. It won't touch any
# of the existing logical volumes, so you can use the same volume group you use
# for other purposes. It requires a name of the VG (not device path).
# config_opts['plugin_conf']['lvm_root_opts']['volume_group'] = 'my_vg'
# You need to specify the size that will mock's thinpool occupy. For regular
# packages with small set of dependencies, 2G should suffice. For large packages
# such as libreoffice, you should set it to at least 5 GB otherwise you may run
# out of space and the build process will be blocked
# config_opts['plugin_conf']['lvm_root_opts']['size'] = '2G'
# You can specify alternative pool metadata size, format is the same as size.
# Default value is determined by lvcreate based on size
# config_opts['plugin_conf']['lvm_root_opts']['poolmetadatasize'] = None
# When thin pool utilization is over 90% mock will refuse to continue.
# Because once it reach 100% utilization weird things will happens.
# config_opts['plugin_conf']['lvm_root_opts']['check_size'] = True
config_opts['plugin_conf']['lvm_root_opts'] = {
    'volume_group': 'vg_fedora',
    'size': '20G',
    'pool_name': 'mock',
}


$ mock -r rhel-6-x86_64 --init 
INFO: mock.py version 1.4.1 starting (python version = 3.6.1)...

... snip ...

Mock Version: 1.4.1
INFO: Mock Version: 1.4.1
Finish: chroot init
Finish: run

$ mock -r rhel-6-x86_64 --scrub all
INFO: mock.py version 1.4.1 starting (python version = 3.6.1)...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
Start: scrub ['all']
INFO: removing +mock.rhel-6-x86_64.head volume
INFO: removing mock.rhel-6-x86_64.postinit volume
INFO: scrubbing everything for rhel-6-x86_64
Finish: scrub ['all']
Finish: run


$ sudo lvs | grep mock.rhel-6
  mock.rhel-6-x86_64-bootstrap.postinit       vg_fedora Vwi---tz-k 20,00g mock  
~~~



Version-Release number of selected component (if applicable):
$ rpm -q mock
mock-1.4.1-1.fc27.noarch

Comment 2 Miroslav Suchý 2017-05-05 10:26:37 UTC
Fixed in commits:
* e7c79eb (HEAD -> devel, origin/devel) call plugins of bootstrap when it has sense
* ca9bcc8 call scrub hook for bootstrap chroot too [RHBZ#1446297]

Comment 3 Fedora Update System 2017-06-19 07:12:27 UTC
mock-1.4.2-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-21b345dd60

Comment 4 Fedora Update System 2017-06-19 07:13:27 UTC
mock-1.4.2-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-3d88d9f8b5

Comment 5 Fedora Update System 2017-06-19 07:14:20 UTC
mock-1.4.2-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-65be829503

Comment 6 Fedora Update System 2017-06-19 14:52:36 UTC
mock-1.4.2-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-65be829503

Comment 7 Fedora Update System 2017-06-19 15:52:09 UTC
mock-1.4.2-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-21b345dd60

Comment 8 Fedora Update System 2017-06-19 19:24:22 UTC
mock-1.4.2-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-3d88d9f8b5

Comment 9 Fedora Update System 2017-06-25 16:19:33 UTC
mock-1.4.2-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2017-07-04 01:51:30 UTC
mock-1.4.2-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2017-07-06 05:19:06 UTC
mock-1.4.2-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


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