public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] [PATCH pmg-api 0/2] upgrade related bugfixes and improvements
@ 2021-06-30 16:39 Stoiko Ivanov
  2021-06-30 16:39 ` [pmg-devel] [PATCH pmg-api 1/2] utils: fix service_aliases usage Stoiko Ivanov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2021-06-30 16:39 UTC (permalink / raw)
  To: pmg-devel

The 2 patches are independent of each other, but were both reported
by Martin, after he attempted an upgrade to Bullseye:
* sending the first one, since I introduced it, being convinced that such a
  small change would not need reviewing
* the change for the ClamAV defaults also makes sense (although just now
  clamav seems to have a problem with incremental downloads ...)

Stoiko Ivanov (2):
  utils: fix service_aliases usage
  config: freshclam: default to incremental downloads

 src/PMG/Config.pm | 2 +-
 src/PMG/Utils.pm  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

-- 
2.20.1




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pmg-devel] [PATCH pmg-api 1/2] utils: fix service_aliases usage
  2021-06-30 16:39 [pmg-devel] [PATCH pmg-api 0/2] upgrade related bugfixes and improvements Stoiko Ivanov
@ 2021-06-30 16:39 ` Stoiko Ivanov
  2021-06-30 16:39 ` [pmg-devel] [PATCH pmg-api 2/2] config: freshclam: default to incremental downloads Stoiko Ivanov
  2021-07-05  6:34 ` [pmg-devel] applied-series: [PATCH pmg-api 0/2] upgrade related bugfixes and improvements Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2021-06-30 16:39 UTC (permalink / raw)
  To: pmg-devel

2 errors were introduced in 4f06ff8ac21baa5736060221191fb109e20d8e37:

* a typo in the postgresql service name
* it missed the other uses of the service_name hash, apart from the
  lookup_real_service_name sub.

both fixed here

Reported-by: Martin Maurer <martin@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 src/PMG/Utils.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/PMG/Utils.pm b/src/PMG/Utils.pm
index 318c7b3..09999d8 100644
--- a/src/PMG/Utils.pm
+++ b/src/PMG/Utils.pm
@@ -717,7 +717,7 @@ sub lookup_real_service_name {
 
     if ($alias eq 'postgres') {
 	my $pg_ver = get_pg_server_version();
-	return "postgresl\@${pg_ver}-main";
+	return "postgresql\@${pg_ver}-main";
     }
 
     return $service_aliases->{$alias} // $alias;
@@ -735,7 +735,7 @@ sub get_full_service_state {
 	}
     };
 
-    $service = $service_aliases->{$service} // $service;
+    $service = lookup_real_service_name($service);
     PVE::Tools::run_command(['systemctl', 'show', $service], outfunc => $parser);
 
     return $res;
@@ -790,7 +790,7 @@ sub service_cmd {
 	$cmd = 'restart' if $cmd eq 'start';
     }
 
-    $service = $service_aliases->{$service} // $service;
+    $service = lookup_real_service_name($service);
     PVE::Tools::run_command(['systemctl', $cmd, $service]);
 };
 
-- 
2.20.1





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pmg-devel] [PATCH pmg-api 2/2] config: freshclam: default to incremental downloads
  2021-06-30 16:39 [pmg-devel] [PATCH pmg-api 0/2] upgrade related bugfixes and improvements Stoiko Ivanov
  2021-06-30 16:39 ` [pmg-devel] [PATCH pmg-api 1/2] utils: fix service_aliases usage Stoiko Ivanov
@ 2021-06-30 16:39 ` Stoiko Ivanov
  2021-07-05  6:34 ` [pmg-devel] applied-series: [PATCH pmg-api 0/2] upgrade related bugfixes and improvements Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Stoiko Ivanov @ 2021-06-30 16:39 UTC (permalink / raw)
  To: pmg-devel

clamav recently started yielding 429 (too many requests) response
codes on even comparatively low attempts to download the complete
signature files (cvd)(see [0]), instead of the incremental changes
(cdiff) (see [1] for some background)

changing the default to scriptedupdates (a.k.a. cdiff download) seems
sensible for most situations.

[0] https://docs.clamav.net/faq/faq-freshclam.html
[1] https://blog.clamav.net/2021/03/clamav-cvds-cdiffs-and-magic-behind.html

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 src/PMG/Config.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PMG/Config.pm b/src/PMG/Config.pm
index 748ed80..20f68da 100755
--- a/src/PMG/Config.pm
+++ b/src/PMG/Config.pm
@@ -397,7 +397,7 @@ sub properties {
 	scriptedupdates => {
 	    description => "Enables ScriptedUpdates (incremental download of signatures)",
 	    type => 'boolean',
-	    default => 0
+	    default => 1
 	},
     };
 }
-- 
2.20.1





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pmg-devel] applied-series: [PATCH pmg-api 0/2] upgrade related bugfixes and improvements
  2021-06-30 16:39 [pmg-devel] [PATCH pmg-api 0/2] upgrade related bugfixes and improvements Stoiko Ivanov
  2021-06-30 16:39 ` [pmg-devel] [PATCH pmg-api 1/2] utils: fix service_aliases usage Stoiko Ivanov
  2021-06-30 16:39 ` [pmg-devel] [PATCH pmg-api 2/2] config: freshclam: default to incremental downloads Stoiko Ivanov
@ 2021-07-05  6:34 ` Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2021-07-05  6:34 UTC (permalink / raw)
  To: Stoiko Ivanov, pmg-devel

On 30.06.21 18:39, Stoiko Ivanov wrote:
> The 2 patches are independent of each other, but were both reported
> by Martin, after he attempted an upgrade to Bullseye:
> * sending the first one, since I introduced it, being convinced that such a
>   small change would not need reviewing
> * the change for the ClamAV defaults also makes sense (although just now
>   clamav seems to have a problem with incremental downloads ...)
> 
> Stoiko Ivanov (2):
>   utils: fix service_aliases usage
>   config: freshclam: default to incremental downloads
> 
>  src/PMG/Config.pm | 2 +-
>  src/PMG/Utils.pm  | 6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 



applied both patches, thanks!




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-05  6:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30 16:39 [pmg-devel] [PATCH pmg-api 0/2] upgrade related bugfixes and improvements Stoiko Ivanov
2021-06-30 16:39 ` [pmg-devel] [PATCH pmg-api 1/2] utils: fix service_aliases usage Stoiko Ivanov
2021-06-30 16:39 ` [pmg-devel] [PATCH pmg-api 2/2] config: freshclam: default to incremental downloads Stoiko Ivanov
2021-07-05  6:34 ` [pmg-devel] applied-series: [PATCH pmg-api 0/2] upgrade related bugfixes and improvements Thomas Lamprecht

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