mirror of
https://github.com/EvernodeXRPL/sashimono.git
synced 2026-04-29 15:38:00 +00:00
Empty description saved in state values. (#219)
This commit is contained in:
committed by
GitHub
parent
179ddc57cc
commit
297cda94d5
@@ -13,14 +13,14 @@ cpuMicroSec=${6}
|
||||
ramKB=${7}
|
||||
swapKB=${8}
|
||||
diskKB=${9}
|
||||
description=${10}
|
||||
lease_amount=${11}
|
||||
rippled_server=${12}
|
||||
xrpl_account_secret=${13}
|
||||
email_address=${14}
|
||||
tls_key_file=${15}
|
||||
tls_cert_file=${16}
|
||||
tls_cabundle_file=${17}
|
||||
lease_amount=${10}
|
||||
rippled_server=${11}
|
||||
xrpl_account_secret=${12}
|
||||
email_address=${13}
|
||||
tls_key_file=${14}
|
||||
tls_cert_file=${15}
|
||||
tls_cabundle_file=${16}
|
||||
description=${17}
|
||||
|
||||
script_dir=$(dirname "$(realpath "$0")")
|
||||
|
||||
@@ -252,7 +252,7 @@ if [ "$NO_MB" == "" ]; then
|
||||
# Append STAGE prefix to the lease offer creation logs, So they would get fetched from setup as stage logs.
|
||||
# Add -p to the progress logs so they would be printed overwriting the same line.
|
||||
! sudo -u $MB_XRPL_USER MB_DATA_DIR=$MB_XRPL_DATA node $MB_XRPL_BIN register \
|
||||
$countrycode $cpuMicroSec $ramKB $swapKB $diskKB $inst_count $cpu_model_name $cpu_count $cpu_mhz $description $email_address |
|
||||
$countrycode $cpuMicroSec $ramKB $swapKB $diskKB $inst_count $cpu_model_name $cpu_count $cpu_mhz $email_address $description |
|
||||
stdbuf --output=L sed -E '/^Creating lease offer/s/^/STAGE /;/^Created lease offer/s/^/STAGE -p /' &&
|
||||
echo "REG_FAILURE" && rollback
|
||||
set +o pipefail
|
||||
|
||||
@@ -578,13 +578,14 @@ function install_evernode() {
|
||||
! create_evernode_alias && install_failure
|
||||
|
||||
# Adding ip address as the host description.
|
||||
description=$inetaddr
|
||||
# Currently the domain address saved only in account_info and an empty value in Hook states )
|
||||
description=""
|
||||
|
||||
echo "Installing Sashimono..."
|
||||
# Filter logs with STAGE prefix and ommit the prefix when echoing.
|
||||
# If STAGE log contains -p arg, move the cursor to previous log line and overwrite the log.
|
||||
! UPGRADE=$upgrade ./sashimono-install.sh $inetaddr $init_peer_port $init_user_port $countrycode $alloc_instcount \
|
||||
$alloc_cpu $alloc_ramKB $alloc_swapKB $alloc_diskKB $description $lease_amount $rippled_server $xrpl_account_secret $email_address $tls_key_file $tls_cert_file $tls_cabundle_file 2>&1 \
|
||||
$alloc_cpu $alloc_ramKB $alloc_swapKB $alloc_diskKB $lease_amount $rippled_server $xrpl_account_secret $email_address $tls_key_file $tls_cert_file $tls_cabundle_file $description 2>&1 \
|
||||
| tee -a $logfile | stdbuf --output=L grep "STAGE\|ERROR" \
|
||||
| while read line ; do [[ $line =~ ^STAGE[[:space:]]-p(.*)$ ]] && echo -e \\e[1A\\e[K"${line:9}" || echo ${line:6} ; done \
|
||||
&& remove_evernode_alias && install_failure
|
||||
|
||||
@@ -31,7 +31,7 @@ async function main() {
|
||||
const acc = await setup.generateBetaHostAccount(rippledServer, registryAddress, domain);
|
||||
setup.newConfig(acc.address, acc.secret, registryAddress, parseFloat(leaseAmount), rippledServer);
|
||||
}
|
||||
else if (process.argv.length === 14 && process.argv[2] === 'register') {
|
||||
else if (process.argv.length === 13 && process.argv[2] === 'register') {
|
||||
await new Setup().register(process.argv[3], parseInt(process.argv[4]), parseInt(process.argv[5]),
|
||||
parseInt(process.argv[6]), parseInt(process.argv[7]), parseInt(process.argv[8]), process.argv[9], parseInt(process.argv[10]), parseInt(process.argv[11]), process.argv[12], process.argv[13]);
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ class Setup {
|
||||
return acc;
|
||||
}
|
||||
|
||||
async register(countryCode, cpuMicroSec, ramKb, swapKb, diskKb, totalInstanceCount, cpuModel, cpuCount, cpuSpeed, description, emailAddress) {
|
||||
async register(countryCode, cpuMicroSec, ramKb, swapKb, diskKb, totalInstanceCount, cpuModel, cpuCount, cpuSpeed, emailAddress, description = "") {
|
||||
console.log("Registering host...");
|
||||
let cpuModelFormatted = cpuModel.replaceAll('_', ' ');
|
||||
const acc = this.#getConfig().xrpl;
|
||||
|
||||
Reference in New Issue
Block a user