You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/07/21 21:07:36 UTC

[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #4881: Renaming a host in TC, does not impact hash_id

zrhoffman commented on a change in pull request #4881:
URL: https://github.com/apache/trafficcontrol/pull/4881#discussion_r458364707



##########
File path: docs/source/api/v3/servers.rst
##########
@@ -287,7 +287,7 @@ Request Structure
 
 :typeId:     The integral, unique identifier of the 'type' of this server
 :updPending: A boolean value which, if ``true``, indicates that the server has updates of some kind pending, typically to be acted upon by Traffic Ops ORT
-:xmppId:     An optional identifier to be used in XMPP communications with the server - in nearly all cases this should be the same as ``hostName``
+:xmppId:     A system-generated UUID used to generate a server hashId for use in traffic router's consistent hashing algorithm. This value is set when a server is created and cannot be changed afterwards.

Review comment:
       Same as above, `traffic router` should be capitalized.

##########
File path: docs/source/api/v2/servers.rst
##########
@@ -244,7 +244,7 @@ Request Structure
 
 :typeId:     The integral, unique identifier of the 'type' of this server
 :updPending: A boolean value which, if ``true``, indicates that the server has updates of some kind pending, typically to be acted upon by Traffic Ops ORT
-:xmppId:     An optional identifier to be used in XMPP communications with the server - in nearly all cases this should be the same as ``hostName``
+:xmppId:    A system-generated UUID used to generate a server hashId for use in traffic router's consistent hashing algorithm. This value is set when a server is created and cannot be changed afterwards.

Review comment:
       `traffic router` should be capitalized.

##########
File path: docs/source/api/v2/servers_id.rst
##########
@@ -183,7 +183,7 @@ Response Structure
 :type:       The name of the 'type' of this server
 :typeId:     The integral, unique identifier of the 'type' of this server
 :updPending: A boolean value which, if ``true``, indicates that the server has updates of some kind pending, typically to be acted upon by Traffic Ops ORT
-:xmppId:     An identifier to be used in XMPP communications with the server - in nearly all cases this will be the same as ``hostName``
+:xmppId:     A system-generated UUID used to generate a server hashId for use in traffic router's consistent hashing algorithm. This value is set when a server is created and cannot be changed afterwards.

Review comment:
       Same as above, `traffic router` should be capitalized.

##########
File path: docs/source/api/v3/servers_id.rst
##########
@@ -94,7 +94,7 @@ Request Structure
 
 :typeId:     The integral, unique identifier of the 'type' of this server
 :updPending: A boolean value which, if ``true``, indicates that the server has updates of some kind pending, typically to be acted upon by Traffic Ops ORT
-:xmppId:     An optional identifier to be used in XMPP communications with the server - in nearly all cases this should be the same as ``hostName``

Review comment:
       Same as above, `traffic router` should be capitalized.

##########
File path: traffic_ops/traffic_ops_golang/server/servers.go
##########
@@ -1055,6 +1069,11 @@ func Update(w http.ResponseWriter, r *http.Request) {
 		return
 	}
 
+	if changeXMPPID {
+		api.WriteRespAlertObj(w, r, tc.ErrorLevel, fmt.Sprintf("server cannot be updated due to requested XMPPID change. XMPIDD is immutable"), nil)

Review comment:
       Now that this is using `api.WriteRespAlertObj()`, I get a 200-level response code. Since we're not writing an object in this case, just `api.WriteAlerts()` should work.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org