Bug #44351 | C++ rsync wrapper for atrt | ||
---|---|---|---|
Submitted: | 18 Apr 2009 7:49 | Modified: | 3 Feb 2010 6:43 |
Reporter: | Magnus Blåudd | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S4 (Feature request) |
Version: | mysql-5.1-telco-7.0 | OS: | Any |
Assigned to: | jack andrews | CPU Architecture: | Any |
[18 Apr 2009 7:49]
Magnus Blåudd
[22 Apr 2009 1:49]
jack andrews
would a .bat file be more appropriate? is cygwin so bad? why do we need to write a wrapper, can't we just use rsync directly? if we need to write a wrapper, why not do it in perl? would need to handle options to rsync, too: $ grep rsync * README.ATRT:!-- deploy binaries and libraries to hosts, rsync atrt-gather-result.sh: rsync -a --exclude='BACKUP' --exclude='ndb_*_fs' "$1" . atrt-setup.sh:rsync -a --delete --force --ignore-errors $2 $1:$3 autotest-boot.sh:# create the database to be rsynced # main.cpp:do_rsync(const char *dir, const char *dst) main.cpp: g_logger.info("rsyncing %s to %s", dir, dst); main.cpp: g_logger.critical("Failed to rsync %s to %s", dir, dst); main.cpp: if (!do_rsync(g_basedir, config.m_hosts[i]->m_hostname.c_str())) main.cpp: if (!do_rsync(g_prefix, config.m_hosts[i]->m_hostname.c_str())) main.cpp: if (g_prefix1 && !do_rsync(g_prefix1, config.m_hosts[i]->m_hostname .c_str())) ndb-autotest.sh:# create the database to be rsynced # ndb-autotest.sh: (cd $install_dir; ./bin/mysql_install_db) # This will be rsynced to all ndb-autotest.sh: rsync -a --delete --force --ignore-errors $install_dir/ $i :$install_dir ndb-autotest.sh: echo "$i failed during rsync, excluding" upgrade-boot.sh:# create the database to be rsynced #
[28 Apr 2009 16:40]
Magnus Blåudd
Primarily "we want to remove its dependency on external shell scripts". In addition we make atrt more self contained (i.e easier to install and debug) and it will also be possible to better handle error and print debug messages if anything goes wrong(i.e we get better control). It won't need to handle any options to rsync to start with. The 'to_remote' function would more or less be equvivalent to "rsync -a --delete --force --ignore-errors $2 $1:$3"
[3 Feb 2010 6:42]
jack andrews
we used a different approach to porting autotest to windows.