4147 Commits

Author SHA1 Message Date
Giuseppe Scrivano
33c3150ec3 Merge pull request #1983 from giuseppe/return-error-from-container-init
container: do not release returned error
2026-02-05 09:32:14 +01:00
Giuseppe Scrivano
c5879bab4b container: make return clearer
the error is not set, so return a positive value to signal
an exit code != 0.

Closes: https://github.com/containers/crun/issues/1980

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2026-02-04 14:52:51 +01:00
Kir Kolyshkin
ca0756f5e5 Merge pull request #1979 from tylerfanelli/krun-aws-nitro-rename
krun: Rename nitro module to awsnitro
2026-02-03 22:36:11 -08:00
Tyler Fanelli
463e277af7 krun: Rename nitro module to awsnitro
"nitro" is a bit vague. Refer to the module as "awsnitro" for more
clarity.

Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
2026-02-03 23:37:29 -05:00
Kir Kolyshkin
86eaeb3c59 Merge pull request #1949 from giuseppe/add-NULL-checks
linux: add some check for NULL pointers before accessing them
2026-02-03 17:55:32 -08:00
Giuseppe Scrivano
ec7a780d0d Merge pull request #1978 from giuseppe/fix-exit-code-return
container: fix exit code return
2026-02-03 12:02:36 +01:00
Giuseppe Scrivano
b32f895bcd container: fix exit code return
do not return a negative value without an error.

Closes: https://github.com/containers/crun/issues/1977

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2026-02-03 10:39:31 +01:00
Giuseppe Scrivano
fe1e7d9624 Merge pull request #1970 from eriksjolund/add-make-error
container: add missing crun_make_error
2026-02-02 11:43:40 +01:00
Erik Sjölund
a6023b10b9 container: add missing crun_make_error
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2026-02-02 08:35:11 +01:00
Giuseppe Scrivano
b05680e3a6 Merge pull request #1975 from eriksjolund/add-yajl-cleanup
container: add missing yajl cleanup
2026-02-01 21:09:01 +01:00
Giuseppe Scrivano
b89e1fafb4 Merge pull request #1974 from eriksjolund/standardize-gen-alloc-errno
libcrun: standardize error code after `yajl_gen_alloc()` failure
2026-02-01 21:08:47 +01:00
Giuseppe Scrivano
b4614166b0 Merge pull request #1973 from eriksjolund/improve-error-handling-after-run-internal
container: handle libcrun_container_run_internal error correctly
2026-02-01 21:07:32 +01:00
Giuseppe Scrivano
2e5803b8b8 Merge pull request #1972 from eriksjolund/improve-error-handling-after-copy
container: improve error handling after libcrun_copy_config_file call
2026-02-01 21:07:22 +01:00
Giuseppe Scrivano
050c192e4c Merge pull request #1971 from eriksjolund/linux-release-errors
linux: do not leak errors
2026-02-01 21:05:22 +01:00
Giuseppe Scrivano
4202f7bbac Merge pull request #1968 from eriksjolund/container-no-errno-after-success
container: do not use errno after successful calls
2026-02-01 21:01:55 +01:00
Erik Sjölund
52294f8493 libcrun: standardize error code after yajl_gen_alloc
Suggestion by gemini-code-assist in
https://github.com/containers/crun/pull/1974
was amended.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2026-02-01 10:54:01 +01:00
Erik Sjölund
59da15f393 container: add missing yajl cleanup
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2026-02-01 10:45:42 +01:00
Erik Sjölund
5082e02d8e container: do not leak error
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2026-02-01 10:13:44 +01:00
Erik Sjölund
a83a4cf904 container: improve error handling after libcrun_copy_config_file call
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2026-02-01 09:34:04 +01:00
Erik Sjölund
6733e20cb0 linux: use crun_error_wrap
Suggestion by gemini-code-assist in
https://github.com/containers/crun/pull/1971
was amended.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2026-02-01 09:09:23 +01:00
Erik Sjölund
0f367791e7 container: do not use errno after successful calls
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2026-01-30 11:22:31 +01:00
Giuseppe Scrivano
342775a297 Merge pull request #1969 from eriksjolund/linux-no-errno-after-success
linux: do not use errno after successful calls
2026-01-30 11:06:24 +01:00
Erik Sjölund
29bb32d855 linux: do not use errno after successful calls
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2026-01-30 08:43:49 +01:00
Giuseppe Scrivano
b8ec3ece3b Merge pull request #1962 from eriksjolund/fix-error-krun
krun: fix error arguments
2026-01-27 10:26:15 +01:00
Giuseppe Scrivano
d742e371aa Merge pull request #1967 from eriksjolund/avoid-redundant-release
krun: avoid redundant crun_error_release() call
2026-01-27 10:25:42 +01:00
Erik Sjölund
e7ffed11dd krun: fix error arguments
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2026-01-27 08:48:54 +01:00
Erik Sjölund
34c1e0989f krun: avoid redundant crun_error_release() call
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2026-01-27 08:40:44 +01:00
Giuseppe Scrivano
53dee9df23 Merge pull request #1955 from jakecorrenti/propagate-log-level
krun: Propagate crun log level to libkrun
2026-01-26 22:05:00 +01:00
Giuseppe Scrivano
e86e8e1b9f Merge pull request #1950 from jakecorrenti/annotations
krun: support OCI annotations to configure microVM
2026-01-26 22:03:50 +01:00
Giuseppe Scrivano
2fc8fc7c9f Merge pull request #1965 from eriksjolund/krun-only-release-created-errors
krun: do not release error when *err is uninitialized
2026-01-26 14:21:57 +01:00
Erik Sjölund
dedcdd6791 krun: do not release error when *err is uninitialized
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2026-01-26 14:17:10 +01:00
Giuseppe Scrivano
b4d3caec7e Merge pull request #1964 from eriksjolund/fix-error
krun: fix error code
2026-01-26 13:20:08 +01:00
Erik Sjölund
671740dd90 krun: fix error code
Closes: https://github.com/containers/crun/issues/1963

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2026-01-26 12:33:19 +01:00
Giuseppe Scrivano
ff8f451aa1 Merge pull request #1960 from giuseppe/fix-error-leak
container: fix error leak
2026-01-26 09:28:04 +01:00
Giuseppe Scrivano
1644fb0e52 container: fix error leak
print the current error and release it.

Closes: https://github.com/containers/crun/issues/1957

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2026-01-26 08:34:04 +01:00
Giuseppe Scrivano
91df434a47 Merge pull request #1959 from giuseppe/fix-krun-err
krun: fix error return
2026-01-23 21:41:52 +01:00
Giuseppe Scrivano
649d568ac1 krun: fix error return
terminate the current container process instead of returning.

Closes: https://github.com/containers/crun/issues/1958

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2026-01-23 12:10:50 +01:00
Jake Correnti
41a14fe81e krun: Propagate crun log level to libkrun
Rather than hard-coding the krun log level to ERROR, align with the log
verbosity of crun.

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2026-01-19 15:17:29 -05:00
Giuseppe Scrivano
617e653c76 Merge pull request #1944 from giuseppe/fix-poststart-retcode
hooks: exit immediately if poststart hooks fail
2026-01-16 16:54:24 +01:00
Giuseppe Scrivano
b75d7e49ce Merge pull request #1951 from karuboniru/main
Move notify handler before mounts to primary uid namespace
2026-01-16 10:53:34 +01:00
Jake Correnti
2bff12976b libcrun: add krun. as a potentially unsafe annotation
Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2026-01-15 19:24:45 -05:00
Jake Correnti
41941f2c28 krun: parse annotations for krun.{cpus, ram_mib}
Support the use of OCI annotations as a way for the container engine to
configure the microVM's CPU count and RAM amount via `krun.cpus` and
`krun.ram_mib` respectively.

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2026-01-15 19:24:38 -05:00
Jake Correnti
625226def5 krun: parse annotations for krun.variant
Support the use of OCI annotations as a way for the container engine to
configure the microVM.

The user may add the `krun.variant` annotation to specify the flavor of
libkrun they want to use. The current supported values are ["sev",
"aws-nitro"].

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2026-01-15 10:00:44 -05:00
Giuseppe Scrivano
53e9094a6e Merge pull request #1939 from giuseppe/add-AGENTS.md
AGENTS.md: new file
2026-01-15 11:00:20 +01:00
Qiyu Yan
f311dc072b Add handler phase HANDLER_CONFIGURE_BEFORE_USERNS, and move krun setup to it
containers/podman#27822

Signed-off-by: Qiyu Yan <yanqiyu@fedoraproject.org>
2026-01-13 16:38:15 +00:00
Giuseppe Scrivano
488f301df3 linux: check for def->linux
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2026-01-08 10:03:53 +01:00
Giuseppe Scrivano
b1a71725d7 linux: check for [ug]id_mappings before accessing them
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2026-01-07 13:46:40 +01:00
Giuseppe Scrivano
e0a6f43ffd Merge pull request #1932 from giuseppe/krun-unload-all-modules
krun: do not leak handles on error
2026-01-07 12:12:57 +01:00
Giuseppe Scrivano
5d0a3c9d70 Merge pull request #1947 from tylerfanelli/krun-nitro-update
krun: Update AWS nitro enclaves support
2026-01-07 12:11:46 +01:00
Tyler Fanelli
df771204d9 krun: Set exec args when running nitro variant
The libkrun nitro variant expects the execution arguments to be provided
for forwarding to an enclave. If the nitro variant is configured, set
the execution arguments for the nitro enclave.

Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
2026-01-06 21:31:00 -05:00