| Summary: | [abrt] yum-3.4.3-106.fc19: subprocess.py:1308:_execute_child:OSError: [Errno 2] No such file or directory | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Stephen Degler <stephen> | ||||||||
| Component: | yum | Assignee: | Packaging Maintenance Team <packaging-team-maint> | ||||||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
| Severity: | unspecified | Docs Contact: | |||||||||
| Priority: | unspecified | ||||||||||
| Version: | 19 | CC: | admiller, ffesti, firas.alkafri, mb/redhat, packaging-team-maint, stephen, zpavlas | ||||||||
| Target Milestone: | --- | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | x86_64 | ||||||||||
| OS: | Unspecified | ||||||||||
| Whiteboard: | abrt_hash:a1d02c0dfe1558f2e7678baed61335cc9c290db8 | ||||||||||
| Fixed In Version: | yum-utils-1.1.31-18.fc19 | Doc Type: | Bug Fix | ||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2013-09-29 01:46:13 UTC | Type: | --- | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Attachments: |
|
||||||||||
Created attachment 801588 [details]
File: backtrace
Created attachment 801589 [details]
File: dso_list
Created attachment 801590 [details]
File: environ
Probably a missing dep, I hope this is good enough:
commit 3910e8712775e0de2ffd1a9859396f5b051b45a2
Author: Zdenek Pavlas <zpavlas>
Date: Mon Sep 23 14:36:04 2013 +0200
yum-plugin-fs-snapshot requires btrfs-progs
diff --git a/yum-utils.spec b/yum-utils.spec
index e22d692..6d6d699 100644
--- a/yum-utils.spec
+++ b/yum-utils.spec
@@ -350,6 +350,7 @@ repo. removes it (and can thus. be reinstalled/downgraded/etc.).
Summary: Yum plugin to automatically snapshot your filesystems during updates
Group: System Environment/Base
Requires: yum >= 3.2.22
+Requires: btrfs-progs
%description -n yum-plugin-fs-snapshot
When this plugin is installed it will automatically snapshot any
Ah, latest btrfs-progs *does not include btrfsctl* Whats the point of the fs sync? Is that needed or just paranoia? The following appears to work for me. % diff -u fs-snapshot.py /usr/lib/yum-plugins/fs-snapshot.py --- fs-snapshot.py 2013-09-23 18:34:37.488541760 -0400 +++ /usr/lib/yum-plugins/fs-snapshot.py 2013-09-23 18:26:46.497672471 -0400 - p = Popen(["/sbin/btrfsctl", "-c", mntpnt], stdout=PIPE, stderr=PIPE) - err = p.wait() - if err: - return 1 - p = Popen(["/sbin/btrfsctl", "-s", snapname, mntpnt], stdout=PIPE, stderr=PIPE) + #p = Popen(["/sbin/btrfsctl", "-c", mntpnt], stdout=PIPE, stderr=PIPE) + #err = p.wait() + #if err: + # return 1 + p = Popen(["/sbin/btrfs", "subvolume", "snapshot", mntpnt, snapname], stdout=PIPE, stderr=PIPE) It depends.. if the block cache is implemented on top of lvm (and it probably is, because that'd make it a bit faster), then we definitely *should* sync before snapshotting. All examples I've googled so far include the sync, so let's keep it. Could you just change "btrfsctl -c <mntpnt>" to "btrfs filesystem sync <mntpnt>"? If that works, I'd merge your patch. Thanks! Ok, here is the patch as requested, with function doc updated as well.
% diff -u fs-snapshot.py /usr/lib/yum-plugins/fs-snapshot.py
--- fs-snapshot.py 2013-09-23 18:34:37.488541760 -0400
+++ /usr/lib/yum-plugins/fs-snapshot.py 2013-09-24 10:39:52.993241471 -0400
@@ -198,9 +198,8 @@
"""
Runs the commands necessary for a snapshot. Basically its just
- btrfsctl -c /dir/to/snapshot #this syncs the fs
- btrfsctl -s /dir/to/snapshot/${snapshot_tag}
- /dir/to/snapshot
+ btrfs filesystem sync /dir/to/snapshot #this syncs the fs
+ btrfs subvolume snapshot /dir/to/snapshot /dir/to/snapshot/${snapshot_tag}
and then we're done.
"""
@@ -212,11 +211,11 @@
snapname = mntpnt + snapshot_tag
conduit.info(1, "fs-snapshot: snapshotting " + mntpnt + ": " + snapname)
- p = Popen(["/sbin/btrfsctl", "-c", mntpnt], stdout=PIPE, stderr=PIPE)
+ p = Popen(["/sbin/btrfs", "filesystem", "sync", mntpnt], stdout=PIPE, stderr=PIPE)
err = p.wait()
if err:
return 1
- p = Popen(["/sbin/btrfsctl", "-s", snapname, mntpnt], stdout=PIPE, stderr=PIPE)
+ p = Popen(["/sbin/btrfs", "subvolume", "snapshot", mntpnt, snapname], stdout=PIPE, stderr=PIPE)
err = p.wait()
if err:
return 1
yum-utils-1.1.31-18.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/yum-utils-1.1.31-18.fc19 Package yum-utils-1.1.31-18.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing yum-utils-1.1.31-18.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-17856/yum-utils-1.1.31-18.fc19 then log in and leave karma (feedback). yum-utils-1.1.31-18.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. *** Bug 1013377 has been marked as a duplicate of this bug. *** |
Description of problem: yum plugin fs snapshot Version-Release number of selected component: yum-3.4.3-106.fc19 Additional info: reporter: libreport-2.1.7 cmdline: /usr/bin/python /bin/yum -y upgrade executable: /bin/yum kernel: 3.11.1-200.fc19.x86_64.debug runlevel: N 5 type: Python uid: 0 Truncated backtrace: subprocess.py:1308:_execute_child:OSError: [Errno 2] No such file or directory Traceback (most recent call last): File "/bin/yum", line 29, in <module> yummain.user_main(sys.argv[1:], exit_code=True) File "/usr/share/yum-cli/yummain.py", line 316, in user_main errcode = main(args) File "/usr/share/yum-cli/yummain.py", line 219, in main return_code = base.doTransaction() File "/usr/share/yum-cli/cli.py", line 732, in doTransaction resultobject = self.runTransaction(cb=cb) File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1732, in runTransaction self.plugins.run('pretrans') File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 188, in run func(conduitcls(self, self.base, conf, **kwargs)) File "/usr/lib/yum-plugins/fs-snapshot.py", line 326, in pretrans_hook create_snapshots(conduit) File "/usr/lib/yum-plugins/fs-snapshot.py", line 316, in create_snapshots rc = _create_snapshot(conduit, snapshot_tag, volume) File "/usr/lib/yum-plugins/fs-snapshot.py", line 191, in _create_snapshot return _create_btrfs_snapshot(conduit, snapshot_tag, volume) File "/usr/lib/yum-plugins/fs-snapshot.py", line 215, in _create_btrfs_snapshot p = Popen(["/sbin/btrfsctl", "-c", mntpnt], stdout=PIPE, stderr=PIPE) File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__ errread, errwrite) File "/usr/lib64/python2.7/subprocess.py", line 1308, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory Local variables in innermost frame: errread: 56 c2pread: 31 gc_was_enabled: True errwrite: 57 shell: False errpipe_write: 59 executable: '/sbin/btrfsctl' close_fds: False self: <subprocess.Popen object at 0x6ec0710> env: None cwd: None child_exception: OSError(2, 'No such file or directory') args: ['/sbin/btrfsctl', '-c', '/'] c2pwrite: 55 data: 'cexceptions\nOSError\np0\n(I2\nS\'No such file or directory\'\np1\ntp2\nRp3\n(dp4\nS\'child_traceback\'\np5\nS\'Traceback (most recent call last):\\n File "/usr/lib64/python2.7/subprocess.py", line 1263, in _execute_child\\n os.execvp(executable, args)\\n File "/usr/lib64/python2.7/os.py", line 344, in execvp\\n _execvpe(file, args)\\n File "/usr/lib64/python2.7/os.py", line 368, in _execvpe\\n func(file, *argrest)\\nOSError: [Errno 2] No such file or directory\\n\'\np6\nsb.' creationflags: 0 errpipe_read: 58 preexec_fn: None p2cread: None startupinfo: None p2cwrite: None universal_newlines: False