← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~twom/lpbuildbot-worker:tmpfs-pool into lpbuildbot-worker:main

 

Tom Wardill has proposed merging ~twom/lpbuildbot-worker:tmpfs-pool into lpbuildbot-worker:main.

Commit message:
Use a named storage pool for containers

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~twom/lpbuildbot-worker/+git/lpbuildbot-worker/+merge/390747
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~twom/lpbuildbot-worker:tmpfs-pool into lpbuildbot-worker:main.
diff --git a/create-lp-tests-lxd b/create-lp-tests-lxd
index 8564bcb..21c684b 100755
--- a/create-lp-tests-lxd
+++ b/create-lp-tests-lxd
@@ -117,6 +117,7 @@ def create_new_instance(client, image_name, series, code_directory):
             )
         },
         "devices": {
+            "root": {"type": "disk", "path": "/", "pool": "lxdtmpfs"},
             "build": {"path": code_directory, "source": code_directory, "type": "disk"}
         },
     }
diff --git a/lp-setup-lxd-build b/lp-setup-lxd-build
index ba2d386..3fff6c7 100755
--- a/lp-setup-lxd-build
+++ b/lp-setup-lxd-build
@@ -51,7 +51,10 @@ def start_new_container(client, image_name, work_dir):
                 getpwnam("buildbot").pw_uid, getpwnam("buildbot").pw_gid
             )
         },
-        "devices": {"build": {"path": work_dir, "source": work_dir, "type": "disk"}},
+        "devices": {
+            "root": {"type": "disk", "path": "/", "pool": "lxdtmpfs"},
+            "build": {"path": work_dir, "source": work_dir, "type": "disk"}
+        },
     }
     container = client.containers.create(image_data, wait=True)
     print("Starting container", flush=True)