From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 4897464640 for ; Fri, 30 Oct 2020 10:43:02 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 3F002116E6 for ; Fri, 30 Oct 2020 10:42:32 +0100 (CET) Received: from kvmformation1.odiso.net (globalOdiso.M6Lille.odiso.net [89.248.211.242]) by firstgate.proxmox.com (Proxmox) with ESMTP id 213E511662 for ; Fri, 30 Oct 2020 10:42:30 +0100 (CET) Received: by kvmformation1.odiso.net (Postfix, from userid 0) id 11200B57072; Fri, 30 Oct 2020 10:42:30 +0100 (CET) From: Alexandre Derumier To: pve-devel@lists.proxmox.com Date: Fri, 30 Oct 2020 10:42:27 +0100 Message-Id: <20201030094228.53423-3-aderumier@odiso.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201030094228.53423-1-aderumier@odiso.com> References: <20201030094228.53423-1-aderumier@odiso.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 1 AWL -0.271 Adjusted score from AWL reputation of From: address HEADER_FROM_DIFFERENT_DOMAINS 0.249 From and EnvelopeFrom 2nd level mail domains are different KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods KHOP_HELO_FCRDNS 0.276 Relay HELO differs from its IP's reverse DNS NO_DNS_FOR_FROM 0.379 Envelope sender has no MX or A DNS records SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [lxc.pm] Subject: [pve-devel] [PATCH pve-container 2/3] use PVE::CGroup X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Oct 2020 09:43:02 -0000 --- src/PVE/LXC.pm | 7 ++++--- src/lxc-pve-prestart-hook | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 9c150d9..5cfcf28 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -33,6 +33,7 @@ use PVE::GuestHelpers qw(safe_string_ne safe_num_ne safe_boolean_ne); use PVE::LXC::Tools; use PVE::LXC::CGroup; use PVE::LXC::Monitor; +use PVE::CGroup; use Time::HiRes qw (gettimeofday); my $have_sdn; @@ -402,9 +403,9 @@ sub parse_ipv4_cidr { die "unable to parse ipv4 address/mask\n"; } -# Deprecated. Use `PVE::LXC::CGroup::get_cgroup_controllers()` instead. +# Deprecated. Use `PVE::CGroup::get_cgroup_controllers()` instead. sub get_cgroup_subsystems { - PVE::LXC::CGroup::get_v1_controllers(); + PVE::CGroup::get_v1_controllers(); } # With seccomp trap to userspace we now have the ability to optionally forward @@ -708,7 +709,7 @@ sub update_lxc_config { } my $cpuset; - my ($cpuset_cgroup, $cpuset_version) = eval { PVE::LXC::CGroup::cpuset_controller_path() }; + my ($cpuset_cgroup, $cpuset_version) = eval { PVE::CGroup::cpuset_controller_path() }; if (defined($cpuset_cgroup)) { $cpuset = eval { PVE::CpuSet->new_from_path("$cpuset_cgroup/lxc", 1) } || PVE::CpuSet->new_from_path($cpuset_cgroup, 1); diff --git a/src/lxc-pve-prestart-hook b/src/lxc-pve-prestart-hook index 8823cad..40d58c4 100755 --- a/src/lxc-pve-prestart-hook +++ b/src/lxc-pve-prestart-hook @@ -144,7 +144,7 @@ PVE::LXC::Tools::lxc_hook('pre-start', 'lxc', sub { sub cleanup_cgroups($) { my ($vmid) = @_; - if (PVE::LXC::CGroup::cgroup_mode() == 2) { + if (PVE::CGroup::cgroup_mode() == 2) { rmdir_recursive("/sys/fs/cgroup/lxc/$vmid"); rmdir_recursive("/sys/fs/cgroup/lxc.monitor/$vmid"); } else { -- 2.20.1