Skip to content

Commit

Permalink
Merge pull request kata-containers#1441 from Ace-Tang/fix-panic
Browse files Browse the repository at this point in the history
config: fix panic in type assertion
  • Loading branch information
lifupan authored Apr 8, 2019
2 parents 26ca2a3 + 1b6affe commit 303f126
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/katautils/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ func checkNetNsConfig(config oci.RuntimeConfig) error {
if config.InterNetworkModel != vc.NetXConnectNoneModel {
return fmt.Errorf("config disable_new_netns only works with 'none' internetworking_model")
}
} else if config.ShimConfig.(vc.ShimConfig).Trace {
} else if shim, ok := config.ShimConfig.(vc.ShimConfig); ok && shim.Trace {
// Normally, the shim runs in a separate network namespace.
// But when tracing, the shim process needs to be able to talk
// to the Jaeger agent running in the host network namespace.
Expand Down

0 comments on commit 303f126

Please sign in to comment.