mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Implement support of log.mode. (#3122)
There was one oversight of #2781 - to influence external tools that Patroni could execute, we set global `umask` value based on permissions of the $PGDATA directory. As a result, it also influenced permissions of log files created by Patroni. To address the problem we implement two measures: 1. Make `log.mode` configurable. 2. If the value is not set - calculate permissions from the original value of the umask setting.
This commit is contained in:
@@ -30,3 +30,6 @@ class TestFilePermissions(unittest.TestCase):
|
||||
def test_set_permissions_from_data_directory(self, mock_logger):
|
||||
pg_perm.set_permissions_from_data_directory('test')
|
||||
self.assertEqual(mock_logger.call_args[0][0], 'Can not check permissions on %s: %r')
|
||||
|
||||
def test_orig_umask(self):
|
||||
self.assertIsNotNone(pg_perm.orig_umask)
|
||||
|
||||
Reference in New Issue
Block a user