@@ -16,18 +16,22 @@ import (
1616)
1717
1818func getEtcdClient (endpoints []string ) (* clientv3.Client , error ) {
19+ klog .Infof ("@Mustafa: being getEtcdClient() - endpoints are [%v]" , endpoints )
1920 grpclog .SetLoggerV2 (grpclog .NewLoggerV2 (ioutil .Discard , ioutil .Discard , os .Stderr ))
2021 dialOptions := []grpc.DialOption {
2122 grpc .WithBlock (), // block until the underlying connection is up
2223 }
2324
25+ klog .Infof ("@Mustafa: before tlsInfo in getEtcdClient()" )
2426 tlsInfo := transport.TLSInfo {
2527 CertFile : os .Getenv ("ETCDCTL_CERT" ),
2628 KeyFile : os .Getenv ("ETCDCTL_KEY" ),
2729 TrustedCAFile : os .Getenv ("ETCDCTL_CACERT" ),
2830 }
2931 tlsConfig , err := tlsInfo .ClientConfig ()
3032 if err != nil {
33+ klog .Infof ("@Mustafa: before tlsInfo in getEtcdClient() - tlsConfig are [%v]" , tlsConfig )
34+ klog .Infof ("@Mustafa: before tlsInfo in getEtcdClient() - err is [%v]" , err )
3135 return nil , fmt .Errorf ("failed to generate tls client config endpoints %v and env %v: %w" , endpoints , os .Environ (), err )
3236 }
3337
@@ -38,14 +42,18 @@ func getEtcdClient(endpoints []string) (*clientv3.Client, error) {
3842 TLS : tlsConfig ,
3943 }
4044
45+ klog .Infof ("@Mustafa: after tlsInfo in getEtcdClient()" )
4146 cli , err := clientv3 .New (* cfg )
4247 if err != nil {
48+ klog .Infof ("@Mustafa: after tlsInfo in getEtcdClient() - cli are [%v]" , cli )
49+ klog .Infof ("@Mustafa: after tlsInfo in getEtcdClient() - err is [%v]" , err )
4350 return nil , fmt .Errorf ("failed to make etcd client for endpoints %v and env %v: %w" , endpoints , os .Environ (), err )
4451 }
4552 return cli , nil
4653}
4754
4855func saveSnapshot (cli * clientv3.Client , dbPath string ) error {
56+ klog .Infof ("@Mustafa: being saveSnapshot() - cli are [%v] - dbPath are [%v]" , cli , dbPath )
4957 partpath := dbPath + ".part"
5058 defer os .RemoveAll (partpath )
5159
0 commit comments