summaryrefslogtreecommitdiff
path: root/morphlib/exts
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-02-12 19:03:05 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-03-04 13:17:06 +0000
commit04cda36673767c37f2fc9bbe310c0f4cb6cf2b37 (patch)
tree78529ccef36015a0734c154bff1214fc3c94aeed /morphlib/exts
parentb5c91e43ff41e1a40570038cf64c32987c676b42 (diff)
downloadmorph-04cda36673767c37f2fc9bbe310c0f4cb6cf2b37.tar.gz
deploy: Finish off the Btrfs system layout implementation
The shared state directories defined in writeexts.py (/var, /home etc.) are now separate Btrfs subvolumes that are mounted in place using fstab. There are some warnings on mounting /var and /srv about the mountpoint not being empty. Not yet investigated. If a configure extension has already added / to the fstab, use the device it chose rather than assuming /dev/sda. This is required for the vdaboot.configure extension that we use for OpenStack deployments. Similarly, if a configure extension has added an entry for a state directory in /etc/fstab already, we don't replace it with a /state/xxx directory. That's only done as a default behaviour.
Diffstat (limited to 'morphlib/exts')
-rwxr-xr-xmorphlib/exts/rawdisk.write2
-rwxr-xr-xmorphlib/exts/ssh-rsync.write2
2 files changed, 4 insertions, 0 deletions
diff --git a/morphlib/exts/rawdisk.write b/morphlib/exts/rawdisk.write
index 8723ac0c..1b4d58c0 100755
--- a/morphlib/exts/rawdisk.write
+++ b/morphlib/exts/rawdisk.write
@@ -56,6 +56,8 @@ class RawDiskWriteExtension(morphlib.writeexts.WriteExtension):
raise
def upgrade_local_system(self, raw_disk, temp_root):
+ self.complete_fstab_for_btrfs_layout(temp_root)
+
mp = self.mount(raw_disk)
version_label = self.get_version_label(mp)
diff --git a/morphlib/exts/ssh-rsync.write b/morphlib/exts/ssh-rsync.write
index 211dbe5e..fe72bc9a 100755
--- a/morphlib/exts/ssh-rsync.write
+++ b/morphlib/exts/ssh-rsync.write
@@ -47,6 +47,8 @@ class SshRsyncWriteExtension(morphlib.writeexts.WriteExtension):
self.upgrade_remote_system(location, temp_root)
def upgrade_remote_system(self, location, temp_root):
+ self.complete_fstab_for_btrfs_layout(temp_root)
+
root_disk = self.find_root_disk(location)
version_label = os.environ.get('VERSION_LABEL')