New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: unexpected and silent intervention of scylla systemd scripts in the manual configuration of perftune.yaml #11385
Comments
3a51e78 is a very dangerous change What was the motivation for it, @tarzanek? The content of The patch above would only be safe if |
I think I found it: #10121 Unfortunately the patch above doesn't represent a solution because perftune.yaml can now be deleted because of some irrelevant change in scylla-server configuration file. The whole approach of deleting the perftune.yaml based on timestamps of other files is bogus. perftune.yaml should be regenerated only when the corresponding content (e.g. CPUSET or NIC name) has changed - not just ANY change. |
I believe that the motivation for this change is not strong enough to keep this patch and a revert should be considered. @avikivity @denesb FYI. |
@tarzanek please comment |
I see that it's already in 5.1. |
this broke a contract in scylla_prepare where if perftune.yaml exists, it shouldn't be touched (I wasn't aware of this, I thought perftune.yaml is volatile and shouldn't have manual modification, hence the slip in the review) |
the question is if scylla_server change impacts content of perftune.yaml or not
The answer is it only changes NIC name, disks are being tuned by default command from scylla_util So changing default scylla-server IFNAME param will impact perftune.yaml too, but since it's direct edit and not by scylla_setup, user is responsible of fixing it in perftune.yaml, too |
The idea is as follows:
In #10121 Lubos asked for However this wasn't supposed to change the original logic that said that IF In simple, all the corresponding patch was supposed to have done was:
This means - no change in |
…tent without introducing regressions This patch fixes the regression introduced by 3a51e78 which broke a very important contract: perftune.yaml should not be "touched" by Scylla scriptology unless explicitly requested. And a call for scylla_cpuset_setup is such an explicit request. The issue that the offending patch was intending to fix was that cpuset.conf was always generated anew for every call of scylla_cpuset_setup - even if a resulting cpuset.conf would come out exactly the same as the one present on the disk before tha call. And since the original code was following the contract mentioned above it was also deleting perftune.yaml every time too. However, this was just an unavoidable side-effect of that cpuset.conf re-generation. The above also means that if scylla_cpuset_setup doesn't write to cpuset.conf we should not "touch" perftune.yaml and vise versa. This patch implements exactly that together with reverting the dangerous logic introduced by 3a51e78. Fixes scylladb#11385 Fixes scylladb#10121
@DoronArazii - any idea why there's no 'Backport candidate' label? |
…tent without introducing regressions This patch fixes the regression introduced by 3a51e78 which broke a very important contract: perftune.yaml should not be "touched" by Scylla scriptology unless explicitly requested. And a call for scylla_cpuset_setup is such an explicit request. The issue that the offending patch was intending to fix was that cpuset.conf was always generated anew for every call of scylla_cpuset_setup - even if a resulting cpuset.conf would come out exactly the same as the one present on the disk before tha call. And since the original code was following the contract mentioned above it was also deleting perftune.yaml every time too. However, this was just an unavoidable side-effect of that cpuset.conf re-generation. The above also means that if scylla_cpuset_setup doesn't write to cpuset.conf we should not "touch" perftune.yaml and vise versa. This patch implements exactly that together with reverting the dangerous logic introduced by 3a51e78. Fixes scylladb#11385 Fixes scylladb#10121 (cherry picked from commit c538cc2)
I have no idea. @benipeled ? |
The pattern looks fine but it's an 8-month-old commit - we don't have build history to look for |
…tent without introducing regressions This patch fixes the regression introduced by 3a51e78 which broke a very important contract: perftune.yaml should not be "touched" by Scylla scriptology unless explicitly requested. And a call for scylla_cpuset_setup is such an explicit request. The issue that the offending patch was intending to fix was that cpuset.conf was always generated anew for every call of scylla_cpuset_setup - even if a resulting cpuset.conf would come out exactly the same as the one present on the disk before tha call. And since the original code was following the contract mentioned above it was also deleting perftune.yaml every time too. However, this was just an unavoidable side-effect of that cpuset.conf re-generation. The above also means that if scylla_cpuset_setup doesn't write to cpuset.conf we should not "touch" perftune.yaml and vise versa. This patch implements exactly that together with reverting the dangerous logic introduced by 3a51e78. \Fixes #11385 \Fixes #10121 (cherry picked from commit c538cc2)
Already backported, removing label. |
Installation details
HEAD: a03a33d
Regression introduced by 3a51e78
Description
The reason why cpuset.conf and perftune.yaml exist are in particular to allow specifying a compute and IRQ handling CPU sets.
If user wants to follow a default choice Scylla thinks is going to be best for the current setup then auto-generated values are going to be fine.
However, sometimes the user wants to define his/her own configuration, for example run multiple Scylla instances on the same big machine with multiple NICs separating them to different NUMA nodes.
In such a case a special value of
cpu_mask
needs to be provided in perftune.yaml and auto-generation of perftune.yaml byscylla_prepare
can no longer be used because it assumes that the whole machine is available.Before 3a51e78 the above could have been easily achieved because
scylla_prepare
would not touchperftune.yaml
if it exists (as was intended!).However after the patch above if a user would change something in
/etc/defaults/scylla-server
or incpuset.conf
after he/she wrote the content he/she wanted in/etc/scylla.d/perftune.yaml
our scriptology is going to just go a overwrite it with an unwanted content on the next restart without a warning!This behavior is less than expected and should be at best optional.
The text was updated successfully, but these errors were encountered: