Conversation
|
failure is because there's no CRI-O in the CI to test this with: |
|
/retest |
|
@dashpole @dchen1107 -- this is the follow-up from our discussion in this week's sig-node. i can handle primary review on this. |
|
fyi @sjenning |
|
failure doesn't seem related (?) |
|
#1742 builds without error. I havent seen this before, so it is likely something with this PR. |
|
Looks similiar to #1481 again |
|
/retest |
|
Updated to make calls on the CRI-O socket |
c0cfa4b to
e70a9de
Compare
container/crio/client.go
Outdated
| ) | ||
|
|
||
| const ( | ||
| crioSocket = "/var/run/crio.sock" |
There was a problem hiding this comment.
Can you make this public? I would want to reference it in kubelet
container/crio/factory.go
Outdated
| // The namespace under which crio aliases are unique. | ||
| const CrioNamespace = "crio" | ||
|
|
||
| // Regexp that identifies docker cgroups, containers started with |
There was a problem hiding this comment.
Nit from my port. s/docker/cri-o
container/crio/factory.go
Outdated
|
|
||
| // crio handles all containers under /crio | ||
| func (self *crioFactory) CanHandleAndAccept(name string) (bool, bool, error) { | ||
| glog.Infof("CRIO CAN HANDLE AND ACCEPT: %v", name) |
container/crio/factory.go
Outdated
| if !strings.HasPrefix(path.Base(name), CrioNamespace) { | ||
| return false, false, nil | ||
| } | ||
| // if the container is not associated with docker, we can't handle it or accept it. |
container/crio/factory.go
Outdated
| return false, false, nil | ||
| } | ||
| glog.Infof("CRIO HANDLE AND ACCEPT: %v", name) | ||
| // TODO should we call equivalent of a crio info to be sure its really ours |
There was a problem hiding this comment.
I know I wrote this comment. I would prefer we do not do this for perf
container/crio/handler.go
Outdated
| // Manager of this container's cgroups. | ||
| cgroupManager cgroups.Manager | ||
|
|
||
| // the docker storage driver |
manager/manager.go
Outdated
| }, | ||
| RktPath: rktPath, | ||
| RktPath: rktPath, | ||
| CrioPath: crioInfo.StorageRoot, |
There was a problem hiding this comment.
I think we should have this be a struct similar to docker
559cbac to
46c9379
Compare
|
@derekwaynecarr addressed your comments |
cde0f22 to
3c40183
Compare
|
removing WIP label, I think it's fully ready for review (added some unit tests also):
kubectl get --raw /api/v1/nodes/127.0.0.1/proxy/stats/summary |
0da90e4 to
fe9ddf3
Compare
|
pretty sure tests failure is unrelated. Added some unit tests also. |
|
/test pull-cadvisor-e2e |
|
@runcom -- looks like a gofmt error on handler_test.go i think. |
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
@derekwaynecarr fixed |
| // No need for compression in local communications. | ||
| tr.DisableCompression = true | ||
| tr.Dial = func(_, _ string) (net.Conn, error) { | ||
| return net.DialTimeout(proto, addr, 32*time.Second) |
There was a problem hiding this comment.
can this be shorter? rkt is 2s
There was a problem hiding this comment.
docker has the exact same value when using socket connection
There was a problem hiding this comment.
ok, thanks for the detail.
|
@runcom - just the one question on timeout looking rather high. once addressed, this is LGTM |
|
LGTM |
Automatic merge from submit-queue (batch tested with PRs 51728, 49202) Enable CRI-O stats from cAdvisor **What this PR does / why we need it**: cAdvisor may support multiple container runtimes (docker, rkt, cri-o, systemd, etc.) As long as the kubelet continues to run cAdvisor, runtimes with native cAdvisor support may not want to run multiple monitoring agents to avoid performance regression in production. Pending kubelet running a more light-weight monitoring solution, this PR allows remote runtimes to have their stats pulled from cAdvisor when cAdvisor is registered stats provider by introspection of the runtime endpoint. See issue kubernetes#51798 **Special notes for your reviewer**: cAdvisor will be bumped to pick up google/cadvisor#1741 At that time, CRI-O will support fetching stats from cAdvisor. **Release note**: ```release-note NONE ```
Automatic merge from submit-queue cadvisor/runc updates Support CRI-O: google/cadvisor#1741 Fix memory stats: google/cadvisor#1728 opencontainers/runc#1378 @derekwaynecarr
This patch adds native support for the CRI-O runtime to cadvisor.
Tested by integrating it with kubernetes and verified the necessary stats are now returned properly.
/cc @derekwaynecarr @mrunalp
Signed-off-by: Antonio Murdaca runcom@redhat.com