Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
46701713
Commit
46701713
authored
Sep 02, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
see resp file
mysql-test/ndb/ndbcluster.sh: added better/safer shutdown
parent
8628937e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
11 deletions
+25
-11
mysql-test/ndb/ndbcluster.sh
mysql-test/ndb/ndbcluster.sh
+25
-11
No files found.
mysql-test/ndb/ndbcluster.sh
View file @
46701713
...
...
@@ -57,6 +57,10 @@ while test $# -gt 0; do
flags_ndb
=
"
$flags_ndb
-i"
initial_ndb
=
1
;;
--debug
*
)
f
=
`
echo
"
$1
"
|
sed
-e
"s;--debug=;;"
`
flags_ndb
=
"
$flags_ndb
$f
"
;;
--status
)
status_ndb
=
1
;;
...
...
@@ -180,15 +184,6 @@ status_ndbcluster() {
stop_default_ndbcluster
()
{
#if [ ! -f $pidfile ] ; then
# exit 0
#fi
#if [ ! -f $cfgfile ] ; then
# echo "$cfgfile missing"
# exit 1
#fi
# Start management client
exec_mgmtclient
=
"
$exec_mgmtclient
--try-reconnect=1"
...
...
@@ -196,10 +191,29 @@ exec_mgmtclient="$exec_mgmtclient --try-reconnect=1"
echo
"shutdown"
|
$exec_mgmtclient
2>&1 |
cat
>
/dev/null
if
[
-f
"
$fs_ndb
/
$pidfile
"
]
;
then
kill
-9
`
cat
"
$fs_ndb
/
$pidfile
"
`
2> /dev/null
kill_pids
=
`
cat
"
$fs_ndb
/
$pidfile
"
`
attempt
=
0
while
[
$attempt
-lt
10
]
;
do
new_kill_pid
=
""
for
p
in
$kill_pids
;
do
kill
-0
$p
2> /dev/null
if
[
$?
-eq
0
]
;
then
new_kill_pid
=
"
$p
$new_kill_pid
"
fi
done
kill_pids
=
$new_kill_pid
if
[
"
$kill_pids
"
==
""
]
;
then
break
fi
sleep
1
attempt
=
`
expr
$attempt
+ 1
`
done
if
[
"
$kill_pids
"
!=
""
]
;
then
echo
"Failed to shutdown ndbcluster, executing kill -9 "
$kill_pids
kill
-9
$kill_pids
fi
rm
"
$fs_ndb
/
$pidfile
"
fi
}
if
[
$status_ndb
]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment