Repository navigation
Conversation
There was a problem hiding this comment.
The first sentence is not clear for me. Sorry for my poor English reading skill. Do you want to say the following?
%%%
When more than two units are specified in the single operation, then no ordering dependency between them are considered in the operation. For example, ...
There was a problem hiding this comment.
Thanks for the review. English is not my native language either, so don't be sorry for anything. However, I saw 2 issues in your statement:
- it's "more than one unit" instead of "more than two units"
systemctl start first secondwill make the ordering dependency take effect. Therefore, I don't think it's safe to say "no ordering dependency between them are considered in the operation".
There was a problem hiding this comment.
- Oops...
- Is it? I do not check the relevant code. But if so, what is the real limitation here?
There was a problem hiding this comment.
Yes, it is. Please check the mailing list. This is my original question: https://lists.freedesktop.org/archives/systemd-devel/2018-January/040122.html and this is a good answer to it: https://lists.freedesktop.org/archives/systemd-devel/2018-January/040124.html
There was a problem hiding this comment.
I see. Not tested, but it makes sense for me. I did not catch that from your original commit. I hope it is explained as the answer.
There was a problem hiding this comment.
OK. I will modify my commit. Thanks!
|
I still feel it would be nice if systemctl is taught to do it as a single transaction, idk about how this impacts backwards compatibility, but I very much expect it to behave as a single transaction, and I'm pretty sure it has just gone unnoticed until now. Fixing this as a documentation problem would create other issues (as then 237 ships and now it's documented behaviour which can only be changed by adding a switch on top). |
So, yes we should have this as single transaction, but I think it's too late to make this change silently now, in order not to break compa. So yes, we should add the single-transaction concept, but in a new option --combine or so. And that means the status quo should be documented, hence I think this patch should go in |
cf06364 to
d93dbde
Compare
|
Do we really want to document this? Current behaviour seems bad, but since it's not documented, there are no guarantees either way. Once we document it, we can't change it. I'd rather not merge this, but instead keep the question open, and make it a single transaction in the future. |
|
@keszybz According to Lennart's previous email:
I agree with Lennart's point. What do you think @keszybz? |
|
I don't think this would be compat breakage. If I wanted to be sure that I get separate transactions, I'd use |
|
@keszybz Is there an existing issue about the single transaction API? I can create one if there is none. |
I still fail to understand why. The only use case for "transnational systemctl" I can think of is to workaround incomplete unit definitions that do not define needed dependencies. Instead of properly configuring your units so service manager can make all necessary work for you you want to sidestep service manager. I'd still love to see real life example of configuration that requires transnational behavior of systemctl. Either two units cannot be started in arbitrary order in which case their definition must clearly say so, or they can be started in arbitrary order in which case I do not understand why |
|
You're right, "bad" is the wrong word here. It should just be a single transaction for efficiency / simplicity reasons. I don't think we want to document it as being separate transactions. |
I have a real world example here: |
|
FWIW I agree with @keszybz |
|
@johnlinp could you open a RFE for it ? Whatever the default behavior will be, I think it needs to be tracked. |
|
Superseded by #42182 |
Fixes: #7877