* [pve-devel] [PATCH manager] api: ceph: mon: make checking for duplicate addresses more robust
@ 2022-03-04 13:09 Fabian Ebner
2022-06-07 7:20 ` Fabian Ebner
2022-06-08 6:50 ` [pve-devel] applied: " Thomas Lamprecht
0 siblings, 2 replies; 3+ messages in thread
From: Fabian Ebner @ 2022-03-04 13:09 UTC (permalink / raw)
To: pve-devel
Because $mon->{addr} might come with a port attached (affects monitors
created with PVE 5.4 as reported in the community forum [0]), or even
be a hostname (according to the code in Ceph/Services.pm). Although
the latter shouldn't happen for configurations created by PVE.
[0]: https://forum.proxmox.com/threads/105904/
Fixes: 86ed64f9 ("api: ceph: mon: fix handling of IPv6 addresses in assert_mon_prerequisites")
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
PVE/API2/Ceph/MON.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/PVE/API2/Ceph/MON.pm b/PVE/API2/Ceph/MON.pm
index 12c9caf0..5771bb46 100644
--- a/PVE/API2/Ceph/MON.pm
+++ b/PVE/API2/Ceph/MON.pm
@@ -132,8 +132,10 @@ my $assert_mon_prerequisites = sub {
for my $mon (values %{$monhash}) {
next if !defined($mon->{addr});
- my $ip = PVE::Network::canonical_ip($mon->{addr});
- $used_ips->{$ip} = 1;
+ for my $ip ($ips_from_mon_host->($mon->{addr})->@*) {
+ $ip = PVE::Network::canonical_ip($ip);
+ $used_ips->{$ip} = 1;
+ }
}
for my $monip (@{$monips}) {
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pve-devel] [PATCH manager] api: ceph: mon: make checking for duplicate addresses more robust
2022-03-04 13:09 [pve-devel] [PATCH manager] api: ceph: mon: make checking for duplicate addresses more robust Fabian Ebner
@ 2022-06-07 7:20 ` Fabian Ebner
2022-06-08 6:50 ` [pve-devel] applied: " Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Fabian Ebner @ 2022-06-07 7:20 UTC (permalink / raw)
To: pve-devel
Ping
Am 04.03.22 um 14:09 schrieb Fabian Ebner:
> Because $mon->{addr} might come with a port attached (affects monitors
> created with PVE 5.4 as reported in the community forum [0]), or even
> be a hostname (according to the code in Ceph/Services.pm). Although
> the latter shouldn't happen for configurations created by PVE.
>
> [0]: https://forum.proxmox.com/threads/105904/
>
> Fixes: 86ed64f9 ("api: ceph: mon: fix handling of IPv6 addresses in assert_mon_prerequisites")
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
> PVE/API2/Ceph/MON.pm | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/PVE/API2/Ceph/MON.pm b/PVE/API2/Ceph/MON.pm
> index 12c9caf0..5771bb46 100644
> --- a/PVE/API2/Ceph/MON.pm
> +++ b/PVE/API2/Ceph/MON.pm
> @@ -132,8 +132,10 @@ my $assert_mon_prerequisites = sub {
> for my $mon (values %{$monhash}) {
> next if !defined($mon->{addr});
>
> - my $ip = PVE::Network::canonical_ip($mon->{addr});
> - $used_ips->{$ip} = 1;
> + for my $ip ($ips_from_mon_host->($mon->{addr})->@*) {
> + $ip = PVE::Network::canonical_ip($ip);
> + $used_ips->{$ip} = 1;
> + }
> }
>
> for my $monip (@{$monips}) {
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pve-devel] applied: [PATCH manager] api: ceph: mon: make checking for duplicate addresses more robust
2022-03-04 13:09 [pve-devel] [PATCH manager] api: ceph: mon: make checking for duplicate addresses more robust Fabian Ebner
2022-06-07 7:20 ` Fabian Ebner
@ 2022-06-08 6:50 ` Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2022-06-08 6:50 UTC (permalink / raw)
To: Proxmox VE development discussion, Fabian Ebner
Am 04/03/2022 um 14:09 schrieb Fabian Ebner:
> Because $mon->{addr} might come with a port attached (affects monitors
> created with PVE 5.4 as reported in the community forum [0]), or even
> be a hostname (according to the code in Ceph/Services.pm). Although
> the latter shouldn't happen for configurations created by PVE.
>
> [0]: https://forum.proxmox.com/threads/105904/
>
> Fixes: 86ed64f9 ("api: ceph: mon: fix handling of IPv6 addresses in assert_mon_prerequisites")
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
> PVE/API2/Ceph/MON.pm | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>
applied, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-08 6:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 13:09 [pve-devel] [PATCH manager] api: ceph: mon: make checking for duplicate addresses more robust Fabian Ebner
2022-06-07 7:20 ` Fabian Ebner
2022-06-08 6:50 ` [pve-devel] applied: " Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox