RUBi-ZA / JMS

A workflow management system and web-based cluster front-end for high performance computing
GNU General Public License v2.0
20 stars 15 forks source link

Missing Table "column_stats" #1

Closed BastiLoe closed 6 years ago

BastiLoe commented 7 years ago

Hello,

when running "python manage.py migrate" I get an error due to a missing table: _mysql_exceptions.Warning: Table 'mysql.column_stats' doesn't exist

HermanVB commented 7 years ago

That's a warning, you sure it actually throws an error on that? (I'm not a programmer, just trying out this program as well) I have messed around with this a couple of days ago, and had to alter some code here and there and install extra packages. But after doing that it finally ran. (Now to see if I can connect it to my cluster...)

davidbrownza commented 7 years ago

@BastiLoe - sorry for the slow response. I have neglected this project slightly in the last while, but am looking to get back into it starting from October. Unfortunately, I am currently swamped with work, but if this is still causing you an issue, you may be able to use this workaround in the meantime: https://gist.github.com/Kellel/8a4f3911c163a83be56f

@HermanVB - I would be interested to hear what issues you had and what changes you made to get JMS running so I could include them in the next version. We have an updated version running on our cluster, which may also solve some of the issues. I will push those changes soon.

BastiLoe commented 7 years ago

Hello,

nice to see the project alive. I think for what I am looking for it is the most promising open source project. I will try the proposed workaround.

BastiLoe commented 7 years ago

The workaround doesn't seem to work for me:

python2.7 ./manage.py  migrate --fake zero
System check identified some issues:

WARNINGS:
?: (1_6.W001) Some project unittests may not execute as expected.
        HINT: Django 1.6 introduced a new default test runner. It looks like this project was generated using Django 1.5 or earlier. You should ensure your tests are all running & behaving as expected. See https://docs.djangoproject.com/en/dev/releases/1.6/#new-test-runner for more information.
CommandError: App 'zero' does not have migrations (you cannot selectively sync unmigrated apps)

After running that I get:

python2.7 ./manage.py  migrate
...
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying filemanager.0001_initial... OK
  Applying filemanager.0002_auto_20150118_1337... OK
  Applying filemanager.0003_auto_20150216_1408... OK
  Applying filemanager.0004_auto_20150225_1009...Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/basti/JMS/src/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/home/basti/JMS/src/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/basti/JMS/src/venv/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/basti/JMS/src/venv/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/home/basti/JMS/src/venv/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 160, in handle
    executor.migrate(targets, plan, fake=options.get("fake", False))
  File "/home/basti/JMS/src/venv/lib/python2.7/site-packages/django/db/migrations/executor.py", line 63, in migrate
    self.apply_migration(migration, fake=fake)
  File "/home/basti/JMS/src/venv/lib/python2.7/site-packages/django/db/migrations/executor.py", line 97, in apply_migration
    migration.apply(project_state, schema_editor)
  File "/home/basti/JMS/src/venv/lib/python2.7/site-packages/django/db/migrations/migration.py", line 107, in apply
    operation.database_forwards(self.app_label, schema_editor, project_state, new_state)
  File "/home/basti/JMS/src/venv/lib/python2.7/site-packages/django/db/migrations/operations/fields.py", line 84, in database_forwards
    schema_editor.remove_field(from_model, from_model._meta.get_field_by_name(self.name)[0])
  File "/home/basti/JMS/src/venv/lib/python2.7/site-packages/django/db/backends/schema.py", line 439, in remove_field
    self.execute(sql)
  File "/home/basti/JMS/src/venv/lib/python2.7/site-packages/django/db/backends/schema.py", line 99, in execute
    cursor.execute(sql, params)
  File "/home/basti/JMS/src/venv/lib/python2.7/site-packages/django/db/backends/utils.py", line 81, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File "/home/basti/JMS/src/venv/lib/python2.7/site-packages/django/db/backends/utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
  File "/home/basti/JMS/src/venv/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 128, in execute
    return self.cursor.execute(query, args)
  File "/home/basti/JMS/src/venv/lib/python2.7/site-packages/MySQLdb/cursors.py", line 207, in execute
    if not self._defer_warnings: self._warning_check()
  File "/home/basti/JMS/src/venv/lib/python2.7/site-packages/MySQLdb/cursors.py", line 117, in _warning_check
    warn(w[-1], self.Warning, 3)
_mysql_exceptions.Warning: Table 'mysql.column_stats' doesn't exist
davidbrownza commented 7 years ago

Hi Bastiloe. It looks like that is the final migration on the filemanager table. From the code, it looks like all it does is delete the Key and Salt fields from the filemanager table. If I am not mistaken, you should be able to ignore this error and continue with the setup process. Other options include:

  1. manually delete the Key and Salt fields from the table
  2. wipe the entire database schema and then delete the src/filemanager/migrations directory before running the migrate command again

I hope this helps. Let me know if it solves your issue. I will hopefully have some time soon to sort out these installation issues in a more satisfactory manner.

BastiLoe commented 7 years ago

Still struggling to get it running. Would really apreciate some updates for the project. I am also willing to help with that. However, my django knowledge is way limited so far.

davidbrownza commented 7 years ago

Hey Bastiloe. I am sorry to hear this. Are you still getting the same error message?

I will take a proper look this weekend and try get JMS running on an EC2 instance. Hopefully, I will run into the same issues as you and then I can try sort them out by the end of the weekend.

BastiLoe commented 7 years ago

I re-tried using a virtualbox with CentOS 7. I had to update quite a lot of python packages, but at the end "python manage.py migrate" worked fine. However, "python manage.py setup" fails: "no module named job.models". I am using the CentOS-Python which is 2.7. What is the requirement for that?

BastiLoe commented 7 years ago

Update: I changed line 4 of jobs/management/commands/setup.py from: from job.models import AccessRight, Condition, Status, ParameterType to: from jobs.models import Condition, Status, ParameterType and now "python manage.py setup" is running fine.

davidbrownza commented 6 years ago

Thanks for all your comments. We have incorporated fixes w=for these issue into a new branch: 2.x-beta