Accepting request 546125 from Cloud:Tools
- Add cloud-init-resize-ro-btrfs.patch + cc_resizefs fails if the current root is a read-only btrfs subvolume, use an always writeable subvolume instead [bsc#1042913] OBS-URL: https://build.opensuse.org/request/show/546125 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cloud-init?expand=0&rev=42
This commit is contained in:
commit
2041458081
20
cloud-init-resize-ro-btrfs.patch
Normal file
20
cloud-init-resize-ro-btrfs.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- cloudinit/config/cc_resizefs.py
|
||||||
|
+++ cloudinit/config/cc_resizefs.py 2017/11/27 11:55:37
|
||||||
|
@@ -59,7 +59,16 @@
|
||||||
|
|
||||||
|
|
||||||
|
def _resize_btrfs(mount_point, devpth):
|
||||||
|
- return ('btrfs', 'filesystem', 'resize', 'max', mount_point)
|
||||||
|
+# That btrfs utilities are using a path and not a device is bad,
|
||||||
|
+# because the subvolume specified by '/' could be read-only
|
||||||
|
+# and btrfs will wrongly fail. Correct fix would be to mount the
|
||||||
|
+# real root of the filesystem (subvolid=5) and resize that. But
|
||||||
|
+# using /.snapshots as workaround is Ok, too, since this is
|
||||||
|
+# normally writeable.
|
||||||
|
+ if mount_point == '/' and os.path.isdir("/.snapshots"):
|
||||||
|
+ return ('btrfs', 'filesystem', 'resize', 'max', '/.snapshots')
|
||||||
|
+ else:
|
||||||
|
+ return ('btrfs', 'filesystem', 'resize', 'max', mount_point)
|
||||||
|
|
||||||
|
|
||||||
|
def _resize_ext(mount_point, devpth):
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 27 13:21:13 CET 2017 - kukuk@suse.de
|
||||||
|
|
||||||
|
- Add cloud-init-resize-ro-btrfs.patch
|
||||||
|
+ cc_resizefs fails if the current root is a read-only btrfs
|
||||||
|
subvolume, use an always writeable subvolume instead [bsc#1042913]
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Nov 19 20:43:46 UTC 2017 - rjschwei@suse.com
|
Sun Nov 19 20:43:46 UTC 2017 - rjschwei@suse.com
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ Patch27: cloud-init-sysconfig-netpathfix.patch
|
|||||||
Patch29: datasourceLocalDisk.patch
|
Patch29: datasourceLocalDisk.patch
|
||||||
Patch34: cloud-init-tests-set-exec.patch
|
Patch34: cloud-init-tests-set-exec.patch
|
||||||
Patch35: cloud-init-final-no-apt.patch
|
Patch35: cloud-init-final-no-apt.patch
|
||||||
|
Patch36: cloud-init-resize-ro-btrfs.patch
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: filesystem
|
BuildRequires: filesystem
|
||||||
# pkg-config is needed to find correct systemd unit dir
|
# pkg-config is needed to find correct systemd unit dir
|
||||||
@ -211,6 +212,7 @@ Documentation and examples for cloud-init tools
|
|||||||
%patch29 -p0
|
%patch29 -p0
|
||||||
%patch34
|
%patch34
|
||||||
%patch35 -p1
|
%patch35 -p1
|
||||||
|
%patch36
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
Loading…
Reference in New Issue
Block a user