You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrate: handle NotFound via resource matching and during conflicts
This change fixes two issues with the migrate command:
1. It updates isNotFoundForInfo to compare the error's kind to the
info's resource as well as its kind. The server error's use the
resource value in places where the kind should be used. We simply
accept both now.
2. It updates DefaultRetriable to not fail on conflict errors if
they were caused by the deletion of the given resource.
The following shell based tests were used to stress the edge cases
that this change fixes. The migrate command will readily fail in
these tests without the fixes from this change.
In one shell we continuously create service accounts with random
names as fast as possible. The resource type is not relevant.
N=8
while true; do
((i=i%N)); ((i++==0)) && wait
oc create serviceaccount $((1 + RANDOM % 10000000)) &
done
In a second shell we try to continuously delete all service
accounts:
while true; do
oc delete sa --all
done
In a third shell we try to continuously migrate service accounts:
while true; do
oc adm migrate storage --include='serviceaccount' --confirm
done
Bug 1537751
Signed-off-by: Monis Khan <[email protected]>
0 commit comments