From 7b3f6848b5f5caa277602a8f7f565671b1b56816 Mon Sep 17 00:00:00 2001 From: Yuji Ito Date: Sat, 4 Feb 2023 22:32:41 +0900 Subject: [PATCH] wip Signed-off-by: Yuji Ito --- agent/core/pod.go | 1 - agent/core/system.go | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/agent/core/pod.go b/agent/core/pod.go index fe9d78b..d3caf4f 100644 --- a/agent/core/pod.go +++ b/agent/core/pod.go @@ -22,7 +22,6 @@ func NewPod(uuid string) *PodImpl { func (p *PodImpl) Update(ctx context.Context, colonio colonio.Colonio) (bool, error) { log.Println("update", p.uuid) key := string(ResourceTypePod) + "/" + p.uuid - // TODO colonio has a bug ? that the `Get`` method is blocked when it used in cb? v, err := colonio.KvsGet(key) if err != nil { return false, err diff --git a/agent/core/system.go b/agent/core/system.go index 50a5034..b22c66b 100644 --- a/agent/core/system.go +++ b/agent/core/system.go @@ -103,7 +103,7 @@ func (sys *System) dealResources() error { } resourceEntry := strings.Split(key, "/") if len(resourceEntry) != 2 { - return fmt.Errorf("local value key is not supported format", key) + return fmt.Errorf("local value key is not supported format:%s", key) } resources = append(resources, struct { resourceType ResourceType @@ -137,7 +137,7 @@ func (sys *System) dealResource(t ResourceType, js string) error { } default: - log.Printf("debug unhandled resource %s", string(t)) + log.Printf("debug unhandled resource:%s", string(t)) } return nil } @@ -153,7 +153,7 @@ func (sys *System) schedulePod(pod *Pod) error { return err default: - return fmt.Errorf("Unsupported scheduling policy:%s", pod.Spec.Scheduler.Type) + return fmt.Errorf("unsupported scheduling policy:%s", pod.Spec.Scheduler.Type) } }