Skip to content

Commit 5c81074

Browse files
committed
documentの修正をrevert
1 parent 680c51d commit 5c81074

File tree

4 files changed

+115
-135
lines changed

4 files changed

+115
-135
lines changed

Diff for: docs/operation-guide.md

+26-51
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ Sakura-DBCは、内部的に以下の4つの状態を持ち、状況に応じて
3737
## BGP経路の属性
3838

3939
Sakura-DBCは、BGP経路のCommunity属性として表現することで、他のノードに自身の状態を広告します。
40-
データベースサーバでは、デーモンとして起動するdb-controllerにgobgpが組み込まれており、BGPピアを確立します。
40+
41+
vtyshコマンドを経由してFRRouting bgpdの設定を変更し、経路広告を行います。
4142

4243
| 状態 | BGP Community |
4344
| --------- | ------------- |
@@ -52,16 +53,16 @@ Sakura-DBCは、BGP経路のCommunity属性として表現することで、他
5253
Sakura-DBCを起動するには以下のようにコマンドを入力します。
5354

5455
```
55-
# systemctl start db-controller
56-
# systemctl status db-controller
57-
db-controller.service - Database Controller
58-
Loaded: loaded (/etc/systemd/system/db-controller.service; enabled; vendor preset: disabled)
56+
[root@test-db1 ~]# systemctl start sakura-controller
57+
[root@test-db1 ~]# systemctl status sakura-controller
58+
sakura-controller.service - Database Controller
59+
Loaded: loaded (/etc/systemd/system/sakura-controller.service; enabled; vendor preset: disabled)
5960
Active: active (running) since Thu 2023-07-13 16:56:21 JST; 4s ago
60-
Main PID: 1391344 (db-controller)
61+
Main PID: 1391344 (sakura-controll)
6162
Tasks: 9 (limit: 24876)
6263
Memory: 5.5M
63-
CGroup: /system.slice/db-controller.service
64-
└─1391344 /root/distributed-mariadb-controller/bin/db-controller --log-level info --db-repilica-password-filepath /root/.db-replica-password
64+
CGroup: /system.slice/sakura-controller.service
65+
└─1391344 /root/distributed-mariadb-controller/bin/sakura-controller --log-level info --db-repilica-password-filepath /root/.db-replica-password
6566
<snip>
6667
```
6768

@@ -70,12 +71,12 @@ Sakura-DBCを起動するには以下のようにコマンドを入力します
7071
Sakura-DBCを停止するには以下のようにコマンドを入力します。
7172

7273
```
73-
# systemctl stop db-controller
74-
# systemctl status db-controller
74+
[root@test-db1 ~]# systemctl stop sakura-controller
75+
[root@test-db1 ~]# systemctl status sakura-controller
7576
● sakura-controller.service - Database Controller
76-
Loaded: loaded (/etc/systemd/system/db-controller.service; enabled; vendor preset: disabled)
77+
Loaded: loaded (/etc/systemd/system/sakura-controller.service; enabled; vendor preset: disabled)
7778
Active: inactive (dead) since Thu 2023-07-13 16:55:35 JST; 7s ago
78-
Process: 694 ExecStart=/root/distributed-mariadb-controller/bin/db-controller --log-level info --db-repilica-password-filepath /root/.db-replica-password (code=exited, status=0/SUCCESS)
79+
Process: 694 ExecStart=/root/distributed-mariadb-controller/bin/sakura-controller --log-level info --db-repilica-password-filepath /root/.db-replica-password (code=exited, status=0/SUCCESS)
7980
Main PID: 694 (code=exited, status=0/SUCCESS)
8081
<snip>
8182
```
@@ -85,15 +86,15 @@ Sakura-DBCを停止するには以下のようにコマンドを入力します
8586
Sakura-DBCは、状態遷移や、それに伴い実行したコマンドなどをログ出力します。ログを確認するにはjournalctlコマンドを利用します。
8687

8788
```
88-
# journalctl -u db-controller -e
89+
journalctl -u sakura-controller -e
8990
```
9091

9192
## 現在の内部状態の確認方法
9293

9394
Sakura-DBCの現在の状態を確認するには、curlコマンドなどで以下のエンドポイントをHTTPリクエストします。
9495

9596
```
96-
# curl http://127.0.0.1:54545/status
97+
[root@test-db1 ~]# curl http://127.0.0.1:54545/status
9798
{"state":"replica"}
9899
```
99100

@@ -103,7 +104,7 @@ Sakura-DBCがGSLBに対し、どのようにレスポンスを行っているか
103104

104105
```
105106
! primaryの場合(200 OKが返る)
106-
# curl -v http://127.0.0.1:54545/healthcheck
107+
[root@test-db2 ~]# curl -v http://127.0.0.1:54545/healthcheck
107108
* Connected to 127.0.0.1 (127.0.0.1) port 54545 (#0)
108109
> GET /healthcheck HTTP/1.1
109110
> Host: 127.0.0.1:54545
@@ -113,7 +114,7 @@ Sakura-DBCがGSLBに対し、どのようにレスポンスを行っているか
113114
< Content-Length: 0
114115
115116
! primary以外の場合(503 Service Unavailableが返る)
116-
# curl -v http://127.0.0.1:54545/healthcheck
117+
[root@test-db1 ~]# curl -v http://127.0.0.1:54545/healthcheck
117118
* Connected to 127.0.0.1 (127.0.0.1) port 54545 (#0)
118119
> GET /healthcheck HTTP/1.1
119120
> Host: 127.0.0.1:54545
@@ -125,12 +126,10 @@ Sakura-DBCがGSLBに対し、どのようにレスポンスを行っているか
125126

126127
## BGP経路の確認方法
127128

128-
### アンカーサーバ
129-
130129
BGPピアの状態を確認するには、以下のようにvtyshコマンドを用います。
131130

132131
```
133-
# vtysh -c 'show ip bgp summary'
132+
[root@test-db1 ~]# vtysh -c 'show ip bgp summary'
134133
135134
IPv4 Unicast Summary (VRF default):
136135
BGP router identifier xx.xx.xx.xx, local AS number 65001 vrf-id 0
@@ -148,7 +147,7 @@ Total number of neighbors 2
148147
BGP経路情報を確認するには、以下のようにvtyshコマンドを用います。
149148

150149
```
151-
# vtysh -c 'show ip bgp'
150+
[root@test-db1 ~]# vtysh -c 'show ip bgp'
152151
BGP table version is 4, local router ID is xx.xx.xx.xx, vrf id 0
153152
Default local pref 100, local AS 65001
154153
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
@@ -168,7 +167,7 @@ RPKI validation codes: V valid, I invalid, N Not found
168167
169168
Displayed 3 routes and 5 total paths
170169
171-
# vtysh -c 'show ip bgp community-list primary'
170+
[root@test-db1 ~]# vtysh -c 'show ip bgp community-list primary'
172171
<snip>
173172
174173
Network Next Hop Metric LocPrf Weight Path
@@ -178,47 +177,23 @@ Displayed 3 routes and 5 total paths
178177
Displayed 1 routes and 5 total paths
179178
```
180179

181-
### DBサーバ
182-
183-
BGPピアの状態を確認するには、以下のようにgobgpコマンドを用います。
184-
db-controllerがgobgpのgRPCポート(50051)を待ち受けており、そこから情報が取得されます。
185-
186-
```
187-
# gobgp neighbor
188-
Peer AS Up/Down State |#Received Accepted
189-
xx.xx.xx.xx 65001 00:30:02 Establ | 1 1
190-
xx.xx.xx.xx 65001 00:31:05 Establ | 3 2
191-
```
192-
193-
BGP経路情報を確認するには、以下のようにgobgpコマンドを用います。
194-
195-
```
196-
# gobgp global rib
197-
Network Next Hop AS_PATH Age Attrs
198-
*> xx.xx.xx.xx/32 xx.xx.xx.xx 00:34:41 [{Origin: i} {Communities: 65001:3}]
199-
*> xx.xx.xx.xx/32 xx.xx.xx.xx 00:34:18 [{Origin: i} {LocalPref: 100} {Communities: 65001:4} {Originator: xx.xx.xx.xx} {ClusterList: [xx.xx.xx.xx]}]
200-
* xx.xx.xx.xx/32 xx.xx.xx.xx 00:34:35 [{Origin: i} {LocalPref: 100} {Communities: 65001:4} {Originator: xx.xx.xx.xx} {ClusterList: [xx.xx.xx.xx]}]
201-
*> xx.xx.xx.xx/32 xx.xx.xx.xx 00:00:00 [{Origin: i} {Med: 0} {LocalPref: 100} {Communities: 65001:10} {Originator: xx.xx.xx.xx} {ClusterList: [xx.xx.xx.xx]}]
202-
* xx.xx.xx.xx/32 xx.xx.xx.xx 00:35:20 [{Origin: i} {Med: 0} {LocalPref: 100} {Communities: 65001:10}]
203-
```
204-
205180
## ログレベルの変更方法
206181

207182
[クイックスタートガイド](quick-start-guide.md)の手順では、通常の運用において推奨されるinfoログレベルにて設定するようになっています。
208183
もし、ログレベルを変更するには、以下のようにします。
209184

210185
```
211-
# vi /etc/systemd/system/db-controller.service
186+
vi /etc/systemd/system/sakura-controller.service
212187
213-
! ログレベルを変更します(debugに変更する場合)
214-
ExecStart = /root/distributed-mariadb-controller/bin/db-controller --log-level debug ...
188+
! infoになっている部分を変更します
189+
ExecStart = /root/distributed-mariadb-controller/bin/sakura-controller --log-level info --db-repilica-password-filepath /root/.db-replica-password
215190
```
216191

217-
systemdに反映し、db-controllerを再起動します
192+
systemdに反映し、Sakura-DBCを再起動します
218193

219194
```
220-
# systemctl daemon-reload
221-
# systemctl restart db-controller
195+
systemctl daemon-reload
196+
systemctl restart sakura-controller
222197
```
223198

224199
指定可能なログレベルと、各レベルにおいて出力されるログの基準は以下の通りです。

Diff for: docs/prometheus-setup.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,5 +123,5 @@ systemctl start alertmanager
123123

124124
以下の場合に通知を行うような設定となっていますので、通知が届くかどうか確認してください。
125125

126-
- db-controllerデーモンがダウンしている場合(サーバがダウンしている状態も含む)
126+
- sakura-controllerデーモンがダウンしている場合(サーバがダウンしている状態も含む)
127127
- primary, replica以外の状態の場合

0 commit comments

Comments
 (0)