Skip to content

Commit

Permalink
Rename Mero -> Motr
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Tkachuk <[email protected]>
  • Loading branch information
andriytk committed Jan 25, 2021
1 parent a728dd1 commit 2fe5e68
Show file tree
Hide file tree
Showing 17 changed files with 68 additions and 68 deletions.
18 changes: 9 additions & 9 deletions README.isc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Preparing a library
===================

APIs from an external library can't be linked directly with a mero instance.
A library is supposed to have a function named "void mero_lib_init(void)".
APIs from an external library can't be linked directly with a motr instance.
A library is supposed to have a function named "void motr_lib_init(void)".
All APIs from a library shall confine to the following signature:

int comp(struct m0_buf *args, struct m0_buf *out,
Expand All @@ -16,11 +16,11 @@ Loading a library
=================

Using a spiel command (@see "spiel/spiel.h" and "c0appz_isc.h") a library can
be loaded with any running mero instance. A helper function
be loaded with any running motr instance. A helper function
"c0appz_isc_api_register" (c0appz_isc.h) takes a path of the library, which is
expected to be identical across all the nodes hosting a mero instance. Currently
expected to be identical across all the nodes hosting a motr instance. Currently
a utility c0isc_reg takes the path as an input and loads the library with remote
mero instances.
motr instances.

On successful loading of the library the output looks like:

Expand All @@ -44,7 +44,7 @@ The second step builds a library libdemo.so

ping
----
This functionality pings all ISC services present in Mero configuration and
This functionality pings all ISC services present in Motr configuration and
returns "Hello-World@<service-fid>" till it encounters a service that's down.

min / max
Expand All @@ -68,10 +68,10 @@ c0isc_demo.c contains a code which can be extended to develop any application.
What's not present ?
====================

Data serialisation is necessary for communicating with remote service. Mero
Data serialisation is necessary for communicating with remote service. Motr
serialises using gccxml and an internal utility gccxml2xcode. Incorporating
this utility in Mero rpm is currently scheduled and not part of current
Mero master. The demo includes a simplistic serialisation technique and
this utility in Motr rpm is currently scheduled and not part of current
Motr master. The demo includes a simplistic serialisation technique and
is not scalable as is.

Async communication with remote services is possible but the demo does not
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ $ make vmrcf
make clean
```

### Clean install mero
### Clean install motr

The clean install mero script stops currently running m0singlenode,
uninstall mero and mero-devel packages, removes all configuration and
The clean install motr script stops currently running m0singlenode,
uninstall motr and motr-devel packages, removes all configuration and
storage disks. It then installs the new version pointed by directory path,
configuraes it as a m0singlenode and starts services.

```sh
$ ./scripts/clean_install_mero <rpms directory path>
$ # (example) ./scripts/clean_install_mero ./rpms/jenkins-OSAINT_mero-1400-29-g7a51cbd/
$ ./scripts/clean_install_motr <rpms directory path>
$ # (example) ./scripts/clean_install_motr ./rpms/jenkins-OSAINT_motr-1400-29-g7a51cbd/
```

### Apps resource file <.[app]rc>
Expand Down
6 changes: 3 additions & 3 deletions buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ int c0appz_fw(char *buf, char *ouf, uint64_t bsz, uint64_t cnt)

/*
* c0appz_mr()
* Reads data from a mero object to memory buffer.
* Reads data from a motr object to memory buffer.
* Reads cnt number of blocks, each of size bsz starting at
* off (byte) offset of the object.
*/
Expand Down Expand Up @@ -202,7 +202,7 @@ int c0appz_mr(char *buf, uint64_t idhi, uint64_t idlo, uint64_t off,

/*
* c0appz_mw()
* Writes data from memory buffer to a mero object.
* Writes data from memory buffer to a motr object.
* Writes cnt number of blocks, each of size bsz starting at
* off (byte) offset of the object.
*/
Expand Down Expand Up @@ -269,7 +269,7 @@ int c0appz_mw(const char *buf, uint64_t idhi, uint64_t idlo, uint64_t off,

/*
* c0appz_mw_async()
* Writes data from memory buffer to a mero object in async mode op_cnt
* Writes data from memory buffer to a motr object in async mode op_cnt
* operations at a time. Writes cnt number of blocks, each of size
* bsz at off (byte) offset of the object.
*/
Expand Down
8 changes: 4 additions & 4 deletions c0appz.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,10 +421,10 @@ int c0appz_cp(uint64_t idhi, uint64_t idlo, char *filename,
if (perf && rc == 0) {
time = (double) read_time / M0_TIME_ONE_SECOND;
fs_bw = off / 1000000.0 / time;
ppf("Mero I/O[ \033[0;31mOSFS: %10.4lf s %10.4lf MB/s\033[0m ]",time, fs_bw);
ppf("Motr I/O[ \033[0;31mOSFS: %10.4lf s %10.4lf MB/s\033[0m ]",time, fs_bw);
time = (double) write_time / M0_TIME_ONE_SECOND;
client_bw = off / 1000000.0 / time;
ppf("[ \033[0;31mMERO: %10.4lf s %10.4lf MB/s\033[0m ]\n",time, client_bw);
ppf("[ \033[0;31mMOTR: %10.4lf s %10.4lf MB/s\033[0m ]\n",time, client_bw);
}

return rc;
Expand Down Expand Up @@ -627,7 +627,7 @@ int c0appz_cat(uint64_t idhi, uint64_t idlo, char *filename,
if (perf && rc == 0) {
time = (double) read_time / M0_TIME_ONE_SECOND;
client_bw = off / 1000000.0 / time;
ppf("Mero I/O[ \033[0;31mMERO: %10.4lf s %10.4lf MB/s\033[0m ]",time, client_bw);
ppf("Motr I/O[ \033[0;31mMOTR: %10.4lf s %10.4lf MB/s\033[0m ]",time, client_bw);
time = (double) write_time / M0_TIME_ONE_SECOND;
fs_bw = off / 1000000.0 / time;
ppf("[ \033[0;31mOSFS: %10.4lf s %10.4lf MB/s\033[0m ]\n",time, fs_bw);
Expand Down Expand Up @@ -1005,7 +1005,7 @@ int c0appz_init(int idx)
m0_conf.mc_layout_id = lid;
}

/* IDX_MERO */
/* IDX_MOTR */
m0_conf.mc_idx_service_id = M0_IDX_DIX;
dix_conf.kc_create_meta = false;
m0_conf.mc_idx_service_conf = &dix_conf;
Expand Down
2 changes: 1 addition & 1 deletion c0appz.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ enum m0_conf_service_type;
/*
** ECMWF REQUIREMENTS
** synchronous/asynchronous get/put etc.
** Note to Nikita: c0appz uses int64_t idhi, int64_t idlo to refer Mero object
** Note to Nikita: c0appz uses int64_t idhi, int64_t idlo to refer Motr object
** ids due to popular demand from other Sage developers. Please use the same
** convention below. ECMWF has been informed about it.
*/
Expand Down
4 changes: 2 additions & 2 deletions c0appz_isc.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ struct c0appz_isc_req {
int c0appz_rmach_bulk_cutoff(struct m0_rpc_link *link, uint32_t *bulk_cutoff);

/**
* Loads a library to all Mero instances hosting an ISC service.
* Loads a library to all Motr instances hosting an ISC service.
* It assumes that library is located at identical path on all
* Mero instances.
* Motr instances.
* */
int c0appz_isc_api_register(const char *libpath);

Expand Down
4 changes: 2 additions & 2 deletions c0rm.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ c0rm [option] idh idl\n\
c0rm 1234 56789\n\
c0rm -y 1234 56789\n\
\n\
idh - Mero fid high\n\
idl - Mero fid low\n\
idh - Motr fid high\n\
idl - Motr fid low\n\
\n\
option is:\n\
-y | yes\n\
Expand Down
2 changes: 1 addition & 1 deletion isc_libdemo.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static void comp_reg(const char *f_name, int (*ftn)(struct m0_buf *arg_in,
fprintf(stderr, "Out of memory");
}

void mero_lib_init(void)
void motr_lib_init(void)
{
comp_reg("hello_world", hello_world);
comp_reg("arr_min", arr_min);
Expand Down
10 changes: 5 additions & 5 deletions scripts/c0appzrcgen
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@

#!/usr/bin/env bash
#
# This script clean install given Mero packages.
# This script clean install given Motr packages.
# It should work on Red Hat and Debian based systems.
#
# Ganesan Umanesan <[email protected]>
# 23/01/2017

# Takes a positive integer as an input and generates those many
# distinct end-points for concurrent m0_instances. The
# script assumes the presence of conf.xc in /etc/mero
# script assumes the presence of conf.xc in /etc/motr
#
# Nachiket Sahasrabudhe <[email protected]>
# 28/06/2018



conf="/etc/mero/conf.xc"
conf="/etc/motr/conf.xc"
base_port=301
IP=""
port=""
Expand All @@ -54,7 +54,7 @@ sanity_check()
{
if [ ! -f $conf ]
then
echo "Configuration file does not exist at /etc/mero"
echo "Configuration file does not exist at /etc/motr"
return 1
fi
string=`grep $IP $conf | cut -d'"' -f 2 | cut -d ':' -f 1`
Expand All @@ -73,7 +73,7 @@ sanity_check()
unused_port_get()
{
hint=$1
port_list=`grep $IP /etc/mero/conf.xc | cut -d '"' -f 2 | cut -d ':' -f 4`
port_list=`grep $IP /etc/motr/conf.xc | cut -d '"' -f 2 | cut -d ':' -f 4`
while [[ $port_list = *"$hint"* ]]
do
hint=$(($hint+1))
Expand Down
26 changes: 13 additions & 13 deletions scripts/clean_install_mero
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#!/usr/bin/env bash
#
# This script clean install given Mero packages.
# This script clean install given Motr packages.
# It should work on Red Hat and Debian based systems.
#
# Ganesan Umanesan <[email protected]>
Expand All @@ -32,39 +32,39 @@ if [[ "$#" -ne 1 ]]; then
exit
fi

RPM1=$1mero-*.rpm
RPM2=$1mero-devel-*.rpm
RPM1=$1motr-*.rpm
RPM2=$1motr-devel-*.rpm

#mero rpm
#motr rpm
if [ ! -e $RPM1 ]; then
echo $RPM1
echo "error! mero rpm does not exist"
echo "error! motr rpm does not exist"
exit
fi

#mero-devel rpm
#motr-devel rpm
if [ ! -e $RPM2 ]; then
echo $RPM2
echo "error! mero-devel rpm does not exist"
echo "error! motr-devel rpm does not exist"
exit
fi


#stop mero
#stop motr
sudo m0singlenode stop

#remove existing mero
sudo yum remove -y mero mero-devel
sudo rm -rf /etc/mero/ /var/mero
#remove existing motr
sudo yum remove -y motr motr-devel
sudo rm -rf /etc/motr/ /var/motr
sudo umount /mnt/m0t1fs
sudo rm -rf /mnt/m0t1fs

#install new mero
#install new motr
sudo yum install -y $RPM1 $RPM2
sudo m0singlenode activate
sudo m0setup -cv
sudo m0setup -Mv

#start mero
#start motr
sudo m0singlenode start

12 changes: 6 additions & 6 deletions scripts/install-build-deps
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#!/usr/bin/env bash
#
# This script installs all packages, which are required to build Mero.
# This script installs all packages, which are required to build Motr.
# It should work on Red Hat and Debian based systems.
#
# Global vars
Expand All @@ -28,8 +28,8 @@
readonly PROG_NAME=$(basename $0)

declare -rA RPM_PACKAGE=(
[mero]='mero'
[mero-devel]='mero-devel'
[motr]='motr'
[motr-devel]='motr-devel'
[binutils]='binutils'
[gcc]='gcc'
[make]='make'
Expand Down Expand Up @@ -66,9 +66,9 @@ Usage: $PROG_NAME [-h|--help] [-n|--dry-run]
-n|--dry-run Don't perform any action, just show what would be
installed.

-l|--list-all List all Mero build dependencies
-l|--list-all List all Motr build dependencies

-m|--list-missing List Mero build dependencies, which are not currently
-m|--list-missing List Motr build dependencies, which are not currently
installed.

-h|--help Print this help screen.
Expand Down Expand Up @@ -264,7 +264,7 @@ if [[ -n $missing_pkgs ]]; then
fi
else
echo '--- Nothing to be done ---'
#echo 'Seems that all Mero build dependencies are satisfied.'
#echo 'Seems that all Motr build dependencies are satisfied.'
fi

if [[ -n $not_available_pkgs ]]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/m0singlenodecleanstart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -x
sudo m0singlenode stop
sudo m0singlenode activate
sudo rm -rf /etc/mero/ /var/mero
sudo rm -rf /etc/motr/ /var/motr
sudo m0singlenode activate
sudo m0setup -cv
sudo m0setup -Mv
Expand Down
6 changes: 3 additions & 3 deletions scripts/sage-user-application-assignment
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ def fid2str(fid):
def regenerate(tier_name, tier_file, client, no_ssh):
# with open('/tmp/tier2.json') as f:
# tier_json = json.load(f)
hctl_mero_status = subprocess.check_output(
hctl_motr_status = subprocess.check_output(
([] if no_ssh else ["ssh", client]) +
"hctl mero status --json".split())
tier_json = json.loads(hctl_mero_status)
"hctl motr status --json".split())
tier_json = json.loads(hctl_motr_status)
clients = {h[1]['crnProcesses'][0][0]['r_endpoint'].split('@')[0]:
h[1]['crnProcesses']
for h in tier_json['csrHosts']
Expand Down
16 changes: 8 additions & 8 deletions scripts/sageclusterstatus
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ lnetstat()
getchar
}

merostat()
motrstat()
{
echo "-[ Motr status(clients) ]-"
ssh -A client-21 hctl status | grep client-
Expand Down Expand Up @@ -165,12 +165,12 @@ Usage: $(basename $0) [-h|--help] [options]
output uname -r

-r|--rpms print installed rpm packages
mero, halon and lnet rpms are printed.
motr, halon and lnet rpms are printed.

-l|--lnet print installed rpm packages
mero, halon and lnet rpms are printed.
motr, halon and lnet rpms are printed.

-m|--mero print mero status
-m|--motr print motr status
clients and tier-nodes online statuses are printed.
Also printed are pool parameters.

Expand All @@ -190,7 +190,7 @@ USAGE_END
# Note that we use `"$@"' to let each command-line parameter expand to a
# separate word. The quotes around `$@' are essential!
# We need TEMP as the `eval set --' would nuke the return value of getopt.
TEMP=$( getopt -o isrlmph --long interactive,ssh,rpms,lnet,mero,paritygroup,help \
TEMP=$( getopt -o isrlmph --long interactive,ssh,rpms,lnet,motr,paritygroup,help \
-n "$PROG_NAME" -- "$@" )

[[ $? != 0 ]] && usage
Expand Down Expand Up @@ -226,9 +226,9 @@ while true ;
lnetstat
shift
;;
-m|--mero)
-m|--motr)
WHOLESYSTEM=0
merostat
motrstat
shift
;;
-p|--paritygroup)
Expand Down Expand Up @@ -259,7 +259,7 @@ if [ $WHOLESYSTEM -eq 1 ]; then
harerpms
lnetrpms
lnetstat
merostat
motrstat
fi

echo '#####'
Expand Down
Loading

0 comments on commit 2fe5e68

Please sign in to comment.