Closed LucasDemea closed 1 year ago
On some systems (a CI env in my case),
Any more details on this system? Trellis requires Ubuntu which should always come with cron.
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.
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.
+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.
@strarsis was cron
the only other package missing when using the minimal version?
@swalkinshaw: Yes, after cron
was installed the provisioning worked fine.
Seems reasonable to add then in that case 👍
@swalkinshaw: On first glance, it should be sufficient to add cron
to apt_packages_default
?
Yep that should be it 👍
IMHO, as the PR is now merged, this issue can be closed.
(Note: I just noticed that there is another, similar PR, which is probably now redundant: https://github.com/roots/trellis/pull/1499)
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