-
Notifications
You must be signed in to change notification settings - Fork 191
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
Recreate the tmp directory when unik daemon deploy a new listener on vSphere #141
Conversation
@@ -90,7 +90,7 @@ func main() { | |||
log.Printf("ERROR: broadcast-ip: %v; failed writing to broadcast udp socket: "+err.Error(), BROADCAST_IPv4) | |||
return | |||
} | |||
time.Sleep(1000 * time.Millisecond) | |||
time.Sleep(5000 * time.Millisecond) |
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.
what's the purpose for this change?
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 listener was using 100% of CPU and stop functioning properly after a while (something like a day). I solved it by extending the sleep time, which also mean that it send less broadcast on the network. The server I was testing on was a bit old. I will test this again on a recent server with a better CPU and I will let you know the result.
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 did the test again on a Xeon E5 1650 v2 3.50 GHz. With the sleep set to 1 second, the listener is using 3.25 GHz. If the sleep is set to 5 seconds the CPU usage drop to 770 MHz.
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've noticed listener spiking CPU on virtualbox
too. Something seems a bit fishy 🤔
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.
probably a rumprun issue...
@@ -50,7 +51,7 @@ func NewVsphereProvier(config config.Vsphere) (*VsphereProvider, error) { | |||
p.getClient().Mkdir("unik/vsphere/volumes") | |||
|
|||
if err := p.deployInstanceListener(); err != nil { | |||
return nil, errors.New("deploying virtualbox instance listener", err) | |||
return nil, errors.New("deploying vsphere instance listener", err) |
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.
👍
Fix the issue #140