gravitl / netmaker

Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.
https://netmaker.io
Other
9.37k stars 544 forks source link

[Bug]: netclient container reports log file not existed #2814

Closed liuweiGL closed 4 months ago

liuweiGL commented 7 months ago

Contact Details

No response

What happened?

I use this pod: https://github.com/gravitl/netmaker/blob/master/k8s/client/netclient.yaml Then the container logs:

Service `hwdrivers' needs non existent service `dev'
2024-02-05T23:16:00.331298516+08:00 Service `machine-id' needs non existent service `dev'
2024-02-05T23:16:00.331835041+08:00  * Caching service dependencies ... [ ok ]
2024-02-05T23:16:00.333630090+08:00 Runlevel: sysinit
2024-02-05T23:16:00.333634800+08:00 Dynamic Runlevel: hotplugged
2024-02-05T23:16:00.333636371+08:00 Dynamic Runlevel: needed/wanted
2024-02-05T23:16:00.333637812+08:00 Dynamic Runlevel: manual
2024-02-05T23:16:00.333802819+08:00 [netclient] starting netclient daemon
2024-02-05T23:16:00.342104520+08:00 [netclient] 2024-02-05 15:16:00 setting OS 
2024-02-05T23:16:00.342639725+08:00 [netclient] 2024-02-05 15:16:00 setting version 
2024-02-05T23:16:00.342645461+08:00 [netclient] 2024-02-05 15:16:00 setting netclient hostid 
2024-02-05T23:16:00.342647460+08:00 [netclient] 2024-02-05 15:16:00 setting name 
2024-02-05T23:16:00.342652521+08:00 [netclient] 2024-02-05 15:16:00 setting macAddress 
2024-02-05T23:16:00.342939301+08:00 [netclient] 2024-02-05 15:16:00 setting wireguard keys 
2024-02-05T23:16:00.342991537+08:00 [netclient] 2024-02-05 15:16:00 setting wireguard interface 
2024-02-05T23:16:00.342993227+08:00 [netclient] 2024-02-05 15:16:00 setting listenport 
2024-02-05T23:16:00.343041172+08:00 [netclient] 2024-02-05 15:16:00 setting MTU 
2024-02-05T23:16:00.343042783+08:00 [netclient] 2024-02-05 15:16:00 setting traffic keys 
[netclient] disabling gui server
2024-02-05T23:16:02.989838397+08:00 [netclient] 2024-02-05 15:16:02 restarting netclient daemon 
2024-02-05T23:16:03.069582039+08:00 [netclient] joining network
2024-02-05T23:16:03.069681221+08:00 [netclient] Starting netclient daemon
2024-02-05T23:16:05.684026292+08:00 setting host fields
2024-02-05T23:16:05.943483883+08:00 registered with server netmaker.eastcoal.club
2024-02-05T23:16:05.945010211+08:00 tail: can't open '/var/log/netclient.log': No such file or directory
2024-02-05T23:16:05.945016486+08:00 tail: no files

Version

v0.22.0

What OS are you using?

Linux

Relevant log output

No response

Contributing guidelines

AhmedMagdiShera commented 6 months ago

got the same issue, any solution?

brunobriante commented 6 months ago

It's not a real solution but as a workaround you can mount that file inside the container in something like a emptyDir, hostPath or use a initContainer to create it beforehand. I'm currently using the hostPath workaround and the container stopped crashing after that.