소스 검색

Merge pull request #1929 from gravitl/story/GRA-944

added server names to host client updates
dcarns 2 년 전
부모
커밋
3873fb3f40
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      mq/dynsec_helper.go
  2. 1 1
      mq/publishers.go

+ 1 - 1
mq/dynsec_helper.go

@@ -180,7 +180,7 @@ func fetchHostAcls(hostID string) []Acl {
 		},
 		{
 			AclType:  "publishClientReceive",
-			Topic:    fmt.Sprintf("host/update/%s", hostID),
+			Topic:    fmt.Sprintf("host/update/%s/#", hostID),
 			Priority: -1,
 			Allow:    true,
 		},

+ 1 - 1
mq/publishers.go

@@ -104,7 +104,7 @@ func HostUpdate(host *models.Host) error {
 		logger.Log(2, "error marshalling node update ", err.Error())
 		return err
 	}
-	if err = publish(host, fmt.Sprintf("host/update/%s", host.ID.String()), data); err != nil {
+	if err = publish(host, fmt.Sprintf("host/update/%s/%s", host.ID.String(), servercfg.GetServer()), data); err != nil {
 		logger.Log(2, "error publishing host update to", host.ID.String(), err.Error())
 		return err
 	}