public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 container 0/2] unmanaged containers
@ 2021-10-05  8:09 Oguz Bektas
  2021-10-05  8:09 ` [pve-devel] [PATCH v2 container 1/2] setup: fix creating " Oguz Bektas
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Oguz Bektas @ 2021-10-05  8:09 UTC (permalink / raw)
  To: pve-devel

minor fix for creating unmanaged containers

v1->v2:
* return nothing instead of an empty hash ref
* separate patch for dropping early unmanaged return

Oguz Bektas (2):
  setup: fix creating unmanaged containers
  setup: drop remaining unmanaged return

 src/PVE/LXC/Setup.pm           | 2 --
 src/PVE/LXC/Setup/Unmanaged.pm | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

-- 
2.30.2





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

* [pve-devel] [PATCH v2 container 1/2] setup: fix creating unmanaged containers
  2021-10-05  8:09 [pve-devel] [PATCH v2 container 0/2] unmanaged containers Oguz Bektas
@ 2021-10-05  8:09 ` Oguz Bektas
  2021-10-05  8:09 ` [pve-devel] [PATCH v2 container 2/2] setup: drop remaining unmanaged return Oguz Bektas
  2021-10-05  8:54 ` [pve-devel] applied-series: [PATCH v2 container 0/2] unmanaged containers Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Oguz Bektas @ 2021-10-05  8:09 UTC (permalink / raw)
  To: pve-devel

ssh_host_key_generate did not explicitly return in unmanaged plugin,
causing the post_create_hook to fail because of an invalid hash
reference (cannot use "1" as a HASH ref, "1" was likely being returned
implicitly as the scalar value of 'my ($self) = @_;')

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
---
 src/PVE/LXC/Setup/Unmanaged.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/PVE/LXC/Setup/Unmanaged.pm b/src/PVE/LXC/Setup/Unmanaged.pm
index 38e245f..3b9febf 100644
--- a/src/PVE/LXC/Setup/Unmanaged.pm
+++ b/src/PVE/LXC/Setup/Unmanaged.pm
@@ -51,6 +51,7 @@ sub unified_cgroupv2_support {
 
 sub ssh_host_key_types_to_generate {
     my ($self) = @_;
+    return;
 }
 
 # hooks
-- 
2.30.2





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

* [pve-devel] [PATCH v2 container 2/2] setup: drop remaining unmanaged return
  2021-10-05  8:09 [pve-devel] [PATCH v2 container 0/2] unmanaged containers Oguz Bektas
  2021-10-05  8:09 ` [pve-devel] [PATCH v2 container 1/2] setup: fix creating " Oguz Bektas
@ 2021-10-05  8:09 ` Oguz Bektas
  2021-10-05  8:54 ` [pve-devel] applied-series: [PATCH v2 container 0/2] unmanaged containers Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Oguz Bektas @ 2021-10-05  8:09 UTC (permalink / raw)
  To: pve-devel

not needed anymore since we have 'unmanaged' plugin, so $self->{plugin}
would be 'unmanaged' and get handled by that instead of an early return.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
---
 src/PVE/LXC/Setup.pm | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/PVE/LXC/Setup.pm b/src/PVE/LXC/Setup.pm
index cfbe02c..4e211ef 100644
--- a/src/PVE/LXC/Setup.pm
+++ b/src/PVE/LXC/Setup.pm
@@ -228,8 +228,6 @@ my sub generate_ssh_key { # create temporary key in hosts' /run, then read and u
 sub rewrite_ssh_host_keys {
     my ($self) = @_;
 
-    return if !$self->{plugin}; # unmanaged
-
     my $plugin = $self->{plugin};
 
     my $keynames = $plugin->ssh_host_key_types_to_generate();
-- 
2.30.2





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

* [pve-devel] applied-series: [PATCH v2 container 0/2] unmanaged containers
  2021-10-05  8:09 [pve-devel] [PATCH v2 container 0/2] unmanaged containers Oguz Bektas
  2021-10-05  8:09 ` [pve-devel] [PATCH v2 container 1/2] setup: fix creating " Oguz Bektas
  2021-10-05  8:09 ` [pve-devel] [PATCH v2 container 2/2] setup: drop remaining unmanaged return Oguz Bektas
@ 2021-10-05  8:54 ` Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2021-10-05  8:54 UTC (permalink / raw)
  To: Proxmox VE development discussion, Oguz Bektas

On 05.10.21 10:09, Oguz Bektas wrote:
> minor fix for creating unmanaged containers
> 
> v1->v2:
> * return nothing instead of an empty hash ref
> * separate patch for dropping early unmanaged return
> 
> Oguz Bektas (2):
>   setup: fix creating unmanaged containers
>   setup: drop remaining unmanaged return
> 
>  src/PVE/LXC/Setup.pm           | 2 --
>  src/PVE/LXC/Setup/Unmanaged.pm | 1 +
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 



applied both patches, thanks!




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

end of thread, other threads:[~2021-10-05  8:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-05  8:09 [pve-devel] [PATCH v2 container 0/2] unmanaged containers Oguz Bektas
2021-10-05  8:09 ` [pve-devel] [PATCH v2 container 1/2] setup: fix creating " Oguz Bektas
2021-10-05  8:09 ` [pve-devel] [PATCH v2 container 2/2] setup: drop remaining unmanaged return Oguz Bektas
2021-10-05  8:54 ` [pve-devel] applied-series: [PATCH v2 container 0/2] unmanaged containers 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