From: "Stefan Sterz" <s.sterz@proxmox.com>
To: "Dominik Csapak" <d.csapak@proxmox.com>, <pmg-devel@lists.proxmox.com>
Subject: Re: [pmg-devel] [RFC PATCH pmg-api 2/2] api: proxy user bl/wl calls to master
Date: Thu, 22 Feb 2024 11:57:14 +0100 [thread overview]
Message-ID: <CZBJY8ADIQP9.3AQW9STW8XH0L@proxmox.com> (raw)
In-Reply-To: <20240215115859.1878868-2-d.csapak@proxmox.com>
On Thu Feb 15, 2024 at 12:58 PM CET, Dominik Csapak wrote:
> if we don't do that, the non-master nodes would get updated (when logged
> in there), but that change would never be synced back to the master.
>
> So to prevent diverging configs, proxy them all to master.
>
> The GET calls are also proxied, because if we don't do that, the user
> might wonder why his change is not visible on the GUI right away.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> Sending only as RFC, because we now loose the ability to see what the
> non-master nodes actually have in their db...
>
this does improve the ux considerably as changes appear immediatelly.
consider this:
Tested-by: Stefan Sterz <s.sterz@proxmox.com>
> src/PMG/API2/Quarantine.pm | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/src/PMG/API2/Quarantine.pm b/src/PMG/API2/Quarantine.pm
> index a100e11..4eec64e 100644
> --- a/src/PMG/API2/Quarantine.pm
> +++ b/src/PMG/API2/Quarantine.pm
> @@ -229,6 +229,7 @@ __PACKAGE__->register_method ({
> name => 'whitelist',
> path => 'whitelist',
> method => 'GET',
> + proxyto => 'master',
> permissions => { check => [ 'admin', 'qmanager', 'audit', 'quser'] },
> description => "Show user whitelist.",
> parameters => {
> @@ -258,6 +259,7 @@ __PACKAGE__->register_method ({
> name => 'whitelist_add',
> path => 'whitelist',
> method => 'POST',
> + proxyto => 'master',
> description => "Add user whitelist entries.",
> permissions => { check => [ 'admin', 'qmanager', 'audit', 'quser'] },
> protected => 1,
> @@ -284,6 +286,7 @@ __PACKAGE__->register_method ({
> name => 'whitelist_delete_base',
> path => 'whitelist',
> method => 'DELETE',
> + proxyto => 'master',
> description => "Delete user whitelist entries.",
> permissions => { check => [ 'admin', 'qmanager', 'audit', 'quser'] },
> protected => 1,
> @@ -311,6 +314,7 @@ __PACKAGE__->register_method ({
> name => 'blacklist',
> path => 'blacklist',
> method => 'GET',
> + proxyto => 'master',
> permissions => { check => [ 'admin', 'qmanager', 'audit', 'quser'] },
> description => "Show user blacklist.",
> parameters => {
> @@ -340,6 +344,7 @@ __PACKAGE__->register_method ({
> name => 'blacklist_add',
> path => 'blacklist',
> method => 'POST',
> + proxyto => 'master',
> description => "Add user blacklist entries.",
> permissions => { check => [ 'admin', 'qmanager', 'audit', 'quser'] },
> protected => 1,
> @@ -366,6 +371,7 @@ __PACKAGE__->register_method ({
> name => 'blacklist_delete_base',
> path => 'blacklist',
> method => 'DELETE',
> + proxyto => 'master',
> description => "Delete user blacklist entries.",
> permissions => { check => [ 'admin', 'qmanager', 'audit', 'quser'] },
> protected => 1,
next prev parent reply other threads:[~2024-02-22 10:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 11:58 [pmg-devel] [PATCH pmg-api 1/2] fix #4392: keep empty user bl/wl in database Dominik Csapak
2024-02-15 11:58 ` [pmg-devel] [RFC PATCH pmg-api 2/2] api: proxy user bl/wl calls to master Dominik Csapak
2024-02-22 10:57 ` Stefan Sterz [this message]
2024-02-22 14:53 ` Stoiko Ivanov
2024-02-22 15:00 ` Stoiko Ivanov
2024-02-22 10:56 ` [pmg-devel] [PATCH pmg-api 1/2] fix #4392: keep empty user bl/wl in database Stefan Sterz
2024-02-22 14:44 ` [pmg-devel] applied: " Stoiko Ivanov
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=CZBJY8ADIQP9.3AQW9STW8XH0L@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=d.csapak@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.