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
So I added some extra logs to see the phase progression from start to end of reconcile in one place this was happening.
# [RECONCILE 1] # The phase "CreateRsyncClientPods" is started. This reconcile will go as planned # and we'll successfully write the DVM back to the APIserver at the end of the reconcile.
{"level":"info","ts":1616708632169,"logger":"directvolume|gd7rs","msg":"START Reconciling DVM",
"preReconcilePhase":"CreateRsyncClientPods","dvmStatus":{"conditions":[{"type":"Running","status":"True","reason":"CreateRsyncClientPods","category":"Advisory","message":"Step: 19/23","lastTransitionTime":"2021-03-25T21:43:52Z"},{"type":"Ready","status":"True","category":"Required","message":"Direct migration is ready","lastTransitionTime":"2021-03-25T21:43:10Z"}],"observedDigest":"8c3663504c0ba31ffed2cb1a75c80afb1072a7b7ecb10186a9d34dc72c05e640","startTimestamp":"2021-03-25T21:43:10Z","phaseDescription":"Creating Rsync client pods","phase":"CreateRsyncClientPods","itinerary":"VolumeMigration"}}
{"level":"info","ts":1616708632680,"logger":"directvolume|gd7rs","msg":"[RUN] (Step 19/23) Creating Rsync client pods","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708633268,"logger":"directvolume|gd7rs","msg":"Getting image for Rsync client Pods that will be created on source MigCluster","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708633855,"logger":"directvolume|gd7rs","msg":"Using image [quay.io/konveyor/rsync-transfer:latest] for Rsync client Pods","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708633855,"logger":"directvolume|gd7rs","msg":"Getting [NS => PVCWithSecurityContext] mappings for PVCs to be migrated","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708634348,"logger":"directvolume|gd7rs","msg":"Getting Rsync password for Rsync client Pods","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708634348,"logger":"directvolume|gd7rs","msg":"Getting Rsync Password from Secret [/] on host cluster","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708634348,"logger":"directvolume|gd7rs","msg":"Getting [PVC => NodeName] mapping for PVCs to be migrated","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708634956,"logger":"directvolume|gd7rs","msg":"Getting limits and requests for Rsync client Pods","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708634970,"logger":"directvolume|gd7rs","msg":"Rsync client Pods will be created with privileged=[false]","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708634988,"logger":"directvolume|gd7rs","msg":"Container [rsync-client] will use Rsync command [rsync --bwlimit=0 --info=COPY2,DEL2,REMOVE2,SKIP2,FLIST2,PROGRESS2,STATS2 --human-readable --port 2222 --log-file /dev/stdout /mnt/rocket-chat/rocketchat-data-claim/ rsync://[email protected]/rocketchat-data-claim]","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708634988,"logger":"directvolume|gd7rs","msg":"Creating Rsync client Pod [rocket-chat/directvolumemigration-rsync-transfer-rocketchat-data-claim] on source cluster.","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708635026,"logger":"directvolume|gd7rs","msg":"Rsync client pod created","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods","name":"directvolumemigration-rsync-transfer-rocketchat-data-claim","namespace":"rocket-chat"}
# We arrive at the end of the reconcile, the phase is complete and # a DVM with next phase=WaitForRsyncClientPodsCompleted is successfully posted back to the APIserver
{"level":"info","ts":1616708635026,"logger":"directvolume|gd7rs","msg":"Phase completed","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods","phaseElapsed":3.026426}
{"level":"info","ts":1616708635050,"logger":"directvolume|gd7rs","msg":"EXIT: SUCCESS - DVM got to end of reconcile","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs",
"postReconcilePhase":"WaitForRsyncClientPodsCompleted","dvmStatus":{"conditions":[{"type":"Running","status":"True","reason":"WaitForRsyncClientPodsCompleted","category":"Advisory","message":"Step: 20/23","lastTransitionTime":"2021-03-25T21:43:55Z"},{"type":"Ready","status":"True","category":"Required","message":"Direct migration is ready","lastTransitionTime":"2021-03-25T21:43:10Z"}],"observedDigest":"8c3663504c0ba31ffed2cb1a75c80afb1072a7b7ecb10186a9d34dc72c05e640","startTimestamp":"2021-03-25T21:43:10Z","phaseDescription":"Waiting for the Rsync client pods to be completed","phase":"WaitForRsyncClientPodsCompleted","itinerary":"VolumeMigration"}}
-----------------------# [RECONCILE 2]# Here's where things get weird. The next reconcile starts out with # phase=CreateRsyncClientPods, so we seem to be behind by one generation!
{"level":"info","ts":1616708635050,"logger":"directvolume|x9hjl","msg":"START Reconciling DVM",
"preReconcilePhase":"CreateRsyncClientPods","dvmStatus":{"conditions":[{"type":"Running","status":"True","reason":"CreateRsyncClientPods","category":"Advisory","message":"Step: 19/23","lastTransitionTime":"2021-03-25T21:43:52Z"},{"type":"Ready","status":"True","category":"Required","message":"Direct migration is ready","lastTransitionTime":"2021-03-25T21:43:10Z"}],"observedDigest":"8c3663504c0ba31ffed2cb1a75c80afb1072a7b7ecb10186a9d34dc72c05e640","startTimestamp":"2021-03-25T21:43:10Z","phaseDescription":"Creating Rsync client pods","phase":"CreateRsyncClientPods","itinerary":"VolumeMigration"}}
{"level":"info","ts":1616708635567,"logger":"directvolume|x9hjl","msg":"[RUN] (Step 19/23) Creating Rsync client pods","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708636050,"logger":"directvolume|x9hjl","msg":"Getting image for Rsync client Pods that will be created on source MigCluster","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708636577,"logger":"directvolume|x9hjl","msg":"Using image [quay.io/konveyor/rsync-transfer:latest] for Rsync client Pods","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708636577,"logger":"directvolume|x9hjl","msg":"Getting [NS => PVCWithSecurityContext] mappings for PVCs to be migrated","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708637157,"logger":"directvolume|x9hjl","msg":"Getting Rsync password for Rsync client Pods","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708637157,"logger":"directvolume|x9hjl","msg":"Getting Rsync Password from Secret [/] on host cluster","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708637157,"logger":"directvolume|x9hjl","msg":"Getting [PVC => NodeName] mapping for PVCs to be migrated","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708637679,"logger":"directvolume|x9hjl","msg":"Getting limits and requests for Rsync client Pods","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708637690,"logger":"directvolume|x9hjl","msg":"Rsync client Pods will be created with privileged=[false]","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708637700,"logger":"directvolume|x9hjl","msg":"Container [rsync-client] will use Rsync command [rsync --bwlimit=0 --info=COPY2,DEL2,REMOVE2,SKIP2,FLIST2,PROGRESS2,STATS2 --human-readable --port 2222 --log-file /dev/stdout /mnt/rocket-chat/rocketchat-data-claim/ rsync://[email protected]/rocketchat-data-claim]","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708637700,"logger":"directvolume|x9hjl","msg":"Creating Rsync client Pod [rocket-chat/directvolumemigration-rsync-transfer-rocketchat-data-claim] on source cluster.","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods"}
{"level":"info","ts":1616708637719,"logger":"directvolume|x9hjl","msg":"Rsync client pod already exists on source","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods","namespace":"rocket-chat"}
{"level":"info","ts":1616708637719,"logger":"directvolume|x9hjl","msg":"Rsync client pod created","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods","name":"directvolumemigration-rsync-transfer-rocketchat-data-claim","namespace":"rocket-chat"}
# We arrive at the end of the reconcile, have re-done everything in the phase needlessly#, but unfortunately we hit a failure updating our DVM because the DVM we started the # reconcile with was a generation behind the APIserver (laggy cache?)
{"level":"info","ts":1616708637719,"logger":"directvolume|x9hjl","msg":"Phase completed","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"CreateRsyncClientPods","phaseElapsed":5.718631}
{"level":"info","ts":1616708637741,"logger":"directvolume|x9hjl","msg":"EXIT: DVM is failed to update","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs",
"postReconcilePhase":"WaitForRsyncClientPodsCompleted","dvmStatus":{"conditions":[{"type":"Running","status":"True","reason":"WaitForRsyncClientPodsCompleted","category":"Advisory","message":"Step: 20/23","lastTransitionTime":"2021-03-25T21:43:57Z"},{"type":"Ready","status":"True","category":"Required","message":"Direct migration is ready","lastTransitionTime":"2021-03-25T21:43:10Z"}],"observedDigest":"8c3663504c0ba31ffed2cb1a75c80afb1072a7b7ecb10186a9d34dc72c05e640","startTimestamp":"2021-03-25T21:43:10Z","phaseDescription":"Waiting for the Rsync client pods to be completed","phase":"WaitForRsyncClientPodsCompleted","itinerary":"VolumeMigration"}}
-----------------------# [RECONCILE 3]# Here the cached client finally gives us the DVM that was# pushed back to the APIserver at the end of Reconcile #1, and we're on to the next phase.
{"level":"info","ts":1616708637741,"logger":"directvolume|p2w7j","msg":"START Reconciling DVM",
"preReconcilePhase":"WaitForRsyncClientPodsCompleted","dvmStatus":{"conditions":[{"type":"Running","status":"True","reason":"WaitForRsyncClientPodsCompleted","category":"Advisory","message":"Step: 20/23","lastTransitionTime":"2021-03-25T21:43:55Z"},{"type":"Ready","status":"True","category":"Required","message":"Direct migration is ready","lastTransitionTime":"2021-03-25T21:43:10Z"}],"observedDigest":"8c3663504c0ba31ffed2cb1a75c80afb1072a7b7ecb10186a9d34dc72c05e640","startTimestamp":"2021-03-25T21:43:10Z","phaseDescription":"Waiting for the Rsync client pods to be completed","phase":"WaitForRsyncClientPodsCompleted","itinerary":"VolumeMigration"}}
{"level":"info","ts":1616708638232,"logger":"directvolume|p2w7j","msg":"[RUN] (Step 20/23) Waiting for the Rsync client pods to be completed","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs","Phase":"WaitForRsyncClientPodsCompleted"}
{"level":"info","ts":1616708638262,"logger":"directvolume|p2w7j","msg":"EXIT: SUCCESS - DVM got to end of reconcile","DVM":"f6c20e60-8db2-11eb-aa03-d79309d81160-lkdvs",
"postReconcilePhase":"WaitForRsyncClientPodsCompleted","dvmStatus":{"conditions":[{"type":"Running","status":"True","reason":"WaitForRsyncClientPodsCompleted","category":"Advisory","message":"Step: 20/23","lastTransitionTime":"2021-03-25T21:43:55Z"},{"type":"Ready","status":"True","category":"Required","message":"Direct migration is ready","lastTransitionTime":"2021-03-25T21:43:10Z"}],"observedDigest":"8c3663504c0ba31ffed2cb1a75c80afb1072a7b7ecb10186a9d34dc72c05e640","startTimestamp":"2021-03-25T21:43:10Z","phaseDescription":"Waiting for the Rsync client pods to be completed","phase":"WaitForRsyncClientPodsCompleted","itinerary":"VolumeMigration"}}
I am wondering if this is related to FastReQ interval used in DVM possibly being shorter than in MigMigration controller. We haven't merged #1013 yet but I actually think it might fix it because it'll switch us from using immediate requeues to FastReQs.
The text was updated successfully, but these errors were encountered:
djwhatle
changed the title
DVM and possibly other controllers are repeating some phases twice
Controllers sometimes repeat the same Phase twice even after hitting t.next() and writing to APIserver successfully
Mar 25, 2021
@pranavgaikwad@alaypatel07@shawn-hurley
Ok, I've provably demonstrated that the cached client is giving us resources a generation behind the APIserver.
This makes sense because the cached client has updates pushed to it.
Generation goes from 8 -> 9 -> 8
# [Reconcile 1] Update is written and generation is bumped
{"level":"info","ts":1616770743729,"logger":"directvolume|92xjm","msg":">>> START >>>","DVM":"a6f41860-8e43-11eb-b81c-f9ed484af5e5-pbxqp",
"generation":8,"prePhase":"CreateDestinationPVCs"}
{"level":"info","ts":1616770745852,"logger":"directvolume|92xjm","msg":"<<< UPDATE [SUCCESS] <<<","DVM":"a6f41860-8e43-11eb-b81c-f9ed484af5e5-pbxqp",
"generation":9,"postPhase":"DestinationPVCsCreated"}
# [Reconcile 2] Cached client hasn't been pushed the update to DVM that was made at end of last reconcile
{"level":"info","ts":1616770745852,"logger":"directvolume|29grx","msg":">>> START >>>","DVM":"a6f41860-8e43-11eb-b81c-f9ed484af5e5-pbxqp",
"generation":8,"prePhase":"CreateDestinationPVCs"}
Describe the bug
cc @shawn-hurley @alaypatel07 @pranavgaikwad I thought you guys might be interested in this phenomena I noticed.
Background
I was running some tests with new phase timing code and noticed a few phases were regularly showing up double or triple.
So I added some extra logs to see the phase progression from start to end of reconcile in one place this was happening.
I am wondering if this is related to FastReQ interval used in DVM possibly being shorter than in MigMigration controller. We haven't merged #1013 yet but I actually think it might fix it because it'll switch us from using immediate requeues to FastReQs.
The text was updated successfully, but these errors were encountered: