Skip to content

Commit 7ffba1d

Browse files
Mikael RonströmHery Ramilison
authored andcommitted
BUG#27531186: BUG#89624: Ensure that we search the right paths for ndb_mgm binary
(cherry picked from commit 9124ce8e3347dff7e5b1c72cbc9d60592c438fcd)
1 parent 9e7ceb3 commit 7ffba1d

File tree

1 file changed

+21
-2
lines changed
  • storage/ndb/mcc/frontend/js/mcc/configuration

1 file changed

+21
-2
lines changed

storage/ndb/mcc/frontend/js/mcc/configuration/deploy.js

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -1301,7 +1301,16 @@ function getStopProcessCommands(process) {
13011301
sc.addopt("--ndb-connectstring", getConnectstring());
13021302
sc.addopt("--execute", "shutdown");
13031303
sc.progTitle = "Running ndb_mgm -e shutdown to take down cluster";
1304-
1304+
//This is CLIENT command thus probably in /usr/bin and not /usr/sbin
1305+
//(default install directory) so we have to use autocomplete.
1306+
if(!isWin) {
1307+
var instDir = sc.msg.file.path;
1308+
//NO path prefix!
1309+
sc.msg.file.path = '';
1310+
//Look for ndb_mgm in InstallDirectory, /usr/bin' and in PATH.
1311+
sc.msg.file.autoComplete = [instDir, '/usr/bin/',''];
1312+
}
1313+
//mcc.util.dbg("SC for ndb_mgm is " + sc + ".");
13051314
if(!isWin) {
13061315
sc.isDone = function ()
13071316
{ return mcc.gui.getStatii(nodeid) =="UNKNOWN" };
@@ -1319,6 +1328,16 @@ function getStopProcessCommands(process) {
13191328
getEffectiveInstanceValue(process, "Socket")));
13201329
sc.progTitle = "mysqldadmin shutdown on node "+nodeid;
13211330
sc.nodeid = nodeid;
1331+
//This is CLIENT command thus probably in /usr/bin and not /usr/sbin
1332+
//(default install directory) so we have to use autocomplete.
1333+
if(!isWin) {
1334+
var instDir = sc.msg.file.path;
1335+
//NO path prefix!
1336+
sc.msg.file.path = '';
1337+
//Look for mysqladmin in InstallDirectory, /usr/bin' and in PATH.
1338+
sc.msg.file.autoComplete = [instDir, '/usr/bin/',''];
1339+
}
1340+
//mcc.util.dbg("SC for mysqladmin is " + sc + ".");
13221341
if (!isWin) {
13231342
sc.isDone = function ()
13241343
{ return mcc.gui.getStatii(nodeid) == "NO_CONTACT" };

0 commit comments

Comments
 (0)