Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (344)
3170d75b
VERSION: Bump version up to 4.10.1...
Mar 19, 2019
2b309861
ctdb-build: use a fixed ctdb_version.h using SAMBA_VERSION_STRING
Mar 22, 2019
6401d809
ctdb-build: Drop creation of .distversion in tarball
Mar 22, 2019
f515f1a5
ctdb-version: Simplify version string usage
Mar 22, 2019
5f1d98c2
ndr_spoolss_buf: fix out of scope use of stack variable in NDR_SPOOLSS_PUSH_ENUM_OUT()
Mar 22, 2019
4cafdc7f
ctdb-tests: Build cluster mutex path manually
Mar 22, 2019
d3ed17e7
s3:script: Fix jobid check in test_smbspool.sh
Mar 22, 2019
18515064
s3:client: Pass DEVICE_URI and AUTH_INFO_REQUIRED env to smbspool
Mar 22, 2019
0db94874
s3:client: Evaluate the AUTH_INFO_REQUIRED variable set by cups
Mar 22, 2019
c6f1719b
s3:client: Make sure we work on a copy of the title
Mar 22, 2019
84aad2ea
s3:client: Fix smbspool device uri handling
Mar 22, 2019
755f624e
ctdb-packaging: ctdb package should not own system library directory
Mar 22, 2019
fc4e3273
ctdb-packaging: Test package requires tcpdump
Mar 22, 2019
909cecd3
ctdb: Initialize addr struct to zero before reparsing as IPV4
Mar 22, 2019
eb632754
ctdb-tests: Add some testing for IPv4-mapped IPv6 address parsing
Mar 22, 2019
f6df8d97
s4:librpc: Fix installation of Samba
Mar 22, 2019
c8e8d979
s3:lib: Fix the debug message for adding cache entries.
Mar 22, 2019
084d2f1b
s3:utils: Use C99 initializer for poptOption in smbstatus
Apr 02, 2019
b866bdbe
s3:utils: Add 'smbstatus -L --resolve-uids' to show usernames
Apr 02, 2019
79d3de4d
selftest: Add smbstatus to testhelper
Apr 02, 2019
a21e9754
s3:tests: Add test for smbstatus and smbstatus --resolve_uids
Apr 02, 2019
2d4820f0
s3:waf: Fix the detection of makdev() macro on Linux
Apr 02, 2019
18f41671
selftest: force running with TZ=UTC
Apr 02, 2019
8d1241da
blackbox/*.sh: pass -u to 'diff'
Apr 02, 2019
4fc17804
blackbox/dbcheck-links.sh: reproduce lost deleted object problem
Apr 02, 2019
3e539f75
dsdb:repl_meta_data: allow CONTROL_DBCHECK_FIX_LINK_DN_NAME to by pass rename
Apr 02, 2019
8736fb5e
dbcheck: use DSDB_CONTROL_DBCHECK_FIX_LINK_DN_NAME when renaming deleted objects
Apr 02, 2019
95f5b9f2
dbcheck: do isDeleted, systemFlags and replPropertyMetaData detection first
Apr 02, 2019
0c2f7224
dbcheck: don't move already deleted objects to LostAndFound
Apr 02, 2019
a47b27b2
dbcheck: don't remove dangling one-way links on already deleted objects
Apr 02, 2019
caf0caba
dbcheck: add find_repl_attid() helper function
Apr 02, 2019
4f0b554b
blackbox/dbcheck-links.sh: add regression test for lost deleted object repair
Apr 02, 2019
89fb9d0a
dbcheck: detect the change after deletion bug
Apr 02, 2019
178fad24
python/samba/netcmd: provide SUPPRESS_HELP via Option class
Apr 02, 2019
b292ef1d
dbcheck: add --selftest-check-expired-tombstones cmdline option
Apr 02, 2019
40b6af9c
blackbox/dbcheck*.sh: pass --selftest-check-expired-tombstones to dbcheck
Apr 02, 2019
4b658a5a
blackbox/dbcheck-links.sh: prepare regression test for skipping expired tombstones
Apr 02, 2019
6602a77b
dbcheck: don't check expired tombstone objects by default anymore
Apr 02, 2019
10a390e8
dbcheck: use the str() value of the "name" attribute
Apr 02, 2019
286b80cb
ldb: cmocka test for empty attributes bug
Apr 02, 2019
868356cf
acl_read: Fix regression caused by
db15fcfa
for empty lists
Apr 02, 2019
75b6e02a
py/graph: use 2.6 compatible check for set membership
Apr 02, 2019
9b8398ec
py/kcc_utils: py2.6 compatibility
Apr 02, 2019
f52ebe25
py/uptodateness: use 2.6 compatible dictionary construction
Apr 02, 2019
76b38e19
py/logger: use python 2.6 compatible arguments
Apr 02, 2019
3f278c3f
Fix typos in "valid"
Apr 02, 2019
cfffac0f
regfio: Use correct function names in debug information
Apr 02, 2019
bf6a8517
regfio: Add trivial unit test
Apr 02, 2019
d4ef858e
regfio: Improve handling of malformed registry hive files
Apr 02, 2019
722c5b32
regfio: Update code near recent changes to match README.Coding
Apr 02, 2019
78b72ff3
regfio tests: Update comment style to match README.Coding
Apr 02, 2019
7921aa63
dlz: Add test to ensure there are writable zones
Apr 02, 2019
0e94b0a3
s4:dlz make b9_has_soa check dc=@ node
Apr 02, 2019
e769bd66
s4/messaging: Fix undefined reference in linking libMESSAGING-samba4.so
Apr 02, 2019
815be52b
lib: Make fd_load work for non-regular files
Apr 02, 2019
af05bf79
libcli: permit larger values of DataLength in SMB2_ENCRYPTION_CAPABILITIES of negotiate response
Apr 02, 2019
17f3d535
WHATSNEW: Add release notes for Samba 4.10.1.
Apr 03, 2019
e0cc225f
VERSION: Disable GIT_SNAPSHOT for the 4.10.1 release.
Apr 03, 2019
61c4d715
VERSION: Bump version up to 4.10.2...
Apr 03, 2019
16fa173a
VERSION: Bump version up to 4.10.2...
Apr 05, 2019
c25ee5bd
CVE-2019-3870 tests: Extend smbd tests to check for umask being overwritten
Apr 05, 2019
0b712415
CVE-2019-3870 tests: Add test to check file-permissions are correct after provision
Apr 05, 2019
ebb9b7fa
CVE-2019-3870 pysmbd: Include tests to show the outside umask has no impact
Apr 05, 2019
9a4029b5
CVE-2019-3870 pysmbd: Move umask manipuations as close as possible to users
Apr 05, 2019
8e0a6867
CVE-2019-3870 pysmbd: Ensure a zero umask is set for smbd.mkdir()
Apr 05, 2019
67c83778
CVE-2019-3880 s3: rpc: winreg: Remove implementations of SaveKey/RestoreKey.
Apr 05, 2019
619d3953
WHATSNEW: Add release notes for Samba 4.10.2.
Apr 05, 2019
17cd92e1
VERSION: Disable GIT_SNAPSHOT for 4.10.2 release.
Apr 05, 2019
ebf34098
Merge tag 'samba-4.10.2' into v4-10-test
Apr 08, 2019
cf323d76
VERSION: Bump version up to 4.10.3.
Apr 08, 2019
54571d33
docs: Update smbclient manpage for --max-protocol
Apr 10, 2019
ada3417c
s3:libads: Print more information when LDAP fails
Apr 10, 2019
461090e0
s3:libsmb: Add some useful debug output to cliconnect
Apr 10, 2019
2e96408e
s3:libnet: Fix debug message in libnet_DomainJoin()
Apr 10, 2019
0b00c7a2
auth:ntlmssp: Add back CRAP ndr debug output
Apr 10, 2019
936594d6
auth:creds: Prefer the principal over DOMAIN/username when using NTLM
Apr 10, 2019
bd573b37
s3:libnet: Use more secure name for the JOIN krb5.conf
Apr 10, 2019
78f30808
s3:libads: Make sure we can lookup KDCs which are not configured
Apr 10, 2019
837a141a
s3:ldap: Leave add machine code early for pre-existing accounts
Apr 10, 2019
05709dba
s3-libnet_join: always pass down admin domain to ads layer
Apr 10, 2019
f85efe20
s3-libnet_join: setup libnet join error string when AD connect fails
Apr 10, 2019
bdf59b41
s3-libnet_join: allow fallback to NTLMSSP auth in libnet_join
Apr 10, 2019
dda1c48a
py/provision: fix for Python 2.6
Apr 10, 2019
63453eb3
ctdb-scripts: Reindent some functions prior to making changes
Apr 11, 2019
a1275fed
ctdb-scripts: Rename variable nfslock_service to nfs_lock_service
Apr 11, 2019
b2aa818e
ctdb-scripts: Add test variable CTDB_NFS_DISTRO_STYLE
Apr 11, 2019
aaf8b6a6
ctdb-scripts: Factor out nfs_load_config()
Apr 11, 2019
ee78bddd
ctdb-scripts: Stop/start mount/rquotad/status via NFS call-out
Apr 11, 2019
002beda3
ctdb-scripts: Start NFS quota service if defined
Apr 11, 2019
80c6b7d3
ctdb-scripts: Add systemd services to NFS call-out
Apr 11, 2019
53e76ab4
ctdb-tests: Update NFS test infrastructure to support systemd services
Apr 11, 2019
12f6eae2
ctdb-scripts: Allow load_system_config() to take multiple alternatives
Apr 11, 2019
6baf1529
ctdb-scripts: Update statd-callout to try several configuration files
Apr 11, 2019
d4ea61f5
memcache: Introduce struct for storing talloc pointer
Apr 11, 2019
43f3544e
memcache: Properly track the size of talloc objects
Apr 11, 2019
1a82c4b9
memcache: Increase size of default memcache to 512k
Apr 11, 2019
182f329f
torture: Add test for talloc size accounting in memcache
Apr 11, 2019
8f43d725
ctdb-daemon: Revert "We can not assume that just because we could complete a TCP handshake"
Apr 15, 2019
e23fdfe6
ctdb-common: Avoid race between fd and signal events
Apr 15, 2019
690ba5dc
s3:smbd: handle IO_REPARSE_TAG_DFS in SMB_FIND_FILE_FULL_DIRECTORY_INFO
Apr 16, 2019
Expand all
Show whitespace changes
Inline
Side-by-side
VERSION
View file @
b9ee441b
...
...
@@ -25,7 +25,7 @@
########################################################
SAMBA_VERSION_MAJOR=4
SAMBA_VERSION_MINOR=10
SAMBA_VERSION_RELEASE=
0
SAMBA_VERSION_RELEASE=
7
########################################################
# If a official release has a serious bug #
...
...
WHATSNEW.txt
View file @
b9ee441b
This diff is collapsed.
Click to expand it.
auth/credentials/credentials.c
View file @
b9ee441b
...
...
@@ -1115,7 +1115,7 @@ _PUBLIC_ void cli_credentials_get_ntlm_username_domain(struct cli_credentials *c
const
char
**
username
,
const
char
**
domain
)
{
if
(
cred
->
principal_obtained
>
cred
->
username_obtained
)
{
if
(
cred
->
principal_obtained
>
=
cred
->
username_obtained
)
{
*
domain
=
talloc_strdup
(
mem_ctx
,
""
);
*
username
=
cli_credentials_get_principal
(
cred
,
mem_ctx
);
}
else
{
...
...
auth/ntlmssp/ntlmssp_client.c
View file @
b9ee441b
...
...
@@ -342,6 +342,22 @@ NTSTATUS ntlmssp_client_challenge(struct gensec_security *gensec_security,
}
}
if
(
DEBUGLEVEL
>=
10
)
{
struct
CHALLENGE_MESSAGE
*
challenge
=
talloc
(
ntlmssp_state
,
struct
CHALLENGE_MESSAGE
);
if
(
challenge
!=
NULL
)
{
NTSTATUS
status
;
challenge
->
NegotiateFlags
=
chal_flags
;
status
=
ntlmssp_pull_CHALLENGE_MESSAGE
(
&
in
,
challenge
,
challenge
);
if
(
NT_STATUS_IS_OK
(
status
))
{
NDR_PRINT_DEBUG
(
CHALLENGE_MESSAGE
,
challenge
);
}
TALLOC_FREE
(
challenge
);
}
}
if
(
chal_flags
&
NTLMSSP_TARGET_TYPE_SERVER
)
{
ntlmssp_state
->
server
.
is_standalone
=
true
;
}
else
{
...
...
@@ -702,6 +718,22 @@ NTSTATUS ntlmssp_client_challenge(struct gensec_security *gensec_security,
return
nt_status
;
}
if
(
DEBUGLEVEL
>=
10
)
{
struct
AUTHENTICATE_MESSAGE
*
authenticate
=
talloc
(
ntlmssp_state
,
struct
AUTHENTICATE_MESSAGE
);
if
(
authenticate
!=
NULL
)
{
NTSTATUS
status
;
authenticate
->
NegotiateFlags
=
ntlmssp_state
->
neg_flags
;
status
=
ntlmssp_pull_AUTHENTICATE_MESSAGE
(
out
,
authenticate
,
authenticate
);
if
(
NT_STATUS_IS_OK
(
status
))
{
NDR_PRINT_DEBUG
(
AUTHENTICATE_MESSAGE
,
authenticate
);
}
TALLOC_FREE
(
authenticate
);
}
}
/*
* We always include the MIC, even without:
* av_flags->Value.AvFlags |= NTLMSSP_AVFLAG_MIC_IN_AUTHENTICATE_MESSAGE;
...
...
buildtools/bin/waf
View file @
b9ee441b
...
...
@@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE.
import
os
,
sys
,
inspect
VERSION
=
"
2.0.
8
"
VERSION
=
"
2.0.
17
"
REVISION
=
"
x
"
GIT
=
"
x
"
INSTALL
=
"
x
"
...
...
buildtools/wafsamba/samba_deps.py
View file @
b9ee441b
# Samba automatic dependency handling and project rules
import
os
,
sys
,
re
,
time
import
os
,
sys
,
re
from
waflib
import
Build
,
Options
,
Logs
,
Utils
,
Errors
from
waflib.Logs
import
debug
...
...
@@ -1102,8 +1102,7 @@ def check_project_rules(bld):
if
not
force_project_rules
and
load_samba_deps
(
bld
,
tgt_list
):
return
global
tstart
tstart
=
time
.
clock
()
timer
=
Utils
.
Timer
()
bld
.
new_rules
=
True
Logs
.
info
(
"
Checking project rules ...
"
)
...
...
@@ -1112,26 +1111,26 @@ def check_project_rules(bld):
expand_subsystem_deps
(
bld
)
debug
(
"
deps: expand_subsystem_deps: %
f
"
%
(
time
.
clock
()
-
tstart
))
debug
(
"
deps: expand_subsystem_deps: %
s
"
%
str
(
time
r
))
replace_grouping_libraries
(
bld
,
tgt_list
)
debug
(
"
deps: replace_grouping_libraries: %
f
"
%
(
time
.
clock
()
-
tstart
))
debug
(
"
deps: replace_grouping_libraries: %
s
"
%
str
(
time
r
))
build_direct_deps
(
bld
,
tgt_list
)
debug
(
"
deps: build_direct_deps: %
f
"
%
(
time
.
clock
()
-
tstart
))
debug
(
"
deps: build_direct_deps: %
s
"
%
str
(
time
r
))
break_dependency_loops
(
bld
,
tgt_list
)
debug
(
"
deps: break_dependency_loops: %
f
"
%
(
time
.
clock
()
-
tstart
))
debug
(
"
deps: break_dependency_loops: %
s
"
%
str
(
time
r
))
if
Options
.
options
.
SHOWDEPS
:
show_dependencies
(
bld
,
Options
.
options
.
SHOWDEPS
,
set
())
calculate_final_deps
(
bld
,
tgt_list
,
loops
)
debug
(
"
deps: calculate_final_deps: %
f
"
%
(
time
.
clock
()
-
tstart
))
debug
(
"
deps: calculate_final_deps: %
s
"
%
str
(
time
r
))
if
Options
.
options
.
SHOW_DUPLICATES
:
show_object_duplicates
(
bld
,
tgt_list
)
...
...
@@ -1140,7 +1139,7 @@ def check_project_rules(bld):
for
f
in
[
build_dependencies
,
build_includes
,
add_init_functions
]:
debug
(
'
deps: project rules checking %s
'
,
f
)
for
t
in
tgt_list
:
f
(
t
)
debug
(
"
deps: %s: %
f
"
%
(
f
,
time
.
clock
()
-
tstart
))
debug
(
"
deps: %s: %
s
"
%
(
f
,
str
(
timer
)
))
debug
(
'
deps: project rules stage1 completed
'
)
...
...
@@ -1148,17 +1147,17 @@ def check_project_rules(bld):
Logs
.
error
(
"
Duplicate sources present - aborting
"
)
sys
.
exit
(
1
)
debug
(
"
deps: check_duplicate_sources: %
f
"
%
(
time
.
clock
()
-
tstart
))
debug
(
"
deps: check_duplicate_sources: %
s
"
%
str
(
time
r
))
if
not
bld
.
check_group_ordering
(
tgt_list
):
Logs
.
error
(
"
Bad group ordering - aborting
"
)
sys
.
exit
(
1
)
debug
(
"
deps: check_group_ordering: %
f
"
%
(
time
.
clock
()
-
tstart
))
debug
(
"
deps: check_group_ordering: %
s
"
%
str
(
time
r
))
show_final_deps
(
bld
,
tgt_list
)
debug
(
"
deps: show_final_deps: %
f
"
%
(
time
.
clock
()
-
tstart
))
debug
(
"
deps: show_final_deps: %
s
"
%
str
(
time
r
))
debug
(
'
deps: project rules checking completed - %u targets checked
'
,
len
(
tgt_list
))
...
...
@@ -1166,7 +1165,7 @@ def check_project_rules(bld):
if
not
bld
.
is_install
:
save_samba_deps
(
bld
,
tgt_list
)
debug
(
"
deps: save_samba_deps: %
f
"
%
(
time
.
clock
()
-
tstart
))
debug
(
"
deps: save_samba_deps: %
s
"
%
str
(
time
r
))
Logs
.
info
(
"
Project rules pass
"
)
...
...
buildtools/wafsamba/wafsamba.py
View file @
b9ee441b
...
...
@@ -37,7 +37,7 @@ LIB_PATH="shared"
os
.
environ
[
'
PYTHONUNBUFFERED
'
]
=
'
1
'
if
Context
.
HEXVERSION
not
in
(
0x200
08
00
,):
if
Context
.
HEXVERSION
not
in
(
0x200
11
00
,):
Logs
.
error
(
'''
Please use the version of waf that comes with Samba, not
a system installed version. See http://wiki.samba.org/index.php/Waf
...
...
ctdb/.gitignore
View file @
b9ee441b
...
...
@@ -27,7 +27,6 @@ tests/takeover/ctdb_takeover.pyc
tests/eventscripts/var
tests/eventscripts/etc/iproute2
tests/eventscripts/etc-ctdb/policy_routing
include/ctdb_version.h
packaging/RPM/ctdb.spec
doc/*.[1-7]
doc/*.[1-7].html
ctdb/common/event_script.c
View file @
b9ee441b
...
...
@@ -117,7 +117,8 @@ int event_script_get_list(TALLOC_CTX *mem_ctx,
}
*
out
=
script_list
;
return
0
;
ret
=
0
;
goto
done
;
nomem:
ret
=
ENOMEM
;
...
...
ctdb/common/run_proc.c
View file @
b9ee441b
...
...
@@ -295,13 +295,22 @@ again:
proc
->
result
.
sig
=
WTERMSIG
(
status
);
}
/* Confirm that all data has been read from the pipe */
if
(
proc
->
fd
!=
-
1
)
{
proc_read_handler
(
ev
,
proc
->
fde
,
0
,
proc
);
TALLOC_FREE
(
proc
->
fde
);
proc
->
fd
=
-
1
;
}
DLIST_REMOVE
(
run_ctx
->
plist
,
proc
);
/* Active run_proc request */
if
(
proc
->
req
!=
NULL
)
{
run_proc_done
(
proc
->
req
);
}
else
{
talloc_free
(
proc
);
}
DLIST_REMOVE
(
run_ctx
->
plist
,
proc
);
goto
again
;
}
...
...
@@ -419,6 +428,7 @@ static void run_proc_done(struct tevent_req *req)
if
(
state
->
proc
->
output
!=
NULL
)
{
state
->
output
=
talloc_steal
(
state
,
state
->
proc
->
output
);
}
talloc_steal
(
state
,
state
->
proc
);
tevent_req_done
(
req
);
}
...
...
ctdb/common/sock_daemon.c
View file @
b9ee441b
...
...
@@ -893,7 +893,7 @@ static void sock_daemon_run_socket_fail(struct tevent_req *subreq)
subreq
,
struct
tevent_req
);
struct
sock_daemon_run_state
*
state
=
tevent_req_data
(
req
,
struct
sock_daemon_run_state
);
const
char
*
sockpath
=
NULL
;
const
char
*
sockpath
=
"INVALID"
;
int
ret
=
0
;
bool
status
;
...
...
ctdb/common/version.c
deleted
100644 → 0
View file @
5b2a3764
/*
CTDB version string
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include
"ctdb_version.h"
const
char
ctdb_version_string
[]
=
CTDB_VERSION_STRING
;
ctdb/common/version.h
deleted
100644 → 0
View file @
5b2a3764
/*
CTDB version string
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
extern
const
char
ctdb_version_string
[];
ctdb/config/ctdb.service
View file @
b9ee441b
...
...
@@ -2,6 +2,7 @@
Description
=
CTDB
Documentation
=
man:ctdbd(1) man:ctdb(7)
After
=
network-online.target time-sync.target
ConditionFileNotEmpty
=
/etc/ctdb/nodes
[Service]
Type
=
forking
...
...
ctdb/config/functions
View file @
b9ee441b
...
...
@@ -33,15 +33,16 @@ fi
load_system_config ()
{
if [ -z "$1" ] ; then
return
fi
for _i ; do
if [ -f "${CTDB_SYS_ETCDIR}/sysconfig/$1" ]; then
. "${CTDB_SYS_ETCDIR}/sysconfig/$1"
elif [ -f "${CTDB_SYS_ETCDIR}/default/$1" ]; then
. "${CTDB_SYS_ETCDIR}/default/$1"
if [ -f "${CTDB_SYS_ETCDIR}/sysconfig/${_i}" ]; then
. "${CTDB_SYS_ETCDIR}/sysconfig/${_i}"
return
elif [ -f "${CTDB_SYS_ETCDIR}/default/${_i}" ]; then
. "${CTDB_SYS_ETCDIR}/default/${_i}"
return
fi
done
}
# load_script_options [ component script ]
...
...
ctdb/config/nfs-checks.d/10.status.check
View file @
b9ee441b
...
...
@@ -2,6 +2,6 @@
version="1"
restart_every=2
unhealthy_after=6
service_stop_cmd="
killall -q -9 rpc.
stat
d
"
service_start_cmd="
rpc.statd ${STATD_HA_CALLOUT:+-H} $STATD_HA_CALLOUT ${STATD_HOSTNAME:+-n} $STATD_HOSTNAME ${STATD_PORT:+-p} $STATD_PORT ${STATD_OUTGOING_PORT:+-o} $STATD_OUTGOING_PORT
"
service_stop_cmd="
$CTDB_NFS_CALLOUT stop
stat
us
"
service_start_cmd="
$CTDB_NFS_CALLOUT start status
"
service_debug_cmd="program_stack_traces rpc.statd 5"
ctdb/config/nfs-checks.d/40.mountd.check
View file @
b9ee441b
...
...
@@ -2,6 +2,6 @@
version="1"
restart_every=2
unhealthy_after=6
service_stop_cmd="
killall -q -9 rpc.
mountd"
service_start_cmd="
rpc.mountd $RPCMOUNTDOPTS ${MOUNTD_PORT:+-p} $MOUNTD_PORT
"
service_stop_cmd="
$CTDB_NFS_CALLOUT stop
mountd"
service_start_cmd="
$CTDB_NFS_CALLOUT start mountd
"
service_debug_cmd="program_stack_traces rpc.mountd 5"
ctdb/config/nfs-checks.d/50.rquotad.check
View file @
b9ee441b
...
...
@@ -2,6 +2,6 @@
version="1"
restart_every=2
unhealthy_after=6
service_stop_cmd="
killall -q -9 rpc.
rquotad"
service_start_cmd="
rpc.rquotad ${RQUOTAD_PORT:+-p} $RQUOTAD_PORT
"
service_stop_cmd="
$CTDB_NFS_CALLOUT stop
rquotad"
service_start_cmd="
$CTDB_NFS_CALLOUT start rquotad
"
service_debug_cmd="program_stack_traces rpc.rquotad 5"
ctdb/config/nfs-linux-kernel-callout
View file @
b9ee441b
...
...
@@ -12,20 +12,66 @@ set -e
# hook for testing.
nfs_exports_file
=
"
${
CTDB_NFS_EXPORTS_FILE
:-
/var/lib/nfs/etab
}
"
# Red Hat
# As above, edit the default value below. CTDB_NFS_DISTRO_STYLE is a
# test variable only.
nfs_distro_style
=
"
${
CTDB_NFS_DISTRO_STYLE
:-
sysvinit
-redhat
}
"
case
"
$nfs_distro_style
"
in
systemd-
*
)
# Defaults
nfs_service
=
"nfs-server"
nfs_lock_service
=
"rpc-statd"
nfs_mountd_service
=
"nfs-mountd"
nfs_status_service
=
"rpc-statd"
nfs_rquotad_service
=
"rpc-rquotad"
nfs_config
=
"/etc/sysconfig/nfs"
nfs_rquotad_config
=
""
# Not use with systemd, restart via service
case
"
$nfs_distro_style
"
in
*
-redhat
|
*
-suse
)
:
# Defaults only
;;
*
-debian
)
nfs_rquotad_service
=
"quotarpc"
;;
*
)
echo
"Internal error"
exit
1
esac
;;
sysvinit-
*
)
# Defaults
nfs_service
=
"nfs"
nfslock_service
=
"nfslock"
nfs_lock_service
=
""
nfs_mountd_service
=
""
nfs_status_service
=
""
nfs_rquotad_service
=
""
nfs_config
=
"/etc/sysconfig/nfs"
nfs_rquotad_config
=
"
$nfs_config
"
# SUSE
#nfs_service="nfsserver"
#nfslock_service=""
#nfs_config="/etc/sysconfig/nfs"
case
"
$nfs_distro_style
"
in
*
-redhat
)
nfs_lock_service
=
"nfslock"
;;
*
-suse
)
nfs_service
=
"nfsserver"
;;
*
-debian
)
nfs_service
=
"nfs-kernel-server"
nfs_config
=
"/etc/default/nfs-kernel-server"
nfs_rquotad_config
=
"/etc/default/quota"
;;
*
)
echo
"Internal error"
exit
1
esac
;;
# Debian
#nfs_service="nfs-kernel-serve
r"
#nfslock_service=""
#nfs_config="/etc/default/nfs-kernel-server"
*
)
echo
"Internal erro
r"
exit
1
esac
# Override for unit testing
if
[
-z
"
$PROCFS_PATH
"
]
;
then
...
...
@@ -46,6 +92,16 @@ EOF
exit
1
}
##################################################
nfs_load_config
()
{
_config
=
"
${
1
:-${
nfs_config
}}
"
if
[
-r
"
$_config
"
]
;
then
.
"
$_config
"
fi
}
##################################################
# Basic service stop and start
...
...
@@ -54,14 +110,19 @@ basic_stop ()
{
case
"
$1
"
in
nfs
)
if
[
-n
"
$nfs_rquotad_service
"
]
;
then
service
"
$nfs_rquotad_service
"
stop
fi
service
"
$nfs_service
"
stop
if
[
-n
"
$nfslock_service
"
]
;
then
service
"
$nfslock_service
"
stop
if
[
-n
"
$nfs_lock_service
"
]
;
then
service
"
$nfs_lock_service
"
stop
fi
;;
nfslock
)
if
[
-n
"
$nfslock_service
"
]
;
then
service
"
$nfslock_service
"
stop
if
[
-n
"
$nfs
_
lock_service
"
]
;
then
service
"
$nfs
_
lock_service
"
stop
else
service
"
$nfs_service
"
stop
fi
...
...
@@ -75,14 +136,19 @@ basic_start ()
{
case
"
$1
"
in
nfs
)
if
[
-n
"
$nfslock_service
"
]
;
then
service
"
$nfslock_service
"
start
if
[
-n
"
$nfs
_
lock_service
"
]
;
then
service
"
$nfs
_
lock_service
"
start
fi
service
"
$nfs_service
"
start
if
[
-n
"
$nfs_rquotad_service
"
]
;
then
service
"
$nfs_rquotad_service
"
start
fi
;;
nfslock
)
if
[
-n
"
$nfslock_service
"
]
;
then
service
"
$nfslock_service
"
start
if
[
-n
"
$nfs
_
lock_service
"
]
;
then
service
"
$nfs
_
lock_service
"
start
else
service
"
$nfs_service
"
start
fi
...
...
@@ -106,6 +172,33 @@ service_stop ()
nlockmgr
)
basic_stop
"nfslock"
>
/dev/null 2>&1
||
true
;;
mountd
)
if
[
-n
"
$nfs_mountd_service
"
]
;
then
service
"
$nfs_mountd_service
"
stop
return
fi
# Default to stopping by hand
killall
-q
-9
rpc.mountd
;;
rquotad
)
if
[
-n
"
$nfs_rquotad_service
"
]
;
then
service
"
$nfs_rquotad_service
"
stop
return
fi
# Default to stopping by hand
killall
-q
-9
rpc.rquotad
;;
status
)
if
[
-n
"
$nfs_status_service
"
]
;
then
service
"
$nfs_status_service
"
stop
return
fi
# Default to stopping by hand
killall
-q
-9
rpc.statd
;;
*
)
usage
esac
...
...
@@ -120,6 +213,56 @@ service_start ()
nlockmgr
)
basic_start
"nfslock"
;;
mountd
)
if
[
-n
"
$nfs_mountd_service
"
]
;
then
service
"
$nfs_mountd_service
"
start
return
fi
# Default to starting by hand
nfs_load_config
if
[
-z
"
$RPCMOUNTDOPTS
"
]
;
then
RPCMOUNTDOPTS
=
"
${
MOUNTD_PORT
:+-p
}
$MOUNTD_PORT
"
fi
# shellcheck disable=SC2086
rpc.mountd
$RPCMOUNTDOPTS
;;
rquotad
)
if
[
-n
"
$nfs_rquotad_service
"
]
;
then
service
"
$nfs_rquotad_service
"
start
return
fi
# Default to starting by hand
nfs_load_config
"
$nfs_rquotad_config
"
if
[
-z
"
$RPCRQUOTADOPTS
"
]
;
then
RPCRQUOTADOPTS
=
"
${
RQUOTAD_PORT
:+-p
}
$RQUOTAD_PORT
"
fi
# shellcheck disable=SC2086
rpc.rquotad
$RPCRQUOTADOPTS
;;
status
)
if
[
-n
"
$nfs_status_service
"
]
;
then
service
"
$nfs_status_service
"
start
return
fi
# Default to starting by hand
nfs_load_config
# Red Hat uses STATDARG, Debian uses STATDOPTS
opts
=
"
${
STATDARG
:-${
STATDOPTS
:-
''
}}
"
if
[
-z
"
$opts
"
]
;
then
# shellcheck disable=SC2086
set
--
\
${
STATD_HA_CALLOUT
:+-H
}
$STATD_HA_CALLOUT
\
${
STATD_HOSTNAME
:+-n
}
$STATD_HOSTNAME
\
${
STATD_PORT
:+-p
}
$STATD_PORT
\
${
STATD_OUTGOING_PORT
:+-o
}
$STATD_OUTGOING_PORT
opts
=
"
$*
"
fi
# shellcheck disable=SC2086
rpc.statd
$opts
;;
*
)
usage
esac
...
...
@@ -138,7 +281,7 @@ nfs_startup ()
basic_stop
"nfs"
||
true
basic_start
"nfs"
_f
=
"
${
PROCFS_PATH
}
/sys/net/ipv4/tcp_tw_recycle"
if
[
"
$_f
"
]
;
then
if
[
-f
"
$_f
"
]
;
then
echo
1
>
"
$_f
"
fi
}
...
...
@@ -149,9 +292,7 @@ nfs_startup ()
nfs_check_thread_count
()
{
# Load NFS configuration to get desired number of threads.
if
[
-r
"
$nfs_config
"
]
;
then
.
"
$nfs_config
"
fi
nfs_load_config
# If $RPCNFSDCOUNT/$USE_KERNEL_NFSD_NUMBER isn't set then we could
# guess the default from the initscript. However, let's just
...
...
ctdb/config/statd-callout
View file @
b9ee441b
...
...
@@ -20,7 +20,8 @@ die ()
exit
1
}
load_system_config
"nfs"
# Try different variables to find config file for NFS_HOSTNAME
load_system_config
"nfs"
"nfs-common"
[
-n
"
$NFS_HOSTNAME
"
]
||
\
die
"NFS_HOSTNAME is not configured. statd-callout failed"
...
...
Prev
1
2
3
4
5
…
22
Next