Motr
M0
|
Data Structures | |
class | MotrError |
Functions | |
def | execute_command_without_log (cmd, timeout_secs=TIMEOUT_SECS, verbose=False, retries=1, stdin=None, logging=False) |
def | execute_command_console (self, command) |
def | execute_command (self, cmd, timeout_secs=TIMEOUT_SECS, verbose=False, retries=1, stdin=None, logging=True) |
def | execute_command_verbose (self, cmd, timeout_secs=TIMEOUT_SECS, verbose=False, set_timeout=True, retry_count=CMD_RETRY_COUNT) |
def | execute_command_without_exception (self, cmd, timeout_secs=TIMEOUT_SECS, retries=1) |
def | check_type (var, vtype, msg) |
def | configure_machine_id (self, phase) |
def | get_server_node (self) |
def | calc_size (self, sz) |
def | set_setup_size (self, service) |
def | get_value (self, key, key_type) |
def | get_logical_node_class (self) |
def | get_storage (self) |
def | restart_services (self, services) |
def | validate_file (file) |
def | validate_files (files) |
def | create_dirs (self, dirs) |
def | is_hw_node (self) |
def | validate_motr_rpm (self) |
def | update_config_file (self, fname, kv_list) |
def | update_copy_motr_config_file (self) |
def | get_md_disks_lists (self, node_info) |
def | get_mdisks_from_list (self, md_lists) |
def | update_to_file (self, index, url, machine_id, md_disks) |
def | get_data_nodes (self) |
def | update_motr_hare_keys (self, nodes) |
def | motr_config_k8 (self) |
def | motr_config (self) |
def | configure_net (self) |
def | configure_lnet (self) |
def | configure_libfabric (self) |
def | verify_libfabric (self) |
def | swap_on (self) |
def | swap_off (self) |
def | add_swap_fstab (self, dev_name) |
def | del_swap_fstab_by_vg_name (self, vg_name) |
def | create_swap (self, swap_dev) |
def | create_lvm (self, index, metadata_dev) |
def | calc_lvm_min_size (self, lv_path, lvm_min_size) |
def | get_cvg_cnt_and_cvg (self) |
def | validate_storage_schema (storage) |
def | get_cvg_cnt_and_cvg_k8 (self) |
def | align_val (val, size) |
def | update_bseg_size (self) |
def | config_lvm (self) |
def | get_lnet_xface () |
def | check_pkgs (self, pkgs) |
def | get_nids (self, nodes) |
def | get_nodes (self) |
def | lnet_ping (self) |
def | test_lnet (self) |
def | test_libfabric (self) |
def | get_metadata_disks_count (self) |
def | lvm_exist (self) |
def | cluster_up (self) |
def | pkg_installed (self, pkg) |
def | test_io (self) |
def | config_logger (self) |
def | remove_dirs (self, log_dir, patterns) |
def | remove_logs (self, patterns) |
def | check_services (self, services) |
def | verify_lnet (self) |
def | lnet_self_ping (self) |
def | update_motr_hare_keys_for_all_nodes (self) |
def | get_vol_grps (self) |
def | lvm_clean (self) |
def | remove_dm_entries (self) |
def | get_disk_size (self, device) |
def | read_config (file) |
def | part_clean (self) |
def | get_part_count (self, device) |
def | delete_parts (self, dev_count, device) |
def | delete_part (self, device, part_num) |
def | get_fid (self, fids, service, idx) |
def | fetch_fid (self, service, idx) |
def | getListOfm0dProcess () |
def | receiveSigTerm (signalNumber, frame) |
def | start_service (self, service, idx) |
Variables | |
string | MOTR_SERVER_SCRIPT_PATH = "/usr/libexec/cortx-motr/motr-start" |
string | MOTR_MKFS_SCRIPT_PATH = "/usr/libexec/cortx-motr/motr-mkfs" |
string | MOTR_FSM_SCRIPT_PATH = "/usr/libexec/cortx-motr/motr-free-space-monitor" |
string | MOTR_CONFIG_SCRIPT = "/opt/seagate/cortx/motr/libexec/motr_cfg.sh" |
string | LNET_CONF_FILE = "/etc/modprobe.d/lnet.conf" |
string | LIBFAB_CONF_FILE = "/etc/libfab.conf" |
string | SYS_CLASS_NET_DIR = "/sys/class/net/" |
string | MOTR_SYS_CFG = "/etc/sysconfig/motr" |
string | MOTR_WORKLOAD_DIR = "/opt/seagate/cortx/motr/workload" |
string | FSTAB = "/etc/fstab" |
string | LOGFILE = "/var/log/seagate/motr/mini_provisioner" |
string | LOGDIR = "/var/log/seagate/motr" |
string | LOGGER = "mini_provisioner" |
string | IVT_DIR = "/var/log/seagate/motr/ivt" |
string | MOTR_LOG_DIR = "/var/motr" |
int | TIMEOUT_SECS = 120 |
int | MACHINE_ID_LEN = 32 |
list | MOTR_LOG_DIRS = [LOGDIR, MOTR_LOG_DIR] |
int | BE_LOG_SZ = 4*1024*1024*1024 |
int | BE_SEG0_SZ = 128 * 1024 *1024 |
int | ALLIGN_SIZE = 4096 |
string | MACHINE_ID_FILE = "/etc/machine-id" |
string | TEMP_FID_FILE = "/opt/seagate/cortx/motr/conf/service_fid.yaml" |
int | CMD_RETRY_COUNT = 5 |
int | MEM_THRESHOLD = 4*1024*1024*1024 |
string | CVG_COUNT_KEY = "num_cvg" |
machine_id | |
setup_size | |
def motr_mini_prov.add_swap_fstab | ( | self, | |
dev_name | |||
) |
1. check swap entry found in /etc/fstab 2. if found, do nothing 3. if not found, add swap entry in /etc/fstab
Definition at line 632 of file motr_mini_prov.py.
def motr_mini_prov.align_val | ( | val, | |
size | |||
) |
def motr_mini_prov.calc_lvm_min_size | ( | self, | |
lv_path, | |||
lvm_min_size | |||
) |
Definition at line 785 of file motr_mini_prov.py.
def motr_mini_prov.calc_size | ( | self, | |
sz | |||
) |
Definition at line 232 of file motr_mini_prov.py.
def motr_mini_prov.check_pkgs | ( | self, | |
pkgs | |||
) |
Check rpm packages.
Definition at line 924 of file motr_mini_prov.py.
def motr_mini_prov.check_services | ( | self, | |
services | |||
) |
Definition at line 1154 of file motr_mini_prov.py.
def motr_mini_prov.check_type | ( | var, | |
vtype, | |||
msg | |||
) |
def motr_mini_prov.cluster_up | ( | self | ) |
def motr_mini_prov.config_logger | ( | self | ) |
Definition at line 1092 of file motr_mini_prov.py.
def motr_mini_prov.config_lvm | ( | self | ) |
def motr_mini_prov.configure_libfabric | ( | self | ) |
Definition at line 615 of file motr_mini_prov.py.
def motr_mini_prov.configure_lnet | ( | self | ) |
Get iface and /etc/modprobe.d/lnet.conf params from conf store. Configure lnet. Start lnet service
Definition at line 580 of file motr_mini_prov.py.
def motr_mini_prov.configure_machine_id | ( | self, | |
phase | |||
) |
Definition at line 207 of file motr_mini_prov.py.
def motr_mini_prov.configure_net | ( | self | ) |
Wrapper function to detect lnet/libfabric transport.
Definition at line 564 of file motr_mini_prov.py.
def motr_mini_prov.create_dirs | ( | self, | |
dirs | |||
) |
Definition at line 353 of file motr_mini_prov.py.
def motr_mini_prov.create_lvm | ( | self, | |
index, | |||
metadata_dev | |||
) |
1. validate /etc/fstab 2. validate metadata device file 3. check requested volume group exist 4. if exist, remove volume group and swap related with it. because if user request same volume group with different device. 5. If not exist, create volume group and lvm 6. create swap from lvm
Definition at line 685 of file motr_mini_prov.py.
def motr_mini_prov.create_swap | ( | self, | |
swap_dev | |||
) |
Definition at line 672 of file motr_mini_prov.py.
def motr_mini_prov.del_swap_fstab_by_vg_name | ( | self, | |
vg_name | |||
) |
Definition at line 664 of file motr_mini_prov.py.
def motr_mini_prov.delete_part | ( | self, | |
device, | |||
part_num | |||
) |
Definition at line 1386 of file motr_mini_prov.py.
def motr_mini_prov.delete_parts | ( | self, | |
dev_count, | |||
device | |||
) |
Definition at line 1371 of file motr_mini_prov.py.
def motr_mini_prov.execute_command | ( | self, | |
cmd, | |||
timeout_secs = TIMEOUT_SECS , |
|||
verbose = False , |
|||
retries = 1 , |
|||
stdin = None , |
|||
logging = True |
|||
) |
def motr_mini_prov.execute_command_console | ( | self, | |
command | |||
) |
Definition at line 88 of file motr_mini_prov.py.
def motr_mini_prov.execute_command_verbose | ( | self, | |
cmd, | |||
timeout_secs = TIMEOUT_SECS , |
|||
verbose = False , |
|||
set_timeout = True , |
|||
retry_count = CMD_RETRY_COUNT |
|||
) |
def motr_mini_prov.execute_command_without_exception | ( | self, | |
cmd, | |||
timeout_secs = TIMEOUT_SECS , |
|||
retries = 1 |
|||
) |
def motr_mini_prov.execute_command_without_log | ( | cmd, | |
timeout_secs = TIMEOUT_SECS , |
|||
verbose = False , |
|||
retries = 1 , |
|||
stdin = None , |
|||
logging = False |
|||
) |
def motr_mini_prov.fetch_fid | ( | self, | |
service, | |||
idx | |||
) |
Definition at line 1421 of file motr_mini_prov.py.
def motr_mini_prov.get_cvg_cnt_and_cvg | ( | self | ) |
Definition at line 797 of file motr_mini_prov.py.
def motr_mini_prov.get_cvg_cnt_and_cvg_k8 | ( | self | ) |
def motr_mini_prov.get_data_nodes | ( | self | ) |
Definition at line 499 of file motr_mini_prov.py.
def motr_mini_prov.get_disk_size | ( | self, | |
device | |||
) |
def motr_mini_prov.get_fid | ( | self, | |
fids, | |||
service, | |||
idx | |||
) |
def motr_mini_prov.get_lnet_xface | ( | str | ) |
Get lnet interface.
Definition at line 901 of file motr_mini_prov.py.
def motr_mini_prov.get_logical_node_class | ( | self | ) |
Get logical_node_class.
Definition at line 318 of file motr_mini_prov.py.
def motr_mini_prov.get_md_disks_lists | ( | self, | |
node_info | |||
) |
def motr_mini_prov.get_mdisks_from_list | ( | self, | |
md_lists | |||
) |
def motr_mini_prov.get_metadata_disks_count | ( | self | ) |
Definition at line 1012 of file motr_mini_prov.py.
def motr_mini_prov.get_nids | ( | self, | |
nodes | |||
) |
Get lnet nids of all available nodes in cluster.
Definition at line 941 of file motr_mini_prov.py.
def motr_mini_prov.get_nodes | ( | self | ) |
def motr_mini_prov.get_part_count | ( | self, | |
device | |||
) |
Definition at line 1365 of file motr_mini_prov.py.
def motr_mini_prov.get_server_node | ( | self | ) |
Get current node name using machine-id.
Definition at line 221 of file motr_mini_prov.py.
def motr_mini_prov.get_storage | ( | self | ) |
def motr_mini_prov.get_value | ( | self, | |
key, | |||
key_type | |||
) |
Get data.
Definition at line 308 of file motr_mini_prov.py.
def motr_mini_prov.get_vol_grps | ( | self | ) |
Definition at line 1251 of file motr_mini_prov.py.
def motr_mini_prov.getListOfm0dProcess | ( | ) |
Get list of running m0d process
Definition at line 1437 of file motr_mini_prov.py.
def motr_mini_prov.is_hw_node | ( | self | ) |
Definition at line 359 of file motr_mini_prov.py.
def motr_mini_prov.lnet_ping | ( | self | ) |
Lnet lctl ping on all available nodes in cluster.
Definition at line 965 of file motr_mini_prov.py.
def motr_mini_prov.lnet_self_ping | ( | self | ) |
Definition at line 1180 of file motr_mini_prov.py.
def motr_mini_prov.lvm_clean | ( | self | ) |
def motr_mini_prov.lvm_exist | ( | self | ) |
def motr_mini_prov.motr_config | ( | self | ) |
def motr_mini_prov.motr_config_k8 | ( | self | ) |
def motr_mini_prov.part_clean | ( | self | ) |
def motr_mini_prov.pkg_installed | ( | self, | |
pkg | |||
) |
def motr_mini_prov.read_config | ( | file | ) |
Definition at line 1333 of file motr_mini_prov.py.
def motr_mini_prov.receiveSigTerm | ( | signalNumber, | |
frame | |||
) |
def motr_mini_prov.remove_dirs | ( | self, | |
log_dir, | |||
patterns | |||
) |
Definition at line 1120 of file motr_mini_prov.py.
def motr_mini_prov.remove_dm_entries | ( | self | ) |
Definition at line 1317 of file motr_mini_prov.py.
def motr_mini_prov.remove_logs | ( | self, | |
patterns | |||
) |
def motr_mini_prov.restart_services | ( | self, | |
services | |||
) |
Definition at line 332 of file motr_mini_prov.py.
def motr_mini_prov.set_setup_size | ( | self, | |
service | |||
) |
Definition at line 253 of file motr_mini_prov.py.
def motr_mini_prov.start_service | ( | self, | |
service, | |||
idx | |||
) |
Definition at line 1463 of file motr_mini_prov.py.
def motr_mini_prov.swap_off | ( | self | ) |
Definition at line 628 of file motr_mini_prov.py.
def motr_mini_prov.swap_on | ( | self | ) |
Definition at line 624 of file motr_mini_prov.py.
def motr_mini_prov.test_io | ( | self | ) |
def motr_mini_prov.test_libfabric | ( | self | ) |
def motr_mini_prov.test_lnet | ( | self | ) |
1. check lustre rpm 2. validate lnet interface which was configured in init 3. ping on lnet interface 4. lctl ping on all nodes in cluster. motr_setup post_install and prepare MUST be performed on all nodes before executing this step.
Definition at line 976 of file motr_mini_prov.py.
def motr_mini_prov.update_bseg_size | ( | self | ) |
Definition at line 855 of file motr_mini_prov.py.
def motr_mini_prov.update_config_file | ( | self, | |
fname, | |||
kv_list | |||
) |
def motr_mini_prov.update_copy_motr_config_file | ( | self | ) |
Definition at line 420 of file motr_mini_prov.py.
def motr_mini_prov.update_motr_hare_keys | ( | self, | |
nodes | |||
) |
Definition at line 510 of file motr_mini_prov.py.
def motr_mini_prov.update_motr_hare_keys_for_all_nodes | ( | self | ) |
def motr_mini_prov.update_to_file | ( | self, | |
index, | |||
url, | |||
machine_id, | |||
md_disks | |||
) |
def motr_mini_prov.validate_file | ( | file | ) |
def motr_mini_prov.validate_files | ( | files | ) |
def motr_mini_prov.validate_motr_rpm | ( | self | ) |
1. check m0tr.ko exists in current kernel modules 2. check /etc/sysconfig/motr
Definition at line 371 of file motr_mini_prov.py.
def motr_mini_prov.validate_storage_schema | ( | storage | ) |
def motr_mini_prov.verify_libfabric | ( | self | ) |
Definition at line 619 of file motr_mini_prov.py.
def motr_mini_prov.verify_lnet | ( | self | ) |
Definition at line 1164 of file motr_mini_prov.py.
int ALLIGN_SIZE = 4096 |
Definition at line 54 of file motr_mini_prov.py.
int BE_LOG_SZ = 4*1024*1024*1024 |
Definition at line 52 of file motr_mini_prov.py.
int BE_SEG0_SZ = 128 * 1024 *1024 |
Definition at line 53 of file motr_mini_prov.py.
int CMD_RETRY_COUNT = 5 |
Definition at line 57 of file motr_mini_prov.py.
string CVG_COUNT_KEY = "num_cvg" |
Definition at line 59 of file motr_mini_prov.py.
string FSTAB = "/etc/fstab" |
Definition at line 43 of file motr_mini_prov.py.
string IVT_DIR = "/var/log/seagate/motr/ivt" |
Definition at line 47 of file motr_mini_prov.py.
string LIBFAB_CONF_FILE = "/etc/libfab.conf" |
Definition at line 39 of file motr_mini_prov.py.
string LNET_CONF_FILE = "/etc/modprobe.d/lnet.conf" |
Definition at line 38 of file motr_mini_prov.py.
string LOGDIR = "/var/log/seagate/motr" |
Definition at line 45 of file motr_mini_prov.py.
string LOGFILE = "/var/log/seagate/motr/mini_provisioner" |
Definition at line 44 of file motr_mini_prov.py.
string LOGGER = "mini_provisioner" |
Definition at line 46 of file motr_mini_prov.py.
machine_id |
Definition at line 209 of file motr_mini_prov.py.
Definition at line 55 of file motr_mini_prov.py.
int MACHINE_ID_LEN = 32 |
Definition at line 50 of file motr_mini_prov.py.
int MEM_THRESHOLD = 4*1024*1024*1024 |
Definition at line 58 of file motr_mini_prov.py.
string MOTR_CONFIG_SCRIPT = "/opt/seagate/cortx/motr/libexec/motr_cfg.sh" |
Definition at line 37 of file motr_mini_prov.py.
Definition at line 36 of file motr_mini_prov.py.
string MOTR_LOG_DIR = "/var/motr" |
Definition at line 48 of file motr_mini_prov.py.
list MOTR_LOG_DIRS = [LOGDIR, MOTR_LOG_DIR] |
Definition at line 51 of file motr_mini_prov.py.
Definition at line 35 of file motr_mini_prov.py.
Definition at line 34 of file motr_mini_prov.py.
string MOTR_SYS_CFG = "/etc/sysconfig/motr" |
Definition at line 41 of file motr_mini_prov.py.
Definition at line 42 of file motr_mini_prov.py.
setup_size |
Definition at line 258 of file motr_mini_prov.py.
string SYS_CLASS_NET_DIR = "/sys/class/net/" |
Definition at line 40 of file motr_mini_prov.py.
Definition at line 56 of file motr_mini_prov.py.
int TIMEOUT_SECS = 120 |
Definition at line 49 of file motr_mini_prov.py.