public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Leo Nunner <l.nunner@proxmox.com>
Subject: Re: [pve-devel] [PATCH container] fix #4192: add new architecture-dependent path to check for newer versions of systemd
Date: Mon, 12 Sep 2022 11:43:41 +0200	[thread overview]
Message-ID: <573b120f-4b30-b9c1-f870-5345ad1fbc41@proxmox.com> (raw)
In-Reply-To: <784d7bc5-3e6a-eeb1-2928-d3a71d3b054b@proxmox.com>

On 12/09/2022 11:30, Dominik Csapak wrote:
> On 9/12/22 11:30, Dominik Csapak wrote:
>>>>   # non systemd based containers work with pure cgroupv2
>>>>   sub unified_cgroupv2_support {
>>>> -    my ($self) = @_;
>>>> +    my ($self, $conf) = @_;
>>>
>>> why pass the whole config if you just need the arch? Please avoid overly generic
>>> parameter in signatures if only one specific thing is required.
>>>
>>
>> AFAICS, not even that is necessary, since a 'LXC::Setup' object has the config in self
>> so we could do there a '$self->{confg}->{arch}' and omit the parameter passing completely
> 
> i meant '$self->{conf}->{arch}' ofc
> 
>> (or am i missing something else here?) 


This is the plugin though, where $self isn't LXC::Setup but basing off LXC::Setup::Plugin,
and there we don't have any $conf object available, and we explicitly pass $conf to those
methods in most case, which I'd guess is where Leo copied this off from.
Still, I'd like to avoid that pattern for newer adaptions if possible, iow. if only using
up two or three config params at max, as heuristic.




  reply	other threads:[~2022-09-12  9:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 11:45 Leo Nunner
2022-09-12  9:13 ` Thomas Lamprecht
2022-09-12  9:30   ` Dominik Csapak
2022-09-12  9:30     ` Dominik Csapak
2022-09-12  9:43       ` Thomas Lamprecht [this message]
2022-09-12  9:37     ` Dominik Csapak

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=573b120f-4b30-b9c1-f870-5345ad1fbc41@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=l.nunner@proxmox.com \
    --cc=pve-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