* [pve-devel] [PATCH qemu-server] fix net regex in qm cleanup
@ 2022-09-20 14:50 Dominik Csapak
2022-09-21 7:13 ` [pve-devel] applied: " Fabian Grünbichler
2022-09-21 7:58 ` [pve-devel] " Thomas Lamprecht
0 siblings, 2 replies; 3+ messages in thread
From: Dominik Csapak @ 2022-09-20 14:50 UTC (permalink / raw)
To: pve-devel
the '+' needs to be in the brackets, otherwise '$1' is not the right id
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
PVE/CLI/qm.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm
index 6a2e161..ca5d25f 100755
--- a/PVE/CLI/qm.pm
+++ b/PVE/CLI/qm.pm
@@ -809,7 +809,7 @@ __PACKAGE__->register_method({
# we have to cleanup the tap devices after a crash
foreach my $opt (keys %$conf) {
- next if $opt !~ m/^net(\d)+$/;
+ next if $opt !~ m/^net(\d+)$/;
my $interface = $1;
PVE::Network::tap_unplug("tap${vmid}i${interface}");
}
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pve-devel] applied: [PATCH qemu-server] fix net regex in qm cleanup
2022-09-20 14:50 [pve-devel] [PATCH qemu-server] fix net regex in qm cleanup Dominik Csapak
@ 2022-09-21 7:13 ` Fabian Grünbichler
2022-09-21 7:58 ` [pve-devel] " Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Fabian Grünbichler @ 2022-09-21 7:13 UTC (permalink / raw)
To: Proxmox VE development discussion
On September 20, 2022 4:50 pm, Dominik Csapak wrote:
> the '+' needs to be in the brackets, otherwise '$1' is not the right id
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> PVE/CLI/qm.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm
> index 6a2e161..ca5d25f 100755
> --- a/PVE/CLI/qm.pm
> +++ b/PVE/CLI/qm.pm
> @@ -809,7 +809,7 @@ __PACKAGE__->register_method({
> # we have to cleanup the tap devices after a crash
>
> foreach my $opt (keys %$conf) {
> - next if $opt !~ m/^net(\d)+$/;
> + next if $opt !~ m/^net(\d+)$/;
> my $interface = $1;
> PVE::Network::tap_unplug("tap${vmid}i${interface}");
> }
> --
> 2.30.2
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pve-devel] [PATCH qemu-server] fix net regex in qm cleanup
2022-09-20 14:50 [pve-devel] [PATCH qemu-server] fix net regex in qm cleanup Dominik Csapak
2022-09-21 7:13 ` [pve-devel] applied: " Fabian Grünbichler
@ 2022-09-21 7:58 ` Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2022-09-21 7:58 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
I initially read this as like it was a recent (code) cleanup that broke it.
Fabian already applied it, so only two suggestion as for how to improve
this for a next similar time..
subject: "qm: fix net regex in 'cleanup' command"
Am 20/09/2022 um 16:50 schrieb Dominik Csapak:
> the '+' needs to be in the brackets, otherwise '$1' is not the right id
>
Add
Fixes: 3ea84aeb7c75d7b0bfbd9cb04440ad00072bfe0c
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> PVE/CLI/qm.pm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm
> index 6a2e161..ca5d25f 100755
> --- a/PVE/CLI/qm.pm
> +++ b/PVE/CLI/qm.pm
> @@ -809,7 +809,7 @@ __PACKAGE__->register_method({
> # we have to cleanup the tap devices after a crash
>
> foreach my $opt (keys %$conf) {
> - next if $opt !~ m/^net(\d)+$/;
> + next if $opt !~ m/^net(\d+)$/;
> my $interface = $1;
> PVE::Network::tap_unplug("tap${vmid}i${interface}");
> }
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-21 7:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20 14:50 [pve-devel] [PATCH qemu-server] fix net regex in qm cleanup Dominik Csapak
2022-09-21 7:13 ` [pve-devel] applied: " Fabian Grünbichler
2022-09-21 7:58 ` [pve-devel] " Thomas Lamprecht
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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal