← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~pelpsi/launchpad:ftpmaster-bug-fixing into launchpad:master

 

Simone Pelosi has proposed merging ~pelpsi/launchpad:ftpmaster-bug-fixing into launchpad:master.

Commit message:
Created required folder
    
srv/launchpad/ubuntu-queue/{incoming,accepted,rejected,failed} folders created in order to
fix a `Permission Denied` error in the ftpmaster uploader charm.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~pelpsi/launchpad/+git/launchpad/+merge/448990
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~pelpsi/launchpad:ftpmaster-bug-fixing into launchpad:master.
diff --git a/charm/launchpad-ftpmaster-uploader/reactive/launchpad-ftpmaster-uploader.py b/charm/launchpad-ftpmaster-uploader/reactive/launchpad-ftpmaster-uploader.py
index 641cc00..e1edf68 100644
--- a/charm/launchpad-ftpmaster-uploader/reactive/launchpad-ftpmaster-uploader.py
+++ b/charm/launchpad-ftpmaster-uploader/reactive/launchpad-ftpmaster-uploader.py
@@ -38,6 +38,16 @@ def configure():
     config = get_service_config()
     config["ubuntu_queue_dir"] = os.path.join(base.base_dir(), "ubuntu-queue")
     host.mkdir(config["ubuntu_queue_dir"], perms=0o755)
+    host.mkdir(
+        os.path.join(config["ubuntu_queue_dir"], "incoming"), perms=0o755
+    )
+    host.mkdir(
+        os.path.join(config["ubuntu_queue_dir"], "accepted"), perms=0o755
+    )
+    host.mkdir(
+        os.path.join(config["ubuntu_queue_dir"], "rejected"), perms=0o755
+    )
+    host.mkdir(os.path.join(config["ubuntu_queue_dir"], "failed"), perms=0o755)
 
     configure_lazr(
         config,
@@ -53,7 +63,9 @@ def configure():
 @when("service.configured", "upload-queue-processor.available")
 @when_not("service.txpkgupload-configured")
 def configure_txpkgupload():
-    fsroot = os.path.join(base.base_dir(), "incoming")
+    fsroot = os.path.join(
+        os.path.join(base.base_dir(), "ubuntu-queue"), "incoming"
+    )
     txpkgupload = endpoint_from_flag("upload-queue-processor.available")
     txpkgupload.set_config(
         fsroot=fsroot,