You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by Christofer Dutz <ch...@c-ware.de> on 2024/07/24 14:33:20 UTC

How to handle the internal and external IPs of Data-Nodes?

Hi all,

I’m currently working on https://github.com/apache/iotdb/pull/12914

Here one of the problems was, that in a cluster with 3 datanodes, where the dn_rpc_address is set to 0.0.0.0, the command “show datanodes” lists each node with an address of 0.0.0.0. So, if someone wants to remove a data-node by its IP, the cli will not find the corresponding node as it thinks it’s 0.0.0.0. However, if you use the cli to delete 0.0.0.0, then it deletes all nodes.

Now my initial fix for this, was, that if a data-node registers and says his dn_rpc_address is 0.0.0.0, that instead of this, the IP from which we are getting the request is being used (Obviously this one exists and belongs to the data-node registering).
The problem is that this usually will be the dn_internal_address instead of the dn_rpc_address.

Now we could use that instead, but I think it would reduce the usefulness of the “show datanodes” command, because it could be in a cluster-internal network, that the client can’t connect to.
So, if a client wants to know which other data-nodes there are in order to connect to another one, this might not be helpful.
However, 0.0.0.0 is also not helpful, as I see no chance to be able to connect to a data-node using 0.0.0.0:6667 as that’s not really a real Ip address.

So, I think, that possibly instead of maintaining 0.0.0.0 we should replace this with the list of public IP addresses the data-node possesses. In this case show data-nodes would no longer display only one IP-Address, but a list of IP-Addresses.

When removing a data-node (or sending any other commands to it) we could now identify a particular data-node as only one will have the IP+Port combination.

What do you think?

Chris

AW: How to handle the internal and external IPs of Data-Nodes?

Posted by Christofer Dutz <ch...@c-ware.de>.
That would be my favorite option … to directly show the internal and external ip/ports.

With my fix in the PR, removing by ID is now possible, so yes … then we should remove the option to use the Ip+port notation.

Chris

Von: 乔嘉林 <ji...@timecho.com>
Datum: Donnerstag, 25. Juli 2024 um 03:05
An: dev@iotdb.apache.org <de...@iotdb.apache.org>
Betreff: Re: How to handle the internal and external IPs of Data-Nodes?
Hi,

Could we list both two addresses? One for internal and another for client connection.

As for removing a datanode, maybe prividing the nodeid is enough.

Jialin
> From: "Christofer Dutz"<ch...@c-ware.de>
> Date:  Wed, Jul 24, 2024, 22:37
> Subject:  How to handle the internal and external IPs of Data-Nodes?
> To: "dev@iotdb.apache.org"<de...@iotdb.apache.org>
> Hi all,
>
> I’m currently working on https://github.com/apache/iotdb/pull/12914
>
> Here one of the problems was, that in a cluster with 3 datanodes, where the dn_rpc_address is set to 0.0.0.0, the command “show datanodes” lists each node with an address of 0.0.0.0. So, if someone wants to remove a data-node by its IP, the cli will not find the corresponding node as it thinks it’s 0.0.0.0. However, if you use the cli to delete 0.0.0.0, then it deletes all nodes.
>
> Now my initial fix for this, was, that if a data-node registers and says his dn_rpc_address is 0.0.0.0, that instead of this, the IP from which we are getting the request is being used (Obviously this one exists and belongs to the data-node registering).
> The problem is that this usually will be the dn_internal_address instead of the dn_rpc_address.
>
> Now we could use that instead, but I think it would reduce the usefulness of the “show datanodes” command, because it could be in a cluster-internal network, that the client can’t connect to.
> So, if a client wants to know which other data-nodes there are in order to connect to another one, this might not be helpful.
> However, 0.0.0.0 is also not helpful, as I see no chance to be able to connect to a data-node using 0.0.0.0:6667 as that’s not really a real Ip address.
>
> So, I think, that possibly instead of maintaining 0.0.0.0 we should replace this with the list of public IP addresses the data-node possesses. In this case show data-nodes would no longer display only one IP-Address, but a list of IP-Addresses.
>
> When removing a data-node (or sending any other commands to it) we could now identify a particular data-node as only one will have the IP+Port combination.
>
> What do you think?
>
> Chris

Re: How to handle the internal and external IPs of Data-Nodes?

Posted by 乔嘉林 <ji...@timecho.com>.
Hi,

Could we list both two addresses? One for internal and another for client connection.

As for removing a datanode, maybe prividing the nodeid is enough.

Jialin
> From: "Christofer Dutz"<ch...@c-ware.de>
> Date:  Wed, Jul 24, 2024, 22:37
> Subject:  How to handle the internal and external IPs of Data-Nodes?
> To: "dev@iotdb.apache.org"<de...@iotdb.apache.org>
> Hi all,
> 
> I’m currently working on https://github.com/apache/iotdb/pull/12914
> 
> Here one of the problems was, that in a cluster with 3 datanodes, where the dn_rpc_address is set to 0.0.0.0, the command “show datanodes” lists each node with an address of 0.0.0.0. So, if someone wants to remove a data-node by its IP, the cli will not find the corresponding node as it thinks it’s 0.0.0.0. However, if you use the cli to delete 0.0.0.0, then it deletes all nodes.
> 
> Now my initial fix for this, was, that if a data-node registers and says his dn_rpc_address is 0.0.0.0, that instead of this, the IP from which we are getting the request is being used (Obviously this one exists and belongs to the data-node registering).
> The problem is that this usually will be the dn_internal_address instead of the dn_rpc_address.
> 
> Now we could use that instead, but I think it would reduce the usefulness of the “show datanodes” command, because it could be in a cluster-internal network, that the client can’t connect to.
> So, if a client wants to know which other data-nodes there are in order to connect to another one, this might not be helpful.
> However, 0.0.0.0 is also not helpful, as I see no chance to be able to connect to a data-node using 0.0.0.0:6667 as that’s not really a real Ip address.
> 
> So, I think, that possibly instead of maintaining 0.0.0.0 we should replace this with the list of public IP addresses the data-node possesses. In this case show data-nodes would no longer display only one IP-Address, but a list of IP-Addresses.
> 
> When removing a data-node (or sending any other commands to it) we could now identify a particular data-node as only one will have the IP+Port combination.
> 
> What do you think?
> 
> Chris

Re: AW: How to handle the internal and external IPs of Data-Nodes?

Posted by Xinyu Tan <ta...@apache.org>.
Hi, Chris

After the above discussion, I think we all agree that removing nodes by id alone is a better solution, so we can do it this way.

However, that it would be nice to use the same approach for ConfigNode and AINode which will be open sourced soon. We can keep an eye on it and maintain it in future versions.

Best
-----------------
Xinyu Tan

On 2024/07/26 06:55:30 Christofer Dutz wrote:
> Well,
> 
> I think I’m going to do it my usuall way If a discussion dries up here …
> I’ll do what I proposed as I didn’t read any opposing opinion before and not after, so I’ll treat this as consent.
> 
> If objections come after … I’ll just add stuff back. Wouldn’t be my time wasted ;-)
> 
> Chris
> 
> 
> Von: Christofer Dutz <ch...@c-ware.de>
> Datum: Donnerstag, 25. Juli 2024 um 09:49
> An: dev@iotdb.apache.org <de...@iotdb.apache.org>
> Betreff: AW: How to handle the internal and external IPs of Data-Nodes?
> But having another look at the documentation at https://iotdb.apache.org/UserGuide/V1.0.x/Cluster/Cluster-Maintenance.html#show-datanode-information
> 
> The NodeID displayed in “show cluster” (datanodes have ids 3,4 and 5) seem to be different from the ones shown in show datanodes (1 and 2)
> Also did show confignodes list “0, 1 and 2” … was every screen output captured on a different cluster configuration? If yes … we should probably update these (manually) to be more aligned.
> 
> 
> Chris
> 
> Von: Christofer Dutz <ch...@c-ware.de>
> Datum: Donnerstag, 25. Juli 2024 um 09:44
> An: dev@iotdb.apache.org <de...@iotdb.apache.org>
> Betreff: AW: How to handle the internal and external IPs of Data-Nodes?
> Comparing the output of them,
> 
> I think deleting nodes only by ID is probably the best option.
> Perhaps in a second PR we could update the output of show datanodes to include the InternalAddress and InternalPort?
> 
> I probably also should check if removing config nodes via ID works … because technically removing a datanode by Id didn’t work till my fix.
> 
> So, I think I should undo the parts I added for replacing the 0.0.0.0 with the internal address and double check the remove config-node code.
> 
> Chris
> 
> Von: Wang Critas <cr...@outlook.com>
> Datum: Donnerstag, 25. Juli 2024 um 09:36
> An: dev@iotdb.apache.org <de...@iotdb.apache.org>
> Betreff: 答复: How to handle the internal and external IPs of Data-Nodes?
> Hi Chris
> 
> Perhaps more often than not, show clusters are used?
> 
> Best
> ----------------
> Xuan Wang
> 发件人: Christofer Dutz <ch...@c-ware.de>
> 日期: 星期四, 2024年7月25日 15:31
> 收件人: dev@iotdb.apache.org <de...@iotdb.apache.org>
> 主题: AW: How to handle the internal and external IPs of Data-Nodes?
> Hi all,
> 
> In that case we would need to show the internal ip in the show datanodes command, right?
> Or would we simply expect the user to know the internal IP of the datanode he wants to remove?
> 
> Chris
> 
> Von: Wang Critas <cr...@outlook.com>
> Datum: Donnerstag, 25. Juli 2024 um 08:16
> An: dev@iotdb.apache.org <de...@iotdb.apache.org>
> Betreff: 答复: How to handle the internal and external IPs of Data-Nodes?
> Hi
> 
> Why not use nodeId or internalAddress:internalPort for unified behavior
> 
> Remove ConfigNode through nodeId or internalAddress:internamPort
> 
> Best
> ----------------
> Xuan Wang
> 
> 发件人: Xinyu Tan <ta...@apache.org>
> 日期: 星期四, 2024年7月25日 12:26
> 收件人: dev@iotdb.apache.org <de...@iotdb.apache.org>
> 主题: Re: How to handle the internal and external IPs of Data-Nodes?
> Hi, chris
> 
> +1 for identifying nodes solely by nodeid
> 
> Best
> ----------------
> Xinyu Tan
> 
> On 2024/07/24 14:33:20 Christofer Dutz wrote:
> > Hi all,
> >
> > I’m currently working on https://github.com/apache/iotdb/pull/12914<https://github.com/apache/iotdb/pull/12914><https://github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e><https://github.com/apache/iotdb/pull/12914><https://github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e%3chttps:/github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e%3e%3chttps:/github.com/apache/iotdb/pull/12914%3e><https://github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e%3chttps:/github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e%3e%3chttps:/github.com/apache/iotdb/pull/12914%3e%3chttps:/github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e%3chttps:/github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e%3e%3chttps:/github.com/apache/iotdb/pull/12914%3e%3e>
> >
> > Here one of the problems was, that in a cluster with 3 datanodes, where the dn_rpc_address is set to 0.0.0.0, the command “show datanodes” lists each node with an address of 0.0.0.0. So, if someone wants to remove a data-node by its IP, the cli will not find the corresponding node as it thinks it’s 0.0.0.0. However, if you use the cli to delete 0.0.0.0, then it deletes all nodes.
> >
> > Now my initial fix for this, was, that if a data-node registers and says his dn_rpc_address is 0.0.0.0, that instead of this, the IP from which we are getting the request is being used (Obviously this one exists and belongs to the data-node registering).
> > The problem is that this usually will be the dn_internal_address instead of the dn_rpc_address.
> >
> > Now we could use that instead, but I think it would reduce the usefulness of the “show datanodes” command, because it could be in a cluster-internal network, that the client can’t connect to.
> > So, if a client wants to know which other data-nodes there are in order to connect to another one, this might not be helpful.
> > However, 0.0.0.0 is also not helpful, as I see no chance to be able to connect to a data-node using 0.0.0.0:6667 as that’s not really a real Ip address.
> >
> > So, I think, that possibly instead of maintaining 0.0.0.0 we should replace this with the list of public IP addresses the data-node possesses. In this case show data-nodes would no longer display only one IP-Address, but a list of IP-Addresses.
> >
> > When removing a data-node (or sending any other commands to it) we could now identify a particular data-node as only one will have the IP+Port combination.
> >
> > What do you think?
> >
> > Chris
> >
> 

答复: How to handle the internal and external IPs of Data-Nodes?

Posted by Wang Critas <cr...@outlook.com>.
Hi,
After careful consideration, it seems that relying solely on the nodeId would be a more viable option



发件人: Christofer Dutz <ch...@c-ware.de>
日期: 星期五, 2024年7月26日 14:55
收件人: dev@iotdb.apache.org <de...@iotdb.apache.org>
主题: AW: How to handle the internal and external IPs of Data-Nodes?
Well,

I think I’m going to do it my usuall way If a discussion dries up here …
I’ll do what I proposed as I didn’t read any opposing opinion before and not after, so I’ll treat this as consent.

If objections come after … I’ll just add stuff back. Wouldn’t be my time wasted ;-)

Chris


Von: Christofer Dutz <ch...@c-ware.de>
Datum: Donnerstag, 25. Juli 2024 um 09:49
An: dev@iotdb.apache.org <de...@iotdb.apache.org>
Betreff: AW: How to handle the internal and external IPs of Data-Nodes?
But having another look at the documentation at https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fiotdb.apache.org%2FUserGuide%2FV1.0.x%2FCluster%2FCluster-Maintenance.html%23show-datanode-information&data=05%7C02%7C%7C832346b45c124f96500e08dcad3ffec1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638575737580508834%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=vDGJsE0pB%2FlCw%2FdLug6il%2F7OE0U5CdCE0CLHb1UZuPg%3D&reserved=0<https://iotdb.apache.org/UserGuide/V1.0.x/Cluster/Cluster-Maintenance.html#show-datanode-information>

The NodeID displayed in “show cluster” (datanodes have ids 3,4 and 5) seem to be different from the ones shown in show datanodes (1 and 2)
Also did show confignodes list “0, 1 and 2” … was every screen output captured on a different cluster configuration? If yes … we should probably update these (manually) to be more aligned.


Chris

Von: Christofer Dutz <ch...@c-ware.de>
Datum: Donnerstag, 25. Juli 2024 um 09:44
An: dev@iotdb.apache.org <de...@iotdb.apache.org>
Betreff: AW: How to handle the internal and external IPs of Data-Nodes?
Comparing the output of them,

I think deleting nodes only by ID is probably the best option.
Perhaps in a second PR we could update the output of show datanodes to include the InternalAddress and InternalPort?

I probably also should check if removing config nodes via ID works … because technically removing a datanode by Id didn’t work till my fix.

So, I think I should undo the parts I added for replacing the 0.0.0.0 with the internal address and double check the remove config-node code.

Chris

Von: Wang Critas <cr...@outlook.com>
Datum: Donnerstag, 25. Juli 2024 um 09:36
An: dev@iotdb.apache.org <de...@iotdb.apache.org>
Betreff: 答复: How to handle the internal and external IPs of Data-Nodes?
Hi Chris

Perhaps more often than not, show clusters are used?

Best
----------------
Xuan Wang
发件人: Christofer Dutz <ch...@c-ware.de>
日期: 星期四, 2024年7月25日 15:31
收件人: dev@iotdb.apache.org <de...@iotdb.apache.org>
主题: AW: How to handle the internal and external IPs of Data-Nodes?
Hi all,

In that case we would need to show the internal ip in the show datanodes command, right?
Or would we simply expect the user to know the internal IP of the datanode he wants to remove?

Chris

Von: Wang Critas <cr...@outlook.com>
Datum: Donnerstag, 25. Juli 2024 um 08:16
An: dev@iotdb.apache.org <de...@iotdb.apache.org>
Betreff: 答复: How to handle the internal and external IPs of Data-Nodes?
Hi

Why not use nodeId or internalAddress:internalPort for unified behavior

Remove ConfigNode through nodeId or internalAddress:internamPort

Best
----------------
Xuan Wang

发件人: Xinyu Tan <ta...@apache.org>
日期: 星期四, 2024年7月25日 12:26
收件人: dev@iotdb.apache.org <de...@iotdb.apache.org>
主题: Re: How to handle the internal and external IPs of Data-Nodes?
Hi, chris

+1 for identifying nodes solely by nodeid

Best
----------------
Xinyu Tan

On 2024/07/24 14:33:20 Christofer Dutz wrote:
> Hi all,
>
> I’m currently working on https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914&data=05%7C02%7C%7C832346b45c124f96500e08dcad3ffec1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638575737580519481%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=nIiqkwth7E5Jam2AlLbpXSsH9kns4Q%2BF17ZJqZ4FVqg%3D&reserved=0<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914&data=05%7C02%7C%7C832346b45c124f96500e08dcad3ffec1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638575737580524669%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=KOKizXS%2FwLFwV4redeO2ZWGg%2BnWz10UkGLBuD30ujTM%3D&reserved=0><https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253chttps%3A%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253e&data=05%7C02%7C%7C832346b45c124f96500e08dcad3ffec1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638575737580528972%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=u%2FYf31yXfh7aQarY%2FwM7h9qryrLnbSWQLRd6oXqLc9s%3D&reserved=0><https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914&data=05%7C02%7C%7C832346b45c124f96500e08dcad3ffec1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638575737580533292%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=vpnRrh3ZLMgkaGXAThGmk4WJQlO%2BXd28vtEP3KbzL6A%3D&reserved=0><https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253chttps%3A%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253e%253chttps%3A%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253chttps%3A%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253e%253e%253chttps%3A%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253e&data=05%7C02%7C%7C832346b45c124f96500e08dcad3ffec1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638575737580537453%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=C9SXXEKJn2h6UfBW2GPC47jurGhb2sAAEmAmt96hu6U%3D&reserved=0><https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253chttps%3A%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253e%253chttps%3A%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253chttps%3A%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253e%253e%253chttps%3A%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253e%253chttps%3A%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253chttps%3A%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253e%253chttps%3A%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253chttps%3A%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253e%253e%253chttps%3A%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253e%253e&data=05%7C02%7C%7C832346b45c124f96500e08dcad3ffec1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638575737580541898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=VbAKhDN2YoSlpgPTKTAVkkI8FsoERsGeSnw2GKkFYgM%3D&reserved=0><https://github.com/apache/iotdb/pull/12914>
>
> Here one of the problems was, that in a cluster with 3 datanodes, where the dn_rpc_address is set to 0.0.0.0, the command “show datanodes” lists each node with an address of 0.0.0.0. So, if someone wants to remove a data-node by its IP, the cli will not find the corresponding node as it thinks it’s 0.0.0.0. However, if you use the cli to delete 0.0.0.0, then it deletes all nodes.
>
> Now my initial fix for this, was, that if a data-node registers and says his dn_rpc_address is 0.0.0.0, that instead of this, the IP from which we are getting the request is being used (Obviously this one exists and belongs to the data-node registering).
> The problem is that this usually will be the dn_internal_address instead of the dn_rpc_address.
>
> Now we could use that instead, but I think it would reduce the usefulness of the “show datanodes” command, because it could be in a cluster-internal network, that the client can’t connect to.
> So, if a client wants to know which other data-nodes there are in order to connect to another one, this might not be helpful.
> However, 0.0.0.0 is also not helpful, as I see no chance to be able to connect to a data-node using 0.0.0.0:6667 as that’s not really a real Ip address.
>
> So, I think, that possibly instead of maintaining 0.0.0.0 we should replace this with the list of public IP addresses the data-node possesses. In this case show data-nodes would no longer display only one IP-Address, but a list of IP-Addresses.
>
> When removing a data-node (or sending any other commands to it) we could now identify a particular data-node as only one will have the IP+Port combination.
>
> What do you think?
>
> Chris
>

AW: How to handle the internal and external IPs of Data-Nodes?

Posted by Christofer Dutz <ch...@c-ware.de>.
Well,

I think I’m going to do it my usuall way If a discussion dries up here …
I’ll do what I proposed as I didn’t read any opposing opinion before and not after, so I’ll treat this as consent.

If objections come after … I’ll just add stuff back. Wouldn’t be my time wasted ;-)

Chris


Von: Christofer Dutz <ch...@c-ware.de>
Datum: Donnerstag, 25. Juli 2024 um 09:49
An: dev@iotdb.apache.org <de...@iotdb.apache.org>
Betreff: AW: How to handle the internal and external IPs of Data-Nodes?
But having another look at the documentation at https://iotdb.apache.org/UserGuide/V1.0.x/Cluster/Cluster-Maintenance.html#show-datanode-information

The NodeID displayed in “show cluster” (datanodes have ids 3,4 and 5) seem to be different from the ones shown in show datanodes (1 and 2)
Also did show confignodes list “0, 1 and 2” … was every screen output captured on a different cluster configuration? If yes … we should probably update these (manually) to be more aligned.


Chris

Von: Christofer Dutz <ch...@c-ware.de>
Datum: Donnerstag, 25. Juli 2024 um 09:44
An: dev@iotdb.apache.org <de...@iotdb.apache.org>
Betreff: AW: How to handle the internal and external IPs of Data-Nodes?
Comparing the output of them,

I think deleting nodes only by ID is probably the best option.
Perhaps in a second PR we could update the output of show datanodes to include the InternalAddress and InternalPort?

I probably also should check if removing config nodes via ID works … because technically removing a datanode by Id didn’t work till my fix.

So, I think I should undo the parts I added for replacing the 0.0.0.0 with the internal address and double check the remove config-node code.

Chris

Von: Wang Critas <cr...@outlook.com>
Datum: Donnerstag, 25. Juli 2024 um 09:36
An: dev@iotdb.apache.org <de...@iotdb.apache.org>
Betreff: 答复: How to handle the internal and external IPs of Data-Nodes?
Hi Chris

Perhaps more often than not, show clusters are used?

Best
----------------
Xuan Wang
发件人: Christofer Dutz <ch...@c-ware.de>
日期: 星期四, 2024年7月25日 15:31
收件人: dev@iotdb.apache.org <de...@iotdb.apache.org>
主题: AW: How to handle the internal and external IPs of Data-Nodes?
Hi all,

In that case we would need to show the internal ip in the show datanodes command, right?
Or would we simply expect the user to know the internal IP of the datanode he wants to remove?

Chris

Von: Wang Critas <cr...@outlook.com>
Datum: Donnerstag, 25. Juli 2024 um 08:16
An: dev@iotdb.apache.org <de...@iotdb.apache.org>
Betreff: 答复: How to handle the internal and external IPs of Data-Nodes?
Hi

Why not use nodeId or internalAddress:internalPort for unified behavior

Remove ConfigNode through nodeId or internalAddress:internamPort

Best
----------------
Xuan Wang

发件人: Xinyu Tan <ta...@apache.org>
日期: 星期四, 2024年7月25日 12:26
收件人: dev@iotdb.apache.org <de...@iotdb.apache.org>
主题: Re: How to handle the internal and external IPs of Data-Nodes?
Hi, chris

+1 for identifying nodes solely by nodeid

Best
----------------
Xinyu Tan

On 2024/07/24 14:33:20 Christofer Dutz wrote:
> Hi all,
>
> I’m currently working on https://github.com/apache/iotdb/pull/12914<https://github.com/apache/iotdb/pull/12914><https://github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e><https://github.com/apache/iotdb/pull/12914><https://github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e%3chttps:/github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e%3e%3chttps:/github.com/apache/iotdb/pull/12914%3e><https://github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e%3chttps:/github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e%3e%3chttps:/github.com/apache/iotdb/pull/12914%3e%3chttps:/github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e%3chttps:/github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e%3e%3chttps:/github.com/apache/iotdb/pull/12914%3e%3e>
>
> Here one of the problems was, that in a cluster with 3 datanodes, where the dn_rpc_address is set to 0.0.0.0, the command “show datanodes” lists each node with an address of 0.0.0.0. So, if someone wants to remove a data-node by its IP, the cli will not find the corresponding node as it thinks it’s 0.0.0.0. However, if you use the cli to delete 0.0.0.0, then it deletes all nodes.
>
> Now my initial fix for this, was, that if a data-node registers and says his dn_rpc_address is 0.0.0.0, that instead of this, the IP from which we are getting the request is being used (Obviously this one exists and belongs to the data-node registering).
> The problem is that this usually will be the dn_internal_address instead of the dn_rpc_address.
>
> Now we could use that instead, but I think it would reduce the usefulness of the “show datanodes” command, because it could be in a cluster-internal network, that the client can’t connect to.
> So, if a client wants to know which other data-nodes there are in order to connect to another one, this might not be helpful.
> However, 0.0.0.0 is also not helpful, as I see no chance to be able to connect to a data-node using 0.0.0.0:6667 as that’s not really a real Ip address.
>
> So, I think, that possibly instead of maintaining 0.0.0.0 we should replace this with the list of public IP addresses the data-node possesses. In this case show data-nodes would no longer display only one IP-Address, but a list of IP-Addresses.
>
> When removing a data-node (or sending any other commands to it) we could now identify a particular data-node as only one will have the IP+Port combination.
>
> What do you think?
>
> Chris
>

AW: How to handle the internal and external IPs of Data-Nodes?

Posted by Christofer Dutz <ch...@c-ware.de>.
But having another look at the documentation at https://iotdb.apache.org/UserGuide/V1.0.x/Cluster/Cluster-Maintenance.html#show-datanode-information

The NodeID displayed in “show cluster” (datanodes have ids 3,4 and 5) seem to be different from the ones shown in show datanodes (1 and 2)
Also did show confignodes list “0, 1 and 2” … was every screen output captured on a different cluster configuration? If yes … we should probably update these (manually) to be more aligned.


Chris

Von: Christofer Dutz <ch...@c-ware.de>
Datum: Donnerstag, 25. Juli 2024 um 09:44
An: dev@iotdb.apache.org <de...@iotdb.apache.org>
Betreff: AW: How to handle the internal and external IPs of Data-Nodes?
Comparing the output of them,

I think deleting nodes only by ID is probably the best option.
Perhaps in a second PR we could update the output of show datanodes to include the InternalAddress and InternalPort?

I probably also should check if removing config nodes via ID works … because technically removing a datanode by Id didn’t work till my fix.

So, I think I should undo the parts I added for replacing the 0.0.0.0 with the internal address and double check the remove config-node code.

Chris

Von: Wang Critas <cr...@outlook.com>
Datum: Donnerstag, 25. Juli 2024 um 09:36
An: dev@iotdb.apache.org <de...@iotdb.apache.org>
Betreff: 答复: How to handle the internal and external IPs of Data-Nodes?
Hi Chris

Perhaps more often than not, show clusters are used?

Best
----------------
Xuan Wang
发件人: Christofer Dutz <ch...@c-ware.de>
日期: 星期四, 2024年7月25日 15:31
收件人: dev@iotdb.apache.org <de...@iotdb.apache.org>
主题: AW: How to handle the internal and external IPs of Data-Nodes?
Hi all,

In that case we would need to show the internal ip in the show datanodes command, right?
Or would we simply expect the user to know the internal IP of the datanode he wants to remove?

Chris

Von: Wang Critas <cr...@outlook.com>
Datum: Donnerstag, 25. Juli 2024 um 08:16
An: dev@iotdb.apache.org <de...@iotdb.apache.org>
Betreff: 答复: How to handle the internal and external IPs of Data-Nodes?
Hi

Why not use nodeId or internalAddress:internalPort for unified behavior

Remove ConfigNode through nodeId or internalAddress:internamPort

Best
----------------
Xuan Wang

发件人: Xinyu Tan <ta...@apache.org>
日期: 星期四, 2024年7月25日 12:26
收件人: dev@iotdb.apache.org <de...@iotdb.apache.org>
主题: Re: How to handle the internal and external IPs of Data-Nodes?
Hi, chris

+1 for identifying nodes solely by nodeid

Best
----------------
Xinyu Tan

On 2024/07/24 14:33:20 Christofer Dutz wrote:
> Hi all,
>
> I’m currently working on https://github.com/apache/iotdb/pull/12914<https://github.com/apache/iotdb/pull/12914><https://github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e><https://github.com/apache/iotdb/pull/12914><https://github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e%3chttps:/github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e%3e%3chttps:/github.com/apache/iotdb/pull/12914%3e>
>
> Here one of the problems was, that in a cluster with 3 datanodes, where the dn_rpc_address is set to 0.0.0.0, the command “show datanodes” lists each node with an address of 0.0.0.0. So, if someone wants to remove a data-node by its IP, the cli will not find the corresponding node as it thinks it’s 0.0.0.0. However, if you use the cli to delete 0.0.0.0, then it deletes all nodes.
>
> Now my initial fix for this, was, that if a data-node registers and says his dn_rpc_address is 0.0.0.0, that instead of this, the IP from which we are getting the request is being used (Obviously this one exists and belongs to the data-node registering).
> The problem is that this usually will be the dn_internal_address instead of the dn_rpc_address.
>
> Now we could use that instead, but I think it would reduce the usefulness of the “show datanodes” command, because it could be in a cluster-internal network, that the client can’t connect to.
> So, if a client wants to know which other data-nodes there are in order to connect to another one, this might not be helpful.
> However, 0.0.0.0 is also not helpful, as I see no chance to be able to connect to a data-node using 0.0.0.0:6667 as that’s not really a real Ip address.
>
> So, I think, that possibly instead of maintaining 0.0.0.0 we should replace this with the list of public IP addresses the data-node possesses. In this case show data-nodes would no longer display only one IP-Address, but a list of IP-Addresses.
>
> When removing a data-node (or sending any other commands to it) we could now identify a particular data-node as only one will have the IP+Port combination.
>
> What do you think?
>
> Chris
>

AW: How to handle the internal and external IPs of Data-Nodes?

Posted by Christofer Dutz <ch...@c-ware.de>.
Comparing the output of them,

I think deleting nodes only by ID is probably the best option.
Perhaps in a second PR we could update the output of show datanodes to include the InternalAddress and InternalPort?

I probably also should check if removing config nodes via ID works … because technically removing a datanode by Id didn’t work till my fix.

So, I think I should undo the parts I added for replacing the 0.0.0.0 with the internal address and double check the remove config-node code.

Chris

Von: Wang Critas <cr...@outlook.com>
Datum: Donnerstag, 25. Juli 2024 um 09:36
An: dev@iotdb.apache.org <de...@iotdb.apache.org>
Betreff: 答复: How to handle the internal and external IPs of Data-Nodes?
Hi Chris

Perhaps more often than not, show clusters are used?

Best
----------------
Xuan Wang
发件人: Christofer Dutz <ch...@c-ware.de>
日期: 星期四, 2024年7月25日 15:31
收件人: dev@iotdb.apache.org <de...@iotdb.apache.org>
主题: AW: How to handle the internal and external IPs of Data-Nodes?
Hi all,

In that case we would need to show the internal ip in the show datanodes command, right?
Or would we simply expect the user to know the internal IP of the datanode he wants to remove?

Chris

Von: Wang Critas <cr...@outlook.com>
Datum: Donnerstag, 25. Juli 2024 um 08:16
An: dev@iotdb.apache.org <de...@iotdb.apache.org>
Betreff: 答复: How to handle the internal and external IPs of Data-Nodes?
Hi

Why not use nodeId or internalAddress:internalPort for unified behavior

Remove ConfigNode through nodeId or internalAddress:internamPort

Best
----------------
Xuan Wang

发件人: Xinyu Tan <ta...@apache.org>
日期: 星期四, 2024年7月25日 12:26
收件人: dev@iotdb.apache.org <de...@iotdb.apache.org>
主题: Re: How to handle the internal and external IPs of Data-Nodes?
Hi, chris

+1 for identifying nodes solely by nodeid

Best
----------------
Xinyu Tan

On 2024/07/24 14:33:20 Christofer Dutz wrote:
> Hi all,
>
> I’m currently working on https://github.com/apache/iotdb/pull/12914<https://github.com/apache/iotdb/pull/12914><https://github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e><https://github.com/apache/iotdb/pull/12914><https://github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e%3chttps:/github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e%3e%3chttps:/github.com/apache/iotdb/pull/12914%3e>
>
> Here one of the problems was, that in a cluster with 3 datanodes, where the dn_rpc_address is set to 0.0.0.0, the command “show datanodes” lists each node with an address of 0.0.0.0. So, if someone wants to remove a data-node by its IP, the cli will not find the corresponding node as it thinks it’s 0.0.0.0. However, if you use the cli to delete 0.0.0.0, then it deletes all nodes.
>
> Now my initial fix for this, was, that if a data-node registers and says his dn_rpc_address is 0.0.0.0, that instead of this, the IP from which we are getting the request is being used (Obviously this one exists and belongs to the data-node registering).
> The problem is that this usually will be the dn_internal_address instead of the dn_rpc_address.
>
> Now we could use that instead, but I think it would reduce the usefulness of the “show datanodes” command, because it could be in a cluster-internal network, that the client can’t connect to.
> So, if a client wants to know which other data-nodes there are in order to connect to another one, this might not be helpful.
> However, 0.0.0.0 is also not helpful, as I see no chance to be able to connect to a data-node using 0.0.0.0:6667 as that’s not really a real Ip address.
>
> So, I think, that possibly instead of maintaining 0.0.0.0 we should replace this with the list of public IP addresses the data-node possesses. In this case show data-nodes would no longer display only one IP-Address, but a list of IP-Addresses.
>
> When removing a data-node (or sending any other commands to it) we could now identify a particular data-node as only one will have the IP+Port combination.
>
> What do you think?
>
> Chris
>

答复: How to handle the internal and external IPs of Data-Nodes?

Posted by Wang Critas <cr...@outlook.com>.
Hi Chris

Perhaps more often than not, show clusters are used?

Best
----------------
Xuan Wang
发件人: Christofer Dutz <ch...@c-ware.de>
日期: 星期四, 2024年7月25日 15:31
收件人: dev@iotdb.apache.org <de...@iotdb.apache.org>
主题: AW: How to handle the internal and external IPs of Data-Nodes?
Hi all,

In that case we would need to show the internal ip in the show datanodes command, right?
Or would we simply expect the user to know the internal IP of the datanode he wants to remove?

Chris

Von: Wang Critas <cr...@outlook.com>
Datum: Donnerstag, 25. Juli 2024 um 08:16
An: dev@iotdb.apache.org <de...@iotdb.apache.org>
Betreff: 答复: How to handle the internal and external IPs of Data-Nodes?
Hi

Why not use nodeId or internalAddress:internalPort for unified behavior

Remove ConfigNode through nodeId or internalAddress:internamPort

Best
----------------
Xuan Wang

发件人: Xinyu Tan <ta...@apache.org>
日期: 星期四, 2024年7月25日 12:26
收件人: dev@iotdb.apache.org <de...@iotdb.apache.org>
主题: Re: How to handle the internal and external IPs of Data-Nodes?
Hi, chris

+1 for identifying nodes solely by nodeid

Best
----------------
Xinyu Tan

On 2024/07/24 14:33:20 Christofer Dutz wrote:
> Hi all,
>
> I’m currently working on https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914&data=05%7C02%7C%7C56b5bbc3bf6a43ef86e808dcac7bd6ad%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638574895089604721%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=yGMJdVfhHQTbUvl6s2gKPhs8Yha%2FF4I5J%2Frzm6jPW1c%3D&reserved=0<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914&data=05%7C02%7C%7C56b5bbc3bf6a43ef86e808dcac7bd6ad%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638574895089612624%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=ds9YewCRdHVSJssiQZYZM98OWEeAsJKNABTm3wM3VL4%3D&reserved=0><https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253chttps%3A%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914%253e&data=05%7C02%7C%7C56b5bbc3bf6a43ef86e808dcac7bd6ad%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638574895089618033%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=z%2Ffm2Uup9FiK%2Bjc03uvQk7LNO%2FuAWMCO7J6Aa8pIb14%3D&reserved=0><https://github.com/apache/iotdb/pull/12914>
>
> Here one of the problems was, that in a cluster with 3 datanodes, where the dn_rpc_address is set to 0.0.0.0, the command “show datanodes” lists each node with an address of 0.0.0.0. So, if someone wants to remove a data-node by its IP, the cli will not find the corresponding node as it thinks it’s 0.0.0.0. However, if you use the cli to delete 0.0.0.0, then it deletes all nodes.
>
> Now my initial fix for this, was, that if a data-node registers and says his dn_rpc_address is 0.0.0.0, that instead of this, the IP from which we are getting the request is being used (Obviously this one exists and belongs to the data-node registering).
> The problem is that this usually will be the dn_internal_address instead of the dn_rpc_address.
>
> Now we could use that instead, but I think it would reduce the usefulness of the “show datanodes” command, because it could be in a cluster-internal network, that the client can’t connect to.
> So, if a client wants to know which other data-nodes there are in order to connect to another one, this might not be helpful.
> However, 0.0.0.0 is also not helpful, as I see no chance to be able to connect to a data-node using 0.0.0.0:6667 as that’s not really a real Ip address.
>
> So, I think, that possibly instead of maintaining 0.0.0.0 we should replace this with the list of public IP addresses the data-node possesses. In this case show data-nodes would no longer display only one IP-Address, but a list of IP-Addresses.
>
> When removing a data-node (or sending any other commands to it) we could now identify a particular data-node as only one will have the IP+Port combination.
>
> What do you think?
>
> Chris
>

AW: How to handle the internal and external IPs of Data-Nodes?

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi all,

In that case we would need to show the internal ip in the show datanodes command, right?
Or would we simply expect the user to know the internal IP of the datanode he wants to remove?

Chris

Von: Wang Critas <cr...@outlook.com>
Datum: Donnerstag, 25. Juli 2024 um 08:16
An: dev@iotdb.apache.org <de...@iotdb.apache.org>
Betreff: 答复: How to handle the internal and external IPs of Data-Nodes?
Hi

Why not use nodeId or internalAddress:internalPort for unified behavior

Remove ConfigNode through nodeId or internalAddress:internamPort

Best
----------------
Xuan Wang

发件人: Xinyu Tan <ta...@apache.org>
日期: 星期四, 2024年7月25日 12:26
收件人: dev@iotdb.apache.org <de...@iotdb.apache.org>
主题: Re: How to handle the internal and external IPs of Data-Nodes?
Hi, chris

+1 for identifying nodes solely by nodeid

Best
----------------
Xinyu Tan

On 2024/07/24 14:33:20 Christofer Dutz wrote:
> Hi all,
>
> I’m currently working on https://github.com/apache/iotdb/pull/12914<https://github.com/apache/iotdb/pull/12914><https://github.com/apache/iotdb/pull/12914%3chttps:/github.com/apache/iotdb/pull/12914%3e>
>
> Here one of the problems was, that in a cluster with 3 datanodes, where the dn_rpc_address is set to 0.0.0.0, the command “show datanodes” lists each node with an address of 0.0.0.0. So, if someone wants to remove a data-node by its IP, the cli will not find the corresponding node as it thinks it’s 0.0.0.0. However, if you use the cli to delete 0.0.0.0, then it deletes all nodes.
>
> Now my initial fix for this, was, that if a data-node registers and says his dn_rpc_address is 0.0.0.0, that instead of this, the IP from which we are getting the request is being used (Obviously this one exists and belongs to the data-node registering).
> The problem is that this usually will be the dn_internal_address instead of the dn_rpc_address.
>
> Now we could use that instead, but I think it would reduce the usefulness of the “show datanodes” command, because it could be in a cluster-internal network, that the client can’t connect to.
> So, if a client wants to know which other data-nodes there are in order to connect to another one, this might not be helpful.
> However, 0.0.0.0 is also not helpful, as I see no chance to be able to connect to a data-node using 0.0.0.0:6667 as that’s not really a real Ip address.
>
> So, I think, that possibly instead of maintaining 0.0.0.0 we should replace this with the list of public IP addresses the data-node possesses. In this case show data-nodes would no longer display only one IP-Address, but a list of IP-Addresses.
>
> When removing a data-node (or sending any other commands to it) we could now identify a particular data-node as only one will have the IP+Port combination.
>
> What do you think?
>
> Chris
>

答复: How to handle the internal and external IPs of Data-Nodes?

Posted by Wang Critas <cr...@outlook.com>.
Hi

Why not use nodeId or internalAddress:internalPort for unified behavior

Remove ConfigNode through nodeId or internalAddress:internamPort

Best
----------------
Xuan Wang

发件人: Xinyu Tan <ta...@apache.org>
日期: 星期四, 2024年7月25日 12:26
收件人: dev@iotdb.apache.org <de...@iotdb.apache.org>
主题: Re: How to handle the internal and external IPs of Data-Nodes?
Hi, chris

+1 for identifying nodes solely by nodeid

Best
----------------
Xinyu Tan

On 2024/07/24 14:33:20 Christofer Dutz wrote:
> Hi all,
>
> I’m currently working on https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fiotdb%2Fpull%2F12914&data=05%7C02%7C%7C0e82ba702c3f4f33d87108dcac61da79%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638574783738380055%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=9TNkrTQlrQZHqhx%2B%2BxJslUQVALiZEzyAx%2BROPepFkmE%3D&reserved=0<https://github.com/apache/iotdb/pull/12914>
>
> Here one of the problems was, that in a cluster with 3 datanodes, where the dn_rpc_address is set to 0.0.0.0, the command “show datanodes” lists each node with an address of 0.0.0.0. So, if someone wants to remove a data-node by its IP, the cli will not find the corresponding node as it thinks it’s 0.0.0.0. However, if you use the cli to delete 0.0.0.0, then it deletes all nodes.
>
> Now my initial fix for this, was, that if a data-node registers and says his dn_rpc_address is 0.0.0.0, that instead of this, the IP from which we are getting the request is being used (Obviously this one exists and belongs to the data-node registering).
> The problem is that this usually will be the dn_internal_address instead of the dn_rpc_address.
>
> Now we could use that instead, but I think it would reduce the usefulness of the “show datanodes” command, because it could be in a cluster-internal network, that the client can’t connect to.
> So, if a client wants to know which other data-nodes there are in order to connect to another one, this might not be helpful.
> However, 0.0.0.0 is also not helpful, as I see no chance to be able to connect to a data-node using 0.0.0.0:6667 as that’s not really a real Ip address.
>
> So, I think, that possibly instead of maintaining 0.0.0.0 we should replace this with the list of public IP addresses the data-node possesses. In this case show data-nodes would no longer display only one IP-Address, but a list of IP-Addresses.
>
> When removing a data-node (or sending any other commands to it) we could now identify a particular data-node as only one will have the IP+Port combination.
>
> What do you think?
>
> Chris
>

Re: How to handle the internal and external IPs of Data-Nodes?

Posted by Xinyu Tan <ta...@apache.org>.
Hi, chris

+1 for identifying nodes solely by nodeid

Best
----------------
Xinyu Tan

On 2024/07/24 14:33:20 Christofer Dutz wrote:
> Hi all,
> 
> I’m currently working on https://github.com/apache/iotdb/pull/12914
> 
> Here one of the problems was, that in a cluster with 3 datanodes, where the dn_rpc_address is set to 0.0.0.0, the command “show datanodes” lists each node with an address of 0.0.0.0. So, if someone wants to remove a data-node by its IP, the cli will not find the corresponding node as it thinks it’s 0.0.0.0. However, if you use the cli to delete 0.0.0.0, then it deletes all nodes.
> 
> Now my initial fix for this, was, that if a data-node registers and says his dn_rpc_address is 0.0.0.0, that instead of this, the IP from which we are getting the request is being used (Obviously this one exists and belongs to the data-node registering).
> The problem is that this usually will be the dn_internal_address instead of the dn_rpc_address.
> 
> Now we could use that instead, but I think it would reduce the usefulness of the “show datanodes” command, because it could be in a cluster-internal network, that the client can’t connect to.
> So, if a client wants to know which other data-nodes there are in order to connect to another one, this might not be helpful.
> However, 0.0.0.0 is also not helpful, as I see no chance to be able to connect to a data-node using 0.0.0.0:6667 as that’s not really a real Ip address.
> 
> So, I think, that possibly instead of maintaining 0.0.0.0 we should replace this with the list of public IP addresses the data-node possesses. In this case show data-nodes would no longer display only one IP-Address, but a list of IP-Addresses.
> 
> When removing a data-node (or sending any other commands to it) we could now identify a particular data-node as only one will have the IP+Port combination.
> 
> What do you think?
> 
> Chris
>