summaryrefslogtreecommitdiff
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
commite419d582cfd0ea873b393b2773c1b0670d16afe0 (patch)
treef14f8ae17f72035174677db439e6f38893e8568f
parentfc7b833170c66acb4672184146d560c6fda20183 (diff)
downloaddefinitions-e419d582cfd0ea873b393b2773c1b0670d16afe0.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.
-rwxr-xr-xrawdisk.write2
-rwxr-xr-xssh-rsync.write2
2 files changed, 4 insertions, 0 deletions
diff --git a/rawdisk.write b/rawdisk.write
index 8723ac0c..1b4d58c0 100755
--- a/rawdisk.write
+++ b/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/ssh-rsync.write b/ssh-rsync.write
index 211dbe5e..fe72bc9a 100755
--- a/ssh-rsync.write
+++ b/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')