New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP][don't merge] Dev:1st impl for integration test #275
[WIP][don't merge] Dev:1st impl for integration test #275
Conversation
@marceloamaral , if I am correct, in integration test, we will deploy kepler with port 9102 right? could you please help with error https://github.com/sustainable-computing-io/kepler/actions/runs/3174554723/jobs/5171489975#step:8:28 |
Sorry, for asking for help on this WIP pr. |
4b22ac7
to
0dcd6a1
Compare
@@ -104,8 +104,12 @@ func (c *Collector) resetCurrValue() { | |||
|
|||
// resetBPFTables reset BPF module's tables | |||
func (c *Collector) resetBPFTables() { | |||
c.modules.Table.DeleteAll() | |||
c.modules.TimeTable.DeleteAll() | |||
if c.modules != nil && c.modules.Table != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rootfs , do you know where we init modules and tables?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the tables are auto filled; the delete functions remove existing table entries, the ebpf program will fill the tables again.
@@ -0,0 +1,94 @@ | |||
//go:build linux | |||
// +build linux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rootfs ,those path are linux specific, so we have to split at here for different device/operator system?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marceloamaral any idea? maybe a stub here too?
@@ -66,7 +62,7 @@ var ( | |||
) | |||
|
|||
func AttachBPFAssets() (*BpfModuleTables, error) { | |||
return nil, fmt.Errorf("no bcc build tag") | |||
return nil, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rootfs , here is the pre defined error for without bcc tag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. This could make a case for a new bcc stub that emit mock data
0e841c2
to
3fe3c52
Compare
@rootfs , @marceloamaral , it seems we got error at https://github.com/sustainable-computing-io/kepler/actions/runs/3180212481/jobs/5183521776#step:7:17 could you please advise? the network port forwards for pod failed |
Could |
I give a try by a new commit, but seems not the root cause. |
@rootfs , I am now try to force KIND use IPv4 to avoid: |
Signed-off-by: Sam Yuan <yy19902439@126.com>
Signed-off-by: Sam Yuan <yy19902439@126.com>
Signed-off-by: Sam Yuan <yy19902439@126.com>
28d17b4
to
40babef
Compare
Signed-off-by: Sam Yuan <yy19902439@126.com>
@BenTheElder Thank you Ben for the help! The application should be running and listening to the port (in this Service). |
port-forward forwards to pods (not services), it will attempt to open a connection from within the pod's namespace, the tunnel looks roughly like: kubectl <=> API server <=> kubelet <=> CRI <=> socket opened within target pod. IIRC kubernetes will always do this on My KIND co-maintainer aojea previously patched this, because it used to literally use I'm noticing that the pod seems to be configured in hostNetwork and looks like the process should be bound to 0.0.0.0 ... I'm not sure if we / Kubernetes have tests for hostNetwork port forward, it's possible that's broken in KIND (or containerd), otherwise unless the app isn't listening yet or the wrong pod is selected, I'm at a loss ... |
Good info @BenTheElder! So based on your feedback, a more appropriate CI deployment is to use pod network. @SamYuan1990 can you give that a try? Thanks! |
well, I also found some thing on github runner. also kubernetes/kubectl#1169 from Jan reported at kubectl as a short summary, we even make the case more complex as we use docker and ref to kubernetes-sigs/kind#2953 (comment)
and I suppose we need to make our life easier, by reduce components on this long tunnel. |
Instead of kubectl port forward, you could try configuring a port forward in kind and use a matching nodePort, similar to https://kind.sigs.k8s.io/docs/user/ingress/
Something like: kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- extraPortMappings:
- containerPort: 30001
hostPort: 30001
protocol: TCP Or actually since the pod appears(?) to be in hostNetwork and you have a single node: kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- extraPortMappings:
- containerPort: 9102
hostPort: 9102 I.E. adds
We run some of our CI in GitHub actions and lack of IPv6 is not an issue, the ipv6 port forward connect is a red-herring, it's portforward is trying both ipv4 and ipv6 and both are failing. You can use kind / kubernetes without ipv6, if anything optional ipv6 in KIND involved a lot of fixing tests and Kubernetes, and then again in conjunction with the folks working on dualstack. |
Signed-off-by: Sam Yuan <yy19902439@126.com>
let me try |
Signed-off-by: Sam Yuan <yy19902439@126.com>
Signed-off-by: Sam Yuan <yy19902439@126.com>
Signed-off-by: Sam Yuan <yy19902439@126.com>
some updates:
|
nodePort can only be set on a service of type NodePort. shouldn't be related to the node level port mappings. I think you can skip the service though and just map 9102 from the host to the kind node since the pod appears to be in hostNetwork. |
I've been using port-forward with no problem on a kind cluster. The command Maybe we should sleep and then check for failed containers.... |
@SamYuan1990 now just a couple of lint error, ready to merge |
no no no.... I am going to bed... and don't merge it for now. please take a look at #283 1st. |
close and move to #292 without issue. thanks guys. |
Details for this PR
e2e folder with end to end testing, will run with two models, base on environment
kepler_address
.Signed-off-by: Sam Yuan yy19902439@126.com