Merge lp:~saviq/cloud-initramfs-tools/nfs-support into lp:cloud-initramfs-tools

Proposed by Michał Sawicz
Status: Rejected
Rejected by: Scott Moser
Proposed branch: lp:~saviq/cloud-initramfs-tools/nfs-support
Merge into: lp:cloud-initramfs-tools
Diff against target: 79 lines (+44/-0)
2 files modified
overlayroot/etc/overlayroot.conf (+13/-0)
overlayroot/scripts/init-bottom/overlayroot (+31/-0)
To merge this branch: bzr merge lp:~saviq/cloud-initramfs-tools/nfs-support
Reviewer Review Type Date Requested Status
cloud-initramfs-tools Pending
Review via email: mp+157542@code.launchpad.net

Commit message

add NFS support to overlayroot

Description of the change

This adds support for NFS-backed overlayroot

Configuration:

overlayroot=nfs:host=10.0.0.1,path=/srv/nfs-overlay

This suffers from bug #1039402 unfortunately, so it's not really workable until the bug is fixed.

To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote :

Michał,
  Thanks for this. It generally looks fine to me. I'm OK to pull it into trunk, my only concern is bug 1039402.
  As I understand it, this is pretty much entirely broken without that bug fix in the kernel, right?

  If so, I'm just weary of pulling in code that is effectively "known broken". I'm not entirely opposed, especially if there is evidence that the kernel issue will be fixed. I'd definitely hold off on including it in ubuntu before raring release though.

  Thoughts?

Revision history for this message
Michał Sawicz (saviq) wrote :

W dniu 09.04.2013 16:05, Scott Moser pisze:
> Michał,
> Thanks for this. It generally looks fine to me. I'm OK to pull it into trunk, my only concern is bug 1039402.
> As I understand it, this is pretty much entirely broken without that bug fix in the kernel, right?

More or less, mounting with server-side locking supposedly helps, but
you can't actually mount it like that in initramfs, and I couldn't
remount later, so yeah.

> If so, I'm just weary of pulling in code that is effectively "known broken". I'm not entirely opposed, especially if there is evidence that the kernel issue will be fixed. I'd definitely hold off on including it in ubuntu before raring release though.
>
> Thoughts?

Perfectly agree. I mostly put it out there to get a feel whether I'm
getting anywhere with this. Holding off until the bug is fixed is perfect.

Thanks!
--
Michał Sawicz <email address hidden>
Canonical Services Ltd.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

On Tue, Apr 9, 2013 at 2:13 PM, Michał Sawicz
<email address hidden> wrote:
> W dniu 09.04.2013 16:05, Scott Moser pisze:
>> Michał,
>> Thanks for this. It generally looks fine to me. I'm OK to pull it into trunk, my only concern is bug 1039402.
>> As I understand it, this is pretty much entirely broken without that bug fix in the kernel, right?
>
> More or less, mounting with server-side locking supposedly helps, but
> you can't actually mount it like that in initramfs, and I couldn't
> remount later, so yeah.
>
>> If so, I'm just weary of pulling in code that is effectively "known broken". I'm not entirely opposed, especially if there is evidence that the kernel issue will be fixed. I'd definitely hold off on including it in ubuntu before raring release though.
>>
>> Thoughts?
>
> Perfectly agree. I mostly put it out there to get a feel whether I'm
> getting anywhere with this. Holding off until the bug is fixed is perfect.

I'm quite intrigued by the feature as well. Nice work. Cool idea. I
agree with publishing the branch and putting it into a holding state
until the kernel bug is fixed.

Cheers,
--
:-Dustin

Revision history for this message
Scott Moser (smoser) wrote :

Please excuse the harsh 'Rejected'.
I'm closing this right now because
a.) bug 1039402 makes it not really work
b.) i've moved code over to git.

If you want to re-submit, please feel free to do so to the git repo.

https://code.launchpad.net/~cloud-initramfs-tools/cloud-initramfs-tools/+git/cloud-initramfs-tools

Unmerged revisions

86. By Michał Sawicz

add NFS support to overlayroot

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'overlayroot/etc/overlayroot.conf'
--- overlayroot/etc/overlayroot.conf 2012-08-29 00:51:40 +0000
+++ overlayroot/etc/overlayroot.conf 2013-04-07 12:04:24 +0000
@@ -66,6 +66,19 @@
66# crypt:mapname=mapper,pass=foo,fstype=ext3,mkfs=1,dev=/dev/disk/by-label/my-jumpdrive,timeout=12066# crypt:mapname=mapper,pass=foo,fstype=ext3,mkfs=1,dev=/dev/disk/by-label/my-jumpdrive,timeout=120
67# crypt:dev=xvdb67# crypt:dev=xvdb
68#68#
69# * overlayroot=nfs:host=IP,path=SHARE
70# mount IP:SHARE as overlayfs and write changes there
71#
72# available parameters are:
73# * host: default: "" [REQUIRED]
74# use given server for backing filesystem.
75# * path: default: "" [REQUIRED]
76# use given share on the server for backing filesystem.
77# * see COMMON PARAMETERS
78#
79# examples:
80# overlayroot=nfs:host=10.0.0.1,path=/srv/nfs-overlay
81#
69# * overlayroot=disabled82# * overlayroot=disabled
70# if set explicitly to 'disabled', or an empty string, then83# if set explicitly to 'disabled', or an empty string, then
71# overlayroot will do nothing.84# overlayroot will do nothing.
7285
=== modified file 'overlayroot/scripts/init-bottom/overlayroot'
--- overlayroot/scripts/init-bottom/overlayroot 2012-08-29 01:42:00 +0000
+++ overlayroot/scripts/init-bottom/overlayroot 2013-04-07 12:04:24 +0000
@@ -258,6 +258,26 @@
258 _RET_DEVICE="$dev"258 _RET_DEVICE="$dev"
259}259}
260260
261nfs_setup() {
262 local options="$1" host="" path="/"
263 # options supported:
264 # host=ip,path=/
265 parse_string "${options}" ||
266 { log_fail "failed parsing '${options}'"; return 1; }
267
268 host=${_RET_host:-${host}}
269 path=${_RET_path:-${path}}
270
271 [ -n "$host" ] ||
272 { log_fail "host= argument not provided in '${options}'"; return 1; }
273 [ -n "$path" ] ||
274 { log_fail "path= argument not provided in '${options}'"; return 1; }
275
276 debug "host=${host} path=${path}"
277
278 _RET_DEVICE="${host}:${path}"
279}
280
261overlayrootify_fstab() {281overlayrootify_fstab() {
262 # overlayrootify_fstab(input, root_ro, root_rw, dir_prefix, recurse, swap)282 # overlayrootify_fstab(input, root_ro, root_rw, dir_prefix, recurse, swap)
263 # read input fstab file, write an overlayroot version to stdout283 # read input fstab file, write an overlayroot version to stdout
@@ -504,6 +524,13 @@
504 mode="device"524 mode="device"
505 device="$_RET_DEVICE"525 device="$_RET_DEVICE"
506 ;;526 ;;
527 nfs:*)
528 mode="nfs"
529 opts=${overlayroot#nfs:}
530 nfs_setup "${opts}" ||
531 fail "failed setup overlay for ${overlayroot}${cfgmsg}"
532 device="$_RET_DEVICE"
533 ;;
507 crypt:*)534 crypt:*)
508 mode="crypt"535 mode="crypt"
509 opts=${overlayroot#crypt:}536 opts=${overlayroot#crypt:}
@@ -573,6 +600,10 @@
573 # mount a tmpfs using the device name tmpfs-root600 # mount a tmpfs using the device name tmpfs-root
574 mount -t tmpfs tmpfs-root "${root_rw}" ||601 mount -t tmpfs tmpfs-root "${root_rw}" ||
575 fail "failed to create tmpfs"602 fail "failed to create tmpfs"
603elif [ "$mode" = "nfs" ]; then
604 # mount the nfs share
605 nfsmount -o nolock "$device" "${root_rw}" ||
606 fail "failed mount backing share $device"
576else607else
577 # dev or crypto608 # dev or crypto
578 mount "$device" "${root_rw}" ||609 mount "$device" "${root_rw}" ||

Subscribers

People subscribed via source and target branches