Commit Graph

76 Commits

Author SHA1 Message Date
Chris Evich
2ef9e11aea Merge branch 'bump_workaround_timebomb' into 'main'
Draft: Remove workaround for #7 (closed)

Closes #9

See merge request qontainers/pipglr!28
2023-12-05 14:57:34 +00:00
Chris Evich
11e2200ff9 Remove workaround for #7
Fixes: #9

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-11-21 10:22:29 -05:00
Chris Evich
9a816a1b8e Merge branch 'fix/drop-task-limit' into 'main'
systemd: Remove task limit

See merge request qontainers/pipglr!27
v4.1.0
2023-11-02 16:06:23 +00:00
Andreas Hartmann
e8d882cc13 ci: Use commit ref slug instead of branch name
as default container tag name for uploading, because branch names can
includes characters that aren't valid for tags (such as '/').

Signed-off-by: Andreas Hartmann <hartan@7x.de>
2023-11-02 08:00:30 +00:00
Andreas Hartmann
fad19dd8f2 systemd: Remove task limit
from user slices and set the default task limit to infinity. Previously,
the task limit on the `user-*.slice` units was 675, which can become a
problem in CI jobs that fork a lot, causing spurious CI failures.

Signed-off-by: Andreas Hartmann <hartan@7x.de>
2023-11-02 08:00:08 +00:00
Chris Evich
8ef19c101a Merge branch 'organize-files-into-folders' into 'main'
chore: Reorganize files into folders

See merge request qontainers/pipglr!26
2023-10-31 17:13:04 +00:00
Andreas Hartmann
d9f2e08b51 chore: Reorganize files into folders
to make it plain where each file belongs in the containers file system
and to simplify the `ADD` directives in the Containerfile.

Signed-off-by: Andreas Hartmann <hartan@7x.de>
2023-10-31 16:46:08 +01:00
Chris Evich
c0f72b3e03 Merge branch 'add_license' into 'main'
Adopt LGPLv3 as project license

Closes #8

See merge request qontainers/pipglr!25
2023-10-17 20:26:13 +00:00
Chris Evich
3222a2a4d1 Adopt LGPLv3 as project license
Signed-off-by: Chris Evich <cevich@redhat.com>
2023-10-17 12:09:38 -04:00
Chris Evich
b5b47d41e6 Merge branch 'docs_update' into 'main'
Improve user-namespace docs slightly

See merge request qontainers/pipglr!23
2023-10-04 18:40:29 +00:00
Chris Evich
c093d6a845 Improve user-namespace docs slightly
Try to explain in more detail and add new error-message possibility.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-10-04 14:36:44 -04:00
Chris Evich
6129365a19 Merge branch 'crun_workaround' into 'main'
Workaround crun oob_score_adj bug

Closes #7

See merge request qontainers/pipglr!24
2023-10-04 18:03:24 +00:00
Chris Evich
6b23c4d84a Workaround crun oob_score_adj bug
This commit can be reverted once a fixed version of crun is available.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-10-04 13:48:26 -04:00
Chris Evich
76ad69ccc8 Update CI/Build container to known-good version
Ref: https://github.com/containers/podman/discussions/19796

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-09-13 09:49:31 -04:00
Chris Evich
ecfb0040de Merge branch 'expand_nested_id_range' into 'main'
Fix <65535 IDs available to nested containers

Closes #3

See merge request qontainers/pipglr!22
v4.0.0
2023-04-26 15:04:42 +00:00
Chris Evich
7727884c55 Fix <65535 IDs available to nested containers
Fixes: #3

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-04-26 10:24:58 -04:00
Chris Evich
98dffa5af5 Merge branch 'linger_docs' into 'main'
Document need for enabling linger-mode

See merge request qontainers/pipglr!21
2023-03-02 19:12:55 +00:00
Chris Evich
e297613194 Document need for enabling linger-mode
Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-16 11:55:14 -05:00
Chris Evich
ae1d652f70 Merge branch 'fix_config' into 'main'
Fix registration permission denied

Closes #1

See merge request qontainers/pipglr!20
v3.0.1
2023-02-03 16:36:36 +00:00
Chris Evich
d66c563c31 Fix registration permission denied
For normal operations, the `runner` user's `.gitlab-runner` directory
has a symlink for (read-only) `config.toml` ->
`/var/run/secrets/config.toml`.  However, for during registration
attempts to write to this volume-mounted file result in a
`PANIC: write: permission denied` error.  Fix this by running the
registration as (namespaced) `root` user, and using the default config.
file location of `/etc/gitlab-runner`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-02-03 11:23:51 -05:00
Chris Evich
4927c6577c Merge branch 'improve_docs' into 'main'
Emphacise need to pre-create config.toml

See merge request qontainers/pipglr!19
2023-02-03 16:12:57 +00:00
Chris Evich
9d8c463a7f Emphacise need to pre-create config.toml
The README did not make it clear enough that a blank `config.toml` file
needs to be pre-created before runner registration.  Otherwise the
`register` *runlabel* will silently fail to bind-mount the file into the
proper location inside the container.

While we're at it, also add a small example of why it may be a good idea
to edit the `config.toml` file before commiting it as a secret.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-01-31 13:43:32 -05:00
Chris Evich
c6d67f583c Merge branch 'reimplement_systemd' into 'main'
Fix podman leaking conmon processes

See merge request qontainers/pipglr!18
2023-01-30 14:36:29 +00:00
Chris Evich
6cb20272e4 Fix podman leaking conmon processes
When running in the background without a full-blown init system,
`podman system service` will leak `conmon` processes for every
gitlab-runner job that executes via the docker socket API.  These
`conmon` processes almost immediately becomes zombies, and are never
cleaned up.  Eventually the zombies will consume all available PIDs.

Many attempts to fix this in various ways have all failed.  In all cases
the GitLab Runner process will start behaving strangely (or fail
completely) after an amount of time dependent on its usage executing
jobs.

Fix this by entirely reimplementing *pipglr* to utilize systemd and a
pair of lingering user-slices.  One for podman, another for the gitlab
runner.  Include a systemd timer service to affect runner cleanup,
periodically. Also update documentation and examples accordingly.

Signed-off-by: Chris Evich <chris_gitlab@icuc.me>
2023-01-28 09:59:59 -05:00
Chris Evich
f44e9891d1 Merge branch 'fix_idmaps' into 'main'
Fix newuidmap...`: newuidmap: open of uid_map failed: Permission denied

See merge request qontainers/pipglr!15
v3.0.0 v2.0.3
2022-12-08 12:05:44 +00:00
Chris Evich
bf242e8a52 Fix newuidmap...`: newuidmap: open of uid_map failed: Permission denied
Within a container, caps need to be set on /usr/bin/new{uid,gid}map
which reflect the (inner) podman user's root namespaced ID of 10000.

Signed-off-by: Chris Evich <chris_gitlab@icuc.me>
v2.0.2
2022-12-08 06:59:02 -05:00
Chris Evich
db6f2bceb9 Attempt fix v2.0.0 newuidmap permission denied
Recently, I believe an update or packaging problem has been causing
podman to throw errors like:

```
level=error msg="running `/usr/bin/newuidmap ...`: newuidmap: open of
uid_map failed: Permission denied\n"
```

This seems to have something to do with the shadow-utils package, which
owns this binary.  I've examined the file attribuites and permissions
along with /etc/sub{uid,gid} contents.  The only thing that seems to
resolve the issue is reinstalling shadow-utils.  Attempt that fix here
and hope it clears up the problem (present in v2.0.0)

Signed-off-by: Chris Evich <chris_gitlab@icuc.me>
v2.0.1
2022-12-07 06:14:45 -05:00
Chris Evich
f1423ae0b2 Merge branch 'fix_volumes' into 'main'
Fix volume mounts

See merge request qontainers/pipglr!14
v2.0.0
2022-12-06 08:15:33 +00:00
Chris Evich
f88c1a43bd Fix volume mounts
* Add note about volume-mounts being cumulative with base-image
* Fix register & run labels to use (correct) base image's
  `/home/podman/.local/share/containers/` instead of defining
  a new (wrong/useless) `storage` volume.
* Fix register & run labels to mask over `/var/lib/containers`
  with a read-only tmpfs to block any nested rootful use of
  podman as a security precaution.

Signed-off-by: Chris Evich <chris_gitlab@icuc.me>
2022-12-06 03:07:40 -05:00
Chris Evich
5b28cca4e1 Merge branch 'docs_and_cache' into 'main'
Docs: Update volume creation section

See merge request qontainers/pipglr!13
2022-12-06 07:31:15 +00:00
Chris Evich
4fbe33bdbd Revert "Cache prior build layers for ~5 days"
This reverts commit 4c1af406f7.  For
whatever reason, trying to build this using the community runners always
results in an out-of-diskspace error.

Signed-off-by: Chris Evich <chris_gitlab@icuc.me>
2022-12-06 02:20:14 -05:00
Chris Evich
4c1af406f7 Cache prior build layers for ~5 days
This vastly improves build performance at the cost of some extra
registry server storage (which there is plenty of).   Note: The cache
TTL needs to be coordinated with the registry server's tag-cleanup
policy.

Signed-off-by: Chris Evich <chris_gitlab@icuc.me>
2022-12-06 02:18:55 -05:00
Chris Evich
51ce5e4e0a Use single uid/gid map
The podman base-image is intended to support running nested-podman both
root and rootless.  Since pipglr only ever runs rootless, eliminate the
nested usernamespace mapping needed to support nested-root usage.

Signed-off-by: Chris Evich <chris_gitlab@icuc.me>
2022-12-06 02:18:55 -05:00
Chris Evich
75bdc3196f Docs: Update volume creation section
Signed-off-by: Chris Evich <chris_gitlab@icuc.me>
2022-12-06 02:18:27 -05:00
Chris Evich
d36e05d452 Merge branch 'add_readme' into 'main'
Include docs inside image

See merge request qontainers/pipglr!12
2022-12-01 19:23:04 +00:00
Chris Evich
29a806305e Include docs inside image
Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-30 09:47:18 -05:00
Chris Evich
19a7e501be Docs update
Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-30 09:44:34 -05:00
Chris Evich
b591a3d7c5 Remove broken workflow rules
They were preventing builds on main and on tags.  Rather than try and
debug them, just kill them as they're mostly unnecessary for this repo.

Signed-off-by: Chris Evich <chris_gitlab@icuc.me>
v1.4.2
2022-11-25 23:28:47 -05:00
Chris Evich
b21181a446 Fix build job not running on main or tag push
Signed-off-by: Chris Evich <chris_gitlab@icuc.me>
v1.4.1
2022-11-25 23:26:35 -05:00
Chris Evich
c80dfffa14 Merge branch 'switch_to_buildah' into 'main'
Switch to using buildah

See merge request qontainers/pipglr!11
2022-11-26 04:20:51 +00:00
Chris Evich
cbb3eb0e22 Switch to using buildah
Observations show the runtime is about the same (since performance is mostly
storage-io bound.  However, buildah images are more compact and there
are simpler possibilities for build-caching available for future use.

Signed-off-by: Chris Evich <chris_gitlab@icuc.me>
v1.4.0
2022-11-25 23:15:26 -05:00
Chris Evich
98e2bee2a5 Merge branch 'kill_vars' into 'main'
Remove unnecessary variables

See merge request qontainers/pipglr!10
v1.3.0
2022-11-24 16:51:33 +00:00
Chris Evich
4b25e62b52 Remove unnecessary variables
Signed-off-by: Chris Evich <chris_gitlab@icuc.me>
2022-11-24 11:48:23 -05:00
Chris Evich
1c08727c5d Merge branch 'simplify_metadata' into 'main'
Simplify image metadata

See merge request qontainers/pipglr!9
2022-11-24 02:41:37 +00:00
Chris Evich
af84720d71 Simplify image metadata
Signed-off-by: Chris Evich <chris_gitlab@icuc.me>
2022-11-23 21:38:06 -05:00
Chris Evich
c748c4f928 Merge branch 'image_metadata' into 'main'
Add metadata to image

See merge request qontainers/pipglr!8
2022-11-24 01:47:48 +00:00
Chris Evich
5164551f98 Add metadata to image
Also, pin base image to a specific version instead of `latest`.

Signed-off-by: Chris Evich <chris_gitlab@icuc.me>
2022-11-23 18:54:24 -05:00
Chris Evich
63b00ad2e7 Merge branch 'fix_maintenance' into 'main'
Fix maintenance task

See merge request qontainers/pipglr!7
v1.2.1
2022-11-23 17:12:59 +00:00
Chris Evich
2bda4c3be6 Fix maintenance task
The function was defined but never called, resulting in immediate exit
of the maintenance script.  Fix this, also add a configuration build-arg and
ENV to control the cleaning interval.

Signed-off-by: Chris Evich <chris_gitlab@icuc.me>
2022-11-23 12:10:07 -05:00
Chris Evich
3b72178739 Merge branch 'cachevol' into 'main'
Add missing cache volume

See merge request qontainers/pipglr!6
2022-11-22 22:31:28 +00:00