obd黑屏部署,在扩容observer或者zone的时候,官方文档描述3.x和4.x的差异还是蛮大的
3.x:
官方文档:OceanBase分布式数据库-海量数据 笔笔算数
1)通过部署(deploy)一个新的集群,但是不要启动
2)修改obd的缓存的老的配置文件,把新的节点信息添加到老集群的配置文件中
3)启动老的集群;但是经常会报这样的错误: [ERROR] The deployment architecture is changed and cannot be reloaded. 即便重新reload 也是报同样的错误
4.x:
官方文档:OceanBase分布式数据库-海量数据 笔笔算数
1)通过部署observer的app;
2)创建对应的目录;
3)拉起observer 进程;
问题:
1)对应的需要部署obagent,比较麻烦,官方文档没有提及;
2)最终部署的observer、obagent的进程节点信息都更新到集群配置文件~/.obd/cluster/{clustername}/config.yaml中去,会不会像3.x一样报部署结构不一致错误呢?
3)如果老的observer主机内存是256G,新加入的observer是128G,这样config.yaml global部分的
memory_limit 是怎么设置呢?如果设置小了,256G的observer浪费,如果设置大了,128G的observer会不会经常oom呢?
4)部署拉起后,实例会产生一些随机密码,比如 http_basic_auth_password 这种,如果和老的不一致,会产生什么问题?
官方应该搞一套统一的运维规范,3.x和4.x 完全不一样,不知道怎么想的!
官网 3.x 文档上 《使用 OBD 进行集群的扩容》中是通过obd cluster edit-config 方法修改配置,在由用户连接 observer 收到添加 observer,该方法并不易用。而在 OBD V2.5 之后,我们新增 obd 支持 observer 扩容的运维功能,不需要用户手动添加 observer。
另外 OceanBase分布式数据库-海量数据 笔笔算数 这篇文章并不是通过 obd 黑屏进行扩容,在搜索文档时,您可以指定产品。
另外,感谢您对于文档内容的建议,我们会充分听取并加以改善。
observer 通过这个obd scale_out可以完成,并且顺利扩容了三个observer,但是在为3个新扩的observer扩容obagent的时候就报错:
[2024-06-03 16:44:32.675] [DEBUG] - sub status ref count to 0
[2024-06-03 16:44:32.676] [DEBUG] - export status
[2024-06-03 16:44:32.688] [ERROR] OBD-1023: Failed to merge config: global is not allowed to be set in additional conf
[2024-06-03 16:44:32.688] [ERROR] Traceback (most recent call last):
[2024-06-03 16:44:32.688] [ERROR] File "core.py", line 1735, in scale_out
[2024-06-03 16:44:32.688] [ERROR] File "_deploy.py", line 1213, in scale_out
[2024-06-03 16:44:32.689] [ERROR] File "_deploy.py", line 1474, in _merge_component
[2024-06-03 16:44:32.689] [ERROR] File "_deploy.py", line 402, in merge_config
[2024-06-03 16:44:32.689] [ERROR] AssertionError: global is not allowed to be set in additional conf
[2024-06-03 16:44:32.689] [ERROR]
[2024-06-03 16:44:32.689] [ERROR] Failed to scale out obdemo
[2024-06-03 16:44:32.689] [INFO] See https://www.oceanbase.com/product/ob-deployer/error-codes .
[2024-06-03 16:44:32.689] [INFO] Trace ID: 7c581006-2185-11ef-90a4-c62cc4bad044
[2024-06-03 16:44:32.689] [INFO] If you want to view detailed obd logs, please run: obd display-trace 7c581006-2185-11ef-90a4-c62cc4bad044
admin@ubuntu:~$ cat scale_out_obagent.yaml
obagent:
servers:
- name: server4
ip: 10.xx.xx.155
- name: server5
ip: 10.xx.xx.156
- name: server6
ip: 10.xx.xx.126
global:
home_path: /home/admin/obagent
admin@ubuntu:~$ obd cluster scale_out obdemo -c scale_out_obagent.yaml
Cluster status check ok
[ERROR] OBD-1023: Failed to merge config: global is not allowed to be set in additional conf
[ERROR] Failed to scale out obdemo
See https://www.oceanbase.com/product/ob-deployer/error-codes .
Trace ID: 497a76f0-2186-11ef-964f-c62cc4bad044
If you want to view detailed obd logs, please run: obd display-trace 497a76f0-2186-11ef-964f-c62cc4bad044
请问,是不是哪里的姿势错了吗?
环境:
os:ubuntu 2204
ob:4.3.0.1
admin@ubuntu:~$ obd --version
OceanBase Deploy: 2.7.0
REVISION: ed74f49b8568586166b8126f1d270cbe2a0e7be1
BUILD_BRANCH: HEAD
BUILD_TIME: Mar 27 2024 19:46:54OURCE
Copyright (C) 2021 OceanBase
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
嗯嗯,犯的低级错误
admin@ubuntu:~$ obd cluster scale_out obdemo -c scale_out_obagent.yaml
Cluster status check ok
Get local repositories and plugins ok
+------------------------------------------------------------------------------------------+
| Packages |
+------------+---------+------------------------+------------------------------------------+
| Repository | Version | Release | Md5 |
+------------+---------+------------------------+------------------------------------------+
| obagent | 4.2.2 | 100000042024011120.el8 | bf152b880953c2043ddaf80d6180cf22bb8c8ac2 |
+------------+---------+------------------------+------------------------------------------+
Repository integrity check ok
Parameter check ok
Initializes obagent work home ok
Remote obagent-4.2.2-100000042024011120.el8-bf152b880953c2043ddaf80d6180cf22bb8c8ac2 repository install ok
Remote obagent-4.2.2-100000042024011120.el8-bf152b880953c2043ddaf80d6180cf22bb8c8ac2 repository lib check ok
Search plugins ok
Load cluster param plugin ok
Check before start obagent ok
Start obagent ok
obagent program health check ok
Connect to Obagent ok
succeed
Generate observer configuration ok
Connect to observer 10.12.75.64:2881 ok
Cluster bootstrap ok
[ERROR] OBD-5000: alter system add server "10.xx.xx.155:2882" zone "zone1" execute failed
[ERROR] OBD-5000: alter system add server "10.xx.xx.156:2882" zone "zone2" execute failed
[ERROR] OBD-5000: alter system add server "10.xx.xx.126:2882" zone "zone3" execute failed
配置文件如下:
$ cat scale_out_obagent.yaml
obagent:
servers:
- name: server4
ip: 10.xx.xx.155
- name: server5
ip: 10.xx.xx.156
- name: server6
ip: 10.xx.xx.126
server4:
home_path: /home/admin/obagent
server5:
home_path: /home/admin/obagent
server6:
home_path: /home/admin/obagent
就是scale_out的时候有错误输出,但是config.yaml配置中有更新,查看obagent却是正常:
此外,好像config.yaml配置中的obproxy-ce.rs_list中没有更新成最新所有的observer地址。
能否提供一下日志呢,这的错误输出是非预期的
看了下log,这是一个已知bug,我们正在修复,近期会发新版本 obd 进行修复。
那这个算正常吗?
http_basic_auth_password 密码随机不一致问题,新版obd会修复,可以用obd cluster edit-config <deploy_name>设置为原先的密码
这个是已知问题。如果是新加的zone 预期是加进去的(新版本修复了),但是只是加server 是不加进去的,因为rs list 是root server 所在的机器。
不过不加进去目前使用也没有影响 ,只有rslist 里面有一个server能连的上就可以正常工作
问题是已经scale out部署的实例,实际产生的http_basic_auth_password密码和配置文件中是不一致的,不能修改obd cluster edit-config <deploy_name> 就完事吧
那再弱弱请教下,此时加入的observer会作为obproxy的realserver吗? 怎么验证下?
可以的,修改成原先的之后,obd cluster restart <deploy_name> --wp就好