Repository navigation
Many fixes, in particular to the install logic - #2973
Conversation
|
I don't think it's possible to comment on individual commits any more. Oh, github! |
|
@keszybz hmm, what do you mean? seems to work here? |
|
When I pick "commit (37)", and then a commit from the list, I'm taken to the "files changed" view, with "showing changes from one commit". I cannot comment on a commit as such, afaict. |
This is not an upstream test... @martinpitt ? |
|
Wrt This creates a SysV init script (only) and then calls Note that this is the (only) failure on s390x only. On i386/amd64 it already fails during build in |
|
@martinpitt hmm, any idea how i can figure out the stacktrace where the mkdir fails? Currently there's no way for me to debug that... |
|
Wrt. the sysv enable regression, that's reasonably straightforward to reproduce: With trunk it should look like (twice). With this branch, the second one fails with this "Unit file is transient or generated." error because This is actually a bug in the tests as well as As for the |
|
I fixed the This actually uncovered a slightly more serious bug with After BTW, http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/tests/unit-config is not really distro specific -- it should run for you by merely replacing |
|
As for the (The build happens in a minimal environment). This is perfectly reproducible locally for me, please let me know if it isn't for you. |
|
I updated http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/tests/unit-config now to detect the systemd unit path and also replace the Debian-specific Note that while the test is normally safe to run on a production install, it could leave As I said, if you want I'm happy to propose this test for upstream inclusion now, to make it easier for others to run. |
|
After reading the patches I think the idea is that generated units cannot be enabled or disabled, and are supposed to be linked into the right place by the generator. This make sense in case of "native" generated units, but breaks down for sysv "wrapper" units, which are both generated, and have external enablement status which we report. I think the code must be changed to allow enable/disable/is-enabled checks, at least for the wrapper units. |
4a7f5b6 to
9b6bb6a
Compare
|
I force pushed a new version, that hopefully fixes all issues @keszybz and the test suite found... I also added a number of more commits that complete the unit file install logic rework, by adding a new "systemctl revert" command. |
We only use it inside of install.c, hence let's make it static.
Exit early, so that we can get rid of the large if block.
This allows dropping all user configuration and reverting back to the vendor default of a unit file. It basically undoes what "systemctl edit", "systemctl set-property" and "systemctl mask" do.
There's no point in first determining the drop-in file name path, then forgetting it again, and then determining it again. Instead, just generated it once, and then write to ti directly.
We don#t really support systems where XDG_RUNTIME_DIR is not supported for systemd --user. Hence, let's always set our own XDG_RUNTIME_DIR for tests that involve systemd --user, so that we know it is set, and that it doesn't polute the user's actual runtime dir.
This hopefully reduces confusion resulting in issues like systemd#2992.
…libmount-force-mountinfo Fixes: systemd#2978
This new command removes all, or all hidden container images that have been downloaded.
…pted to be enabled We don't allow using config symlinks to enable units, but the error message we printed was awful. Fix that, and generate a more readable error. Fixes systemd#3010.
We only use it for the Tx code anyway, hence sd-lldp.h shouldn't expose it, as it only implements Rx.
Otherwise "systemctl status" will immediately report that our unit file is out of date.
Let's make this more digestable to read by making the list of documented unit file paths a bit shorter. Specifically, let's drop references to $XDG_CONFIG_HOME and $XDG_DATA_HOME, as their default values are listed too already. Given that the fact that the XDG basedir spec makes these paths configurable is probably not a strong point of the spec, let's drop the reference to the env vars, and keep only the literal, default paths for them in the list. Of course, we do support the full XDG basedir spec in this regard, but it's one thing to implement it and another one to recommend it by documenting it. Replace "$HOME" by "~", because UNIX.
|
And yeah @evverx found a memory leak. In fact we should really free the changes list in all of the install methods, just to be sure, and the revert method is just one of those. Will add a new commit to fix this on top, and rebase. |
|
ok, rebased and and force pushed, let's see if the CI still likes it. |
Indeed. Thanks! Sorry, but what is @centos-ci ? :) |
…on't choke on ELOOP ELOOP indicates that there's a symlink in /etc for a native unit file, and that's completely OK.
|
@centos-ci is a Jenkins instance, currently in the works to being set up for us, so that we also can have integration tests on RHEL in addition to Ubuntu. However it's not complete yet, and it ended up spamming a lot of PRs, unfortunately. |
|
Whats the difference of the integration test being performed on Ubuntu vs RHEL and should not one integration test be enough upstream or is there plans to have integration test on all the llinux distribution out there? |
|
@johannbg not the right place to discuss this. → ML |
|
Yay, CI is green again thanks to your latest fix (3c6d8e5). So let's land this before something else shatters this again :-) |
This contains a big pile of fixes, primarily to the install logic and the core.
(Note that there will be more coming. For example, the install logic can now recognize transient unit files, however the core currently doesn't create any. Instead it just creates drop-ins with no main unit file. I am working on fixing this. As soon as fixed "systemctl list-unit-files" should show the usual unit files but also generated and transient ones).
This stuff has been lying around for a while on my checkout, since it contains many fixes, I#d really like to see this go in now, so that it doesn't continue to be this rebase-all-the-time orgy.