Skip to content
This repository was archived by the owner on Mar 26, 2020. It is now read-only.

Commit ae0fe1b

Browse files
committed
Default configuration for glusterd2 when run using systemctl
systemctl enable glusterd2 systemctl start glusterd2 systemctl status glusterd2 Limited config file extension to `TOML` to avoid confusions with multiple config extensions. Signed-off-by: Aravinda VK <[email protected]>
1 parent b5f8705 commit ae0fe1b

20 files changed

+62
-55
lines changed

doc/quick-start-user-guide.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,29 +51,29 @@ $ mkdir -p /var/lib/gd2
5151
```
5252

5353
**Create a config file:** This is optional but if your VM/machine has multiple network interfaces, it is recommended to create a config file. The config file location can be passed to Glusterd2 using the `--config` option.
54-
Glusterd2 will also pick up conf files named `glusterd.{yaml|json|toml}` if available in `/etc/glusterd2/` or the current directory.
55-
56-
```yaml
57-
$ cat conf.yaml
58-
workdir: "/var/lib/gd2"
59-
peeraddress: "192.168.56.101:24008"
60-
clientaddress: "192.168.56.101:24007"
61-
etcdcurls: "http://192.168.56.101:2379"
62-
etcdpurls: "http://192.168.56.101:2380"
54+
Glusterd2 will also pick up conf file named `glusterd2.toml` if available in `/etc/glusterd2/` or the current directory.
55+
56+
```toml
57+
$ cat conf.toml
58+
workdir = "/var/lib/gd2"
59+
peeraddress = "192.168.56.101:24008"
60+
clientaddress = "192.168.56.101:24007"
61+
etcdcurls = "http://192.168.56.101:2379"
62+
etcdpurls = "http://192.168.56.101:2380"
6363
```
6464

6565
Replace the IP address accordingly on each node.
6666

6767
**Start glusterd2 process:** Glusterd2 is not a daemon and currently can run only in the foreground.
6868

6969
```sh
70-
# ./glusterd2 --config conf.yaml
70+
# ./glusterd2 --config conf.toml
7171
```
7272

7373
You will see an output similar to the following:
7474
```log
7575
INFO[2017-08-28T16:03:58+05:30] Starting GlusterD pid=1650
76-
INFO[2017-08-28T16:03:58+05:30] loaded configuration from file file=conf.yaml
76+
INFO[2017-08-28T16:03:58+05:30] loaded configuration from file file=conf.toml
7777
INFO[2017-08-28T16:03:58+05:30] Generated new UUID uuid=19db62df-799b-47f1-80e4-0f5400896e05
7878
INFO[2017-08-28T16:03:58+05:30] started muxsrv listener
7979
INFO[2017-08-28T16:03:58+05:30] Started GlusterD ReST server ip:port=192.168.56.101:24007

e2e/config/1.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
workdir = "/tmp/gd2_func_test/w1"
2+
logfile = "w1.log"
3+
peeraddress = "127.0.0.1:24008"
4+
clientaddress = "127.0.0.1:24007"
5+
etcdcurls = "http://127.0.0.1:2479"
6+
etcdpurls = "http://127.0.0.1:2480"

e2e/config/1.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

e2e/config/2.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
workdir = "/tmp/gd2_func_test/w2"
2+
logfile = "w2.log"
3+
peeraddress = "127.0.0.1:23008"
4+
clientaddress = "127.0.0.1:23007"
5+
etcdcurls = "http://127.0.0.1:2379"
6+
etcdpurls = "http://127.0.0.1:2380"

e2e/config/2.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

e2e/config/3.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
workdir = "/tmp/gd2_func_test/w3"
2+
logfile = "w3.log"
3+
peeraddress = "127.0.0.1:22008"
4+
clientaddress = "127.0.0.1:22007"
5+
etcdcurls = "http://127.0.0.1:2279"
6+
etcdpurls = "http://127.0.0.1:2280"

e2e/config/3.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

e2e/config/4.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
workdir = "/tmp/gd2_func_test/w4"
2+
logfile = "w4.log"
3+
peeraddress = "127.0.0.1:21008"
4+
clientaddress = "127.0.0.1:21007"
5+
etcdcurls = "http://127.0.0.1:2179"
6+
etcdpurls = "http://127.0.0.1:2180"
7+
restauth = true

e2e/config/4.yaml

Lines changed: 0 additions & 7 deletions
This file was deleted.

e2e/georep_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
func TestGeorepCreateDelete(t *testing.T) {
1414
r := require.New(t)
1515

16-
gds, err := setupCluster("./config/1.yaml", "./config/2.yaml")
16+
gds, err := setupCluster("./config/1.toml", "./config/2.toml")
1717
r.Nil(err)
1818
defer teardownCluster(gds)
1919

0 commit comments

Comments
 (0)