0

I'm trying to move the manual launch of our Podman LakeFS container to a service at boot.

I was suggested to use Quadlet and I'm following this guide

I converted our script/command:

#!/usr/bin/bash
podman run --pull=newer\
  --name lakeFS \
  -p 8000:8000 \
  -e LAKEFS_DATABASE_TYPE="postgres" \
  -e LAKEFS_DATABASE_POSTGRES_CONNECTION_STRING="postgres://lakefs:[email protected]:5432/postgres?sslmode=disable" \
  -e LAKEFS_AUTH_ENCRYPT_SECRET_KEY=".." \
  -e LAKEFS_BLOCKSTORE_TYPE="s3" \
  -e LAKEFS_BLOCKSTORE_S3_FORCE_PATH_STYLE="true" \
  -e LAKEFS_BLOCKSTORE_S3_ENDPOINT="http://192.168.17.107:9000" \
  -e LAKEFS_BLOCKSTORE_S3_DISCOVER_BUCKET_REGION="false" \
  -e LAKEFS_BLOCKSTORE_S3_CREDENTIALS_ACCESS_KEY_ID=".." \
  -e LAKEFS_BLOCKSTORE_S3_CREDENTIALS_SECRET_ACCESS_KEY=".." \
  docker.io/treeverse/lakefs:latest run

to an unit file (/usr/share/containers/systemd/lakeFS.container) using podlet:

[Container]
ContainerName=lakeFS
Environment=LAKEFS_DATABASE_TYPE=postgres LAKEFS_DATABASE_POSTGRES_CONNECTION_STRING=postgres://lakefs:[email protected]:5432/postgres?sslmode=disable LAKEFS_AUTH_ENCRYPT_SECRET_KEY=.. LAKEFS_BLOCKSTORE_TYPE=s3 LAKEFS_BLOCKSTORE_S3_FORCE_PATH_STYLE=true LAKEFS_BLOCKSTORE_S3_ENDPOINT=http://192.168.17.107:9000 LAKEFS_BLOCKSTORE_S3_DISCOVER_BUCKET_REGION=false LAKEFS_BLOCKSTORE_S3_CREDENTIALS_ACCESS_KEY_ID=.. LAKEFS_BLOCKSTORE_S3_CREDENTIALS_SECRET_ACCESS_KEY=..
Exec=run
Image=docker.io/treeverse/lakefs:latest
PublishPort=8000:8000
Pull=newer

but after trying to inform systemd about it with systemctl daemon-reload

I still get:

~$ systemctl status lakeFS.service 
× lakeFS.service
     Loaded: loaded (/usr/share/containers/systemd/lakeFS.container; generated)
     Active: failed (Result: exit-code) since Wed 2024-01-24 15:25:22 CET; 4min 20s ago
   Duration: 680ms
    Process: 1738 ExecStart=/usr/bin/podman run --name=lakeFS --cidfile=/run/lakeFS.cid --replace --rm --cgroups=split --sdnotify=conmon -d --publish 8000:8000 --env>
    Process: 1816 ExecStopPost=/usr/bin/podman rm -v -f -i --cidfile=/run/lakeFS.cid (code=exited, status=0/SUCCESS)
   Main PID: 1738 (code=exited, status=1/FAILURE)
        CPU: 14.026s

What is wrong?

Ps: Podman version is 4.9.0

10
  • 1
    What is your podman --version?
    – AlexD
    Jan 24 at 13:53
  • Why are you running systemctl --user? It looks like you are creating system containers. Also: It's not a problem, but arguably you should be placing your container files in /etc/containers/systemd (typically, /usr/share/containers/systemd would be used for container files provided by installed packages).
    – larsks
    Jan 24 at 13:58
  • See my answer to a different quadlet question for some suggestions on debugging things.
    – larsks
    Jan 24 at 14:00
  • I got 4.9 version, I'm running systemctl --user because that's what the guide suggested. I'll try the second location
    – elect
    Jan 24 at 14:08
  • @larsks I added the debug, it looks apparently fine, but I don't see the service
    – elect
    Jan 24 at 14:14

1 Answer 1

0

Most likely your version of podman doesn't have quadlet integrated. Quadlet was integrated into podman version 4.4 and Debian bookworm contains podman version 4.3.1. In this case, you need to install quadlet separately.

1
  • No, sorry, I didn't specify, but I do have 4.9.0
    – elect
    Jan 24 at 14:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .