summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Merge pull request #34597 from ryantimwilson/oomd-pressure-durationYu Watanabe2024-10-1722-553/+859
|\ \ \ \ \ | | | | | | | | | | | | Add ManagedOOMMemoryPressureDurationSec override setting for units
| * | | | | Reformat load-fragment-gperf.gperf.inRyan Wilson2024-10-171-527/+527
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit reformats load-fragment-gperf.gperf.in after changes made for adding the ManagedOOMMemoryPressureDurationSec= property.
| * | | | | cgroup: Add ManagedOOMMemoryPressureDurationSec= override setting for unitsRyan Wilson2024-10-1721-21/+293
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will allow units (scopes/slices/services) to override the default systemd-oomd setting DefaultMemoryPressureDurationSec=. The semantics of ManagedOOMMemoryPressureDurationSec= are: - If >= 1 second, overrides DefaultMemoryPressureDurationSec= from oomd.conf - If is empty, uses DefaultMemoryPressureDurationSec= from oomd.conf - Ignored if ManagedOOMMemoryPressure= is not "kill" - Disallowed if < 1 second Note the corresponding dbus property is DefaultMemoryPressureDurationUSec which is in microseconds. This is consistent with other time-based dbus properties.
| * | | | | oomd: Refactor DefaultMemoryPressureDurationSec= to use conf parserRyan Wilson2024-10-172-6/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parsing DefaultMemoryPressureDurationSec= is currently split between conf parser, main() and manager_start() methods. This commit centralizes parsing and bounds checking logic within a single custom conf parser function.
* | | | | | Merge pull request #34797 from yuwata/test-mountYu Watanabe2024-10-171-62/+75
|\ \ \ \ \ \ | |/ / / / / |/| | | | | TEST-60: several cleanups and potential performance improvement
| * | | | | TEST-60-MOUNT-RATELIMIT: disable journal ratelimitingYu Watanabe2024-10-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, journal check in testcase_mount_ratelimit() may fail and we need to wait 2 minutes.
| * | | | | TEST-60-MOUNT-RATEMINIT: split into small test casesYu Watanabe2024-10-161-57/+63
| | | | | | | | | | | | | | | | | | | | | | | | Then, use run_testcases().
| * | | | | TEST-60-MOUNT-RATELIMIT: wait for mount unit being started or stoppedYu Watanabe2024-10-161-6/+6
|/ / / / /
* | | | | Merge pull request #34793 from yuwata/journalctl-copy-argumentsYu Watanabe2024-10-162-33/+63
|\ \ \ \ \ | |/ / / / |/| | | | journalctl: copy arguments
| * | | | journalctl: do not directly use optarg, but copy optarg before useYu Watanabe2024-10-162-29/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, if the process forks child processes, then the arguments cannot be used from them. To avoid potential issues like the one fixed by 6d3012bab4ce4c1ed260598d05b4e9f2ea471658.
| * | | | journalctl: erase verify key before freeYu Watanabe2024-10-161-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Even optarg is erased, copied string was not erased. Let's erase the copied key for safety.
* | | | | doc: fix typoYu Watanabe2024-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | Follow-up for b3b7cf8b7c35df14c6eb4f79da1a241dc0aa8c7e.
* | | | | machine: fix typoYu Watanabe2024-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | Follow-up for ad0d4f9a4c340f3fd5f0fcf646f7c762722737cd.
* | | | | pidref: fix typoYu Watanabe2024-10-162-2/+2
| | | | | | | | | | | | | | | | | | | | Follow-up for de34ec188c4d4f682a337445aa7753259cd7f821.
* | | | | ukify: fix typoYu Watanabe2024-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | Follow-up for 02eabaffe98c9a3b5dec1c4837968a4d3e2ff7db.
* | | | | Merge pull request #34381 from DaanDeMeyer/extension-submountsYu Watanabe2024-10-164-33/+183
|\ \ \ \ \ | | | | | | | | | | | | sysext: Deal with nested mounts properly
| * | | | | sysext: Deal with nested mounts properlyDaan De Meyer2024-10-162-11/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nested mounts should be carried over from host to overlayfs to overlayfs (and back to host if unmerged). Otherwise you run into hard to debug issues where merging extensions means you can't unmount those nested mounts anymore as they are hidden by the overlayfs mount. To fix this, before unmerging any previous extensions, let's move the nested mounts from the hierarchy to the workspace, then set up the new hierachy, and finally, just before moving the hierarchy into place, move the nested mounts back into place. Because there might be multiple nested mounts that consists of one or more mounts stacked on top of each other, we make sure to move all stacked mounts properly to the overlayfs. The kernel doesn't really provide a nice way to do this, so we create a stack, pop off each mount onto the stack and then pop from the stack again to the destination to re-establish the stacked mounts in the same order in the destination.
| * | | | | sysext: Run unmerge in a subprocessDaan De Meyer2024-10-161-18/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Preparation for later commit where we need a private mount namespace for unmerge.
| * | | | | mount-util: Make get_submounts() a public functionDaan De Meyer2024-10-162-10/+11
| |/ / / /
* | | | | Fix maybe-uninitialized warnings with gcc 14.2Luca Boccassi2024-10-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ../src/resolve/resolved-bus.c: In function ‘call_link_method’: ../src/resolve/resolved-bus.c:1769:16: warning: ‘l’ may be used uninitialized [-Wmaybe-uninitialized] 1769 | return handler(message, l, error); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/resolve/resolved-bus.c:1755:15: note: ‘l’ was declared here 1755 | Link *l; | ^ ../src/resolve/resolved-bus.c: In function ‘bus_method_get_link’: ../src/resolve/resolved-bus.c:1828:13: warning: ‘l’ may be used uninitialized [-Wmaybe-uninitialized] 1828 | p = link_bus_path(l); | ^~~~~~~~~~~~~~~~ ../src/resolve/resolved-bus.c:1816:15: note: ‘l’ was declared here 1816 | Link *l; | ^
* | | | | pid1: add env var to override default mount rate limit intervalxujing2024-10-162-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to 24a4542c. 24a4542c can only be set 1 in 1s at most, sometimes we may need to set to something else(such as 1 in 2s). So it's best to let the user decide. This also allows users to solve #34690.
* | | | | Merge pull request #34791 from poettering/live-mount-tweakLuca Boccassi2024-10-163-20/+10
|\ \ \ \ \ | |/ / / / |/| | | | tweaks to live mount property logging
| * | | | core: move debug logging from _can_live_mount() functions to callerLennart Poettering2024-10-163-19/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's debug log the returned dbus error where we want the logging, but don't log it, where we don't. This removes the noisy logging from the property handler for the CanLiveMount property, but keeps it in place for the MountImage() method call where we want it. Alternative to #34175 Follow-up for 5162829ec87df20c7af763bdf274735bf9e53552 and 1cafbecabecc619b4e147abd9925282d0ff323bd
| * | | | core: one more Mount -> LiveMount renameLuca Boccassi2024-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Missed by earlier search-and-replace Follow-up for 5162829ec87df20c7af763bdf274735bf9e53552
* | | | | Merge pull request #34756 from yuwata/test-oomd-cleanupsYu Watanabe2024-10-163-60/+73
|\ \ \ \ \ | | | | | | | | | | | | TEST-55-OOMD: several cleanups
| * | | | | TEST-55-OOMD: check slice property before stressing sliceYu Watanabe2024-10-161-2/+3
| | | | | |
| * | | | | TEST-55-OOMD: stop test units when unnecessaryYu Watanabe2024-10-161-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | Then, sleep becomes not necessary anymore. This greatly improve performance.
| * | | | | TEST-55-OOMD: check slice more in detailYu Watanabe2024-10-161-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | system and user slice has same name, hence we need to check full path.
| * | | | | TEST-55-OOMD: split into small testcasesYu Watanabe2024-10-161-47/+41
| | | | | | | | | | | | | | | | | | | | | | | | Then, we can run each small test cases separately.
| * | | | | TEST-55-OOMD: check global config earlierYu Watanabe2024-10-161-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'Default Memory Pressure Duration' field in oomctl, which can be configured with DefaultMemoryPressureDurationSec= in oomd.conf, is a global config. Let's check it earlier. This also drops unnecessary cleanup at the beginning.
| * | | | | TEST-55-OOMD: set ManagedOOMMemoryPressure= and friends in a drop-in configYu Watanabe2024-10-163-3/+8
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fedora and friends has a drop-in config for the settings in /usr/lib/systemd/user/slice.d/ . Hence, settings in the main .slice may be overridden. Let's set below in a drop-in with higher decimal prefix. Also, rename override.conf -> 99-managed-oom-preference.conf for the same reason.
* | | | | test: fix TOCTOU in test-jsonYu Watanabe2024-10-161-4/+4
| |/ / / |/| | | | | | | | | | | | | | | Follow-up for 60ae3b86fb52d545b279e3927d2214462385e734. Fixes CID#1563782.
* | | | Merge pull request #34742 from yuwata/test-storageFrantisek Sumsal2024-10-167-12/+17
|\ \ \ \ | |/ / / |/| | | test: fix multipath test in TEST-64-STORAGE
| * | | TEST-64-UDEV-STORAGE: insert udevadm settle moreYu Watanabe2024-10-121-1/+7
| | | | | | | | | | | | | | | | Hopefully fixes #34073.
| * | | TEST-58-REPART: drop duplicated inclusion of util.shYu Watanabe2024-10-121-3/+0
| | | |
| * | | mkosi: replace PackageManagerTrees= with SandboxTrees=Yu Watanabe2024-10-125-8/+10
| | | |
* | | | gpt-auto: remove directory check for ESP mountMichael Ferrari2024-10-161-17/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure that we always attempt to mount the `ESP` partition to `/boot` when there is no `XBOOTLDR` partition. Fixes an issue when booting without a `XBOOTLDR` partition and an empty root partition, since it would mount the `ESP` partition to `/efi/` unconditionally causing boot entries to not be under `/boot/` as recommended by the Boot Loader Specification.
* | | | Merge pull request #34482 from bgurney-rh/alt-nvme-multins-symlink-fixYu Watanabe2024-10-162-3/+3
|\ \ \ \ | | | | | | | | | | Pin obsolete NVMe symlinks to namespace 1
| * | | | TEST-64-UDEV-STORAGE: test for absence of obsolete NVMe symlinkBryan Gurney2024-10-151-0/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Bryan Gurney <bgurney@redhat.com>
| * | | | TEST-64-UDEV-STORAGE: remove obsolete NVMe symlink for nvme_subsystemBryan Gurney2024-09-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the nvme_subsystem test, there are only namespace IDs 16 and 17, so there would no longer be an "obsolete" symlink created, since this test scenaro does not create a namespace with ID 1. Signed-off-by: Bryan Gurney <bgurney@redhat.com>
| * | | | Pin obsolete NVMe symlinks to namespace 1Bryan Gurney2024-09-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to preserve backwards compatibility with legacy NVMe devices, create the obsolete symlinks, but only if they are associated with namespace ID 1. Signed-off-by: Bryan Gurney <bgurney@redhat.com>
* | | | | Merge pull request #34781 from poettering/write-string-rename-fullYu Watanabe2024-10-157-38/+47
|\ \ \ \ \ | | | | | | | | | | | | fileio: write_string_file() naming clean-ups
| * | | | | debug-generator: create prefix dir of generate unit fileLennart Poettering2024-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Strictly speaking, it's more correct if we create the prefix path before writing our unit file.
| * | | | | dropin: use WRITE_STRING_FILE_MKDIR_0755 to create drop-in prefix pathLennart Poettering2024-10-151-4/+3
| | | | | |
| * | | | | shared: modernize drop_in_file() a bitLennart Poettering2024-10-151-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the return parameters optional, since we don't actually need them in all cases (see later commits).
| * | | | | fileio: clean up write_string_file() namingLennart Poettering2024-10-155-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | let's rename the "_ts" flavour of these calls "_full" instead, exposing the full functionality. And then keep two more minimal versions around: one "_at" (which has the ts parameter suppressed, but keeps the dir_fd one). And one without suffix (which supresses both). Do the same for the label versions of these calls.
* | | | | | Merge pull request #34719 from poettering/pidref-remoteYu Watanabe2024-10-155-48/+160
|\ \ \ \ \ \ | |/ / / / / |/| | | | | pidref: add explicit concept of "remote" PidRef
| * | | | | json-util: initialize "remote" flag for PidRef when parsing JSON pidref ↵Lennart Poettering2024-10-152-35/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | serializations Now that we have a way to recognize "remoteness" of a PidRef, let's make sure when we decode a JSON pidref we initialize things that way.
| * | | | | pidref: add explicit concept of "remote" PidRefLennart Poettering2024-10-153-13/+99
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PidRef just track some data, but cannot be used for any active operation. Background: for https://github.com/systemd/systemd/pull/34703 it makes sense to track explicitly if some PidRef is not a local one, so that we never attempt to for example "kill a remote process" and thus acccidentally hit the wrong process (i.e. a local one by the same PID).
* | | | | core: do not fail if ignorable img.v/ vpick dir is missingLuca Boccassi2024-10-152-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not fail if the directory is missing entirely, other than just empty Follow-up for 00f546e25e8 Follow-up for 5e79dd96a88 Follow-up for 622efc544dc