Browse Source

adjusting client join

0xdcarns 3 years ago
parent
commit
66d6c71441
2 changed files with 4 additions and 0 deletions
  1. 3 0
      controllers/auth_grpc.go
  2. 1 0
      netclient/functions/join.go

+ 3 - 0
controllers/auth_grpc.go

@@ -4,6 +4,7 @@ import (
 	"context"
 	"context"
 	"encoding/json"
 	"encoding/json"
 	"errors"
 	"errors"
+	"log"
 
 
 	"github.com/gravitl/netmaker/database"
 	"github.com/gravitl/netmaker/database"
 	"github.com/gravitl/netmaker/functions"
 	"github.com/gravitl/netmaker/functions"
@@ -118,6 +119,8 @@ func (s *NodeServiceServer) Login(ctx context.Context, req *nodepb.Object) (*nod
 	password := reqNode.Password
 	password := reqNode.Password
 	macaddress := reqNode.MacAddress
 	macaddress := reqNode.MacAddress
 
 
+	log.Printf("authing node: %v \n", reqNode)
+
 	var result models.NodeAuth
 	var result models.NodeAuth
 	var err error
 	var err error
 	// err := errors.New("generic server error")
 	// err := errors.New("generic server error")

+ 1 - 0
netclient/functions/join.go

@@ -127,6 +127,7 @@ func JoinNetwork(cfg config.ClientConfig, privateKey string) error {
 	if cfg.Node.IsServer != "yes" {
 	if cfg.Node.IsServer != "yes" {
 		ncutils.Log("joining " + cfg.Network + " at " + cfg.Server.GRPCAddress)
 		ncutils.Log("joining " + cfg.Network + " at " + cfg.Server.GRPCAddress)
 		var wcclient nodepb.NodeServiceClient
 		var wcclient nodepb.NodeServiceClient
+		log.Printf("used: %v\n", postnode)
 
 
 		conn, err := grpc.Dial(cfg.Server.GRPCAddress,
 		conn, err := grpc.Dial(cfg.Server.GRPCAddress,
 			ncutils.GRPCRequestOpts(cfg.Server.GRPCSSL))
 			ncutils.GRPCRequestOpts(cfg.Server.GRPCSSL))