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

cron missing #1498

Closed
LucasDemea opened this issue Jul 27, 2023 · 12 comments
Closed

cron missing #1498

LucasDemea opened this issue Jul 27, 2023 · 12 comments
Labels

Comments

@LucasDemea
Copy link
Contributor

Version

1.21.0

What did you expect to happen?

Trellis checks that cron is installed

What actually happens?

On some systems (a CI env in my case), cron could be missing by default, causing wordpress-setup job to fail on Setup WP system cron task.

Steps to reproduce

Provision a server.

System info

No response

Log output

No response

Please confirm this isn't a support request.

Yes

@swalkinshaw
Copy link
Member

On some systems (a CI env in my case),

Any more details on this system? Trellis requires Ubuntu which should always come with cron.

@LucasDemea
Copy link
Contributor Author

LucasDemea commented Jul 28, 2023

This happens with a custom docker image based on cimg/php:8.1.21-browsers. Cron was not missing in the 8.1.9 version.
This image is itself based on cimg/base which is on an ubuntu base.

@LucasDemea
Copy link
Contributor Author

LucasDemea commented Jul 28, 2023

docker run -it ubuntu:22.04 crontab
=>

docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "crontab": executable file not found in $PATH: unknown.

@strarsis
Copy link
Contributor

strarsis commented Sep 30, 2023

+1, I encountered the same issue with a minimal Ubuntu 22.04 LTS install.
Manually installing the cron package fixed the issue.

However, the current Ubuntu 22.04 LTS minimal installation does not contain cron, so for Trellis supporting the default Ubuntu 22.04 LTS minimal install, Trellis should also ensure that the cron package is being present?
There are golden images for Ubuntu 22.04 LTS minimal that also contain cron, but these being custom additions by the image creator/cloud provider. And there were images for Ubuntu LTS minimal in the past that contained additional services that actually interfered with the Trellis setup. IMHO only the default Ubuntu minimal system should be considered authoritative.
And just ensuring the presence of the cron package should not interfere with systems with cron already installed.

Edit: I used the Ubuntu 22.04 LTS server ISO (ubuntu-22.04.3-live-server-amd64 (Ubuntu 22.04.3 LTS (Jammy Jellyfish)
release images page
, Server install image) and selected the "Ubuntu Server (minimized)" base. Also enabled "Install OpenSSH server" option, left all listed, featured server snaps unselected.

@swalkinshaw
Copy link
Member

@strarsis was cron the only other package missing when using the minimal version?

@strarsis
Copy link
Contributor

strarsis commented Oct 1, 2023

@swalkinshaw: Yes, after cron was installed the provisioning worked fine.

@swalkinshaw
Copy link
Member

Seems reasonable to add then in that case 👍

@strarsis
Copy link
Contributor

strarsis commented Oct 1, 2023

@swalkinshaw: On first glance, it should be sufficient to add cron to apt_packages_default?

@swalkinshaw
Copy link
Member

Yep that should be it 👍

@strarsis
Copy link
Contributor

strarsis commented Oct 2, 2023

@swalkinshaw: #1506 #1499

@strarsis
Copy link
Contributor

strarsis commented Oct 6, 2023

IMHO, as the PR is now merged, this issue can be closed.

@strarsis
Copy link
Contributor

strarsis commented Oct 9, 2023

(Note: I just noticed that there is another, similar PR, which is probably now redundant: #1499)

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

Successfully merging a pull request may close this issue.

3 participants