[MCOL-4782] CMAPI blocks node after host name resolution error. Created: 2021-06-29  Updated: 2022-03-01  Resolved: 2022-02-21

Status: Closed
Project: MariaDB ColumnStore
Component/s: cmapi
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Denis Khalikov Assignee: Roman
Resolution: Won't Do Votes: 0
Labels: None

Attachments: File VM1.log     File VM2.log    

 Description   

Test case:
1. 2 virtual machines (virtual box) running ubuntu 20.04 connected with internal network.
2. Enable cmapi server on both (python3 -m cmapi_server)
3. Add first node on VM1 from VM1 "curl -X PUT https://127.0.0.1:8640/cmapi/0.4.0/cluster/node --header 'Content-Type:application/json' --header 'x-api-key:somekey123' --data '

{"timeout":20, "node": "VM1_IPAddress"}

' -k"
4. Add second node from VM1 on VM2 https://127.0.0.1:8640/cmapi/0.4.0/cluster/node --header 'Content-Type:application/json' --header 'x-api-key:somekey123' --data '

{"timeout":20, "node": "VM2_IPAddress"}

' -k"

Log VM1:
66 [29/Jun/2021 12:26:45] cherrypy.access.139637462044192 192.168.1.20 - - [29/Jun/2021:12:26:45] "PUT /cmapi/0.4.0/node/commit HTTP/1.1" 200 43 "" "python-requests/2.23.0"
67 [29/Jun/2021 12:26:45] cmapi_server add_node returns

{'timestamp': '2021-06-29 12:26:43.236266', 'node_id': '192.168.1.20'}

68 [29/Jun/2021 12:26:45] cherrypy.access.139637462044192 127.0.0.1 - - [29/Jun/2021:12:26:45] "PUT /cmapi/0.4.0/cluster/node HTTP/1.1" 200 70 "" "curl/7.68.0"
69 [29/Jun/2021 12:28:04] cmapi_server add_node starts
70 [29/Jun/2021 12:28:04] cmapi_server put_begin starts
71 [29/Jun/2021 12:28:04] cmapi_server put_begin JSON body

{'id': 134252, 'timeout': 299}

72 [29/Jun/2021 12:28:04] cmapi_server put_begin returns

{'timestamp': '2021-06-29 12:28:04.742922'}

73 [29/Jun/2021 12:28:04] cherrypy.access.139637462044192 192.168.1.20 - - [29/Jun/2021:12:28:04] "PUT /cmapi/0.4.0/node/begin HTTP/1.1" 200 43 "" "python-requests/2.23.0"
74 [29/Jun/2021 12:28:04] root add_node(): Caught exception: '[Errno 2] Host name lookup failure', config file is unchanged
75 [29/Jun/2021 12:28:04] cherrypy.access.139637462044192 192.168.1.20 - - [29/Jun/2021:12:28:04] "PUT /cmapi/0.4.0/node/rollback HTTP/1.1" 200 43 "" "python-requests/2.23.0"
76 [29/Jun/2021 12:28:04] cmapi_server add_node there was an error adding the node: [Errno 2] Host name lookup failure
77 [29/Jun/2021 12:28:04] cherrypy.access.139637462044192 127.0.0.1 - - [29/Jun/2021:12:28:04] "PUT /cmapi/0.4.0/cluster/node HTTP/1.1" 422 83 "" "curl/7.68.0"
78 [29/Jun/2021 12:28:19] cmapi_server add_node starts
79 [29/Jun/2021 12:28:19] cmapi_server put_begin starts
80 [29/Jun/2021 12:28:19] cmapi_server put_begin JSON body

{'id': 188952, 'timeout': 299}

81 [29/Jun/2021 12:28:19] cmapi_server put_begin returns

{'timestamp': '2021-06-29 12:28:19.262334'}

82 [29/Jun/2021 12:28:19] cherrypy.access.139637462044192 192.168.1.20 - - [29/Jun/2021:12:28:19] "PUT /cmapi/0.4.0/node/begin HTTP/1.1" 200 43 "" "python-requests/2.23.0"
83 [29/Jun/2021 12:28:19] root Got a 4xx error

Log VM2:
17 [29/Jun/2021 12:28:04] cherrypy.access.139648137915024 192.168.1.20 - - [29/Jun/2021:12:28:04] "PUT /cmapi/0.4.0/node/begin HTTP/1.1" 200 43 "" "python-requests/2.23.0"
18 [29/Jun/2021 12:28:18] cherrypy.access.139648137915024 192.168.1.20 - - [29/Jun/2021:12:28:18] "PUT /cmapi/0.4.0/node/begin HTTP/1.1" 422 42 "" "python-requests/2.23.0"
19 [29/Jun/2021 12:28:20] cherrypy.access.139648137915024 192.168.1.20 - - [29/Jun/2021:12:28:20] "PUT /cmapi/0.4.0/node/begin HTTP/1.1" 422 42 "" "python-requests/2.23.0"
20 [29/Jun/2021 12:28:22] cherrypy.access.139648137915024 192.168.1.20 - - [29/Jun/2021:12:28:22] "PUT /cmapi/0.4.0/node/begin HTTP/1.1" 422 42 "" "python-requests/2.23.0"

Full logs attached.



 Comments   
Comment by Roman [ 2022-02-21 ]

This is known and documented limitation. The nodes must be able to resolve the hostnames.

Generated at Thu Feb 08 02:52:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.