1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

10 Commits

Author SHA1 Message Date
Martin Schwenke
9ec9e6f77b ctdb-scripts: Quote some variable expansions
This avoids relevant shellcheck warnings.  This is most of the
shellcheck low hanging fruit in the non-test code.  Many of the other
warnings produced by shellcheck are either false positives, are
non-trivial to fix or a fix may result in worse code.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Jul  6 08:15:49 CEST 2016 on sn-devel-144
2016-07-06 08:15:49 +02:00
Martin Schwenke
f227c26178 ctdb-scripts: Update script boilerplate to avoid shellcheck warnings
* Assign the output of dirname to temporary variable to avoid word
  splitting when directory name contains whitespace

* Drop export of CTDB_BASE to avoid masking broken return value -
  functions file does the export anyway

* Quote path when including functions file

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2016-07-06 04:28:09 +02:00
Martin Schwenke
6456b06294 ctdb-scripts: Lock debugging should print kernel stack for process in D state
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-10-16 13:35:10 +02:00
Martin Schwenke
677467682a ctdb-scripts: Move remaining state files into CTDB_SCRIPT_VARDIR
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jose A. Rivera <jarrpa@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-09-15 08:56:21 +02:00
Amitay Isaacs
f1e281cd47 ctdb-scripts: Fix the regular expresssion for parsing /proc/locks
The major and minor device numbers are hexadecimal not decimal.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Thu Sep 25 07:19:59 CEST 2014 on sn-devel-104
2014-09-25 07:19:59 +02:00
Amitay Isaacs
c18f3eeffb ctdb-scripts: Be careful when generating unique pids for stack traces
sort expects the data to be line based, so make it so.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-11-27 18:46:17 +01:00
Amitay Isaacs
7f20b760ec ctdb-scripts: Set defaults for CTDB_DBDIR and CTDB_DBDIR_PERSISTENT
If these configuration variables are not defined, then there should
a default fallback.  This is a workaround till CTDB compile time
configuration can be accessed at runtime.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-11-27 18:46:17 +01:00
Amitay Isaacs
86802b05f6 ctdb-scripts: Run a single instance of debug_locks.sh at a give time
This prevents spamming of logs if multiple lock requests are waiting
and keep timing out.

Also, improve the logging format with separators.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-11-27 18:46:16 +01:00
Martin Schwenke
4ab58a12a1 ctdb-scripts: debug_locks.sh should use configuration to find TDB location
That is, don't use fixed paths.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-11-27 18:46:16 +01:00
Amitay Isaacs
f46d0e783c scripts: Add an example debug_locks.sh script to debug locking issue
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit c711ff4702c5f95b75e4bf030665fc2afffc2f9e)
2013-07-10 14:33:18 +10:00