From: Kefu Chai <k.chai@proxmox.com>
To: Ilya Dryomov <idryomov@gmail.com>
Cc: ceph-devel@vger.kernel.org, Alex Markuze <amarkuze@redhat.com>,
Viacheslav Dubeyko <slava@dubeyko.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] libceph: accept addrvecs with multiple entries of the same type
Date: Thu, 23 Apr 2026 19:44:09 +0800 [thread overview]
Message-ID: <87y0idhpfa.fsf@proxmox.com> (raw)
In-Reply-To: <CAOi1vP_=Z9n8aEBZtqLuedfUDka2_80xc28NKWcR5ijgZwUT0Q@mail.gmail.com>
Ilya Dryomov <idryomov@gmail.com> writes:
> On Thu, Apr 23, 2026 at 12:09 PM Kefu Chai <k.chai@proxmox.com> wrote:
>>
>> ceph_decode_entity_addrvec() rejects any addrvec containing more than
>> one entry that matches the requested msgr type (LEGACY or MSGR2),
>> logging "another match of type N in addrvec" and returning -EINVAL.
>> This breaks legitimate deployments where a daemon advertises multiple
>> addresses of the same type, most notably dual-stack (IPv4 + IPv6)
>> clusters
>
> Hi Kefu,
>
Hi Ilya,
>
> My understanding is that dual-stack isn't supported in general:
> https://tracker.ceph.com/issues/65631. The respective references were
> purged from the documentation with Radoslaw (offline?) ack.
>
Yeah, you are right. I was overreaching. Dual-stack and
heterogeneous-subnet clients are not served by multi-entry addrvecs, and
the patch does not change that.
>
>> and multi-subnet deployments where tooling picks one address
>> per listed public_network.
>
> Can you elaborate on when such tooling kicks in, what exactly does it
> do and the use case in general? It's not immediately obvious to me how
> having two addresses of the same type/stack and simply ignoring the
> second one is better than insisting on having a just single address.
>
Sure. The narrow case that remains is compatibility. Admin tooling built
around public_addrv and ceph mon set-addrs produces addrvecs with more
than one entry of the same type on the back of that behavior, and the
kernel's strict guard rejects the whole monmap. The handshake contains()
check is the one concrete reason the extra entries need to be listed in
the addrvec rather than dropped at advertise time.
>
>> Match the userspace messenger, which since Nautilus picks the first
>> entry of the requested type and silently tolerates subsequent entries.
>
> Do you have a reference to a specific commit? I'm wondering if it
> isn't on that "merged more or less accidentally" list.
>
The pick-first selector in AsyncMessenger::create_connect() landed in
Sage's commit d1a783a5f733, and Xie Xingguo's commit 50d8c8a3cce3 fixed
the loop to actually honor the "pick whichever is listed first" comment.
Both shipped in Nautilus.
Would you be willing to take this as a compatibility fix, with the
commit message and the comment in ceph_decode_entity_addrvec() rewritten
to state exactly that and nothing more? If you would rather keep the
strict check and handle this on the tooling side instead, I am happy to
withdraw the patch. Either way, thanks for the review.
Thanks,
Kefu
> Thanks,
>
> Ilya
next prev parent reply other threads:[~2026-04-23 11:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 10:09 [PATCH] libceph: accept addrvecs with multiple entries of the same type Kefu Chai
2026-04-23 10:35 ` Ilya Dryomov
2026-04-23 11:44 ` Kefu Chai [this message]
2026-04-24 18:54 ` Ilya Dryomov
2026-04-25 12:56 ` Kefu Chai
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=87y0idhpfa.fsf@proxmox.com \
--to=k.chai@proxmox.com \
--cc=amarkuze@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=slava@dubeyko.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox