1
0
mirror of https://github.com/gluster/glusterd2.git synced 2026-02-05 12:45:38 +01:00

9 Commits

Author SHA1 Message Date
Prashanth Pai
936f040f10 e2e: Create separate localstatedirs for each test
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-09-17 17:45:31 +05:30
Oshank Kumar
38d20ee280 restclient: refactor some of the rest client code .
added separate method to create http.Request.
Initializing underlying http.Client while initializing
GlusterD rest client

Signed-off-by: Oshank Kumar <okumar@redhat.com>
2018-08-14 18:28:18 +05:30
John Mulligan
fb9769ca25 e2e: use setupCluster in rest api test
This test didn't really need a lot of manual control over it's
glusterd2 instances. Switch it to use the test cluster functions.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2018-07-13 10:56:50 +05:30
Prashanth Pai
dd2a8f7507 Remove 'workdir' config in favour of 'localstatedir'
For all practical purposes, in real usage and in tests, the configurable
paths `workdir` and `localstatedir` are set to the same directory which
defaults to `/var/lib/glusterd2` or `/user/local/var/lib/glusterd2`

Unlike glusterd1, glusterd2 does not daemonize itself. The working
directory of the process can be meaningfully set to either current
working directory from where glusterd2 process is started or to
`localstatedir` where glusterd2 stores all its data. We choose the
latter.

This change also reduces ambiguity for users and one less thing to
configure.

Signed-off-by: Prashanth Pai <ppai@redhat.com>
2018-07-02 09:44:30 +05:30
John Mulligan
bb72497b9c e2e: remove instances of EraseWorkdir from test bodies
Avoid deleting the glusterd2 workdirs within the test bodies.
This will allow for post-test debugging. These dirs will be
cleaned up by the start of the next test(s) or by external
code.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2018-04-26 15:12:14 -04:00
Aravinda VK
ae0fe1b65a 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 <avishwan@redhat.com>
2018-02-27 12:39:33 +05:30
Aravinda VK
369c3ba8c3 restapi: Fixed Auth test
Updates: #252
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2017-11-09 10:18:45 +05:30
Aravinda VK
76b710e9e4 restapi/auth: Fixed IsRESTServer running function
Updates: #252
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2017-11-08 17:22:11 +05:30
Aravinda VK
f9c851ec26 rest: Authentication middleware
Added REST API authentication middleware. On Glusterd2 start, it
generates `$WORKDIR/auth` file with random string if not exists.

Local CLI/Curl can use that auth file and add Authorization request.

Note: User management is not covered in this patch. Limited to local
consumers only who can access `$WORKDIR/auth`. Auth is disabled by
default which can be enabled using config file option `restauth=true`

CLI needs new flag `--auth-file` to accept path for auth file similar
to Glusterd1 CLI flag `glusterd-sock`

Updates: #252
Signed-off-by: Aravinda VK <avishwan@redhat.com>
2017-11-08 17:22:11 +05:30