kmesh-net / kmesh

High Performance ServiceMesh Data Plane Based on Programmable Kernel
https://kmesh.net
Apache License 2.0
464 stars 70 forks source link

Fix missing default oncn-mda default startup file #720

Open jiayoukun opened 3 months ago

jiayoukun commented 3 months ago

In the new dockerfile, you are missing the default startup file /etc/oncn-mda/oncn-mda.conf. @hzxuzhonghu

kmesh-bot commented 3 months ago

Welcome @jiayoukun! It looks like this is your first PR to kmesh-net/kmesh 🎉

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 51.77%. Comparing base (89cdacd) to head (220f44a). Report is 18 commits behind head on main.

see 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 89cdacd...220f44a. Read the comment docs.

hzxuzhonghu commented 3 months ago

/assign @lec-bit

jiayoukun commented 3 months ago

请查看https://github.com/kmesh-net/kmesh/blob/main/hack/utils.sh#L42-L58

这列出了我们之前建造的

COPY out/$arch/*so* /usr/lib64/
COPY out/$arch/*.o /usr/share/oncn-mda/
COPY out/$arch/oncn-mda.conf /etc/oncn-mda/
COPY out/$arch/kmesh-daemon /usr/bin/
COPY out/$arch/kmesh-cni /usr/bin/
COPY out/$arch/mdacore /usr/bin/
COPY build/docker/start_kmesh.sh /kmesh
COPY out/$arch/ko /kmesh

所以我们应该

COPY --from=builder /kmesh/oncn-mda/build/ebpf_src/CMakeFiles/sock_redirect.dir/sock_redirect.c.o /usr/share/oncn-mda/
 COPY --from=builder /kmesh/oncn-mda/build/ebpf_src/CMakeFiles/sock_ops.dir/sock_ops.c.o /usr/share/oncn-mda/

复制 --from=builder /kmesh/oncn-mda/etc/oncn-mda.conf /etc/oncn-mda/

It looks like using COPY --from=builder /kmesh/out/*.o /usr/share/oncn-mda/ It's the same, but I'm with you on that.

kmesh-bot commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kmesh-net/kmesh/blob/main/OWNERS)~~ [hzxuzhonghu] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
hzxuzhonghu commented 3 months ago

seems this is not needed now

jiayoukun commented 3 months ago

@hzxuzhonghu There are also the two issues I mentioned earlier in the commit: Reporting errors:time="2024-08-19T03:28:28Z" level=error msg="the config you input not unique to root, please modify permission of the config enable serviceMesh accelerating failed! " subsys=pkg/bpf

Modify the source of the oncn-mda.conf file to be: /etc/oncn-mda/oncn-mda.conf, since it was set to "chmod 600 /etc/oncn-mda/oncn-mda.conf" in build.sh.

Change the name of the file to official docs: "docker build --build-arg arch=amd64 -f build/docker/kmesh.dockerfile -t $image_name ."

hzxuzhonghu commented 3 months ago

@weli-l @lec-bit Seems with the recent pr, i guess this is not needed

jiayoukun commented 3 months ago

@weli-l @lec-bit Seems with the recent pr, i guess this is not needed

Ok, you can try the latest version of mda, I just finished testing it and it wasn't fixed.

hzxuzhonghu commented 3 months ago

BTW, there is a conflict please rebase

jiayoukun commented 3 months ago

BTW, there is a conflict please rebase

fix-pr