From: Jing Luo via pve-devel <pve-devel@lists.proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [pve-devel] [PATCH pve-cluster] tree-wide: change /var/run to /run and /var/lock to /run/lock
Date: Sun, 23 Mar 2025 00:17:13 +0900 [thread overview]
Message-ID: <mailman.86.1742657429.359.pve-devel@lists.proxmox.com> (raw)
In-Reply-To: <20250322152004.1646886-1-jing@jing.rocks>
[-- Attachment #1: Type: message/rfc822, Size: 7664 bytes --]
From: Jing Luo <jing@jing.rocks>
To: pve-devel@lists.proxmox.com
Cc: Jing Luo <jing@jing.rocks>
Subject: [PATCH pve-cluster] tree-wide: change /var/run to /run and /var/lock to /run/lock
Date: Sun, 23 Mar 2025 00:17:13 +0900
Message-ID: <20250322152004.1646886-6-jing@jing.rocks>
"/var/run" and "/var/lock" are deprecated.
This is to comply with Debian Policy 9.1.4 "/run and /run/lock".
(https://www.debian.org/doc/debian-policy/ch-opersys.html#run-and-run-lock)
Signed-off-by: Jing Luo <jing@jing.rocks>
---
src/PVE/API2/ClusterConfig.pm | 4 ++--
src/PVE/CLI/pvecm.pm | 2 +-
src/PVE/RRD.pm | 4 ++--
src/pmxcfs/cfs-utils.h | 2 +-
src/pmxcfs/status.c | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/PVE/API2/ClusterConfig.pm b/src/PVE/API2/ClusterConfig.pm
index e7efe37..327e34d 100644
--- a/src/PVE/API2/ClusterConfig.pm
+++ b/src/PVE/API2/ClusterConfig.pm
@@ -20,7 +20,7 @@ use base qw(PVE::RESTHandler);
my $clusterconf = "/etc/pve/corosync.conf";
my $authfile = "/etc/corosync/authkey";
-my $local_cluster_lock = "/var/lock/pvecm.lock";
+my $local_cluster_lock = "/run/lock/pvecm.lock";
my $nodeid_desc = {
type => 'integer',
@@ -677,7 +677,7 @@ __PACKAGE__->register_method ({
my ($param) = @_;
my $result = {};
- my $socket_path = "/var/run/corosync-qdevice/corosync-qdevice.sock";
+ my $socket_path = "/run/corosync-qdevice/corosync-qdevice.sock";
return $result if !-S $socket_path;
my $qdevice_socket = IO::Socket::UNIX->new(
diff --git a/src/PVE/CLI/pvecm.pm b/src/PVE/CLI/pvecm.pm
index cc8b3d3..09e6a3f 100755
--- a/src/PVE/CLI/pvecm.pm
+++ b/src/PVE/CLI/pvecm.pm
@@ -377,7 +377,7 @@ __PACKAGE__->register_method ({
delete $param->{use_ssh};
$param->{password} = $password;
- my $local_cluster_lock = "/var/lock/pvecm.lock";
+ my $local_cluster_lock = "/run/lock/pvecm.lock";
PVE::Tools::lock_file($local_cluster_lock, 10, \&PVE::Cluster::Setup::join, $param);
if (my $err = $@) {
diff --git a/src/PVE/RRD.pm b/src/PVE/RRD.pm
index 5d4abc9..d98d219 100644
--- a/src/PVE/RRD.pm
+++ b/src/PVE/RRD.pm
@@ -33,7 +33,7 @@ sub create_rrd_data {
"-r" => $reso,
);
- my $socket = "/var/run/rrdcached.sock";
+ my $socket = "/run/rrdcached.sock";
push @args, "--daemon" => "unix:$socket" if -S $socket;
my ($start, $step, $names, $data) = RRDs::fetch($rrd, $cf, @args);
@@ -101,7 +101,7 @@ sub create_rrd_graph {
"--lower-limit" => 0,
);
- my $socket = "/var/run/rrdcached.sock";
+ my $socket = "/run/rrdcached.sock";
push @args, "--daemon" => "unix:$socket" if -S $socket;
my @coldef = ('#00ddff', '#ff0000');
diff --git a/src/pmxcfs/cfs-utils.h b/src/pmxcfs/cfs-utils.h
index eb86379..6cf5013 100644
--- a/src/pmxcfs/cfs-utils.h
+++ b/src/pmxcfs/cfs-utils.h
@@ -30,7 +30,7 @@
#include <fcntl.h>
#define HOST_CLUSTER_CONF_FN "/etc/corosync/corosync.conf"
-#define CFS_PID_FN "/var/run/pve-cluster.pid"
+#define CFS_PID_FN "/run/pve-cluster.pid"
#define VARLIBDIR "/var/lib/pve-cluster"
#define RUNDIR "/run/pve-cluster"
diff --git a/src/pmxcfs/status.c b/src/pmxcfs/status.c
index ff5fcc4..b9c202a 100644
--- a/src/pmxcfs/status.c
+++ b/src/pmxcfs/status.c
@@ -1244,7 +1244,7 @@ update_rrd_data(
g_return_if_fail(len > 0);
g_return_if_fail(len < 4096);
- static const char *rrdcsock = "unix:/var/run/rrdcached.sock";
+ static const char *rrdcsock = "unix:/run/rrdcached.sock";
int use_daemon = 1;
if (rrdc_connect(rrdcsock) != 0)
--
2.49.0
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-03-22 15:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250322152004.1646886-1-jing@jing.rocks>
2025-03-22 15:17 ` [pve-devel] [PATCH pve-manager 2/2] move /run/vzdump.lock to /run/lock/vzdump.lock Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH] rust-proxmox-network-api: change /var/lock to /run/lock Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pmg-api] tree-wide: change /var/run to /run and " Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH] rust-proxmox-backup: change " Jing Luo via pve-devel
2025-03-22 15:17 ` Jing Luo via pve-devel [this message]
2025-03-22 15:17 ` [pve-devel] [PATCH pve-common] tree-wide: change /var/run to /run and " Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pve-container] tree-wide: change /var/run to /run Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pve-firewall] tree-wide: change /var/run to /run and /var/lock to /run/lock Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pve-guest-common] tree-wide: change " Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH pve-storage] " Jing Luo via pve-devel
2025-03-22 15:17 ` [pve-devel] [PATCH qemu-server] tree-wide: change /var/run to /run and " Jing Luo via pve-devel
[not found] ` <20250322152004.1646886-2-jing@jing.rocks>
2025-03-24 8:02 ` [pve-devel] [PATCH pve-manager 2/2] move /run/vzdump.lock to /run/lock/vzdump.lock Thomas Lamprecht
2025-03-24 11:41 ` Jing Luo via pve-devel
[not found] ` <d8306d3000f15b2dc4dad5f0be32db4f@jing.rocks>
2025-03-24 11:56 ` Thomas Lamprecht
2025-03-24 13:04 ` Jing Luo via pve-devel
[not found] ` <39e9a7cd767a4de295ab573fa71c7722@jing.rocks>
2025-03-24 13:11 ` 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=mailman.86.1742657429.359.pve-devel@lists.proxmox.com \
--to=pve-devel@lists.proxmox.com \
--cc=jing@jing.rocks \
/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