mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 03:03:59 +00:00
Add warning log
This commit is contained in:
parent
c389897017
commit
287b9e8978
@ -23,6 +23,8 @@ import (
|
|||||||
"k8s.io/kubernetes/pkg/api"
|
"k8s.io/kubernetes/pkg/api"
|
||||||
"k8s.io/kubernetes/pkg/registry/service/allocator"
|
"k8s.io/kubernetes/pkg/registry/service/allocator"
|
||||||
"k8s.io/kubernetes/pkg/util"
|
"k8s.io/kubernetes/pkg/util"
|
||||||
|
|
||||||
|
"github.com/golang/glog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Interface manages the allocation of ports out of a range. Interface
|
// Interface manages the allocation of ports out of a range. Interface
|
||||||
@ -112,7 +114,7 @@ func (r *PortAllocator) AllocateNext() (int, error) {
|
|||||||
func (r *PortAllocator) Release(port int) error {
|
func (r *PortAllocator) Release(port int) error {
|
||||||
ok, offset := r.contains(port)
|
ok, offset := r.contains(port)
|
||||||
if !ok {
|
if !ok {
|
||||||
// TODO: log a warning
|
glog.Warningf("port is not in the range when release it. port: %v", port)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user