ShahriyarR / MySQL-AutoXtraBackup

MySQL-AutoXtraBackup commandline tool written in Python 3 based on Percona XtraBackup
https://autoxtrabackup.azepug.az/
MIT License
140 stars 79 forks source link

AttributeError: 'GeneralClass' object has no attribute 'testpath' #242

Closed ShahriyarR closed 6 years ago

ShahriyarR commented 6 years ago
$ autoxtrabackup -v -lf /home/shahriyar.rzaev/XB_TEST/autoxtrabackup_2_4_5_7____3.log -l DEBUG --defaults_file=/home/shahriyar.rzaev/XB_TEST/server_dir/other_configs/xb_2_4_ps_5_7.conf --test_mode
2017-12-15 10:56:36 DEBUG    <pid.PidFile object at 0x7f2678e03368> entering setup
2017-12-15 10:56:36 DEBUG    <pid.PidFile object at 0x7f2678e03368> create pidfile: /tmp/MySQL-AutoXtraBackup/autoxtrabackup.pid
2017-12-15 10:56:36 DEBUG    <pid.PidFile object at 0x7f2678e03368> check pidfile: /tmp/MySQL-AutoXtraBackup/autoxtrabackup.pid
2017-12-15 10:56:36 WARNING  Enabled Test Mode!!!
2017-12-15 10:56:36 DEBUG    Starting Test Mode
2017-12-15 10:56:36 DEBUG    Trying to get basedir path...
2017-12-15 10:56:37 DEBUG    Could get PS basedir path...
2017-12-15 10:56:37 ERROR    Please pass proper already generated config file!
2017-12-15 10:56:37 ERROR    Please check also if you have run prepare_env.bats file
2017-12-15 10:56:37 ERROR    Please pass proper already generated config file!
2017-12-15 10:56:37 ERROR    Please check also if you have run prepare_env.bats file
2017-12-15 10:56:37 DEBUG    <pid.PidFile object at 0x7f2678e03368> closing pidfile: /tmp/MySQL-AutoXtraBackup/autoxtrabackup.pid
Traceback (most recent call last):
  File "/home/shahriyar.rzaev/virtualenvs/py_3_5_3_autoxtrabackup/bin/autoxtrabackup", line 11, in <module>
    load_entry_point('mysql-autoxtrabackup==1.5.1', 'console_scripts', 'autoxtrabackup')()
  File "/home/shahriyar.rzaev/virtualenvs/py_3_5_3_autoxtrabackup/lib/python3.5/site-packages/click-6.7-py3.5.egg/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/shahriyar.rzaev/virtualenvs/py_3_5_3_autoxtrabackup/lib/python3.5/site-packages/click-6.7-py3.5.egg/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/shahriyar.rzaev/virtualenvs/py_3_5_3_autoxtrabackup/lib/python3.5/site-packages/click-6.7-py3.5.egg/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/shahriyar.rzaev/virtualenvs/py_3_5_3_autoxtrabackup/lib/python3.5/site-packages/click-6.7-py3.5.egg/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/shahriyar.rzaev/virtualenvs/py_3_5_3_autoxtrabackup/lib/python3.5/site-packages/click-6.7-py3.5.egg/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/shahriyar.rzaev/virtualenvs/py_3_5_3_autoxtrabackup/lib/python3.5/site-packages/mysql_autoxtrabackup-1.5.1-py3.5.egg/autoxtrabackup.py", line 203, in all_procedure
    test_obj.wipe_backup_prepare_copyback(basedir=basedir)
  File "/home/shahriyar.rzaev/virtualenvs/py_3_5_3_autoxtrabackup/lib/python3.5/site-packages/mysql_autoxtrabackup-1.5.1-py3.5.egg/prepare_env_test_mode/runner_test_mode.py", line 412, in wipe_backup_prepare_copyback
    for options in ConfigGenerator(config=self.conf).options_combination_generator(self.mysql_options):
  File "/home/shahriyar.rzaev/virtualenvs/py_3_5_3_autoxtrabackup/lib/python3.5/site-packages/mysql_autoxtrabackup-1.5.1-py3.5.egg/prepare_env_test_mode/config_generator.py", line 15, in __init__
    self.benchmark_obj = RunBenchmark()
  File "/home/shahriyar.rzaev/virtualenvs/py_3_5_3_autoxtrabackup/lib/python3.5/site-packages/mysql_autoxtrabackup-1.5.1-py3.5.egg/prepare_env_test_mode/run_benchmark.py", line 15, in __init__
    self.testpath = GeneralClass(self.conf).testpath
AttributeError: 'GeneralClass' object has no attribute 'testpath'
2017-12-15 10:56:37 DEBUG    <pid.PidFile object at 0x7f2678e03368> closing pidfile: /tmp/MySQL-AutoXtraBackup/autoxtrabackup.pid
ShahriyarR commented 6 years ago

The thing is it is needed in /etc/bck.conf things enabled for using --test_mode. So it is normal to see this Exception. Closing for now as it is affect only --test_mode not the tools usage itself.