Browse Source

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

added server names to host client updates
dcarns 2 years ago
parent
commit
3873fb3f40
2 changed files with 2 additions and 2 deletions
  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
 	}