public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christoph Heiss <c.heiss@proxmox.com>
To: Stoiko Ivanov <s.ivanov@proxmox.com>
Cc: pmg-devel@lists.proxmox.com
Subject: Re: [pmg-devel] [PATCH pmg-api v2] fix #4410: Remove non-null host-bits from CIDR when reading `mynetworks`
Date: Wed, 28 Dec 2022 11:17:15 +0100	[thread overview]
Message-ID: <20221228101715.h4hsz25nyr3k33fl@maui.proxmox.com> (raw)
In-Reply-To: <20221228105121.7e3ff1f1@rosa.proxmox.com>

On Wed, Dec 28, 2022 at 10:51:21AM +0100, Stoiko Ivanov wrote:
> [..]
>
> One option that came to my mind was ... just keeping the API part and the
> values in /etc/pmg/mynetworks as they are ..
> only normalize the prefixes in get_template_vars for use in the postfix
> config
>
> It has the downside of users getting different values there than they
> entered - but I personally never understood why programs forced me to
> clear out the host-bits for their use - so I'm not sure if there's any
> upside to requiring our users to clear that up?
One upside I can think of would be that users cannot _that_ easily typo
the prefix, since they need to match up the prefix length to the network
address. Then again, we can only do so much if someone puts in wrong
values.

But otherwise, the above suggestion seems very reasonable to me. I don't
think a whole lot of users will read the postfix config directly anyway
(why would they?), so IMHO that is a non-issue anyway if the values
differ.
I'll try it out and send a v3 with the above implemented, maybe it is
the better way in the end anyway.

> > [..]
> >
> > Removing it would change the API though - is stability / backwards
> > compatibility something we have to be wary of or can I just drop it if
> > it's really not used anywhere?
> good point! - we do return it from the API - so let's keep it for now
> (a 'FIXME: drop network_address and prefix_size with PMG 8.0' comment
> might make sense though - then we can clear it up with the next major
> release)
Ack, I'll just add a comment and leave it as it is for now.





      reply	other threads:[~2022-12-28 10:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-27 12:29 Christoph Heiss
2022-12-27 18:21 ` Stoiko Ivanov
2022-12-28  9:31   ` Christoph Heiss
2022-12-28  9:51     ` Stoiko Ivanov
2022-12-28 10:17       ` Christoph Heiss [this message]

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=20221228101715.h4hsz25nyr3k33fl@maui.proxmox.com \
    --to=c.heiss@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    --cc=s.ivanov@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