[ https://issues.apache.org/jira/browse/BROOKLYN-548?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Bouron updated BROOKLYN-548: ----------------------------------- Description: I was testing Brooklyn HA and noticed something odd: when restarting an HA Brooklyn node, it changes it's node ID reported by `/v1/server/ha/states`. For instance, I have 2 Brooklyn nodes, 1 master, 1 slave. I stopped master (not killed, stopped), slave took over as expected. Then I restarted the previous master, it came back online as a slave (expected) but the node ID was different. I was expecting it to keep its ID rather creating a new one. {code} { "planeId": "qDpn2Lau", "ownId": "nJagUrw8", "masterId": "nJagUrw8", "nodes": { "BgOjYcml": { "nodeId": "BgOjYcml", "nodeUri": null, "status": "TERMINATED", "localTimestamp": 1510052259169, "remoteTimestamp": 1510052260000 }, "iv3XfaEu": { "nodeId": "iv3XfaEu", "nodeUri": null, "status": "STANDBY", "localTimestamp": 1510054973636, "remoteTimestamp": 1510054974000 }, "nJagUrw8": { "nodeId": "nJagUrw8", "nodeUri": null, "status": "MASTER", "localTimestamp": 1510054975025, "remoteTimestamp": 1510054976000 } }, "links": {} } {code} On the JSON above, {{BgOjYcml}} is the same node as {{iv3XfaEu}} but {{BgOjYcml}} was the ID of the node before restart. was: I was testing Brooklyn HA and noticed something odd: when restarting an HA Brooklyn node, it changes it's node ID reported by `/v1/server/ha/states`. For instance, I have 2 Brooklyn nodes, 1 master, 1 slave. I stopped master (not killed, stopped), slave took over as expected. Then I restarted the previous master, it came back online as a slave (expected) but the node ID was different. I was expecting it to keep its ID rather creating a new one. {code} { "planeId": "qDpn2Lau", "ownId": "nJagUrw8", "masterId": "nJagUrw8", "nodes": { "BgOjYcml": { "nodeId": "BgOjYcml", "nodeUri": null, "status": "TERMINATED", "localTimestamp": 1510052259169, "remoteTimestamp": 1510052260000 }, "iv3XfaEu": { "nodeId": "iv3XfaEu", "nodeUri": null, "status": "STANDBY", "localTimestamp": 1510054973636, "remoteTimestamp": 1510054974000 }, "nJagUrw8": { "nodeId": "nJagUrw8", "nodeUri": null, "status": "MASTER", "localTimestamp": 1510054975025, "remoteTimestamp": 1510054976000 } }, "links": {} } {code} On the attached screenshot, {{BgOjYcml}} is the same node as {{iv3XfaEu}}. {{BgOjYcml}} was the ID of the node before restart > Brooklyn node ID changes on restart > ----------------------------------- > > Key: BROOKLYN-548 > URL: https://issues.apache.org/jira/browse/BROOKLYN-548 > Project: Brooklyn > Issue Type: Bug > Affects Versions: 0.12.0 > Reporter: Thomas Bouron > > I was testing Brooklyn HA and noticed something odd: when restarting an HA > Brooklyn node, it changes it's node ID reported by `/v1/server/ha/states`. > For instance, I have 2 Brooklyn nodes, 1 master, 1 slave. I stopped master > (not killed, stopped), slave took over as expected. Then I restarted the > previous master, it came back online as a slave (expected) but the node ID > was different. I was expecting it to keep its ID rather creating a new one. > {code} > { > "planeId": "qDpn2Lau", > "ownId": "nJagUrw8", > "masterId": "nJagUrw8", > "nodes": { > "BgOjYcml": { > "nodeId": "BgOjYcml", > "nodeUri": null, > "status": "TERMINATED", > "localTimestamp": 1510052259169, > "remoteTimestamp": 1510052260000 > }, > "iv3XfaEu": { > "nodeId": "iv3XfaEu", > "nodeUri": null, > "status": "STANDBY", > "localTimestamp": 1510054973636, > "remoteTimestamp": 1510054974000 > }, > "nJagUrw8": { > "nodeId": "nJagUrw8", > "nodeUri": null, > "status": "MASTER", > "localTimestamp": 1510054975025, > "remoteTimestamp": 1510054976000 > } > }, > "links": {} > } > {code} > On the JSON above, {{BgOjYcml}} is the same node as {{iv3XfaEu}} but > {{BgOjYcml}} was the ID of the node before restart. -- This message was sent by Atlassian JIRA (v6.4.14#64029)