use _real_ cert-path to get node ID for metrics (#1058)
apparently, the presence of an "Identity" attribute in a config struct does not imply that anything will fill it in or use it. i tested all of these executables manually and individually this time.
This commit is contained in:
parent
a2333c4809
commit
681d77c41a
@ -128,7 +128,7 @@ func cmdRun(cmd *cobra.Command, args []string) (err error) {
|
||||
if err != nil {
|
||||
return errs.New("Error creating tables for master database on satellite: %+v", err)
|
||||
}
|
||||
if err := process.InitMetricsWithCertPath(ctx, nil, runCfg.Identity.CertPath); err != nil {
|
||||
if err := process.InitMetricsWithCertPath(ctx, nil, runCfg.Server.Identity.CertPath); err != nil {
|
||||
zap.S().Errorf("Failed to initialize telemetry batcher: %+v", err)
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ func cmdRun(cmd *cobra.Command, args []string) (err error) {
|
||||
zap.S().Info("Operator wallet: ", operatorConfig.Wallet)
|
||||
}
|
||||
ctx := process.Ctx(cmd)
|
||||
if err := process.InitMetricsWithCertPath(ctx, nil, runCfg.Identity.CertPath); err != nil {
|
||||
if err := process.InitMetricsWithCertPath(ctx, nil, runCfg.Server.Identity.CertPath); err != nil {
|
||||
zap.S().Error("Failed to initialize telemetry batcher:", err)
|
||||
}
|
||||
|
||||
|
@ -47,14 +47,14 @@ func cmdRun(cmd *cobra.Command, args []string) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := process.InitMetricsWithCertPath(ctx, nil, cfg.Identity.CertPath); err != nil {
|
||||
zap.S().Errorf("Failed to initialize telemetry batcher: %v", err)
|
||||
}
|
||||
_, err = metainfo.ListBuckets(ctx, storj.BucketListOptions{Direction: storj.After})
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to contact Satellite.\n"+
|
||||
"Perhaps your configuration is invalid?\n%s", err)
|
||||
}
|
||||
if err := process.InitMetricsWithCertPath(ctx, nil, cfg.Identity.CertPath); err != nil {
|
||||
zap.S().Errorf("Failed to initialize telemetry batcher: %v", err)
|
||||
}
|
||||
|
||||
return cfg.Run(ctx)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user