Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3 on el7: 'ERROR! Unexpected Exception, this is probably a bug: SQLite 3.8.3 or later is required (found 3.7.17).' #99

Closed
dmsimard opened this issue Dec 4, 2019 · 9 comments
Labels
bug database Related to the database backends or models el7 Related to support on EL7
Milestone

Comments

@dmsimard
Copy link
Contributor

dmsimard commented Dec 4, 2019

What component is this about ?

django's sqlite database backend

What is your ARA installation like ?

python3 virtualenv on el7 with default settings: offline api client and sqlite database backend

What is happening ?

Before attempting sqlite migrations, django fails with the following error:

'ERROR! Unexpected Exception, this is probably a bug: SQLite 3.8.3 or later is required (found 3.7.17).'

What should be happening ?

It would be nice for the default use case to work on el7.
I haven't yet investigated this issue.

@dmsimard dmsimard added bug database Related to the database backends or models el7 Related to support on EL7 labels Dec 4, 2019
@dmsimard
Copy link
Contributor Author

dmsimard commented Feb 3, 2020

It doesn't look like we can expect the base sqlite included in EL7 to be updated beyond 3.7.17 based on the package history: https://git.centos.org/rpms/sqlite/commits/c7
Screenshot from 2020-02-03 13-15-25

@juliojsb
Copy link

Hi,
So we have to assume that we won't be able to make ARA 1.x work in RHEL7?
Regards,

@flowerysong
Copy link
Contributor

ARA doesn't directly depend on a newer version of SQLite, the version requirement is imposed by Django. If you install django<2.2 instead of the latest then ARA (currently) works fine.

@juliojsb
Copy link

Thanks, just in case someone needs it, this is how to make the last version of ARA 1.x work in CentOS/RHEL 7.x

pip3 install --user Django==2.1.15
pip3 install --user "ara[server]"

@jstarek
Copy link

jstarek commented May 13, 2020

@juliojsb, many thanks for that suggestion! However, it just leads me into a situation where the ara callback is skipped due to

[WARNING]: Skipping plugin (/home/vm/.local/lib/python3.6/site-packages/ara/plugins/callback/ara_default.py) as it seems to be invalid: No module named ara.clients

@dmsimard
Copy link
Contributor Author

@flowerysong

ARA doesn't directly depend on a newer version of SQLite, the version requirement is imposed by Django. If you install django<2.2 instead of the latest then ARA (currently) works fine.

@juliojsb

Thanks, just in case someone needs it, this is how to make the last version of ARA 1.x work in CentOS/RHEL 7.x

pip3 install --user Django==2.1.15
pip3 install --user "ara[server]"

and @jstarek,

I can't recommend or support doing this because of documented django CVEs like these:

Generally speaking, you want to keep django as up to date as possible to get those security fixes.

What I would recommend for running the API server on CentOS 7 would be to use podman (docker) containers. It's three commands, built into CentOS distribution and no daemon or service to run:

yum -y install podman
mkdir -p ~/.ara/server
podman run --name ara-api --detach --tty \
  --volume ~/.ara/server:/opt/ara:z \
  -p 8000:8000 \
  docker.io/recordsansible/ara-api:pypi-latest

Then, on your host:

# No need for the ``[server]`` prefix, we don't need API server dependencies
pip3 install ara
export ANSIBLE_CALLBACK_PLUGINs=$(python3 -m ara.setup.callback_plugins)
export ARA_API_CLIENT=http
export ARA_API_SERVER=http://127.0.0.1:8000

I'm happy to put this in the documentation -- you can read more about how you can build your own images and how to run them: https://ara.readthedocs.io/en/latest/container-images.html

The images on DockerHub ( https://hub.docker.com/r/recordsansible/ara-api ) are currently based on Fedora but there is a pull request for one based on CentOS 8: #133

I feel it would be a good alternative that would be less hacky, more secure and easier to support. What do you think ?

@dmsimard
Copy link
Contributor Author

Re: django version, we're currently targetting 2.2 which is a LTS release and this makes it much easier to support from a packaging perspective. There is no incentive to upgrade to 3.x yet.
Screenshot from 2020-05-28 22-22-50
(Source: https://www.djangoproject.com/download/)

@juliojsb
Copy link

juliojsb commented Jun 2, 2020

@dmsimard +1 to the solution you provided, a much better approach!

@dmsimard dmsimard added this to the 1.5 milestone Aug 22, 2020
@dmsimard
Copy link
Contributor Author

I've sent a patch to refresh the installation docs and it'll contain a note about this issue with a recommendation to use container images for running the API server on CenOS 7:
Screenshot from 2020-08-22 13-45-01

I believe we'll be good to close this issue once the patch lands and the docs are updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug database Related to the database backends or models el7 Related to support on EL7
Projects
None yet
Development

No branches or pull requests

4 participants