Again fix the expand-root script for GCE. The volume is not /dev/loop0

but it should be /dev/sda.
This commit is contained in:
Zach Marano 2016-03-03 13:59:01 -08:00
parent 41597d2700
commit 2b629d784c
2 changed files with 13 additions and 0 deletions

View file

@ -40,6 +40,7 @@ def resolve_tasks(taskset, manifest):
tasks.host.InstallHostnameHook,
tasks.boot.ConfigureGrub,
initd.AddExpandRoot,
tasks.initd.AdjustExpandRootDev,
initd.InstallInitScripts,
boot.BlackListModules,
boot.UpdateInitramfs,

View file

@ -23,3 +23,15 @@ class AddGrowRootDisable(Task):
'etc/initramfs-tools/scripts/local-premount/gce-disable-growroot')
copy(script_src, script_dst)
os.chmod(script_dst, rwxr_xr_x)
class AdjustExpandRootDev(Task):
description = 'Adjusting the expand-root device'
phase = phases.system_modificatio
predecessors = [initd.AddExpandRoot, initd.AdjustExpandRootScript]
@classmethod
def run(cls, info):
from bootstrapvz.common.tools import sed_i
script = os.path.join(info.root, 'etc/init.d/expand-root')
sed_i(script, '/dev/loop0', '/dev/sda')