-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix discard job #74
Merged
Merged
Fix discard job #74
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ushitora-anqou
force-pushed
the
fix-discard-job
branch
7 times, most recently
from
December 6, 2024 00:48
440f0dd
to
36afb28
Compare
…dary This commit ensures that sync-mode annotation is correctly set before discard and import Jobs are created. Currently, mantle-controller does NOT wait for a discard Job to finish before an import Job is created, because an empty sync-mode passes this if condition: https://github.com/cybozu-go/mantle/blob/fc095a2c6c9944faf2889aad703ee39e41ccc872/internal/controller/mantlebackup_controller.go#L1532-L1534 This behaviour isn't what we expect. This commit fixes this problem. Signed-off-by: Ryotaro Banno <ryotaro.banno@gmail.com>
This commit sets ImagePullPolicy to discard Jobs. Without this setting, this field is set to Always, and it breaks our e2e tests, because there's no "controller:latest" image on the Internet. Signed-off-by: Ryotaro Banno <ryotaro.banno@gmail.com>
…VolumeReconciler `getCephClusterIDFromSCName` works correctly only for storage class names provisioned by Rook/Ceph. However, the PVs requested to PersistentVolumeReconciler aren't necessarily provisioned by Rook/Ceph. This commit resolves the problem above by checking that the PV has the correct finalizer before calling `getCephClusterIDFromSCName`. Signed-off-by: Ryotaro Banno <ryotaro.banno@gmail.com>
In CreateOrUpdateMantleBackup rpc, we first need to create (or update) a MantleBackup and then update its status. This "update-after-create" process is likely to fail due to "the object has been modified" error, unless the cache for kubeapi refreshes quickly after the creation. This commit fixes this problem by using Patch instead of Update for the status. Signed-off-by: Ryotaro Banno <ryotaro.banno@gmail.com>
According to some tries, the current timeout 5m is too short to wait for SyncToRemote to be true in the e2e test, probably due to the exponential backoff of `Requeue: true`. This commit lengthens its value to 10m to resolve this problem in an ad hoc way. A fundamental resolution should come in another PR. Signed-off-by: Ryotaro Banno <ryotaro.banno@gmail.com>
ushitora-anqou
force-pushed
the
fix-discard-job
branch
from
December 6, 2024 01:16
32d19ac
to
38fbc44
Compare
Signed-off-by: Ryotaro Banno <ryotaro.banno@gmail.com>
satoru-takeuchi
approved these changes
Dec 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following commits:
ImagePullPolicy
to discard Jobs. Without this setting, this field is set toAlways
, and it breaks our e2e tests, because there's nocontroller:latest
image on the Internet.getCephClusterIDFromSCName
works correctly only for storage class names provisioned by Rook/Ceph. However, the PVs requested to PersistentVolumeReconciler aren't necessarily provisioned by Rook/Ceph. This commit fixes this problem by checking that the PV has the correct finalizer before callinggetCephClusterIDFromSCName
.CreateOrUpdateMantleBackup
rpc, we first need to create (or update) a MantleBackup and then update its status. This "update-after-create" process is likely to fail due to "the object has been modified" error, unless the cache for kubeapi refreshes quickly after the creation. This commit fixes this problem by using Patch instead of Update for the status.Requeue: true
. This commit lengthens its value to 10m to resolve this problem in an ad hoc way. A fundamental resolution should come in another PR.