Can you talk a bit more about your setup with patroni, postgresql and glusterFS. Are you running postgres on a glusterfs? How well does that work?
From my experience file locking on a distributed filesystem is either not implemented correctly or has piss-poor performance -- and databases use them