uawdijnntqw1x1x1
IP : 216.73.216.207
Hostname : xhost1.intravision.ru
Kernel : Linux xhost1.intravision.ru 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
.
/
files
/
need-2-delete
/
mini-borishof.ru1
/
.
/
.
/
bitrix
/
modules
/
scale
/
lib
/
.
/
actionmodifyer.php
/
/
<? namespace Bitrix\Scale; use \Bitrix\Main\Localization\Loc; Loc::loadMessages(__FILE__); /** * Class ActionModifyer * @package Bitrix\Scale */ class ActionModifyer { /** * MYSQL_ADD_SLAVE action modifyer * @param string $actionId - action idenifyer * @param array $actionParams - action parameterss * @param string $hostname - server hostname * @return array - modifyed action params * @throws NeedMoreUserInfoException */ public static function mysqlAddSlave($actionId, $actionParams, $hostname) { $action = new Action("MYSQL_ADD_SLAVE_MODIFYER", array( "START_COMMAND_TEMPLATE" => "sudo -u root /opt/webdir/bin/bx-mysql -a options -o json", "LOG_LEVEL" => Logger::LOG_LEVEL_DISABLE ), "", array() ); $action->start(); $actRes = $action->getResult(); $needModeInfo = false; if(isset($actRes["MYSQL_ADD_SLAVE_MODIFYER"]["OUTPUT"]["DATA"]["params"]["options"]) && is_array($actRes["MYSQL_ADD_SLAVE_MODIFYER"]["OUTPUT"]["DATA"]["params"]["options"]) ) { foreach($actRes["MYSQL_ADD_SLAVE_MODIFYER"]["OUTPUT"]["DATA"]["params"]["options"] as $option) { if($option == "cluster_password" || $option == "replica_password") { $actionParams["START_COMMAND_TEMPLATE"] .=" --".$option."=".\Bitrix\Scale\Helper::generatePass(); } elseif($option == "mysql_password") { $actionParams["START_COMMAND_TEMPLATE"] .=" --".$option."=##USER_PARAMS:MYSQL_PASS##"; if(!isset($actionParams["USER_PARAMS"])) $actionParams["USER_PARAMS"] = array(); $actionParams["USER_PARAMS"]["MYSQL_PASS"] = array( "NAME" => Loc::getMessage("SCALE_AM_MYAR_MYSQL_PASS"), "TYPE" => "PASSWORD", "REQUIRED" => "Y", "VERIFY_TWICE" => "Y" ); $needModeInfo = true; } } if($needModeInfo) throw new NeedMoreUserInfoException("Need more user's info", $actionParams); } return $actionParams; } /** * MYSQL_ADD_SLAVE, MYSQL_CHANGE_MASTER, MYSQL_DEL_SLAVE actions modifier/ * @param string $actionId - action idenifyer * @param array $actionParams - action parameters * @param string $hostname - server hostname * @return array - modifyed action params * @throws NeedMoreUserInfoException */ public static function checkExtraDbExist($actionId, $actionParams, $hostname) { if($actionId == "MYSQL_ADD_SLAVE" || $actionId == "MYSQL_CHANGE_MASTER") $hostname = ServersData::getDbMasterHostname(); if(Helper::isExtraDbExist($hostname)) { $actionParams["CHECK_EXTRA_DB_USER_ASK"] = "Y"; throw new NeedMoreUserInfoException("Need more user's info", $actionParams); } return $actionParams; } }
/var/./files/need-2-delete/mini-borishof.ru1/././bitrix/modules/scale/lib/./actionmodifyer.php