[Samba] CTDB Path

Micha Ballmann ballmann at uni-landau.de
Mon May 7 13:46:50 UTC 2018


Hello,

i'm still trying to find out what is the right path for ctdb.conf 
(ubuntu 18.04, samba was compiled from source!!).

When im trying to start CTDB without any config file, my log in 
/usr/local/samba/var/log/log.ctdb shows me:

2018/05/07 12:56:44.363513 ctdbd[4503]: Failed to read nodes file 
"/usr/local/samba/etc/ctdb/nodes"
2018/05/07 12:56:44.363546 ctdbd[4503]: Failed to load nodes file 
"/usr/local/samba/etc/ctdb/nodes"

I thought, thats nice, lets create some config files like:

/usr/local/samba/etc/ctdb/*nodes*

/usr/local/samba/etc/ctdb/*public_addresses*
****

/usr/local/samba/etc/ctdb/*ctdbd.conf*

After creation, i tried to start CTDB:

/usr/local/samba/sbin/ctdbd

First I thought it works, but CTDB ignored my ctdbd.conf and 
public_addresses files.

logfile shows:

####################################################################################

2018/05/07 15:31:39.654278 ctdbd[2092]: CTDB starting on node
2018/05/07 15:31:39.654461 ctdbd[2092]: Recovery lock not set
2018/05/07 15:31:39.658143 ctdbd[2093]: Starting CTDBD (Version 4.7.7) 
as PID: 2093
2018/05/07 15:31:39.659359 ctdbd[2093]: Removed stale socket 
/usr/local/samba/var/run/ctdb/ctdbd.socket
2018/05/07 15:31:39.659502 ctdbd[2093]: Listening to ctdb socket 
/usr/local/samba/var/run/ctdb/ctdbd.socket
2018/05/07 15:31:39.659560 ctdbd[2093]: Set real-time scheduler priority
2018/05/07 15:31:39.659836 ctdbd[2093]: Starting event daemon 
/usr/local/samba/libexec/ctdb/ctdb_eventd -e 
/usr/local/samba/etc/ctdb/events.d -s 
/usr/local/samba/var/run/ctdb/eventd.sock -P 2093 -l 
file:/usr/local/samba/var/log/log.ctdb -d NOTICE
2018/05/07 15:31:39.660333 ctdbd[2093]: connect() failed, errno=2
2018/05/07 15:31:39.686379 ctdb-eventd[2094]: listening on 
/usr/local/samba/var/run/ctdb/eventd.sock
2018/05/07 15:31:39.686576 ctdb-eventd[2094]: daemon started, pid=2094
2018/05/07 15:31:40.660741 ctdbd[2093]: Set runstate to INIT (1)
2018/05/07 15:31:40.863914 ctdb-eventd[2094]: *10.interface: No public 
addresses file found. Nothing to do for 10.interfaces*
2018/05/07 15:31:40.942371 ctdbd[2093]: PNN is 1
2018/05/07 15:31:40.979024 ctdbd[2093]: Vacuuming is disabled for 
non-volatile database ctdb.tdb
2018/05/07 15:31:40.979126 ctdbd[2093]: Attached to database 
'/usr/local/samba/var/lib/ctdb/persistent/ctdb.tdb.1' with flags 0x400
2018/05/07 15:31:40.979225 ctdbd[2093]: Freeze db: ctdb.tdb
2018/05/07 15:31:40.979306 ctdbd[2093]: Set lock helper to 
"/usr/local/samba/libexec/ctdb/ctdb_lock_helper"
2018/05/07 15:31:40.992886 ctdbd[2093]: Set runstate to SETUP (2)
2018/05/07 15:31:41.098136 ctdbd[2093]: Keepalive monitoring has been 
started
2018/05/07 15:31:41.098283 ctdbd[2093]: Set runstate to FIRST_RECOVERY (3)
2018/05/07 15:31:41.098653 ctdb-recoverd[2160]: monitor_cluster starting
2018/05/07 15:31:41.102114 ctdb-recoverd[2160]: Initial recovery master 
set - forcing election
2018/05/07 15:31:41.102652 ctdbd[2093]: This node (1) is now the 
recovery master
2018/05/07 15:31:42.098950 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:43.099496 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:44.100002 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:44.103288 ctdb-recoverd[2160]: Election period ended
2018/05/07 15:31:44.105712 ctdb-recoverd[2160]: Node:1 was in recovery 
mode. Start recovery process
2018/05/07 15:31:44.105826 ctdb-recoverd[2160]: 
../ctdb/server/ctdb_recoverd.c:1268 Starting do_recovery
2018/05/07 15:31:44.105909 ctdb-recoverd[2160]: 
../ctdb/server/ctdb_recoverd.c:1327 Recovery initiated due to problem 
with node 0
2018/05/07 15:31:44.106152 ctdb-recoverd[2160]: 
../ctdb/server/ctdb_recoverd.c:1352 Recovery - created remote databases
2018/05/07 15:31:44.106892 ctdb-recoverd[2160]: 
../ctdb/server/ctdb_recoverd.c:1381 Recovery - updated flags
2018/05/07 15:31:44.107052 ctdb-recoverd[2160]: Set recovery_helper to 
"/usr/local/samba/libexec/ctdb/ctdb_recovery_helper"
2018/05/07 15:31:44.115882 ctdb-recovery[2161]: Set recovery mode to ACTIVE
2018/05/07 15:31:44.116131 ctdbd[2093]: Recovery has started
2018/05/07 15:31:44.195601 ctdb-recovery[2161]: start_recovery event 
finished
2018/05/07 15:31:44.195982 ctdb-recovery[2161]: updated VNNMAP
2018/05/07 15:31:44.196048 ctdb-recovery[2161]: recover database 0x6645c6c4
2018/05/07 15:31:44.196632 ctdbd[2093]: Freeze db: ctdb.tdb frozen
2018/05/07 15:31:44.243352 ctdbd[2093]: Thaw db: ctdb.tdb generation 
1340321078
2018/05/07 15:31:44.243405 ctdbd[2093]: Release freeze handle for db 
ctdb.tdb
2018/05/07 15:31:44.245184 ctdb-recovery[2161]: 1 of 1 databases recovered
2018/05/07 15:31:44.245372 ctdbd[2093]: Recovery mode set to NORMAL
2018/05/07 15:31:44.245701 ctdb-recovery[2161]: Set recovery mode to NORMAL
2018/05/07 15:31:44.245876 ctdbd[2093]: Recovery has finished
2018/05/07 15:31:44.322510 ctdbd[2093]: Set runstate to STARTUP (4)
2018/05/07 15:31:44.322777 ctdb-recovery[2161]: recovered event finished
2018/05/07 15:31:44.323016 ctdb-recoverd[2160]: Takeover run starting
2018/05/07 15:31:44.323240 ctdb-recoverd[2160]: Set takeover_helper to 
"/usr/local/samba/libexec/ctdb/ctdb_takeover_helper"
2018/05/07 15:31:44.330647 ctdb-takeover[2214]: No nodes available to 
host public IPs yet
2018/05/07 15:31:44.406941 ctdb-recoverd[2160]: Takeover run completed 
successfully
2018/05/07 15:31:44.407040 ctdb-recoverd[2160]: 
../ctdb/server/ctdb_recoverd.c:1399 Recovery complete
2018/05/07 15:31:44.407066 ctdb-recoverd[2160]: Resetting ban count to 0 
for all nodes
2018/05/07 15:31:44.407089 ctdb-recoverd[2160]: Just finished a 
recovery. New recoveries will now be suppressed for the rerecovery 
timeout (10 seconds)
2018/05/07 15:31:44.407108 ctdb-recoverd[2160]: Disabling recoveries for 
10 seconds
2018/05/07 15:31:44.826298 ctdbd[2093]: Recovery mode set to ACTIVE
2018/05/07 15:31:44.827914 ctdbd[2093]: Remote node (0) is now the 
recovery master
2018/05/07 15:31:45.100166 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:45.100245 ctdbd[2093]: 
../ctdb/server/ctdb_monitor.c:329 in recovery. Wait one more second
2018/05/07 15:31:46.099005 ctdbd[2093]: 192.168.199.53:4379: connected 
to 192.168.199.52:4379 - 1 connected
2018/05/07 15:31:46.101234 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:46.101301 ctdbd[2093]: 
../ctdb/server/ctdb_monitor.c:329 in recovery. Wait one more second
2018/05/07 15:31:47.102341 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:47.102494 ctdbd[2093]: 
../ctdb/server/ctdb_monitor.c:329 in recovery. Wait one more second
2018/05/07 15:31:47.828655 ctdb-recoverd[2160]: Election period ended
2018/05/07 15:31:47.836226 ctdbd[2093]: 
../ctdb/server/ctdb_monitor.c:528 Node 0 became healthy - force recovery 
for startup
2018/05/07 15:31:47.836732 ctdb-recoverd[2160]: Node 0 has changed flags 
- now 0x0  was 0x2
2018/05/07 15:31:47.846349 ctdbd[2093]: Recovery has started
2018/05/07 15:31:47.932655 ctdbd[2093]: Freeze db: ctdb.tdb
2018/05/07 15:31:47.965191 ctdbd[2093]: Thaw db: ctdb.tdb generation 
2118244862
2018/05/07 15:31:47.965262 ctdbd[2093]: Release freeze handle for db 
ctdb.tdb
2018/05/07 15:31:47.966427 ctdbd[2093]: Recovery mode set to NORMAL
2018/05/07 15:31:47.967419 ctdbd[2093]: Recovery has finished
2018/05/07 15:31:48.047051 ctdb-recoverd[2160]: Disabling takeover runs 
for 60 seconds
2018/05/07 15:31:48.102622 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:48.102740 ctdbd[2093]: 
../ctdb/server/ctdb_monitor.c:340 wait for pending recoveries to end. 
Wait one more second.
2018/05/07 15:31:48.135294 ctdb-recoverd[2160]: Reenabling takeover runs
2018/05/07 15:31:49.103472 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:49.103573 ctdbd[2093]: 
../ctdb/server/ctdb_monitor.c:340 wait for pending recoveries to end. 
Wait one more second.
2018/05/07 15:31:49.113553 ctdb-recoverd[2160]: Initial interface fetched
2018/05/07 15:31:49.114022 ctdb-recoverd[2160]: Trigger takeoverrun
2018/05/07 15:31:49.836780 ctdb-recoverd[2160]: Disabling takeover runs 
for 60 seconds
2018/05/07 15:31:49.927400 ctdb-recoverd[2160]: Reenabling takeover runs
2018/05/07 15:31:50.104495 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:50.104602 ctdbd[2093]: 
../ctdb/server/ctdb_monitor.c:340 wait for pending recoveries to end. 
Wait one more second.
2018/05/07 15:31:51.104930 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:51.105040 ctdbd[2093]: 
../ctdb/server/ctdb_monitor.c:340 wait for pending recoveries to end. 
Wait one more second.
2018/05/07 15:31:52.105910 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:52.106030 ctdbd[2093]: 
../ctdb/server/ctdb_monitor.c:340 wait for pending recoveries to end. 
Wait one more second.
2018/05/07 15:31:53.106522 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:53.106651 ctdbd[2093]: 
../ctdb/server/ctdb_monitor.c:340 wait for pending recoveries to end. 
Wait one more second.
2018/05/07 15:31:54.107388 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:54.107502 ctdbd[2093]: 
../ctdb/server/ctdb_monitor.c:340 wait for pending recoveries to end. 
Wait one more second.
2018/05/07 15:31:54.408316 ctdb-recoverd[2160]: Reenabling recoveries 
after timeout
2018/05/07 15:31:55.108346 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:55.108461 ctdbd[2093]: 
../ctdb/server/ctdb_monitor.c:340 wait for pending recoveries to end. 
Wait one more second.
2018/05/07 15:31:56.108656 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:56.108751 ctdbd[2093]: 
../ctdb/server/ctdb_monitor.c:340 wait for pending recoveries to end. 
Wait one more second.
2018/05/07 15:31:57.109724 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:57.109850 ctdbd[2093]: 
../ctdb/server/ctdb_monitor.c:340 wait for pending recoveries to end. 
Wait one more second.
2018/05/07 15:31:58.110660 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:58.110777 ctdbd[2093]: 
../ctdb/server/ctdb_monitor.c:340 wait for pending recoveries to end. 
Wait one more second.
2018/05/07 15:31:59.111745 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:31:59.111863 ctdbd[2093]: 
../ctdb/server/ctdb_monitor.c:340 wait for pending recoveries to end. 
Wait one more second.
2018/05/07 15:32:00.112446 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:32:00.112583 ctdbd[2093]: 
../ctdb/server/ctdb_monitor.c:340 wait for pending recoveries to end. 
Wait one more second.
2018/05/07 15:32:01.112748 ctdbd[2093]: CTDB_WAIT_UNTIL_RECOVERED
2018/05/07 15:32:01.112871 ctdbd[2093]: ctdb_recheck_persistent_health: 
OK[1] FAIL[0]
2018/05/07 15:32:01.112908 ctdbd[2093]: 
../ctdb/server/ctdb_takeover.c:1617 Released 0 public IPs
2018/05/07 15:32:01.112928 ctdbd[2093]: Running the "startup" event.
2018/05/07 15:32:01.258966 ctdbd[2093]: startup event OK - enabling 
monitoring
2018/05/07 15:32:01.259028 ctdbd[2093]: Set runstate to RUNNING (5)
2018/05/07 15:32:03.403726 ctdbd[2093]: monitor event OK - node re-enabled
2018/05/07 15:32:03.403810 ctdbd[2093]: Node became HEALTHY. Ask 
recovery master to reallocate IPs
2018/05/07 15:32:03.405372 ctdb-recoverd[2160]: Node 1 has changed flags 
- now 0x0  was 0x2
2018/05/07 15:32:03.860374 ctdb-recoverd[2160]: Disabling takeover runs 
for 60 seconds
2018/05/07 15:32:03.948388 ctdb-recoverd[2160]: Reenabling takeover runs

####################################################################################

The "public_addresses" file is on the same location like the "nodes" file!

ctdb status:

Number of nodes:2
pnn:0 192.168.199.52   OK
pnn:1 192.168.199.53   OK (THIS NODE)
Generation:2118244862
Size:2
hash:0 lmaster:0
hash:1 lmaster:1
Recovery mode:NORMAL (0)
Recovery master:0

Thanks and best regards!

PS:

I have no problems to configure with packages provided by Ubuntu 
repositories. The CTDB files are located in /etc/ctdb.


Am 05.05.2018 um 05:10 schrieb Martin Schwenke:
> Hi Micha,
>
> On Fri, 4 May 2018 13:57:42 +0200, Micha Ballmann via samba
> <samba at lists.samba.org> wrote:
>
>> at this time i want to install a CTDB Cluster with SAMBA 4.7.7 from SOURCE!
>>
>> I compiled samba as follow:
>>
>> |./configure| |--with-cluster-support
>> ||--with-shared-modules=idmap_rid,idmap_tdb2,idmap_ad|
>>
>> The whole SAMBA enviroment is located in /usr/local/samba/.
>>
>> CTDB is located in /usr/local/samba/etc/ctdb.
>>
>> I guess right that the correct path of ctdbd.conf (node file, public
>> address file . . .) is located in /usr/loca/samba/etc/ctdb?
> Yep, should be.
>
>> Im a litte bit confused about
>> (https://ctdb.samba.org/manpages/ctdbd.conf.5.html):
>>
>> |/usr/local/etc/ctdb/
>>
>> | |/etc/sysconfig/ctdb
>> |
>> |/etc/default/ctdb
> Hmmm... I'm a bit confused too!  The nice thing about standards is that
> there are so many of them to choose from.  ;-)
>
> /etc/sysconfig/ctdb and /etc/default/ctdb are used by
> initscripts/packages on Linux distributions.  You may be able to ignore
> them completely.
>
> A couple of years ago we changed all the paths that we could find in
> CTDB and its documentation to use the GNU default prefix of /usr/local/.
> Until now I didn't know that the top-level Samba build installs
> into /usr/local/samba/ by default!  I never thought to check...  :-(
>
> However, we do modify the prefix when installing files, so they should
> all be correct be correct on your system.
>
> Can you please check the installed ctdbd.conf(5) manpage (and others) on
> your system and let me know if the paths there reflect the reality of
> where things are actually installed?
>
> peace & happiness,
> martin



More information about the samba mailing list