Skip to content

Conversation

@yinzhijian
Copy link
Contributor

@yinzhijian yinzhijian commented Mar 10, 2023

Proposed changes

Issue Number: close #xxx

旧集群启用FQDN

如果需要为旧集群启用FQDN,则需要将系统升级到包含本commit的版本.

警告:升级二进制版本时,先不要开启enable_fqdn_mode配置。

FE启用FQDN

为了让FE启用FQDN,需要先操作follower、observer节点,最后再操作master节点。

修改follower FE、observer FE节点

注意:<fe_hostname>必须要跟/etc/hosts中的一致,且/etc/hosts不能存在重复的IP,否则会导致FE启动失败。

逐一对follower、observer节点进行以下操作:

  1. 停止节点。进入到FE根目录执行以下命令:
    a. sh bin/stop_fe.sh
  2. 检查节点是否停止。通过 MySQL 客户端执行以下语句,查看该 FE 节点的 Alive 状态直至变为 false。
    a. show frontends;
  3. 为节点设置FQDN
    a. ALTER SYSTEM MODIFY FRONTEND "<fe_ip>:<edit_log_port>" HOSTNAME "<fe_hostname>";
  4. 修改节点配置。修改FE根目录中的conf/fe.conf文件,添加如下配置:
    a. enable_fqdn_mode = true
  5. 启动节点。进入到FE根目录执行以下命令:
    a. sh bin/start_fe.sh
  6. 检查节点是否启动。通过 MySQL 客户端执行以下语句,查看该 FE 节点的 Alive 状态直至变为 true。
    a. show frontends;

修改master FE节点

当所有的follower、observer节点都修改完毕后,可以开启修改master fe节点。

注意:在完成master fe修改之前,整个集群的FQDN并未生效,在这个期间新添加的FE,依旧使用IP访问,所以尽量在该操作期间禁止新FE的添加。

  1. 停止节点。进入到FE根目录执行以下命令:
    a. sh bin/stop_fe.sh
  2. 检查节点是否停止。通过 MySQL 客户端执行以下语句,查看该 FE 节点的 Alive 状态直至变为 false。
    a. show frontends;
  3. 为节点设置FQDN
    a. ALTER SYSTEM MODIFY FRONTEND "<fe_ip>:<edit_log_port>" HOSTNAME "<fe_hostname>";
  4. 修改节点配置。修改FE根目录中的conf/fe.conf文件,添加如下配置:
    a. enable_fqdn_mode = true
  5. 启动节点。进入到FE根目录执行以下命令:
    a. sh bin/start_fe.sh
  6. 检查节点是否启动。通过 MySQL 客户端执行以下语句,查看该 FE 节点的 Alive 状态直至变为 true。
    a. show frontends;

Backend节点启用FQDN

BE节点启用FQDN只需要通过MYSQL执行以下命令,不需要对BE执行重启操作。
ALTER SYSTEM MODIFY BACKEND "<backend_ip>:<backend_port>" HOSTNAME "<be_hostname>";

Checklist(Required)

  • Does it affect the original behavior
  • Has unit tests been added
  • Has document been added or modified
  • Does it need to update dependencies
  • Is this PR support rollback (If NO, please explain WHY)

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@github-actions github-actions bot added the area/planner Issues or PRs related to the query planner label Mar 10, 2023
@yinzhijian
Copy link
Contributor Author

run buildall

@yinzhijian
Copy link
Contributor Author

run feut

@yinzhijian yinzhijian force-pushed the dev.support_fqdn_upgrade branch from 722d57a to e77b47c Compare March 14, 2023 07:27
@yinzhijian
Copy link
Contributor Author

run buildall

@hello-stephen
Copy link
Contributor

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 33.91 seconds
stream load tsv: 466 seconds loaded 74807831229 Bytes, about 153 MB/s
stream load json: 38 seconds loaded 2358488459 Bytes, about 59 MB/s
stream load orc: 75 seconds loaded 1101869774 Bytes, about 14 MB/s
stream load parquet: 32 seconds loaded 861443392 Bytes, about 25 MB/s
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230314080928_clickbench_pr_113963.html

@yinzhijian
Copy link
Contributor Author

run p0

1 similar comment
@yinzhijian
Copy link
Contributor Author

run p0

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@morningman morningman merged commit 54a5193 into apache:master Mar 15, 2023
gnehil pushed a commit to gnehil/doris that referenced this pull request Apr 21, 2023
@zddr zddr mentioned this pull request May 23, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/planner Issues or PRs related to the query planner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants