public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api 2/2] do not create /cluster/<cid> unconditionally
Date: Wed, 18 Nov 2020 15:52:54 +0100	[thread overview]
Message-ID: <20201118145254.26214-3-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20201118145254.26214-1-s.ivanov@proxmox.com>

while looking through the spooldir creation we noticed the mkdir call
on a relative path. This creates a '/cluster/<cid>/' directory on each system
which has a cluster.conf (<cid> being the node's clusterid). This is not used
since the spooldirs are in '/var/spool/pmg/cluster/'

Simply drop the mkdir call, since the spooldirs get created upon cluster
creation (PMG::API2::Cluster::create) and joining to an existing cluster.

Reported-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 src/PMG/MailQueue.pm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/PMG/MailQueue.pm b/src/PMG/MailQueue.pm
index e0f56b9..435f168 100644
--- a/src/PMG/MailQueue.pm
+++ b/src/PMG/MailQueue.pm
@@ -285,7 +285,6 @@ sub quarantine_mail {
     eval {
 	if ($lcid) {
 	    my $subdir = "cluster/$lcid/$subpath";
-	    mkpath $subdir;
 	    ($fh, $uid, $path) = new_fileid ($spooldir, $subdir);
 	} else {
 	    ($fh, $uid, $path) = new_fileid ($spooldir, $subpath);
-- 
2.20.1





  parent reply	other threads:[~2020-11-18 14:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18 14:52 [pmg-devel] [PATCH pmg-api 0/2] fix 2 small glitches in clustered environments Stoiko Ivanov
2020-11-18 14:52 ` [pmg-devel] [PATCH pmg-api 1/2] fix clustersync after node-deletion Stoiko Ivanov
2020-11-18 16:03   ` [pmg-devel] applied: " Thomas Lamprecht
2020-11-18 14:52 ` Stoiko Ivanov [this message]
2020-11-18 16:03   ` [pmg-devel] applied: [PATCH pmg-api 2/2] do not create /cluster/<cid> unconditionally Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201118145254.26214-3-s.ivanov@proxmox.com \
    --to=s.ivanov@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal