[Samba] Strange issue with Samba+CTDB+SELinux+GlusterFS

Martin Schwenke martin at meltin.net
Wed Nov 16 05:54:48 UTC 2022


On Tue, 15 Nov 2022 21:04:18 -0600, Thomas Cameron via samba
<samba at lists.samba.org> wrote:

> I'm wondering if something weird is happening like it creates the file 
> initially as /var/lib/ctdb/persistent/registry.tdb and then renames it 
> to /var/lib/ctdb/persistent/registry.tdb.1. The SELinux error could be 
> on the initial file it's creating or something like that.

No, the node number is part of the name of the TDB that is opened:

	/* open the database */
	ctdb_db->db_path = talloc_asprintf(ctdb_db, "%s/%s.%u",
					   ctdb_db_persistent(ctdb_db) ?
						ctdb->db_directory_persistent :
						ctdb->db_directory,
					   db_name, ctdb->pnn);

	tdb_flags = ctdb_db_tdb_flags(db_flags,
				      ctdb->valgrinding,
				      ctdb_config.tdb_mutexes);

again:
	ctdb_db->ltdb = tdb_wrap_open(ctdb_db, ctdb_db->db_path,
				      ctdb->tunable.database_hash_size, 
				      tdb_flags, 
				      O_CREAT|O_RDWR, mode);

There is no manipulation of the filename below this level.

Watching with interest...

peace & happiness,
martin



More information about the samba mailing list