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

Python 2.7 EoL & task hang #70

Closed
Darkknight33 opened this issue Feb 27, 2020 · 6 comments
Closed

Python 2.7 EoL & task hang #70

Darkknight33 opened this issue Feb 27, 2020 · 6 comments

Comments

@Darkknight33
Copy link

Darkknight33 commented Feb 27, 2020

Python 2.7 has been EoL on Jan 1.

Got an error message related to this: docker/docker-py#1502 had to install python-docker to get around the problem.

There is a command in prep_nextcloud main.yml: db:convert-filecache-bigint that requires a y/n response. It's causing the task to hang. Here is the output when run manually:

sudo -u www-data ./occ db:convert-filecache-bigint

Following columns will be updated:

  • mounts.storage_id
  • mounts.root_id
  • mounts.mount_id

This can take up to hours, depending on the number of files in your instance!
Continue with the conversion (y/n)? [n]

Hope these are useful.

@ReinerNippes
Copy link
Owner

Python 2.7: On which Linux distro?

@ReinerNippes
Copy link
Owner

About task hang: You could simply try to add --no-interaction to this line:

- db:convert-filecache-bigint

I'll do this after testing.

@Darkknight33
Copy link
Author

Python 2.7: On which Linux distro?

All of them? python/devguide#344 I suppose someone might be doing security patches, but if it's clearly not supported by the core python devs any more. It's probably time to update as v3 is already 12 years old.

About task hang: You could simply try to add --no-interaction to this line:

- db:convert-filecache-bigint

I'll do this after testing.

I'll give this a shot myself.

@ReinerNippes
Copy link
Owner

Python: You may have a look at the nextcloud-reloaded branch. You'll find a lot of "python 3 support" commits. Everything works fine on Ubuntu/Debian. As far as I tested it.

But when I run the playbook on CentOS/Fedora this didn't went well. The yum module doesn't work with python3. So I had to add this to all yum tasks.

ansible_python_interpreter: python2

That would be OK. But there is no libselinux-python.rpm for python3. So all selinux related tasks will fail. And firewalld also fails. The "official" RedHat statment: We support Python2 as long as RedHat 7. Same applies to CentOS 7. If you want Python3 move to RHEL/CentOS 8. In CentOS 8 they removed docker support and renamed imagemagick. :-(

When I have time again I'll think about an elegant solution for CentOS7 and python3.

Until then: Don't worry about python2. It's supported by the distro owner.

@Darkknight33
Copy link
Author

I use Debian & Ubuntu, so that makes sense. Thanks for the suggestions.

@Darkknight33
Copy link
Author

--no-interaction worked great:

TASK [prep_nextcloud : backup jobs, upgrade apps and database tuning] *********************************************************************************************************
Saturday 29 February 2020 08:46:15 -0500 (0:00:00.057) 0:10:01.671 *****
changed: [XXXXXXX] => (item=background:cron)
changed: [XXXXXXX] => (item=upgrade)
changed: [XXXXXXX] => (item=db:add-missing-indices)
changed: [XXXXXXX] => (item=db:convert-filecache-bigint --no-interaction)

TASK [prep_nextcloud : upgrade nextcloud] ******************************************

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants