ara
ara copied to clipboard
Docker Image not compatible on RHEL7.9 w/FIPS
What is the issue ?
Docker container exits immediately with exit code 1
>[root@ara ~]# docker run --name api-server --detach --tty --volume ~/.ara/server:/opt/ara:z -p 8000:8000 quay.io/recordsansible/ara-api:latest
2f935a06e8f65e64ef6c97685a70bd5d7041d281411dd57c6b92b4daac3c2747
[root@ara ~]# docker container ls --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2f935a06e8f6 quay.io/recordsansible/ara-api:latest "bash -c '/usr/loc..." 9 seconds ago Exited (1) 5 seconds ago api-server
[root@ara ~]# docker start api-server
api-server
[root@infra-mgmt-ara ~]# docker container ls --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2f935a06e8f6 quay.io/recordsansible/ara-api:latest "bash -c '/usr/loc..." About a minute ago Exited (1) 1 second ago api-server
Attempted disabling SElinux without success. Output of docker log below:
>`[root@ara ~]# docker logs api-server
[ara] No setting found for SECRET_KEY. Generating a random key...
[ara] Writing default settings to /opt/ara/settings.yaml
[ara] Using settings file: /opt/ara/settings.yaml
Operations to perform:
Apply all migrations: admin, api, auth, contenttypes, db, sessions
Running migrations:
Applying contenttypes.0001_initial...Traceback (most recent call last):
File "/usr/local/bin/ara-manage", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/ara/server/__main__.py", line 58, in main
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 83, in wrapped
res = handle_func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/core/management/commands/migrate.py", line 232, in handle
post_migrate_state = executor.migrate(
File "/usr/local/lib/python3.9/site-packages/django/db/migrations/executor.py", line 117, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python3.9/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python3.9/site-packages/django/db/migrations/executor.py", line 245, in apply_migration
state = migration.apply(state, schema_editor)
File "/usr/local/lib/python3.9/site-packages/django/db/migrations/migration.py", line 124, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/usr/local/lib/python3.9/site-packages/django/db/migrations/operations/models.py", line 527, in database_forwards
alter_together(
File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/schema.py", line 367, in alter_unique_together
self.execute(self._create_unique_sql(model, columns))
File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/schema.py", line 126, in execute
sql = str(sql)
File "/usr/local/lib/python3.9/site-packages/django/db/backends/ddl_references.py", line 194, in __str__
return self.template % self.parts
File "/usr/local/lib/python3.9/site-packages/django/db/backends/ddl_references.py", line 103, in __str__
return self.create_index_name(self.table, self.columns, self.suffix)
File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/schema.py", line 1049, in create_unique_name
return self.quote_name(self._create_index_name(*args, **kwargs))
File "/usr/local/lib/python3.9/site-packages/django/db/backends/base/schema.py", line 884, in _create_index_name
hash_suffix_part = '%s%s' % (names_digest(table_name, *column_names, length=8), suffix)
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 221, in names_digest
h = hashlib.md5()
ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS
[ara] Using settings file: /opt/ara/settings.yaml
It appears this is a known Django issue. https://code.djangoproject.com/ticket/28401
@abashore hey! I've looked at the django code base. It seems this has been fixed in Aug 2021 with this ticket but I haven't found it recent codebase. Can you confirm this no longer happens ?
@DataHearth I tried to look real quick but couldn't figure out in which version of django that patch made it in -- I would suspect that it isn't in django 2.2 though I wonder if it would be in 3.2.