yangwwei commented on a change in pull request #72: Add ability to support 3rd
party K8s operator integration
URL:
https://github.com/apache/incubator-yunikorn-k8shim/pull/72#discussion_r382773150
##########
File path: pkg/cache/context_recovery.go
##########
@@ -34,19 +36,12 @@ import (
"github.com/apache/incubator-yunikorn-k8shim/pkg/log"
)
-func (ctx *Context) WaitForRecovery(maxTimeout time.Duration) error {
+func (ctx *Context) WaitForRecovery(recoverableApps []interfaces.Recoverable,
maxTimeout time.Duration) error {
// Currently, disable recovery when testing in a mocked cluster,
// because mock pod/node lister is not easy. We do have unit tests for
- // waitForAppRecovery/waitForNodeRecovery separately.
- if !ctx.testMode {
- // step 1: recover apps
- if err := ctx.waitForAppRecovery(ctx.podInformer.Lister(),
maxTimeout); err != nil {
- log.Logger.Error("app recovery failed", zap.Error(err))
- return err
- }
-
- // step 2: recover nodes
- if err := ctx.waitForNodeRecovery(ctx.nodeInformer.Lister(),
maxTimeout); err != nil {
+ // waitForAppRecovery/recover separately.
+ if !ctx.apiProvider.IsTestingMode() {
+ if err := ctx.recover(recoverableApps, maxTimeout); err != nil {
log.Logger.Error("nodes recovery failed",
zap.Error(err))
return err
Review comment:
After the split, we will do app recovery in appmgmt pkg, and nodes recovery
in cache pkg.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]