Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
launcher_def Struct Reference
Collaboration diagram for launcher_def:

Public Member Functions

void assign_name (eosd_def &node, bool is_bios)
 
void set_options (bpo::options_description &cli)
 
void initialize (const variables_map &vmap)
 
void init_genesis ()
 
void load_servers ()
 
bool generate ()
 
void define_network ()
 
void bind_nodes ()
 
host_deffind_host (const string &name)
 
host_deffind_host_by_name_or_address (const string &name)
 
host_defdeploy_config_files (tn_node_def &node)
 
string compose_scp_command (const host_def &host, const bfs::path &source, const bfs::path &destination)
 
void write_config_file (tn_node_def &node)
 
void write_logging_config_file (tn_node_def &node)
 
void write_genesis_file (tn_node_def &node)
 
void write_setprods_file ()
 
void write_bios_boot ()
 
bool is_bios_ndx (size_t ndx)
 
size_t start_ndx ()
 
bool next_ndx (size_t &ndx)
 
size_t skip_ndx (size_t from, size_t offset)
 
void make_line (bool make_ring=true)
 
void make_star ()
 
void make_mesh ()
 
void make_custom ()
 
void write_dot_file ()
 
void format_ssh (const string &cmd, const string &host_name, string &ssh_cmd_line)
 
void do_command (const host_def &host, const string &name, vector< pair< string, string > > env_pairs, const string &cmd)
 
bool do_ssh (const string &cmd, const string &host_name)
 
void prep_remote_config_dir (eosd_def &node, host_def *host)
 
void launch (eosd_def &node, string &gts)
 
void kill (launch_modes mode, string sig_opt)
 
pair< host_def, eosd_deffind_node (uint16_t node_num)
 
vector< pair< host_def, eosd_def > > get_nodes (const string &node_number_list)
 
void bounce (const string &node_numbers)
 
void down (const string &node_numbers)
 
void roll (const string &host_names)
 
void start_all (string &gts, launch_modes mode)
 
void ignite ()
 
string find_and_remove_arg (string str, string substr)
 

Static Public Member Functions

static string get_node_num (uint16_t node_num)
 

Public Attributes

bool force_overwrite
 
size_t total_nodes
 
size_t unstarted_nodes
 
size_t prod_nodes
 
size_t producers
 
size_t shared_producers
 
size_t next_node
 
string shape
 
allowed_connection allowed_connections = PC_NONE
 
bfs::path genesis
 
bfs::path output
 
bfs::path host_map_file
 
bfs::path server_ident_file
 
bfs::path stage
 
string erd
 
bfs::path config_dir_base
 
bfs::path data_dir_base
 
bool skip_transaction_signatures = false
 
string eosd_extra_args
 
std::map< uint, string > specific_nodeop_args
 
std::map< uint, string > specific_nodeop_installation_paths
 
testnet_def network
 
string gelf_endpoint
 
vector< string > aliases
 
vector< host_defbindings
 
int per_host = 0
 
last_run_def last_run
 
int start_delay = 0
 
bool gelf_enabled
 
bool nogen
 
bool boot
 
bool add_enable_stale_production = false
 
string launch_name
 
string launch_time
 
server_identities servers
 
producer_set_def producer_set
 
string start_temp
 
string start_script
 
std::optional< uint32_tmax_block_cpu_usage
 
std::optional< uint32_tmax_transaction_cpu_usage
 
sysio::chain::genesis_state genesis_from_file
 

Detailed Description

Definition at line 385 of file main.cpp.

Member Function Documentation

◆ assign_name()

void launcher_def::assign_name ( eosd_def & node,
bool is_bios )

Definition at line 699 of file main.cpp.

699 {
700 string node_cfg_name;
701
702 if (is_bios) {
703 node.name = "bios";
704 node_cfg_name = "node_bios";
705 }
706 else {
707 string dex = next_node < 10 ? "0":"";
708 dex += boost::lexical_cast<string,int>(next_node++);
709 node.name = network.name + dex;
710 node_cfg_name = "node_" + dex;
711 }
712 node.config_dir_name = (config_dir_base / node_cfg_name).string();
713 node.data_dir_name = (data_dir_base / node_cfg_name).string();
714}
string config_dir_name
Definition main.cpp:210
string name
Definition main.cpp:215
string data_dir_name
Definition main.cpp:211
size_t next_node
Definition main.cpp:392
bfs::path config_dir_base
Definition main.cpp:402
bfs::path data_dir_base
Definition main.cpp:403
Here is the caller graph for this function:

◆ bind_nodes()

void launcher_def::bind_nodes ( )

Definition at line 861 of file main.cpp.

861 {
862 if (prod_nodes < 2) {
863 cerr << "Unable to allocate producers due to insufficient prod_nodes = " << prod_nodes << "\n";
864 exit (10);
865 }
866 size_t non_bios = prod_nodes - 1;
867 int per_node = producers / non_bios;
868 int extra = producers % non_bios;
869 unsigned int i = 0;
870 unsigned int producer_number = 0;
871 const auto to_not_start_node = total_nodes - unstarted_nodes - 1;
872 for (auto &h : bindings) {
873 for (auto &inst : h.instances) {
874 bool is_bios = inst.name == "bios";
875 tn_node_def node;
876 node.name = inst.name;
877 node.instance = &inst;
878 auto kp = is_bios ?
879 private_key_type(string("5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3")) :
881 auto pubkey = kp.get_public_key();
882 node.keys.emplace_back (move(kp));
883 if (is_bios) {
884 string prodname = "sysio";
885 node.producers.push_back(prodname);
886 producer_set.schedule.push_back({prodname,pubkey});
887 }
888 else {
889 if (i < non_bios) {
890 int count = per_node;
891 if (extra ) {
892 ++count;
893 --extra;
894 }
895 while (count--) {
896 const auto prodname = producer_names::producer_name(producer_number);
897 node.producers.push_back(prodname);
898 producer_set.schedule.push_back({prodname,pubkey});
899 ++producer_number;
900 }
901 for (unsigned j = 0; j < shared_producers; ++j) {
902 const auto prodname = producer_names::producer_name(j, true);
903 node.producers.push_back(prodname);
904 producer_set.schedule.push_back({prodname,pubkey});
905 }
906 }
907 node.dont_start = i >= to_not_start_node;
908 }
910 network.nodes[node.name] = move(node);
911 inst.node = &network.nodes[inst.name];
912 if (!is_bios) i++;
913 }
914 }
915}
public_key get_public_key() const
static string producer_name(unsigned int producer_number, bool shared_producer=false)
Definition main.cpp:354
string name
Definition main.cpp:238
vector< private_key_type > keys
Definition main.cpp:239
string gelf_endpoint
Definition main.cpp:243
bool dont_start
Definition main.cpp:244
eosd_def * instance
Definition main.cpp:242
vector< string > producers
Definition main.cpp:241
int * count
std::ostream & cerr()
fc::crypto::private_key private_key_type
Definition types.hpp:77
producer_set_def producer_set
Definition main.cpp:422
size_t prod_nodes
Definition main.cpp:389
size_t unstarted_nodes
Definition main.cpp:388
vector< host_def > bindings
Definition main.cpp:411
bool generate()
Definition main.cpp:717
string gelf_endpoint
Definition main.cpp:409
size_t shared_producers
Definition main.cpp:391
size_t total_nodes
Definition main.cpp:387
size_t producers
Definition main.cpp:390
vector< prodkey_def > schedule
Definition main.cpp:294
uint16_t j
CK_BYTE_PTR pubkey
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bounce()

void launcher_def::bounce ( const string & node_numbers)

Definition at line 1815 of file main.cpp.

1815 {
1816 auto node_list = get_nodes(node_numbers);
1817 for (auto node_pair: node_list) {
1818 const host_def& host = node_pair.first;
1819 const eosd_def& node = node_pair.second;
1820 const string node_num = node.get_node_num();
1821 cout << "Bouncing " << node.name << endl;
1822 string cmd = "./scripts/sysio-tn_bounce.sh " + eosd_extra_args;
1823 if (node_num != "bios" && !specific_nodeop_args.empty()) {
1824 const auto node_num_i = boost::lexical_cast<uint16_t,string>(node_num);
1825 if (specific_nodeop_args.count(node_num_i)) {
1826 cmd += " " + specific_nodeop_args[node_num_i];
1827 }
1828 }
1829
1830 do_command(host, node.name, { { "SYSIO_HOME", host.sysio_home }, { "SYSIO_NODE", node_num } }, cmd);
1831 }
1832}
string get_node_num() const
Definition main.cpp:229
void do_command(const host_def &host, const string &name, vector< pair< string, string > > env_pairs, const string &cmd)
Definition main.cpp:1791
string eosd_extra_args
Definition main.cpp:405
vector< pair< host_def, eosd_def > > get_nodes(const string &node_number_list)
Definition main.cpp:1759
std::map< uint, string > specific_nodeop_args
Definition main.cpp:406
Here is the call graph for this function:
Here is the caller graph for this function:

◆ compose_scp_command()

string launcher_def::compose_scp_command ( const host_def & host,
const bfs::path & source,
const bfs::path & destination )

Definition at line 1045 of file main.cpp.

1045 {
1046 string scp_cmd_line = network.ssh_helper.scp_cmd + " ";
1047 const string &args = host.ssh_args.length() ? host.ssh_args : network.ssh_helper.ssh_args;
1048 if (args.length()) {
1049 scp_cmd_line += args + " ";
1050 }
1051 scp_cmd_line += source.string() + " ";
1052
1053 const string &uid = host.ssh_identity.length() ? host.ssh_identity : network.ssh_helper.ssh_identity;
1054 if (uid.length()) {
1055 scp_cmd_line += uid + "@";
1056 }
1057
1058 scp_cmd_line += host.host_name + ":" + destination.string();
1059
1060 return scp_cmd_line;
1061}
const CharType(& source)[N]
Definition pointer.h:1204
Here is the caller graph for this function:

◆ define_network()

void launcher_def::define_network ( )

Definition at line 789 of file main.cpp.

789 {
790
791 if (per_host == 0) {
792 host_def local_host;
793 local_host.sysio_home = erd;
794 local_host.genesis = genesis.string();
795 for (size_t i = 0; i < (total_nodes); i++) {
796 eosd_def eosd;
797 assign_name(eosd, i == 0);
798 aliases.push_back(eosd.name);
799 eosd.set_host (&local_host, i == 0);
800 local_host.instances.emplace_back(move(eosd));
801 }
802 bindings.emplace_back(move(local_host));
803 }
804 else {
805 int ph_count = 0;
806 host_def *lhost = nullptr;
807 size_t host_ndx = 0;
808 size_t num_prod_addr = servers.producer.size();
809 size_t num_nonprod_addr = servers.nonprod.size();
810 for (size_t i = total_nodes; i > 0; i--) {
811 bool do_bios = false;
812 if (ph_count == 0) {
813 if (lhost) {
814 bindings.emplace_back(move(*lhost));
815 delete lhost;
816 }
817 lhost = new host_def;
818 lhost->genesis = genesis.string();
819 if (host_ndx < num_prod_addr ) {
820 do_bios = servers.producer[host_ndx].has_bios;
821 lhost->host_name = servers.producer[host_ndx].ipaddr;
822 lhost->public_name = servers.producer[host_ndx].name;
823 ph_count = servers.producer[host_ndx].instances;
824 }
825 else if (host_ndx - num_prod_addr < num_nonprod_addr) {
826 size_t ondx = host_ndx - num_prod_addr;
827 do_bios = servers.nonprod[ondx].has_bios;
828 lhost->host_name = servers.nonprod[ondx].ipaddr;
829 lhost->public_name = servers.nonprod[ondx].name;
830 ph_count = servers.nonprod[ondx].instances;
831 }
832 else {
833 string ext = host_ndx < 10 ? "0" : "";
834 ext += boost::lexical_cast<string,int>(host_ndx);
835 lhost->host_name = "pseudo_" + ext;
836 lhost->public_name = lhost->host_name;
837 ph_count = 1;
838 }
839 lhost->sysio_home =
840 (local_id.contains (lhost->host_name) || servers.default_sysio_home.empty()) ?
842 host_ndx++;
843 } // ph_count == 0
844
845 eosd_def eosd;
846 assign_name(eosd, do_bios);
847
848 aliases.push_back(eosd.name);
849 eosd.set_host (lhost, do_bios);
850 do_bios = false;
851 lhost->instances.emplace_back(move(eosd));
852 --ph_count;
853 } // for i
854 bindings.emplace_back( move(*lhost) );
855 delete lhost;
856 }
857}
void set_host(host_def *h, bool is_bios)
Definition main.cpp:266
string sysio_home
Definition main.cpp:138
string host_name
Definition main.cpp:139
vector< eosd_def > instances
Definition main.cpp:145
string genesis
Definition main.cpp:135
string public_name
Definition main.cpp:140
struct local_identity local_id
int per_host
Definition main.cpp:412
vector< string > aliases
Definition main.cpp:410
void assign_name(eosd_def &node, bool is_bios)
Definition main.cpp:699
server_identities servers
Definition main.cpp:421
string erd
Definition main.cpp:401
vector< server_name_def > producer
Definition main.cpp:307
string default_sysio_home
Definition main.cpp:310
vector< server_name_def > nonprod
Definition main.cpp:308
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deploy_config_files()

host_def * launcher_def::deploy_config_files ( tn_node_def & node)

Definition at line 952 of file main.cpp.

952 {
953 boost::system::error_code ec;
954 eosd_def &instance = *node.instance;
955 host_def *host = find_host (instance.host);
956
957 bfs::path source = stage / instance.config_dir_name / "config.ini";
958 bfs::path logging_source = stage / instance.config_dir_name / "logging.json";
959 bfs::path genesis_source = stage / instance.config_dir_name / "genesis.json";
960
961 if (host->is_local()) {
962 bfs::path cfgdir = bfs::path(host->sysio_home) / instance.config_dir_name;
963 bfs::path dd = bfs::path(host->sysio_home) / instance.data_dir_name;
964
965 if (!bfs::exists (cfgdir)) {
966 if (!bfs::create_directories (cfgdir, ec) && ec.value()) {
967 cerr << "could not create new directory: " << instance.config_dir_name
968 << " errno " << ec.value() << " " << strerror(ec.value()) << endl;
969 exit (-1);
970 }
971 }
972 else if (bfs::exists (cfgdir / "config.ini") && !force_overwrite) {
973 cerr << cfgdir / "config.ini" << " exists. Use -f|--force to overwrite configuration\n";
974 exit (-1);
975 }
976
977 if (!bfs::exists (dd)) {
978 if (!bfs::create_directories (dd, ec) && ec.value()) {
979 cerr << "could not create new directory: " << instance.config_dir_name
980 << " errno " << ec.value() << " " << strerror(ec.value()) << endl;
981 exit (-1);
982 }
983 }
984 else if (force_overwrite) {
985 int64_t count = bfs::remove_all (dd / block_dir, ec);
986 if (ec.value() != 0) {
987 cerr << "count = " << count << " could not remove old directory: " << dd
988 << " " << strerror(ec.value()) << endl;
989 exit (-1);
990 }
991 count = bfs::remove_all (dd / shared_mem_dir, ec);
992 if (ec.value() != 0) {
993 cerr << "count = " << count << " could not remove old directory: " << dd
994 << " " << strerror(ec.value()) << endl;
995 exit (-1);
996 }
997 }
998 else if (bfs::exists (dd/ block_dir) || bfs::exists (dd / shared_mem_dir)) {
999 cerr << "either " << block_dir << " or " << shared_mem_dir << " exist in \n";
1000 cerr << dd << ". Use -f|--force to erase blockchain data" << endl;
1001 exit (-1);
1002 }
1003
1004 bfs::copy_file (genesis_source, cfgdir / "genesis.json", bfs::copy_option::overwrite_if_exists);
1005 bfs::copy_file (logging_source, cfgdir / "logging.json", bfs::copy_option::overwrite_if_exists);
1006 bfs::copy_file (source, cfgdir / "config.ini", bfs::copy_option::overwrite_if_exists);
1007 }
1008 else {
1009 prep_remote_config_dir (instance, host);
1010
1011 bfs::path rfile = bfs::path (host->sysio_home) / instance.config_dir_name / "config.ini";
1012 auto scp_cmd_line = compose_scp_command(*host, source, rfile);
1013
1014 cerr << "cmdline = " << scp_cmd_line << endl;
1015 int res = boost::process::system (scp_cmd_line);
1016 if (res != 0) {
1017 cerr << "unable to scp config file to host " << host->host_name << endl;
1018 exit(-1);
1019 }
1020
1021 rfile = bfs::path (host->sysio_home) / instance.config_dir_name / "logging.json";
1022
1023 scp_cmd_line = compose_scp_command(*host, logging_source, rfile);
1024
1025 res = boost::process::system (scp_cmd_line);
1026 if (res != 0) {
1027 cerr << "unable to scp logging config file to host " << host->host_name << endl;
1028 exit(-1);
1029 }
1030
1031 rfile = bfs::path (host->sysio_home) / instance.config_dir_name / "genesis.json";
1032
1033 scp_cmd_line = compose_scp_command(*host, genesis_source, rfile);
1034
1035 res = boost::process::system (scp_cmd_line);
1036 if (res != 0) {
1037 cerr << "unable to scp genesis.json file to host " << host->host_name << endl;
1038 exit(-1);
1039 }
1040 }
1041 return host;
1042}
string host
Definition main.cpp:217
const string shared_mem_dir
Definition main.cpp:49
const string block_dir
Definition main.cpp:48
schedule config_dir_name data_dir_name p2p_port http_port file_size name host(p2p_endpoint)) FC_REFLECT(tn_node_def
signed __int64 int64_t
Definition stdint.h:135
string compose_scp_command(const host_def &host, const bfs::path &source, const bfs::path &destination)
Definition main.cpp:1045
bool force_overwrite
Definition main.cpp:386
host_def * find_host(const string &name)
Definition main.cpp:918
void prep_remote_config_dir(eosd_def &node, host_def *host)
Definition main.cpp:1496
Here is the call graph for this function:
Here is the caller graph for this function:

◆ do_command()

void launcher_def::do_command ( const host_def & host,
const string & name,
vector< pair< string, string > > env_pairs,
const string & cmd )

Definition at line 1791 of file main.cpp.

1792 {
1793 if (!host.is_local()) {
1794 string rcmd = "cd " + host.sysio_home + "; ";
1795 for (auto& env_pair : env_pairs) {
1796 rcmd += "export " + env_pair.first + "=" + env_pair.second + "; ";
1797 }
1798 rcmd += cmd;
1799 if (!do_ssh(rcmd, host.host_name)) {
1800 cerr << "Remote command failed for " << name << endl;
1801 exit (-1);
1802 }
1803 }
1804 else {
1805 bp::environment e;
1806 for (auto& env_pair : env_pairs) {
1807 e.emplace(env_pair.first, env_pair.second);
1808 }
1809 bp::child c(cmd, e);
1810 c.wait();
1811 }
1812}
std::string name
bool do_ssh(const string &cmd, const string &host_name)
Definition main.cpp:1488
Here is the call graph for this function:
Here is the caller graph for this function:

◆ do_ssh()

bool launcher_def::do_ssh ( const string & cmd,
const string & host_name )

Definition at line 1488 of file main.cpp.

1488 {
1489 string ssh_cmd_line;
1490 format_ssh (cmd, host_name, ssh_cmd_line);
1491 int res = boost::process::system (ssh_cmd_line);
1492 return (res == 0);
1493}
void format_ssh(const string &cmd, const string &host_name, string &ssh_cmd_line)
Definition main.cpp:1472
Here is the call graph for this function:
Here is the caller graph for this function:

◆ down()

void launcher_def::down ( const string & node_numbers)

Definition at line 1835 of file main.cpp.

1835 {
1836 auto node_list = get_nodes(node_numbers);
1837 for (auto node_pair: node_list) {
1838 const host_def& host = node_pair.first;
1839 const eosd_def& node = node_pair.second;
1840 const string node_num = node.get_node_num();
1841 cout << "Taking down " << node.name << endl;
1842 string cmd = "./scripts/sysio-tn_down.sh ";
1843 do_command(host, node.name,
1844 { { "SYSIO_HOME", host.sysio_home }, { "SYSIO_NODE", node_num }, { "SYSIO_TN_RESTART_CONFIG_DIR", node.config_dir_name } },
1845 cmd);
1846 }
1847}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_and_remove_arg()

string launcher_def::find_and_remove_arg ( string str,
string substr )

Definition at line 1546 of file main.cpp.

1546 {
1547 if (args.empty() || arg.empty())
1548 return args;
1549
1550 string left, middle, right;
1551 size_t found = args.find(arg);
1552 if (found != std::string::npos){
1553 left = args.substr(0, found);
1554 middle = args.substr(found + 2); //skip --
1555 found = middle.find("--");
1556 if (found != std::string::npos){
1557 right = middle.substr(found);
1558 }
1559 return left + right;
1560 } else {
1561 return args;
1562 }
1563}
Here is the caller graph for this function:

◆ find_host()

host_def * launcher_def::find_host ( const string & name)

Definition at line 918 of file main.cpp.

919{
920 host_def *host = nullptr;
921 for (auto &h : bindings) {
922 if (h.host_name == name) {
923 host = &h;
924 break;
925 }
926 }
927 if (host == 0) {
928 cerr << "could not find host for " << name << endl;
929 exit(-1);
930 }
931 return host;
932}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_host_by_name_or_address()

host_def * launcher_def::find_host_by_name_or_address ( const string & name)

Definition at line 935 of file main.cpp.

936{
937 host_def *host = nullptr;
938 for (auto &h : bindings) {
939 if ((h.host_name == host_id) || (h.public_name == host_id)) {
940 host = &h;
941 break;
942 }
943 }
944 if (host == 0) {
945 cerr << "could not find host for " << host_id << endl;
946 exit(-1);
947 }
948 return host;
949}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_node()

pair< host_def, eosd_def > launcher_def::find_node ( uint16_t node_num)

Definition at line 1745 of file main.cpp.

1745 {
1746 const string node_name = network.name + get_node_num(node_num);
1747 for (const auto& host: bindings) {
1748 for (const auto& node: host.instances) {
1749 if (node_name == node.name) {
1750 return make_pair(host, node);
1751 }
1752 }
1753 }
1754 cerr << "Unable to find node " << node_num << endl;
1755 exit (-1);
1756}
static string get_node_num(uint16_t node_num)
Definition main.cpp:1738
Here is the call graph for this function:
Here is the caller graph for this function:

◆ format_ssh()

void launcher_def::format_ssh ( const string & cmd,
const string & host_name,
string & ssh_cmd_line )

Definition at line 1472 of file main.cpp.

1474 {
1475
1476 ssh_cmd_line = network.ssh_helper.ssh_cmd + " ";
1477 if (network.ssh_helper.ssh_args.length()) {
1478 ssh_cmd_line += network.ssh_helper.ssh_args + " ";
1479 }
1480 if (network.ssh_helper.ssh_identity.length()) {
1481 ssh_cmd_line += network.ssh_helper.ssh_identity + "@";
1482 }
1483 ssh_cmd_line += host_name + " \"" + cmd + "\"";
1484 cerr << "cmdline = " << ssh_cmd_line << endl;
1485}
Here is the caller graph for this function:

◆ generate()

bool launcher_def::generate ( )

Definition at line 717 of file main.cpp.

717 {
718
719 if (boost::iequals (shape,"ring")) {
720 make_line ();
721 }
722 else if (boost::iequals (shape,"line")) {
723 make_line(false);
724 }
725 else if (boost::iequals (shape, "star")) {
726 make_star ();
727 }
728 else if (boost::iequals (shape, "mesh")) {
729 make_mesh ();
730 }
731 else {
732 make_custom ();
733 }
734
735 if( !nogen ) {
738 init_genesis();
739 for (auto &node : network.nodes) {
740 write_config_file(node.second);
741 write_logging_config_file(node.second);
742 write_genesis_file(node.second);
743 }
744 }
746
747 if (!output.empty()) {
748 bfs::path savefile = output;
749 {
750 bfs::ofstream sf (savefile);
751 sf << fc::json::to_pretty_string (network) << endl;
752 sf.close();
753 }
754 if (host_map_file.empty()) {
755 savefile = bfs::path (output.stem().string() + "_hosts.json");
756 }
757 else {
758 savefile = bfs::path (host_map_file);
759 }
760
761 {
762 bfs::ofstream sf (savefile);
763
764 sf << fc::json::to_pretty_string (bindings) << endl;
765 sf.close();
766 }
767 return false;
768 }
769
770 return true;
771}
static string to_pretty_string(const variant &v, const yield_function_t &yield, const output_formatting format=output_formatting::stringify_large_ints_and_doubles)
Definition json.cpp:775
void make_star()
Definition main.cpp:1379
void write_setprods_file()
Definition main.cpp:1254
void write_bios_boot()
Definition main.cpp:1272
bool nogen
Definition main.cpp:416
void write_dot_file()
Definition main.cpp:774
void write_logging_config_file(tn_node_def &node)
Definition main.cpp:1140
void write_genesis_file(tn_node_def &node)
Definition main.cpp:1240
void make_mesh()
Definition main.cpp:1431
void make_line(bool make_ring=true)
Definition main.cpp:1350
void init_genesis()
Definition main.cpp:1222
bfs::path output
Definition main.cpp:396
string shape
Definition main.cpp:393
void make_custom()
Definition main.cpp:1456
bfs::path host_map_file
Definition main.cpp:397
void write_config_file(tn_node_def &node)
Definition main.cpp:1064
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_node_num()

string launcher_def::get_node_num ( uint16_t node_num)
static

Definition at line 1738 of file main.cpp.

1738 {
1739 string node_num_str = node_num < 10 ? "0":"";
1740 node_num_str += boost::lexical_cast<string,uint16_t>(node_num);
1741 return node_num_str;
1742}
Here is the caller graph for this function:

◆ get_nodes()

vector< pair< host_def, eosd_def > > launcher_def::get_nodes ( const string & node_number_list)

Definition at line 1759 of file main.cpp.

1759 {
1760 vector<pair<host_def, eosd_def>> node_list;
1761 if (fc::to_lower(node_number_list) == "all") {
1762 for (auto host: bindings) {
1763 for (auto node: host.instances) {
1764 cout << "host=" << host.host_name << ", node=" << node.name << endl;
1765 node_list.push_back(make_pair(host, node));
1766 }
1767 }
1768 }
1769 else {
1770 vector<string> nodes;
1771 boost::split(nodes, node_number_list, boost::is_any_of(","));
1772 for (string node_number: nodes) {
1773 uint16_t node = -1;
1774 try {
1775 node = boost::lexical_cast<uint16_t,string>(node_number);
1776 }
1777 catch(boost::bad_lexical_cast &) {
1778 // This exception will be handled below
1779 }
1780 if (node < 0 || node > 99) {
1781 cerr << "Bad node number found in node number list: " << node_number << endl;
1782 exit(-1);
1783 }
1784 node_list.push_back(find_node(node));
1785 }
1786 }
1787 return node_list;
1788}
fc::string to_lower(const fc::string &)
Definition string.cpp:161
unsigned short uint16_t
Definition stdint.h:125
pair< host_def, eosd_def > find_node(uint16_t node_num)
Definition main.cpp:1745
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ignite()

void launcher_def::ignite ( )

Definition at line 1862 of file main.cpp.

1862 {
1863 if (boot) {
1864 cerr << "Invoking the blockchain boot script, " << start_script << "\n";
1865 string script("bash " + start_script);
1866 bp::child c(script);
1867 try {
1868 cerr << "waiting for script completion\n";
1869 c.wait();
1870 } catch (bfs::filesystem_error &ex) {
1871 cerr << "wait threw error " << ex.what() << "\n";
1872 }
1873 catch (...) {
1874 // when script dies wait throws an exception but that is ok
1875 }
1876 } else {
1877 cerr << "**********************************************************************\n"
1878 << "run 'bash " << start_script << "' to kick off delegated block production\n"
1879 << "**********************************************************************\n";
1880 }
1881
1882 }
bool boot
Definition main.cpp:417
string start_script
Definition main.cpp:424
Here is the caller graph for this function:

◆ init_genesis()

void launcher_def::init_genesis ( )

Definition at line 1222 of file main.cpp.

1222 {
1223 const bfs::path genesis_path = genesis.is_complete() ? genesis : bfs::current_path() / genesis;
1224 if (!bfs::exists(genesis_path)) {
1225 cout << "generating default genesis file " << genesis_path << endl;
1226 sysio::chain::genesis_state default_genesis;
1227 fc::json::save_to_file( default_genesis, genesis_path, true );
1228 }
1229 string bioskey = network.nodes["bios"].keys[0].get_public_key().to_string();
1230
1237}
static variant from_file(const fc::path &p, const parse_type ptype=parse_type::legacy_parser, const uint32_t max_depth=DEFAULT_MAX_RECURSION_DEPTH)
Definition json.cpp:797
static bool save_to_file(const T &v, const fc::path &fi, const bool pretty=true, const output_formatting format=output_formatting::stringify_large_ints_and_doubles)
Definition json.hpp:45
T as() const
Definition variant.hpp:327
fc::crypto::public_key public_key_type
Definition types.hpp:76
bfs::path genesis
Definition main.cpp:395
sysio::chain::genesis_state genesis_from_file
Definition main.cpp:427
std::optional< uint32_t > max_transaction_cpu_usage
Definition main.cpp:426
std::optional< uint32_t > max_block_cpu_usage
Definition main.cpp:425
uint32_t max_transaction_cpu_usage
the maximum billable cpu usage (in microseconds) that the chain will allow regardless of account limi...
uint32_t max_block_cpu_usage
the maxiumum billable cpu usage (in microseconds) for a block
chain_config_v0 initial_configuration
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize()

void launcher_def::initialize ( const variables_map & vmap)

Definition at line 540 of file main.cpp.

540 {
541 if (vmap.count("mode")) {
542 const vector<string> modes = vmap["mode"].as<vector<string>>();
543 for(const string&m : modes)
544 {
545 if (boost::iequals(m, "any"))
547 else if (boost::iequals(m, "producers"))
549 else if (boost::iequals(m, "specified"))
551 else if (boost::iequals(m, "none"))
553 else {
554 cerr << "unrecognized connection mode: " << m << endl;
555 exit (-1);
556 }
557 }
558 }
559
560 if (vmap.count("max-block-cpu-usage")) {
561 max_block_cpu_usage = vmap["max-block-cpu-usage"].as<uint32_t>();
562 }
563
564 if (vmap.count("max-transaction-cpu-usage")) {
565 max_transaction_cpu_usage = vmap["max-transaction-cpu-usage"].as<uint32_t>();
566 }
567
568 genesis = vmap["genesis"].as<string>();
569 if (vmap.count("host-map")) {
570 host_map_file = vmap["host-map"].as<string>();
571 }
572 if (vmap.count("servers")) {
573 server_ident_file = vmap["servers"].as<string>();
574 }
575
576 retrieve_paired_array_parameters(vmap, "specific-num", "specific-" + string(node_executable_name), specific_nodeop_args);
577 retrieve_paired_array_parameters(vmap, "spcfc-inst-num", "spcfc-inst-" + string(node_executable_name), specific_nodeop_installation_paths);
578
579 using namespace std::chrono;
580 system_clock::time_point now = system_clock::now();
581 std::time_t now_c = system_clock::to_time_t(now);
582 ostringstream dstrm;
583 dstrm << std::put_time(std::localtime(&now_c), "%Y_%m_%d_%H_%M_%S");
584 launch_time = dstrm.str();
585
586 if ( ! (shape.empty() ||
587 boost::iequals( shape, "ring" ) ||
588 boost::iequals( shape, "line" ) ||
589 boost::iequals( shape, "star" ) ||
590 boost::iequals( shape, "mesh" )) &&
591 host_map_file.empty()) {
592 bfs::path src = shape;
593 host_map_file = src.stem().string() + "_hosts.json";
594 }
595
596 if( !host_map_file.empty() ) {
597 try {
598 fc::json::from_file(host_map_file).as<vector<host_def>>(bindings);
599 for (auto &binding : bindings) {
600 for (auto &eosd : binding.instances) {
601 eosd.host = binding.host_name;
602 eosd.p2p_endpoint = binding.public_name + ":" + boost::lexical_cast<string,uint16_t>(eosd.p2p_port);
603
604 aliases.push_back (eosd.name);
605 }
606 }
607 } catch (...) { // this is an optional feature, so an exception is OK
608 }
609 }
610
611 config_dir_base = "etc/sysio";
612 data_dir_base = "var/lib";
613 next_node = 0;
614 ++prod_nodes; // add one for the bios node
615 ++total_nodes;
616
617 load_servers ();
618
619 if (prod_nodes > (producers + 1))
624 cerr << "ERROR: if provided, \"--nodes\" must be equal or greater than the number of nodes indicated by \"--pnodes\" and \"--unstarted-nodes\"." << endl;
625 exit (-1);
626 }
627
628 if (vmap.count("specific-num")) {
629 const auto specific_nums = vmap["specific-num"].as<vector<uint>>();
630 const auto specific_args = vmap["specific-" + string(node_executable_name)].as<vector<string>>();
631 if (specific_nums.size() != specific_args.size()) {
632 cerr << "ERROR: every specific-num argument must be paired with a specific-" << node_executable_name << " argument" << endl;
633 exit (-1);
634 }
635 // don't include bios
636 const auto allowed_nums = total_nodes - 1;
637 for(uint i = 0; i < specific_nums.size(); ++i)
638 {
639 const auto& num = specific_nums[i];
640 if (num >= allowed_nums) {
641 cerr << "\"--specific-num\" provided value= " << num << " is higher than \"--nodes\" provided value=" << total_nodes << endl;
642 exit (-1);
643 }
644 specific_nodeop_args[num] = specific_args[i];
645 }
646 }
647
648 char* erd_env_var = getenv ("SYSIO_HOME");
649 if (erd_env_var == nullptr || std::string(erd_env_var).empty()) {
650 erd_env_var = getenv ("PWD");
651 }
652
653 if (erd_env_var != nullptr) {
654 erd = erd_env_var;
655 } else {
656 erd.clear();
657 }
658
659 stage = bfs::path(erd);
660 if (!bfs::exists(stage)) {
661 cerr << "\"" << erd << "\" is not a valid path. Please ensure environment variable SYSIO_HOME is set to the build path." << endl;
662 exit (-1);
663 }
664 stage /= bfs::path("staging");
665 bfs::create_directories (stage);
666 if (bindings.empty()) {
668 }
669
670}
@ PC_NONE
Definition main.cpp:334
@ PC_PRODUCERS
Definition main.cpp:335
@ PC_ANY
Definition main.cpp:337
@ PC_SPECIFIED
Definition main.cpp:336
void retrieve_paired_array_parameters(const variables_map &vmap, const std::string &num_selector, const std::string &paired_selector, std::map< uint, T > &selector_map)
Definition main.cpp:518
unsigned int uint32_t
Definition stdint.h:126
void load_servers()
Definition main.cpp:673
void define_network()
Definition main.cpp:789
bfs::path server_ident_file
Definition main.cpp:398
std::map< uint, string > specific_nodeop_installation_paths
Definition main.cpp:407
allowed_connection allowed_connections
Definition main.cpp:394
string launch_time
Definition main.cpp:420
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_bios_ndx()

bool launcher_def::is_bios_ndx ( size_t ndx)

Definition at line 1318 of file main.cpp.

1318 {
1319 return aliases[ndx] == "bios";
1320}
Here is the caller graph for this function:

◆ kill()

void launcher_def::kill ( launch_modes mode,
string sig_opt )

Definition at line 1684 of file main.cpp.

1684 {
1685 switch (mode) {
1686 case LM_NONE:
1687 return;
1688 case LM_VERIFY:
1689 // no-op
1690 return;
1691 case LM_NAMED: {
1692 cerr << "feature not yet implemented " << endl;
1693 #if 0
1694 auto node = network.nodes.find(launch_name);
1695 kill_instance (node.second.instance, sig_opt);
1696 #endif
1697 break;
1698 }
1699 case LM_ALL:
1700 case LM_LOCAL:
1701 case LM_REMOTE : {
1702 bfs::path source = "last_run.json";
1703 try {
1705 for( auto& info : last_run.running_nodes ) {
1706 if( mode == LM_ALL || (info.remote && mode == LM_REMOTE) ||
1707 (!info.remote && mode == LM_LOCAL) ) {
1708 try {
1709 if( info.pid_file.length() ) {
1710 string pid;
1711 fc::json::from_file( info.pid_file ).as<string>( pid );
1712 string kill_cmd = "kill " + sig_opt + " " + pid;
1713 boost::process::system( kill_cmd );
1714 } else {
1715 boost::process::system( info.kill_cmd );
1716 }
1717 } catch( fc::exception& fce ) {
1718 cerr << "unable to kill fc::exception=" << fce.to_detail_string() << endl;
1719 } catch( std::exception& stde ) {
1720 cerr << "unable to kill std::exception=" << stde.what() << endl;
1721 } catch( ... ) {
1722 cerr << "Unable to kill" << endl;
1723 }
1724 }
1725 }
1726 } catch( fc::exception& fce ) {
1727 cerr << "unable to open " << source << " fc::exception=" << fce.to_detail_string() << endl;
1728 } catch( std::exception& stde ) {
1729 cerr << "unable to open " << source << " std::exception=" << stde.what() << endl;
1730 } catch( ... ) {
1731 cerr << "Unable to open " << source << endl;
1732 }
1733 }
1734 }
1735}
Used to generate a useful error report when an exception is thrown.
Definition exception.hpp:58
std::string to_detail_string(log_level ll=log_level::all) const
@ LM_NONE
Definition main.cpp:325
@ LM_ALL
Definition main.cpp:329
@ LM_NAMED
Definition main.cpp:328
@ LM_VERIFY
Definition main.cpp:330
@ LM_LOCAL
Definition main.cpp:326
@ LM_REMOTE
Definition main.cpp:327
vector< node_rt_info > running_nodes
Definition main.cpp:321
last_run_def last_run
Definition main.cpp:413
string launch_name
Definition main.cpp:419
Here is the call graph for this function:
Here is the caller graph for this function:

◆ launch()

void launcher_def::launch ( eosd_def & node,
string & gts )

Definition at line 1566 of file main.cpp.

1566 {
1567 bfs::path dd = instance.data_dir_name;
1568 bfs::path reout = dd / "stdout.txt";
1569 bfs::path reerr_sl = dd / "stderr.txt";
1570 bfs::path reerr_base = bfs::path("stderr." + launch_time + ".txt");
1571 bfs::path reerr = dd / reerr_base;
1572 bfs::path pidf = dd / bfs::path(string(node_executable_name) + ".pid");
1573 host_def* host;
1574 try {
1575 host = deploy_config_files (*instance.node);
1576 } catch (const bfs::filesystem_error &ex) {
1577 cerr << "deploy_config_files threw " << ex.what() << endl;
1578 exit (-1);
1579 }
1580
1581 node_rt_info info;
1582 info.remote = !host->is_local();
1583
1584 string install_path;
1585 if (instance.name != "bios" && !specific_nodeop_installation_paths.empty()) {
1586 const auto node_num = boost::lexical_cast<uint16_t,string>(instance.get_node_num());
1587 if (specific_nodeop_installation_paths.count(node_num)) {
1588 install_path = specific_nodeop_installation_paths[node_num] + "/";
1589 }
1590 }
1591 string eosdcmd = install_path + "programs/nodeop/" + string(node_executable_name) + " ";
1593 eosdcmd += "--skip-transaction-signatures ";
1594 }
1595 if (!eosd_extra_args.empty()) {
1596 eosdcmd += eosd_extra_args + " ";
1597 }
1598 if (instance.name != "bios" && !specific_nodeop_args.empty()) {
1599 const auto node_num = boost::lexical_cast<uint16_t,string>(instance.get_node_num());
1600 if (specific_nodeop_args.count(node_num)) {
1601 eosdcmd += specific_nodeop_args[node_num] + " ";
1602 }
1603 }
1604
1606 eosdcmd += "--enable-stale-production true ";
1608 }
1609
1610 eosdcmd += " --config-dir " + instance.config_dir_name + " --data-dir " + instance.data_dir_name;
1611 eosdcmd += " --genesis-json " + instance.config_dir_name + "/genesis.json";
1612 if (gts.length()) {
1613 eosdcmd += " --genesis-timestamp " + gts;
1614 }
1615
1616 if (eosdcmd.find("sysio::history_api_plugin") != string::npos && eosdcmd.find("sysio::trace_api_plugin") != string::npos){
1617 // remove trace_api_plugin from old version nodes in multiversion test
1618 eosdcmd = find_and_remove_arg(eosdcmd, "--plugin sysio::trace_api_plugin");
1619 eosdcmd = find_and_remove_arg(eosdcmd, "--trace-no-abis");
1620 eosdcmd = find_and_remove_arg(eosdcmd, "--trace-rpc-abi");
1621 }
1622
1623 if (!host->is_local()) {
1624 if (instance.node->dont_start) {
1625 cerr << "Unable to use \"unstarted-nodes\" with a remote hose" << endl;
1626 exit (-1);
1627 }
1628 string cmdl ("cd ");
1629 cmdl += host->sysio_home + "; nohup " + eosdcmd + " > "
1630 + reout.string() + " 2> " + reerr.string() + "& echo $! > " + pidf.string()
1631 + "; rm -f " + reerr_sl.string()
1632 + "; ln -s " + reerr_base.string() + " " + reerr_sl.string();
1633 if (!do_ssh (cmdl, host->host_name)){
1634 cerr << "Unable to invoke " << cmdl
1635 << " on host " << host->host_name << endl;
1636 exit (-1);
1637 }
1638
1639 string cmd = "cd " + host->sysio_home + "; kill -15 $(cat " + pidf.string() + ")";
1640 format_ssh (cmd, host->host_name, info.kill_cmd);
1641 }
1642 else if (!instance.node->dont_start) {
1643 cerr << "spawning child, " << eosdcmd << endl;
1644
1645 bp::child c(eosdcmd, bp::std_out > reout, bp::std_err > reerr );
1646 bfs::remove(reerr_sl);
1647 bfs::create_symlink (reerr_base, reerr_sl);
1648
1649 bfs::ofstream pidout (pidf);
1650 pidout << c.id() << flush;
1651 pidout.close();
1652
1653 info.pid_file = pidf.string();
1654 info.kill_cmd = "";
1655
1656 if(!c.running()) {
1657 cerr << "child not running after spawn " << eosdcmd << endl;
1658 for (int i = 0; i > 0; i++) {
1659 if (c.running () ) break;
1660 }
1661 }
1662 c.detach();
1663 }
1664 else {
1665 cerr << "not spawning child, " << eosdcmd << endl;
1666
1667 const bfs::path dd = instance.data_dir_name;
1668 const bfs::path start_file = dd / "start.cmd";
1669 bfs::ofstream sf (start_file);
1670
1671 sf << eosdcmd << endl;
1672 sf.close();
1673 }
1674 last_run.running_nodes.emplace_back (move(info));
1675}
string find_and_remove_arg(string str, string substr)
Definition main.cpp:1546
host_def * deploy_config_files(tn_node_def &node)
Definition main.cpp:952
bool skip_transaction_signatures
Definition main.cpp:404
bool add_enable_stale_production
Definition main.cpp:418
bool remote
Definition main.cpp:315
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load_servers()

void launcher_def::load_servers ( )

Definition at line 673 of file main.cpp.

673 {
674 if (!server_ident_file.empty()) {
675 try {
677 prod_nodes = 0;
678 for (auto &s : servers.producer) {
679 prod_nodes += s.instances;
680 }
681
683 for (auto &s : servers.nonprod) {
684 total_nodes += s.instances;
685 }
686
687 per_host = 1;
688 network.ssh_helper = servers.ssh;
689 }
690 catch (...) {
691 cerr << "unable to load server identity file " << server_ident_file << endl;
692 exit (-1);
693 }
694 }
695}
remote_deploy ssh
Definition main.cpp:311
char * s
Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_custom()

void launcher_def::make_custom ( )

Definition at line 1456 of file main.cpp.

1456 {
1457 bfs::path source = shape;
1459 for (auto &h : bindings) {
1460 for (auto &inst : h.instances) {
1461 tn_node_def *node = &network.nodes[inst.name];
1462 for (auto &p : node->producers) {
1463 producer_set.schedule.push_back({p,node->keys[0].get_public_key()});
1464 }
1465 node->instance = &inst;
1466 inst.node = node;
1467 }
1468 }
1469}
const mie::Vuint & p
Definition bn.cpp:27
tn_node_def * node
Definition main.cpp:216
testnet_def network
Definition main.cpp:408
Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_line()

void launcher_def::make_line ( bool make_ring = true)

Definition at line 1350 of file main.cpp.

1350 {
1351 bind_nodes();
1352 size_t non_bios = total_nodes - 1;
1353 if (non_bios > 2) {
1354 // since we have at least 3 indexes, every next_ndx(i) call is guaranteed to not be the end of the loop
1355 bool end_of_loop = false;
1356 for (size_t i = start_ndx(); !end_of_loop; next_ndx(i)) {
1357 size_t front = i;
1358 end_of_loop = next_ndx (front);
1359 // if this is the end of the loop and this is not a ring, then don't connect the end to the beginning to make a ring
1360 if (end_of_loop && !make_ring) {
1361 break;
1362 }
1363 network.nodes.find(aliases[i])->second.peers.push_back (aliases[front]);
1364 }
1365 }
1366 else if (non_bios == 2) {
1367 size_t n0 = start_ndx();
1368 size_t n1 = n0;
1369 next_ndx(n1);
1370 network.nodes.find(aliases[n0])->second.peers.push_back (aliases[n1]);
1371 if (make_ring) {
1372 network.nodes.find(aliases[n1])->second.peers.push_back (aliases[n0]);
1373 }
1374 // since there are only 2 nodes, this really just affects startup and that only index 0 will initiate the connection if !make_ring
1375 }
1376}
size_t start_ndx()
Definition main.cpp:1322
void bind_nodes()
Definition main.cpp:861
bool next_ndx(size_t &ndx)
Definition main.cpp:1326
Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_mesh()

void launcher_def::make_mesh ( )

Definition at line 1431 of file main.cpp.

1431 {
1432 size_t non_bios = total_nodes - 1;
1433 bind_nodes();
1434 // use to prevent duplicates since all connections are bidirectional
1435 std::map <string, std::set<string>> peers_to_from;
1436 bool loop = false;
1437 for (size_t i = start_ndx();!loop; loop = next_ndx(i)) {
1438 const auto& iter = network.nodes.find(aliases[i]);
1439 auto &current = iter->second;
1440 const auto& current_name = iter->first;
1441
1442 for (size_t j = 1; j < non_bios; j++) {
1443 size_t ndx = skip_ndx(i,j);
1444 const auto& peer = aliases[ndx];
1445 // if already established, don't add to list
1446 if (peers_to_from[peer].count(current_name) < 2) {
1447 current.peers.push_back (peer);
1448 // keep track of bidirectional relationships to prevent duplicates
1449 peers_to_from[current_name].insert(peer);
1450 }
1451 }
1452 }
1453}
size_t skip_ndx(size_t from, size_t offset)
Definition main.cpp:1338
Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_star()

void launcher_def::make_star ( )

Definition at line 1379 of file main.cpp.

1379 {
1380 size_t non_bios = total_nodes - 1;
1381 if (non_bios < 4) {
1382 make_line ();
1383 return;
1384 }
1385 bind_nodes();
1386
1387 size_t links = 3;
1388 if (non_bios > 12) {
1389 links = static_cast<size_t>(sqrt(non_bios)) + 2;
1390 }
1391 size_t gap = non_bios > 6 ? 3 : (non_bios - links)/2 +1;
1392 while (non_bios % gap == 0) {
1393 ++gap;
1394 }
1395 // use to prevent duplicates since all connections are bidirectional
1396 std::map <string, std::set<string>> peers_to_from;
1397 bool loop = false;
1398 for (size_t i = start_ndx(); !loop; loop = next_ndx(i)) {
1399 const auto& iter = network.nodes.find(aliases[i]);
1400 auto &current = iter->second;
1401 const auto& current_name = iter->first;
1402 size_t ndx = i;
1403 for (size_t l = 1; l <= links; l++) {
1404 ndx = skip_ndx(ndx, l * gap);
1405 auto &peer = aliases[ndx];
1406 for (bool found = true; found; ) {
1407 found = false;
1408 for (auto &p : current.peers) {
1409 if (p == peer) {
1410 next_ndx(ndx);
1411 if (ndx == i) {
1412 next_ndx(ndx);
1413 }
1414 peer = aliases[ndx];
1415 found = true;
1416 break;
1417 }
1418 }
1419 }
1420 // if already established, don't add to list
1421 if (peers_to_from[peer].count(current_name) < 2) {
1422 current.peers.push_back(peer); // current_name -> peer
1423 // keep track of bidirectional relationships to prevent duplicates
1424 peers_to_from[current_name].insert(peer);
1425 }
1426 }
1427 }
1428}
int l
Here is the call graph for this function:
Here is the caller graph for this function:

◆ next_ndx()

bool launcher_def::next_ndx ( size_t & ndx)

Definition at line 1326 of file main.cpp.

1326 {
1327 ++ndx;
1328 bool loop = ndx == total_nodes;
1329 if (loop)
1330 ndx = start_ndx();
1331 else
1332 if (is_bios_ndx(ndx)) {
1333 loop = next_ndx(ndx);
1334 }
1335 return loop;
1336}
bool is_bios_ndx(size_t ndx)
Definition main.cpp:1318
Here is the call graph for this function:
Here is the caller graph for this function:

◆ prep_remote_config_dir()

void launcher_def::prep_remote_config_dir ( eosd_def & node,
host_def * host )

Definition at line 1496 of file main.cpp.

1496 {
1497 bfs::path abs_config_dir = bfs::path(host->sysio_home) / node.config_dir_name;
1498 bfs::path abs_data_dir = bfs::path(host->sysio_home) / node.data_dir_name;
1499
1500 string acd = abs_config_dir.string();
1501 string add = abs_data_dir.string();
1502 string cmd = "cd " + host->sysio_home;
1503
1504 cmd = "cd " + host->sysio_home;
1505 if (!do_ssh(cmd, host->host_name)) {
1506 cerr << "Unable to switch to path " << host->sysio_home
1507 << " on host " << host->host_name << endl;
1508 exit (-1);
1509 }
1510
1511 cmd = "cd " + acd;
1512 if (!do_ssh(cmd,host->host_name)) {
1513 cmd = "mkdir -p " + acd;
1514 if (!do_ssh (cmd, host->host_name)) {
1515 cerr << "Unable to invoke " << cmd << " on host " << host->host_name << endl;
1516 exit (01);
1517 }
1518 }
1519 cmd = "cd " + add;
1520 if (do_ssh(cmd,host->host_name)) {
1521 if(force_overwrite) {
1522 cmd = "rm -rf " + add + "/" + block_dir + " ;"
1523 + "rm -rf " + add + "/" + shared_mem_dir;
1524 if (!do_ssh (cmd, host->host_name)) {
1525 cerr << "Unable to remove old data directories on host "
1526 << host->host_name << endl;
1527 exit (-1);
1528 }
1529 }
1530 else {
1531 cerr << add << " already exists on host " << host->host_name << ". Use -f/--force to overwrite configuration and erase blockchain" << endl;
1532 exit (-1);
1533 }
1534 }
1535 else {
1536 cmd = "mkdir -p " + add;
1537 if (!do_ssh (cmd, host->host_name)) {
1538 cerr << "Unable to invoke " << cmd << " on host "
1539 << host->host_name << endl;
1540 exit (-1);
1541 }
1542 }
1543}
int add(int a, int b)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ roll()

void launcher_def::roll ( const string & host_names)

Definition at line 1850 of file main.cpp.

1850 {
1851 vector<string> hosts;
1852 boost::split(hosts, host_names, boost::is_any_of(","));
1853 for (string host_name: hosts) {
1854 cout << "Rolling " << host_name << endl;
1855 auto host = find_host_by_name_or_address(host_name);
1856 string cmd = "./scripts/sysio-tn_roll.sh ";
1857 do_command(*host, host_name, { { "SYSIO_HOME", host->sysio_home } }, cmd);
1858 }
1859}
host_def * find_host_by_name_or_address(const string &name)
Definition main.cpp:935
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_options()

void launcher_def::set_options ( bpo::options_description & cli)

Definition at line 477 of file main.cpp.

477 {
478 cfg.add_options()
479 ("force,f", bpo::bool_switch(&force_overwrite)->default_value(false), "Force overwrite of existing configuration files and erase blockchain")
480 ("nodes,n",bpo::value<size_t>(&total_nodes)->default_value(1),"total number of nodes to configure and launch")
481 ("unstarted-nodes",bpo::value<size_t>(&unstarted_nodes)->default_value(0),"total number of nodes to configure, but not launch")
482 ("pnodes,p",bpo::value<size_t>(&prod_nodes)->default_value(1),"number of nodes that contain one or more producers")
483 ("producers",bpo::value<size_t>(&producers)->default_value(21),"total number of non-bios and non-shared producer instances in this network")
484 ("shared-producers",bpo::value<size_t>(&shared_producers)->default_value(0),"total number of shared producers on each non-bios nodes")
485 ("mode,m",bpo::value<vector<string>>()->multitoken()->default_value({"any"}, "any"),"connection mode, combination of \"any\", \"producers\", \"specified\", \"none\"")
486 ("shape,s",bpo::value<string>(&shape)->default_value("star"),"network topology, use \"star\", \"mesh\", \"ring\", \"line\" or give a filename for custom")
487 ("genesis,g",bpo::value<string>()->default_value("./genesis.json"),"set the path to genesis.json")
488 ("skip-signature", bpo::bool_switch(&skip_transaction_signatures)->default_value(false), (string(node_executable_name) + " does not require transaction signatures.").c_str())
489 (node_executable_name, bpo::value<string>(&eosd_extra_args), ("forward " + string(node_executable_name) + " command line argument(s) to each instance of " + string(node_executable_name) + ", enclose arg(s) in quotes").c_str())
490 ("specific-num", bpo::value<vector<uint>>()->composing(), ("forward " + string(node_executable_name) + " command line argument(s) (using \"--specific-" + string(node_executable_name) + "\" flag) to this specific instance of " + string(node_executable_name) + ". This parameter can be entered multiple times and requires a paired \"--specific-" + string(node_executable_name) +"\" flag each time it is used").c_str())
491 (("specific-" + string(node_executable_name)).c_str(), bpo::value<vector<string>>()->composing(), ("forward " + string(node_executable_name) + " command line argument(s) to its paired specific instance of " + string(node_executable_name) + "(using \"--specific-num\"), enclose arg(s) in quotes").c_str())
492 ("spcfc-inst-num", bpo::value<vector<uint>>()->composing(), ("Specify a specific version installation path (using \"--spcfc-inst-"+ string(node_executable_name) + "\" flag) for launching this specific instance of " + string(node_executable_name) + ". This parameter can be entered multiple times and requires a paired \"--spcfc-inst-" + string(node_executable_name) + "\" flag each time it is used").c_str())
493 (("spcfc-inst-" + string(node_executable_name)).c_str(), bpo::value<vector<string>>()->composing(), ("Provide a specific version installation path to its paired specific instance of " + string(node_executable_name) + "(using \"--spcfc-inst-num\")").c_str())
494 ("delay,d",bpo::value<int>(&start_delay)->default_value(0),"seconds delay before starting each node after the first")
495 ("boot",bpo::bool_switch(&boot)->default_value(false),"After deploying the nodes and generating a boot script, invoke it.")
496 ("nogen",bpo::bool_switch(&nogen)->default_value(false),"launch nodes without writing new config files")
497 ("host-map",bpo::value<string>(),"a file containing mapping specific nodes to hosts. Used to enhance the custom shape argument")
498 ("servers",bpo::value<string>(),"a file containing ip addresses and names of individual servers to deploy as producers or non-producers ")
499 ("per-host",bpo::value<int>(&per_host)->default_value(0),("specifies how many " + string(node_executable_name) + " instances will run on a single host. Use 0 to indicate all on one.").c_str())
500 ("network-name",bpo::value<string>(&network.name)->default_value("testnet_"),"network name prefix used in GELF logging source")
501 ("enable-gelf-logging",bpo::value<bool>(&gelf_enabled)->default_value(false),"enable gelf logging appender in logging configuration file")
502 ("gelf-endpoint",bpo::value<string>(&gelf_endpoint)->default_value("10.160.11.21:12201"),"hostname:port or ip:port of GELF endpoint")
503 ("template",bpo::value<string>(&start_temp)->default_value("testnet.template"),"the startup script template")
504 ("script",bpo::value<string>(&start_script)->default_value("bios_boot.sh"),"the generated startup script name")
505 ("max-block-cpu-usage",bpo::value<uint32_t>(),"Provide the \"max-block-cpu-usage\" value to use in the genesis.json file")
506 ("max-transaction-cpu-usage",bpo::value<uint32_t>(),"Provide the \"max-transaction-cpu-usage\" value to use in the genesis.json file")
507 ;
508}
int start_delay
Definition main.cpp:414
string start_temp
Definition main.cpp:423
bool gelf_enabled
Definition main.cpp:415
Here is the caller graph for this function:

◆ skip_ndx()

size_t launcher_def::skip_ndx ( size_t from,
size_t offset )

Definition at line 1338 of file main.cpp.

1338 {
1339 size_t ndx = (from + offset) % total_nodes;
1340 if (total_nodes > 2) {
1341 size_t attempts = total_nodes - 1;
1342 while (--attempts && (is_bios_ndx(ndx) || ndx == from)) {
1343 next_ndx(ndx);
1344 }
1345 }
1346 return ndx;
1347}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_all()

void launcher_def::start_all ( string & gts,
launch_modes mode )

Definition at line 1885 of file main.cpp.

1885 {
1886 switch (mode) {
1887 case LM_NONE:
1888 return;
1889 case LM_VERIFY:
1890 //validate configuration, report findings, exit
1891 return;
1892 case LM_NAMED : {
1893 try {
1895 auto node = network.nodes.find(launch_name);
1896 launch(*node->second.instance, gts);
1897 } catch (fc::exception& fce) {
1898 cerr << "unable to launch " << launch_name << " fc::exception=" << fce.to_detail_string() << endl;
1899 } catch (std::exception& stde) {
1900 cerr << "unable to launch " << launch_name << " std::exception=" << stde.what() << endl;
1901 } catch (...) {
1902 cerr << "Unable to launch " << launch_name << endl;
1903 exit (-1);
1904 }
1905 break;
1906 }
1907 case LM_ALL:
1908 case LM_REMOTE:
1909 case LM_LOCAL: {
1910
1911 for (auto &h : bindings ) {
1912 if (mode == LM_ALL ||
1913 (h.is_local() ? mode == LM_LOCAL : mode == LM_REMOTE)) {
1914 for (auto &inst : h.instances) {
1915 try {
1916 cerr << "launching " << inst.name << endl;
1917 launch (inst, gts);
1918 } catch (fc::exception& fce) {
1919 cerr << "unable to launch " << inst.name << " fc::exception=" << fce.to_detail_string() << endl;
1920 } catch (std::exception& stde) {
1921 cerr << "unable to launch " << inst.name << " std::exception=" << stde.what() << endl;
1922 } catch (...) {
1923 cerr << "unable to launch " << inst.name << endl;
1924 }
1925 sleep (start_delay);
1926 }
1927 }
1928 }
1929 break;
1930 }
1931 }
1932 bfs::path savefile = "last_run.json";
1933 bfs::ofstream sf (savefile);
1934
1935 sf << fc::json::to_pretty_string (last_run) << endl;
1936 sf.close();
1937}
void launch(eosd_def &node, string &gts)
Definition main.cpp:1566
Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_ndx()

size_t launcher_def::start_ndx ( )

Definition at line 1322 of file main.cpp.

1322 {
1323 return is_bios_ndx(0) ? 1 : 0;
1324}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_bios_boot()

void launcher_def::write_bios_boot ( )

Definition at line 1272 of file main.cpp.

1272 {
1273 bfs::ifstream src(bfs::path(config_dir_base) / "launcher" / start_temp);
1274 if(!src.good()) {
1275 cerr << "unable to open " << config_dir_base << "launcher/" << start_temp << " " << strerror(errno) << "\n";
1276 exit (9);
1277 }
1278
1279 bfs::ofstream brb (bfs::current_path() / start_script);
1280 if(!brb.good()) {
1281 cerr << "unable to open " << bfs::current_path() << "/" << start_script << " " << strerror(errno) << "\n";
1282 exit (9);
1283 }
1284
1285 auto &bios_node = network.nodes["bios"];
1286 uint16_t biosport = bios_node.instance->http_port;
1287 string bhost = bios_node.instance->host;
1288 string line;
1289 string prefix = "###INSERT ";
1290 size_t len = prefix.length();
1291 while (getline(src,line)) {
1292 if (line.substr(0,len) == prefix) {
1293 string key = line.substr(len);
1294 if (key == "envars") {
1295 brb << "bioshost=" << bhost << "\nbiosport=" << biosport << "\n";
1296 }
1297 else if (key == "prodkeys" ) {
1298 for (auto &node : network.nodes) {
1299 brb << "wcmd import -n ignition --private-key " << node.second.keys[0].to_string() << "\n";
1300 }
1301 }
1302 else if (key == "cacmd") {
1303 for (auto &p : producer_set.schedule) {
1304 if (p.producer_name == "sysio") {
1305 continue;
1306 }
1307 brb << "cacmd " << p.producer_name
1308 << " " << p.block_signing_key.to_string() << " " << p.block_signing_key.to_string() << "\n";
1309 }
1310 }
1311 }
1312 brb << line << "\n";
1313 }
1314 src.close();
1315 brb.close();
1316}
size_t len
Here is the caller graph for this function:

◆ write_config_file()

void launcher_def::write_config_file ( tn_node_def & node)

Definition at line 1064 of file main.cpp.

1064 {
1065 bool is_bios = (node.name == "bios");
1066 bfs::path filename;
1067 eosd_def &instance = *node.instance;
1068 host_def *host = find_host (instance.host);
1069
1070 bfs::path dd = stage / instance.config_dir_name;
1071 if (!bfs::exists(dd)) {
1072 try {
1073 bfs::create_directories (dd);
1074 } catch (const bfs::filesystem_error &ex) {
1075 cerr << "write_config_files threw " << ex.what() << endl;
1076 exit (-1);
1077 }
1078 }
1079
1080 filename = dd / "config.ini";
1081
1082 bfs::ofstream cfg(filename);
1083 if (!cfg.good()) {
1084 cerr << "unable to open " << filename << " " << strerror(errno) << "\n";
1085 exit (-1);
1086 }
1087
1088 cfg << "blocks-dir = " << block_dir << "\n";
1089 cfg << "http-server-address = " << host->host_name << ":" << instance.http_port << "\n";
1090 cfg << "http-validate-host = false\n";
1091 cfg << "p2p-listen-endpoint = " << host->listen_addr << ":" << instance.p2p_port << "\n";
1092 cfg << "p2p-server-address = " << host->public_name << ":" << instance.p2p_port << "\n";
1093
1094
1095 if (is_bios) {
1096 cfg << "enable-stale-production = true\n";
1097 }
1099 cfg << "allowed-connection = any\n";
1100 }
1101 else if (allowed_connections == PC_NONE) {
1102 cfg << "allowed-connection = none\n";
1103 }
1104 else
1105 {
1107 cfg << "allowed-connection = producers\n";
1108 }
1110 cfg << "allowed-connection = specified\n";
1111 cfg << "peer-key = \"" << node.keys.begin()->get_public_key().to_string() << "\"\n";
1112 cfg << "peer-private-key = [\"" << node.keys.begin()->get_public_key().to_string()
1113 << "\",\"" << node.keys.begin()->to_string() << "\"]\n";
1114 }
1115 }
1116
1117 if(!is_bios) {
1118 auto &bios_node = network.nodes["bios"];
1119 cfg << "p2p-peer-address = " << bios_node.instance->p2p_endpoint<< "\n";
1120 }
1121 for (const auto &p : node.peers) {
1122 cfg << "p2p-peer-address = " << network.nodes.find(p)->second.instance->p2p_endpoint << "\n";
1123 }
1124 if (node.producers.size()) {
1125 for (const auto &kp : node.keys ) {
1126 cfg << "private-key = [\"" << kp.get_public_key().to_string()
1127 << "\",\"" << kp.to_string() << "\"]\n";
1128 }
1129 for (auto &p : node.producers) {
1130 cfg << "producer-name = " << p << "\n";
1131 }
1132 cfg << "plugin = sysio::producer_plugin\n";
1133 }
1134 cfg << "plugin = sysio::net_plugin\n";
1135 cfg << "plugin = sysio::chain_api_plugin\n";
1136 cfg.close();
1137}
uint16_t http_port
Definition main.cpp:213
uint16_t p2p_port
Definition main.cpp:212
vector< string > peers
Definition main.cpp:240
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_dot_file()

void launcher_def::write_dot_file ( )

Definition at line 774 of file main.cpp.

774 {
775 bfs::ofstream df ("testnet.dot");
776 df << "digraph G\n{\nlayout=\"circo\";\n";
777 for (auto &node : network.nodes) {
778 for (const auto &p : node.second.peers) {
779 string pname=network.nodes.find(p)->second.instance->dot_label();
780 df << "\"" << node.second.instance->dot_label ()
781 << "\"->\"" << pname
782 << "\" [dir=\"forward\"];" << std::endl;
783 }
784 }
785 df << "}\n";
786}
Here is the caller graph for this function:

◆ write_genesis_file()

void launcher_def::write_genesis_file ( tn_node_def & node)

Definition at line 1240 of file main.cpp.

1240 {
1241 bfs::path filename;
1242 eosd_def &instance = *node.instance;
1243
1244 bfs::path dd = stage / instance.config_dir_name;
1245 if (!bfs::exists(dd)) {
1246 bfs::create_directories(dd);
1247 }
1248
1249 filename = dd / "genesis.json";
1250 fc::json::save_to_file( genesis_from_file, dd / "genesis.json", true );
1251}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_logging_config_file()

void launcher_def::write_logging_config_file ( tn_node_def & node)

Definition at line 1140 of file main.cpp.

1140 {
1141 bfs::path filename;
1142 eosd_def &instance = *node.instance;
1143
1144 bfs::path dd = stage / instance.config_dir_name;
1145 if (!bfs::exists(dd)) {
1146 bfs::create_directories(dd);
1147 }
1148
1149 filename = dd / "logging.json";
1150
1151 bfs::ofstream cfg(filename);
1152 if (!cfg.good()) {
1153 cerr << "unable to open " << filename << " " << strerror(errno) << "\n";
1154 exit (9);
1155 }
1156
1157 auto log_config = fc::logging_config::default_config();
1158 if(gelf_enabled) {
1159 log_config.appenders.push_back(
1160 fc::appender_config( "net", "gelf",
1162 ( "endpoint", node.gelf_endpoint )
1163 ( "host", instance.name )
1164 ) );
1165 log_config.loggers.front().appenders.push_back( "net" );
1166 }
1167
1168 fc::logger_config p2p( "net_plugin_impl" );
1169 p2p.level = fc::log_level::debug;
1170 p2p.appenders.push_back( "stderr" );
1171 if( gelf_enabled ) p2p.appenders.push_back( "net" );
1172 log_config.loggers.emplace_back( p2p );
1173
1174 fc::logger_config http( "http_plugin" );
1175 http.level = fc::log_level::debug;
1176 http.appenders.push_back( "stderr" );
1177 if( gelf_enabled ) http.appenders.push_back( "net" );
1178 log_config.loggers.emplace_back( http );
1179
1180 fc::logger_config pp( "producer_plugin" );
1181 pp.level = fc::log_level::debug;
1182 pp.appenders.push_back( "stderr" );
1183 if( gelf_enabled ) pp.appenders.push_back( "net" );
1184 log_config.loggers.emplace_back( pp );
1185
1186 fc::logger_config tt( "transaction_success_tracing" );
1187 tt.level = fc::log_level::debug;
1188 tt.appenders.push_back( "stderr" );
1189 if( gelf_enabled ) tt.appenders.push_back( "net" );
1190 log_config.loggers.emplace_back( tt );
1191
1192 fc::logger_config tft( "transaction_failure_tracing" );
1193 tft.level = fc::log_level::debug;
1194 tft.appenders.push_back( "stderr" );
1195 if( gelf_enabled ) tft.appenders.push_back( "net" );
1196 log_config.loggers.emplace_back( tft );
1197
1198 fc::logger_config tts( "transaction_trace_success" );
1199 tts.level = fc::log_level::debug;
1200 tts.appenders.push_back( "stderr" );
1201 if( gelf_enabled ) tts.appenders.push_back( "net" );
1202 log_config.loggers.emplace_back( tts );
1203
1204 fc::logger_config ttf( "transaction_trace_failure" );
1205 ttf.level = fc::log_level::debug;
1206 ttf.appenders.push_back( "stderr" );
1207 if( gelf_enabled ) ttf.appenders.push_back( "net" );
1208 log_config.loggers.emplace_back( ttf );
1209
1210 fc::logger_config ta( "trace_api" );
1211 ta.level = fc::log_level::debug;
1212 ta.appenders.push_back( "stderr" );
1213 if( gelf_enabled ) ta.appenders.push_back( "net" );
1214 log_config.loggers.emplace_back( ta );
1215
1217 cfg.write( str.c_str(), str.size() );
1218 cfg.close();
1219}
An order-preserving dictionary of variants.
static constexpr time_point maximum()
Definition time.hpp:46
return str
Definition CLI11.hpp:1359
static logging_config default_config()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_setprods_file()

void launcher_def::write_setprods_file ( )

Definition at line 1254 of file main.cpp.

1254 {
1255 bfs::path filename = bfs::current_path() / "setprods.json";
1256 bfs::ofstream psfile (filename);
1257 if(!psfile.good()) {
1258 cerr << "unable to open " << filename << " " << strerror(errno) << "\n";
1259 exit (9);
1260 }
1261 producer_set_def no_bios;
1262 for (auto &p : producer_set.schedule) {
1263 if (p.producer_name != "sysio")
1264 no_bios.schedule.push_back(p);
1265 }
1267 psfile.write( str.c_str(), str.size() );
1268 psfile.close();
1269}
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ add_enable_stale_production

bool launcher_def::add_enable_stale_production = false

Definition at line 418 of file main.cpp.

◆ aliases

vector<string> launcher_def::aliases

Definition at line 410 of file main.cpp.

◆ allowed_connections

allowed_connection launcher_def::allowed_connections = PC_NONE

Definition at line 394 of file main.cpp.

◆ bindings

vector<host_def> launcher_def::bindings

Definition at line 411 of file main.cpp.

◆ boot

bool launcher_def::boot

Definition at line 417 of file main.cpp.

◆ config_dir_base

bfs::path launcher_def::config_dir_base

Definition at line 402 of file main.cpp.

◆ data_dir_base

bfs::path launcher_def::data_dir_base

Definition at line 403 of file main.cpp.

◆ eosd_extra_args

string launcher_def::eosd_extra_args

Definition at line 405 of file main.cpp.

◆ erd

string launcher_def::erd

Definition at line 401 of file main.cpp.

◆ force_overwrite

bool launcher_def::force_overwrite

Definition at line 386 of file main.cpp.

◆ gelf_enabled

bool launcher_def::gelf_enabled

Definition at line 415 of file main.cpp.

◆ gelf_endpoint

string launcher_def::gelf_endpoint

Definition at line 409 of file main.cpp.

◆ genesis

bfs::path launcher_def::genesis

Definition at line 395 of file main.cpp.

◆ genesis_from_file

sysio::chain::genesis_state launcher_def::genesis_from_file

Definition at line 427 of file main.cpp.

◆ host_map_file

bfs::path launcher_def::host_map_file

Definition at line 397 of file main.cpp.

◆ last_run

last_run_def launcher_def::last_run

Definition at line 413 of file main.cpp.

◆ launch_name

string launcher_def::launch_name

Definition at line 419 of file main.cpp.

◆ launch_time

string launcher_def::launch_time

Definition at line 420 of file main.cpp.

◆ max_block_cpu_usage

std::optional<uint32_t> launcher_def::max_block_cpu_usage

Definition at line 425 of file main.cpp.

◆ max_transaction_cpu_usage

std::optional<uint32_t> launcher_def::max_transaction_cpu_usage

Definition at line 426 of file main.cpp.

◆ network

testnet_def launcher_def::network

Definition at line 408 of file main.cpp.

◆ next_node

size_t launcher_def::next_node

Definition at line 392 of file main.cpp.

◆ nogen

bool launcher_def::nogen

Definition at line 416 of file main.cpp.

◆ output

bfs::path launcher_def::output

Definition at line 396 of file main.cpp.

◆ per_host

int launcher_def::per_host = 0

Definition at line 412 of file main.cpp.

◆ prod_nodes

size_t launcher_def::prod_nodes

Definition at line 389 of file main.cpp.

◆ producer_set

producer_set_def launcher_def::producer_set

Definition at line 422 of file main.cpp.

◆ producers

size_t launcher_def::producers

Definition at line 390 of file main.cpp.

◆ server_ident_file

bfs::path launcher_def::server_ident_file

Definition at line 398 of file main.cpp.

◆ servers

server_identities launcher_def::servers

Definition at line 421 of file main.cpp.

◆ shape

string launcher_def::shape

Definition at line 393 of file main.cpp.

◆ shared_producers

size_t launcher_def::shared_producers

Definition at line 391 of file main.cpp.

◆ skip_transaction_signatures

bool launcher_def::skip_transaction_signatures = false

Definition at line 404 of file main.cpp.

◆ specific_nodeop_args

std::map<uint,string> launcher_def::specific_nodeop_args

Definition at line 406 of file main.cpp.

◆ specific_nodeop_installation_paths

std::map<uint,string> launcher_def::specific_nodeop_installation_paths

Definition at line 407 of file main.cpp.

◆ stage

bfs::path launcher_def::stage

Definition at line 399 of file main.cpp.

◆ start_delay

int launcher_def::start_delay = 0

Definition at line 414 of file main.cpp.

◆ start_script

string launcher_def::start_script

Definition at line 424 of file main.cpp.

◆ start_temp

string launcher_def::start_temp

Definition at line 423 of file main.cpp.

◆ total_nodes

size_t launcher_def::total_nodes

Definition at line 387 of file main.cpp.

◆ unstarted_nodes

size_t launcher_def::unstarted_nodes

Definition at line 388 of file main.cpp.


The documentation for this struct was generated from the following file: