Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1805179 - Mock does not work with LVM plugin when bootstrap enabled
Summary: Mock does not work with LVM plugin when bootstrap enabled
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Copr Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-20 12:45 UTC by Vít Ondruch
Modified: 2020-08-04 15:11 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-04 15:11:29 UTC
Type: Bug


Attachments (Terms of Use)
~/.config/mock.cfg (3.59 KB, text/plain)
2020-02-20 12:45 UTC, Vít Ondruch
no flags Details

Description Vít Ondruch 2020-02-20 12:45:01 UTC
Created attachment 1664355 [details]
~/.config/mock.cfg

Description of problem:
Mock does not run with LVM plugin together with bootstrap chroot. Simple rebuild command does not work:

~~~
$ mock -r fedora-rawhide-x86_64 rubygem-simple-rss-1.3.1-8.fc33.src.rpm
INFO: mock.py version 2.0 starting (python version = 3.8.1)...
Start(bootstrap): init plugins
INFO: selinux enabled
Finish(bootstrap): init plugins
Start: init plugins
INFO: selinux enabled
Finish: init plugins
INFO: Signal handler active
Start: run
INFO: Start(rubygem-simple-rss-1.3.1-8.fc33.src.rpm)  Config(fedora-rawhide-x86_64)
Start: clean chroot
ERROR: Exception(rubygem-simple-rss-1.3.1-8.fc33.src.rpm) Config(fedora-rawhide-x86_64) 0 minutes 0 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-x86_64/result
ERROR: no device file specified for mountpoint
Traceback (most recent call last):
  File "/usr/libexec/mock/mock", line 1026, in <module>
    exitStatus = main()
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 805, in main
    result = run_command(options, args, config_opts, commands, buildroot, state)
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 907, in run_command
    mockbuild.rebuild.do_rebuild(config_opts, commands, buildroot, options, args)
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.8/site-packages/mockbuild/rebuild.py", line 83, in do_rebuild
    rebuild_generic(srpms, commands, buildroot, config_opts, cmd=build,
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.8/site-packages/mockbuild/rebuild.py", line 23, in rebuild_generic
    commands.clean()
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.8/site-packages/mockbuild/backend.py", line 93, in clean
    self.buildroot.delete()
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.8/site-packages/mockbuild/buildroot.py", line 751, in delete
    self.plugins.call_hooks('postclean')
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.8/site-packages/mockbuild/plugin.py", line 78, in call_hooks
    hook(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/mockbuild/plugins/lvm_root.py", line 191, in hook_postclean
    self.delete_head()
  File "/usr/lib/python3.8/site-packages/mockbuild/plugins/lvm_root.py", line 181, in delete_head
    self.umount()
  File "/usr/lib/python3.8/site-packages/mockbuild/plugins/lvm_root.py", line 269, in umount
    self.prepare_mount()
  File "/usr/lib/python3.8/site-packages/mockbuild/plugins/lvm_root.py", line 263, in prepare_mount
    newmount = mounts.FileSystemMountPoint(mount.mountpath, self.fs_type,
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.8/site-packages/mockbuild/mounts.py", line 43, in __init__
    raise RuntimeError("no device file specified for mountpoint")
RuntimeError: no device file specified for mountpoint
~~~

See my config in attachement.


Version-Release number of selected component (if applicable):
$ rpm -q mock
mock-2.0-2.fc32.noarch


How reproducible:
Always


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
It seems that there is some interference with boostrap chroot. Adding `config_opts['use_bootstrap'] = False` into my config enables the mock to work again.

Comment 1 Vít Ondruch 2020-02-20 12:50:58 UTC
But the `--scrub=all` fails in similar fashion :/

~~~
$ mock -r fedora-rawhide-x86_64 --scrub=all
INFO: mock.py version 2.0 starting (python version = 3.8.1)...
Start(bootstrap): init plugins
INFO: selinux enabled
Finish(bootstrap): init plugins
Start: init plugins
INFO: selinux enabled
Finish: init plugins
INFO: Signal handler active
Start: run
Start: scrub ['all']
INFO: removing +mock.fedora-rawhide-x86_64.head volume
INFO: removing mock.fedora-rawhide-x86_64.postinit volume
INFO: deleted LVM cache thinpool
INFO: scrubbing everything for fedora-rawhide-x86_64
Finish: scrub ['all']
ERROR: no device file specified for mountpoint
Traceback (most recent call last):
  File "/usr/libexec/mock/mock", line 1026, in <module>
    exitStatus = main()
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 805, in main
    result = run_command(options, args, config_opts, commands, buildroot, state)
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/libexec/mock/mock", line 838, in run_command
    commands.scrub(options.scrub)
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.8/site-packages/mockbuild/backend.py", line 114, in scrub
    self.buildroot.delete()
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.8/site-packages/mockbuild/buildroot.py", line 741, in delete
    self.plugins.call_hooks('umount_root')
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.8/site-packages/mockbuild/plugin.py", line 78, in call_hooks
    hook(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/mockbuild/plugins/lvm_root.py", line 335, in hook_umount_root
    self.umount()
  File "/usr/lib/python3.8/site-packages/mockbuild/plugins/lvm_root.py", line 269, in umount
    self.prepare_mount()
  File "/usr/lib/python3.8/site-packages/mockbuild/plugins/lvm_root.py", line 263, in prepare_mount
    newmount = mounts.FileSystemMountPoint(mount.mountpath, self.fs_type,
  File "/usr/lib/python3.8/site-packages/mockbuild/trace_decorator.py", line 93, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.8/site-packages/mockbuild/mounts.py", line 43, in __init__
    raise RuntimeError("no device file specified for mountpoint")
RuntimeError: no device file specified for mountpoint
~~~

Comment 2 Vít Ondruch 2020-02-20 12:55:09 UTC
The strange thing is that although bootstrap is disabled, there are some `bootstrap` files left in the mock working directory:

~~~
$ ls -la /var/lib/mock/
total 12
drwxrwsr-x.  3 root mock 4096 Feb 20 13:53 .
drwxr-xr-x. 61 root root 4096 Dec 18 15:26 ..
-rw-rw-r--.  1 root mock    0 Feb 20 13:53 .lvm-mock.fedora-rawhide-x86_64-bootstrap.lock
-rw-rw-r--.  1 root mock    0 Feb 20 13:52 .lvm-mock.fedora-rawhide-x86_64.lock
-rw-rw-r--.  1 root mock    0 Feb 20 13:53 .lvm-pool-mock.fedora-rawhide-x86_64-bootstrap.lock
-rw-rw-r--.  1 root mock    0 Feb 20 13:52 .lvm-pool-mock.fedora-rawhide-x86_64.lock
drwxrwsr-x.  5 root mock 4096 Feb 20 13:52 fedora-rawhide-x86_64
~~~

Comment 3 Pavel Raiskup 2020-03-02 09:19:21 UTC
Thanks for the report!

https://github.com/rpm-software-management/mock/pull/504

Comment 4 Fedora Update System 2020-03-11 09:37:03 UTC
FEDORA-2020-e331425193 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2020-e331425193

Comment 5 Fedora Update System 2020-03-11 09:39:42 UTC
FEDORA-EPEL-2020-5a84e15907 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-5a84e15907

Comment 6 Fedora Update System 2020-03-11 09:39:56 UTC
FEDORA-EPEL-2020-88ef4b4d66 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-88ef4b4d66

Comment 7 Fedora Update System 2020-03-12 18:49:23 UTC
mock-2.1-1.fc32, mock-core-configs-32.4-1.fc32 has been pushed to the Fedora 32 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-2020-d32d395e18

Comment 8 Fedora Update System 2020-03-12 22:25:44 UTC
mock-2.1-1.el8, mock-core-configs-32.4-1.el8 has been pushed to the Fedora EPEL 8 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-2020-5a84e15907

Comment 9 Fedora Update System 2020-03-12 22:53:36 UTC
mock-2.1-1.fc30, mock-core-configs-32.4-1.fc30 has been pushed to the Fedora 30 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-2020-e331425193

Comment 10 Fedora Update System 2020-03-12 22:59:16 UTC
mock-2.1-1.fc31, mock-core-configs-32.4-1.fc31 has been pushed to the Fedora 31 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-2020-d952a70712

Comment 11 Fedora Update System 2020-03-12 23:31:43 UTC
mock-2.1-1.el7, mock-core-configs-32.4-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-2020-88ef4b4d66

Comment 12 Fedora Admin XMLRPC Client 2020-03-17 04:43:14 UTC
This package has changed maintainer in the Fedora.
Reassigning to the new maintainer of this component.

Comment 13 Fedora Update System 2020-03-19 00:50:06 UTC
mock-2.1-1.fc32, mock-core-configs-32.4-1.fc32 has been pushed to the Fedora 32 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2020-03-19 01:44:24 UTC
mock-2.1-1.fc31, mock-core-configs-32.4-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2020-03-26 16:24:12 UTC
FEDORA-EPEL-2020-88ef4b4d66 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-88ef4b4d66

Comment 16 Fedora Update System 2020-03-27 08:02:07 UTC
FEDORA-EPEL-2020-5a84e15907 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-5a84e15907

Comment 17 Fedora Update System 2020-03-27 10:41:21 UTC
FEDORA-2020-e331425193 has been pushed to the Fedora 30 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 18 Fedora Update System 2020-03-27 13:23:15 UTC
FEDORA-EPEL-2020-5a84e15907 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-5a84e15907

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 19 Fedora Update System 2020-03-27 13:40:07 UTC
FEDORA-EPEL-2020-88ef4b4d66 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-88ef4b4d66

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 20 Fedora Update System 2020-04-02 07:53:37 UTC
FEDORA-EPEL-2020-5a84e15907 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-5a84e15907

Comment 21 Fedora Update System 2020-04-02 07:54:58 UTC
FEDORA-EPEL-2020-88ef4b4d66 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-88ef4b4d66

Comment 22 Fedora Update System 2020-04-03 20:19:54 UTC
FEDORA-EPEL-2020-5a84e15907 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-5a84e15907

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 23 Fedora Update System 2020-04-03 21:18:24 UTC
FEDORA-EPEL-2020-88ef4b4d66 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-88ef4b4d66

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 24 Fedora Update System 2020-05-05 05:46:29 UTC
FEDORA-EPEL-2020-5a84e15907 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 25 Fedora Update System 2020-05-05 07:17:27 UTC
FEDORA-EPEL-2020-88ef4b4d66 has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, 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.