Repository navigation
reef: mds: optionally forbid to use standby for another fs as last resort - #53340
Conversation
|
Hi @trociny, this backport has commits from Luis's changes related to max xattr. Is that intentional? |
|
This change would require a rebase once some of other reef backports are merged. Just FYI - @trociny |
|
Hey @trociny, I'm seeing a compile failure that seems related to your PR: Can you take a look? I am removing the "needs-qa" label for now. Feel free to re-add it when the PR is ready for testing again. |
@ifed01 changes #53229 are merged which uses |
This new configuration option will allow to define the maximum size for a filesystem xattrs blob. This is a filesystem-wide knob that will replace the per-MDS mds_max_xattr_pairs_size option. Note: The kernel client patch to handle this new configuration was merged before the corresponding ceph-side pull-request. This was unfortunate because in the meantime PR ceph#43284 was merged and the encoding/decoding of 'bal_rank_mask' got in between. Hence the 'max_xattr_size' is being encoding/decoded before 'bal_rank_mask'. URL: https://tracker.ceph.com/issues/55725 Signed-off-by: Luís Henriques <[email protected]> (cherry picked from commit 7b8def5)
rishabh-d-dave
left a comment
There was a problem hiding this comment.
Testing was fine, CephFS approved - https://tracker.ceph.com/projects/cephfs/wiki/Reef#21-Nov-2023
|
@trociny @vshankar @leonid-s-usov This was tested and ready for merge |
This would require additional fixes and retest. The change has been marked as unapproved for now. |
This is required for a reef client to work with a higher revision
MDS, since essentially, this happens:
reef(client):
if (version >=17) {
decode(bal_rank_mask, p);
}
and higher-revision MDS (say, upcoming squid):
version = 17
encode(version, bl);
...
...
encode(max_xattr_size, bl);
encode(bal_rank_mask, bl);
The client incorrectly decodes max_xattr_size (type: uint64_t) into
bal_rank_mask (type: string).
This situation ended up due to a couple of reasons:
* the kclient patchset hanlding `max_xattr_size` was merged early on
and another MDS side change that bumped the MDSMap encoding version
to 17 got merged in the midst (PR ceph#43284). Details in comment:
ceph#46357 (comment)
* The reef backport for PR ceph#46357 got delayed (and, reef branched out).
Which means reef(18.2.0) user-space clients are broken with higher version
MDSs.
Fixes: https://tracker.ceph.com/issues/63713
Signed-off-by: Venky Shankar <[email protected]>
(cherry picked from commit 36ee8e7)
|
centos builds are busted atm - https://shaman.ceph.com/builds/ceph/wip-vshankar-testing1-2023-12-18-1207-reef/ The above run is with --filter ubuntu. I'm proposing that we merge (to get the squid kickoff PR fully running) this once it goes through @yuriw's trello process. |
|
jenkins test windows |
|
@leonid-s-usov The merge is blocked by your change requested. Could you PTAL and do the needful. |
leonid-s-usov
left a comment
There was a problem hiding this comment.
I am happy to see that the versioning has been rigorously discussed and addressed according to the consensus.
Commit e134c89 adds the bal_rank_mask with encoded (ev) version 17. This was merged into main Oct 2022 and made it into the reef release normally. Commit 7b8def5 adds the max_xattr_size also with encoded (ev) version 17 but places it before bal_rank_mask. This is problematic as there were no plans to backport e134c89 to quincy or pacific so piggybacking on the ev 17 bump would not work and otherwise would require the backports to be done as a set to ensure consistency (including with the kernel client). However, the real issue is that 7b8def5 was not merged until after reef was already cut. This required 7b8def5 to be backported separately in [1] which was not merged until after v18.2.1 (current reef HEAD as of this commit). Ultimately, this means that there are reef versions (v18.2.[01]) in the wild which expect bal_rank_mask to be encoded at ev17 and not (max_xattr_size, bal_rank_mask). Adding to the complications, the kernel client has already merged code [2] expecting max_xattr_size for ev17. It was decided in a github discussion [3] to move bal_rank_mask to ev18 to avoid updating the kernel client which was done in the main branch via 36ee8e7 and update the reef max_xattr_size backport with the same change (d8cebd6). Unfortunately, this breaks upgrades v18.2.[01] to newer reef versions or to main. The reason is that monitors will encode v17 with bal_rank_mask (max_xattr_size is not merged yet) and send that to upgraded mgrs (which are upgraded first). The mgr will attempt to decode bal_rank_mask as a uint64_t (max_xattr_size) but fail because an empty (by default) bal_rank_mask is simply encoded as a signed 32-bit integer. Consequently, the mgr will fail decoding with: failed to decode message of type 45 v1: End of buffer [buffer:2] Of course the problem does not stop there, even if the mgr were able to handle this, the monitors/mds/clients would fail in similar fashion. So the only choice left is to fix max_xattr_size to be encoded at ev18. Fortunately, v18.2.2 has not been released nor has any max_xattr_size backport to quincy/pacific been merged. The main downside will be that kernels will wrongly decode ev17 (which is already true for ceph clusters running v18.2.[01]). A follow-up kernel fix will be required. [1] https://tracker.ceph.com/issues/59405 [2] linux.git d93231a6bc8a452323d5fef16cca7107ce483a27 [3] ceph#53340 (comment) Fixes: https://tracker.ceph.com/issues/64440 Signed-off-by: Patrick Donnelly <[email protected]>
Commit e134c89 adds the bal_rank_mask with encoded (ev) version 17. This was merged into main Oct 2022 and made it into the reef release normally. Commit 7b8def5 adds the max_xattr_size also with encoded (ev) version 17 but places it before bal_rank_mask. This is problematic as there were no plans to backport e134c89 to quincy or pacific so piggybacking on the ev 17 bump would not work and otherwise would require the backports to be done as a set to ensure consistency (including with the kernel client). However, the real issue is that 7b8def5 was not merged until after reef was already cut. This required 7b8def5 to be backported separately in [1] which was not merged until after v18.2.1 (current reef HEAD as of this commit). Ultimately, this means that there are reef versions (v18.2.[01]) in the wild which expect bal_rank_mask to be encoded at ev17 and not (max_xattr_size, bal_rank_mask). Adding to the complications, the kernel client has already merged code [2] expecting max_xattr_size for ev17. It was decided in a github discussion [3] to move bal_rank_mask to ev18 to avoid updating the kernel client which was done in the main branch via 36ee8e7 and update the reef max_xattr_size backport with the same change (d8cebd6). Unfortunately, this breaks upgrades v18.2.[01] to newer reef versions or to main. The reason is that monitors will encode v17 with bal_rank_mask (max_xattr_size is not merged yet) and send that to upgraded mgrs (which are upgraded first). The mgr will attempt to decode bal_rank_mask as a uint64_t (max_xattr_size) but fail because an empty (by default) bal_rank_mask is simply encoded as a signed 32-bit integer. Consequently, the mgr will fail decoding with: failed to decode message of type 45 v1: End of buffer [buffer:2] Of course the problem does not stop there, even if the mgr were able to handle this, the monitors/mds/clients would fail in similar fashion. So the only choice left is to fix max_xattr_size to be encoded at ev18. Fortunately, v18.2.2 has not been released nor has any max_xattr_size backport to quincy/pacific been merged. The main downside will be that kernels will wrongly decode ev17 (which is already true for ceph clusters running v18.2.[01]). A follow-up kernel fix will be required. [1] https://tracker.ceph.com/issues/59405 [2] linux.git d93231a6bc8a452323d5fef16cca7107ce483a27 [3] ceph#53340 (comment) Fixes: https://tracker.ceph.com/issues/64440 Signed-off-by: Patrick Donnelly <[email protected]>
Commit e134c89 adds the bal_rank_mask with encoded (ev) version 17. This was merged into main Oct 2022 and made it into the reef release normally. Commit 7b8def5 adds the max_xattr_size also with encoded (ev) version 17 but places it before bal_rank_mask. This is problematic as there were no plans to backport e134c89 to quincy or pacific so piggybacking on the ev 17 bump would not work and otherwise would require the backports to be done as a set to ensure consistency (including with the kernel client). However, the real issue is that 7b8def5 was not merged until after reef was already cut. This required 7b8def5 to be backported separately in [1] which was not merged until after v18.2.1 (current reef HEAD as of this commit). Ultimately, this means that there are reef versions (v18.2.[01]) in the wild which expect bal_rank_mask to be encoded at ev17 and not (max_xattr_size, bal_rank_mask). Adding to the complications, the kernel client has already merged code [2] expecting max_xattr_size for ev17. It was decided in a github discussion [3] to move bal_rank_mask to ev18 to avoid updating the kernel client which was done in the main branch via 36ee8e7 and update the reef max_xattr_size backport with the same change (d8cebd6). Unfortunately, this breaks upgrades v18.2.[01] to newer reef versions or to main. The reason is that monitors will encode v17 with bal_rank_mask (max_xattr_size is not merged yet) and send that to upgraded mgrs (which are upgraded first). The mgr will attempt to decode bal_rank_mask as a uint64_t (max_xattr_size) but fail because an empty (by default) bal_rank_mask is simply encoded as a signed 32-bit integer. Consequently, the mgr will fail decoding with: failed to decode message of type 45 v1: End of buffer [buffer:2] Of course the problem does not stop there, even if the mgr were able to handle this, the monitors/mds/clients would fail in similar fashion. So the only choice left is to fix max_xattr_size to be encoded at ev18. Fortunately, v18.2.2 has not been released nor has any max_xattr_size backport to quincy/pacific been merged. The main downside will be that kernels will wrongly decode ev17 (which is already true for ceph clusters running v18.2.[01]). A follow-up kernel fix will be required. [1] https://tracker.ceph.com/issues/59405 [2] linux.git d93231a6bc8a452323d5fef16cca7107ce483a27 [3] ceph#53340 (comment) Fixes: https://tracker.ceph.com/issues/64440 Signed-off-by: Patrick Donnelly <[email protected]> (cherry picked from commit 78abfea)
Commit e134c89 adds the bal_rank_mask with encoded (ev) version 17. This was merged into main Oct 2022 and made it into the reef release normally. Commit 7b8def5 adds the max_xattr_size also with encoded (ev) version 17 but places it before bal_rank_mask. This is problematic as there were no plans to backport e134c89 to quincy or pacific so piggybacking on the ev 17 bump would not work and otherwise would require the backports to be done as a set to ensure consistency (including with the kernel client). However, the real issue is that 7b8def5 was not merged until after reef was already cut. This required 7b8def5 to be backported separately in [1] which was not merged until after v18.2.1 (current reef HEAD as of this commit). Ultimately, this means that there are reef versions (v18.2.[01]) in the wild which expect bal_rank_mask to be encoded at ev17 and not (max_xattr_size, bal_rank_mask). Adding to the complications, the kernel client has already merged code [2] expecting max_xattr_size for ev17. It was decided in a github discussion [3] to move bal_rank_mask to ev18 to avoid updating the kernel client which was done in the main branch via 36ee8e7 and update the reef max_xattr_size backport with the same change (d8cebd6). Unfortunately, this breaks upgrades v18.2.[01] to newer reef versions or to main. The reason is that monitors will encode v17 with bal_rank_mask (max_xattr_size is not merged yet) and send that to upgraded mgrs (which are upgraded first). The mgr will attempt to decode bal_rank_mask as a uint64_t (max_xattr_size) but fail because an empty (by default) bal_rank_mask is simply encoded as a signed 32-bit integer. Consequently, the mgr will fail decoding with: failed to decode message of type 45 v1: End of buffer [buffer:2] Of course the problem does not stop there, even if the mgr were able to handle this, the monitors/mds/clients would fail in similar fashion. So the only choice left is to fix max_xattr_size to be encoded at ev18. Fortunately, v18.2.2 has not been released nor has any max_xattr_size backport to quincy/pacific been merged. The main downside will be that kernels will wrongly decode ev17 (which is already true for ceph clusters running v18.2.[01]). A follow-up kernel fix will be required. [1] https://tracker.ceph.com/issues/59405 [2] linux.git d93231a6bc8a452323d5fef16cca7107ce483a27 [3] ceph#53340 (comment) Fixes: https://tracker.ceph.com/issues/64440 Signed-off-by: Patrick Donnelly <[email protected]> (cherry picked from commit 78abfea)
Commit 879080a adds the bal_rank_mask with encoded (ev) version 17. This was merged into main Oct 2022 and made it into the reef release normally. Commit f39916e adds the max_xattr_size also with encoded (ev) version 17 but places it before bal_rank_mask. This is problematic as there were no plans to backport 879080a to quincy or pacific so piggybacking on the ev 17 bump would not work and otherwise would require the backports to be done as a set to ensure consistency (including with the kernel client). However, the real issue is that f39916e was not merged until after reef was already cut. This required f39916e to be backported separately in [1] which was not merged until after v18.2.1 (current reef HEAD as of this commit). Ultimately, this means that there are reef versions (v18.2.[01]) in the wild which expect bal_rank_mask to be encoded at ev17 and not (max_xattr_size, bal_rank_mask). Adding to the complications, the kernel client has already merged code [2] expecting max_xattr_size for ev17. It was decided in a github discussion [3] to move bal_rank_mask to ev18 to avoid updating the kernel client which was done in the main branch via e0f1084 and update the reef max_xattr_size backport with the same change (7fefda43). Unfortunately, this breaks upgrades v18.2.[01] to newer reef versions or to main. The reason is that monitors will encode v17 with bal_rank_mask (max_xattr_size is not merged yet) and send that to upgraded mgrs (which are upgraded first). The mgr will attempt to decode bal_rank_mask as a uint64_t (max_xattr_size) but fail because an empty (by default) bal_rank_mask is simply encoded as a signed 32-bit integer. Consequently, the mgr will fail decoding with: failed to decode message of type 45 v1: End of buffer [buffer:2] Of course the problem does not stop there, even if the mgr were able to handle this, the monitors/mds/clients would fail in similar fashion. So the only choice left is to fix max_xattr_size to be encoded at ev18. Fortunately, v18.2.2 has not been released nor has any max_xattr_size backport to quincy/pacific been merged. The main downside will be that kernels will wrongly decode ev17 (which is already true for ceph clusters running v18.2.[01]). A follow-up kernel fix will be required. [1] https://tracker.ceph.com/issues/59405 [2] linux.git d93231a6bc8a452323d5fef16cca7107ce483a27 [3] ceph#53340 (comment) Fixes: https://tracker.ceph.com/issues/64440 Signed-off-by: Patrick Donnelly <[email protected]> (cherry picked from commit 7ca167f)
backport tracker:
backport of #51942
parent tracker: https://tracker.ceph.com/issues/61599
this PR is based on #53339 to avoid conflicts and might need rebase after #53339 is merged
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh