citus/.devcontainer
Mehmet YILMAZ 188c182be4
PG18 - Enable NUMA syscalls in CI containers to fix PG18 numa.out regression test failures (#8258)
fixes #8246

PostgreSQL 18 introduced stricter NUMA page-inquiry permissions for the
`pg_shmem_allocations_numa` view.
Without the required kernel capabilities, the test fails with:

```
ERROR:  failed NUMA pages inquiry status: Operation not permitted
```

This PR updates our test containers to include the necessary privileges:

* Adds `--cap-add=SYS_NICE` and `--security-opt seccomp=unconfined`

When PostgreSQL’s new NUMA views (`pg_shmem_allocations_numa`,
`pg_buffercache_numa`) run, they call `move_pages()` to ask the kernel
which NUMA node holds each shared memory page.


https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=8cc139bec

That syscall (`move_pages()`) requires `CAP_SYS_NICE` when inspecting
another process.

So: `--cap-add=SYS_NICE` grants the container permission to perform that
NUMA page query.


https://man7.org/linux/man-pages/man2/move_pages.2.html#:~:text=must%20be%20privileged%0A%20%20%20%20%20%20%20%20%20%20(-,CAP_SYS_NICE,-)%20or%20the%20real


`--security-opt seccomp=unconfined`

Docker containers still run under a seccomp filter which a kernel-level
sandbox that blocks many system calls entirely for safety.
The default Docker seccomp profile blocks `move_pages()` outright,
because it can expose kernel memory layout information.


https://docs.docker.com/engine/security/seccomp/#:~:text=You%20can%20pass-,unconfined,-to%20run%20a


**In combination**

Both flags are required for NUMA introspection inside a container:
- `SYS_NICE` → permission
- `seccomp=unconfined` → ability
2025-10-27 21:00:32 +03:00
..
.vscode Devcontainer: enable coredumps (#7523) 2024-02-23 13:38:11 +00:00
pgenv/config Add devcontainer for development purposes (#7102) 2023-10-09 15:37:21 +02:00
src/test/regress Bump black from 24.2.0 to 24.3.0 in /.devcontainer/src/test/regress (#8068) 2025-07-22 18:30:20 +03:00
.gdbinit automatically add a breakpoint that breaks on postgres errors (#7279) 2023-10-27 16:57:51 +02:00
.gitignore Add devcontainer for development purposes (#7102) 2023-10-09 15:37:21 +02:00
.psqlrc Add Debugging Instructions to Devcontainer Setup in CONTRIBUTING.md (#7673) 2024-08-23 12:16:18 +03:00
Dockerfile Bump PG versions to 17.6, 16.10, 15.14 (#8142) 2025-08-25 15:34:13 +03:00
Makefile Add devcontainer for development purposes (#7102) 2023-10-09 15:37:21 +02:00
devcontainer.json PG18 - Enable NUMA syscalls in CI containers to fix PG18 numa.out regression test failures (#8258) 2025-10-27 21:00:32 +03:00
requirements.txt Bump black from 23.11.0 to 24.3.0 in /.devcontainer (#8075) 2025-07-25 17:54:28 +03:00