Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

ignited: catch signals and cleanup socket file #486

Merged
merged 1 commit into from
Nov 11, 2019

Conversation

chanwit
Copy link
Member

@chanwit chanwit commented Nov 7, 2019

This PR catches signals and cleans the left over socket file up.
Fixes #485

Result:

DEBU[0000] FileWatcher: Monitoring thread started       
DEBU[0000] SyncStorage: Monitoring thread started       
DEBU[0000] FileWatcher: Dispatch thread started         
DEBU[0000] GenericWatchStorage: Monitoring thread started 
INFO[0000] Starting GitOps loop for repo at "git@github.com:chanwit/ignited-demo" 
INFO[0000] Whenever changes are pushed to the master branch, Ignite will apply the desired state locally 
DEBU[0000] Starting the commit loop...                  
DEBU[0000] Starting the repo sync...                    
DEBU[0000] Starting the checkout loop...                
INFO[0000] Initializing the Git repo...                 
INFO[0026] Git initialized: A bare clone of repo "git@github.com:chanwit/ignited-demo" has been made 
INFO[0026] New commit observed on branch "master": a57fca1f35fd9c42598e2d97824900b0e2cd2115. User initiated: true 
INFO[0026] Initial clone done, entering the checkout loop... 
DEBU[0030] FileWatcher: Dispatch thread started         
DEBU[0030] FileWatcher: Monitoring thread started       
DEBU[0030] GenericWatchStorage: Monitoring thread started 
DEBU[0030] SyncStorage: Monitoring thread started       
DEBU[0030] GenericMappedRawStorage: AddMapping: "vm/022b373de5d34c80" -> "/tmp/flux-working982449342/myvm.yaml" 
DEBU[0030] SyncStorage: Received update {{MODIFY &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha2,}} 0xc000370240} true 
DEBU[0030] SyncStorage: Sent update: {MODIFY &TypeMeta{Kind:VM,APIVersion:ignite.weave.works/v1alpha2,}} 
DEBU[0030] FileWatcher: Skipping suspended event MODIFY for path: "/tmp/flux-working982449342/myvm.yaml" 
^CDEBU[0066] Signal SIGTERM caught                        
DEBU[0066] Socket "/var/lib/firecracker/daemon.sock" removed successfully 
DEBU[0066] Program normally terminated     

@chanwit chanwit requested a review from twelho as a code owner November 7, 2019 17:58
@chanwit chanwit requested review from stealthybox and removed request for twelho November 7, 2019 17:59
@chanwit
Copy link
Member Author

chanwit commented Nov 7, 2019

cc @palemtnrider

Copy link
Contributor

@palemtnrider palemtnrider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few suggested changes. Thanks for fixing this.

cmd/ignited/ignited.go Outdated Show resolved Hide resolved
cmd/ignited/ignited.go Outdated Show resolved Hide resolved
cmd/ignited/ignited.go Outdated Show resolved Hide resolved
Copy link
Contributor

@palemtnrider palemtnrider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for fixing this!

@chanwit
Copy link
Member Author

chanwit commented Nov 11, 2019

Thank you @palemtnrider for reviewing this.
I'll have another PR for the dep changes.

@chanwit chanwit merged commit 315c151 into weaveworks:master Nov 11, 2019
@luxas luxas added this to the v0.7.0 milestone Jun 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prometheus socket left open after ignited gitops terminates
3 participants