retitle 984560 NIS binary maps could be broken after upgrades, due to GDBM 
oddities
thanks

On Fri, Mar 05, 2021 at 03:40:35AM +0000, McIntyre, Vincent (CASS, Marsfield) 
wrote:

Between stretch and buster, something subtle changed in makedbm.
A map produced by the makedbm in stretch starts with the byte 0xCE.
A map produced by the nakedbm in buster starts with the byte 0xCF.

This makes it impossible for stretch clients to understand the
contents of the map file, they just give up.


Eh, this is the result of a system of propagation of information that is not arch independent and based on file format that could change its inner structure for tons of different reasons.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=923609 for instance.

and specifically the NOTES-WARNING:

-----
Gdbm files have never been `portable' between different operating
systems, system architectures, or potentially even different compilers.
Differences in byte order, the size of file offsets, and even structure
packing make gdbm files non-portable.
-----

I would say that your problem was totally expected, but none pointed that issue at the time of latest release, in the release notes for instance.

That implies that master/slaves _must_ be aligned to ensure a working service,
and that is a requirement, not a suggestion. While one can mix clients and servers, the NIS propagation of binary maps can be broken from time to time and between different platforms. That even applies to each master/slave upgrades.

I'm afraid that's nothing I can manage to do in order to deal with this type of issues, at this stage of release cycle. For sure, in next releases a map rebuild from time to time could be introduced at upgrade time, but - as you can see - the changes could be subtle and unexpected, so the most safe approach is probably to warn about that in documentation, and suggest a rebuild of maps at every binary upgrade, starting from master. And of course never cross the streams!!!! It would be bad ;-)
For sure I can't see expected issues in buster -> bullseye upgrades, at least.
I'm currently using in production a bullseye master, mixed with buster clients and slaves without problems.


--
Francesco P. Lovergine

Reply via email to