The latest golang version is 1.10.3. We are bumping golang version
to the previous stable version that is present as a package in base
repo on centos 7.
Signed-off-by: Prashanth Pai <ppai@redhat.com>
if a restauth key is missing in config
file or if restauth is set to true,
glusterd2 will do token authentication.
Authentication can be disabled by
by setting restauth key in the configuration
to false.
updated test cases to use authentication
if auth file is present
added default rest authentication in glustercli
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
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>
If `PREFIX` is `/usr` then `logdir`, `rundir` and `localstatedir`
should not contain the prefix.
**Global default configuration**: Based on the `--prefix` used during
installation/make global config should be installed in
`$PREFIX/etc/glusterfs/glusterd2.toml`. All the default values from
code should be moved to this file.
**Removed logic to pick config file from current directory**: Since
Glusterd2 will be run as daemon or background process, automatically
picking config file from current directory will add confusion to
users. For development, if global config file not exists then it loads
config file from the current directory.
**Config file as argument**: Glusterd2 applies global configurations
first and then applies this configuration to overwrite the values
if any.
Signed-off-by: Aravinda VK <avishwan@redhat.com>
SC2086: Double quote to prevent globbing and word splitting.
SC2046: Quote this to prevent word splitting.
Signed-off-by: Michael Adam <obnox@redhat.com>
SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]].
SC1117: Backslash is literal in "\(". Prefer explicit escaping: "\\(".
SC1117: Backslash is literal in "\(". Prefer explicit escaping: "\\)".
Signed-off-by: Michael Adam <obnox@redhat.com>
SC1117: Backslash is literal in "\(". Prefer explicit escaping: "\\(".
SC1117: Backslash is literal in "\)". Prefer explicit escaping: "\\)".
SC2003: expr is antiquated. Consider rewriting this using $((..)), ${} or [[ ]].
Signed-off-by: Michael Adam <obnox@redhat.com>
SC2086: Double quote to prevent globbing and word splitting.
SC2046: Quote this to prevent word splitting.
SC1117: Backslash is literal in "\.". Prefer explicit escaping: "\\.".
Signed-off-by: Michael Adam <obnox@redhat.com>
SC2155: Declare and assign separately to avoid masking return values.
SC2053: Quote the rhs of == in [[ ]] to prevent glob matching.
SC2086: Double quote to prevent globbing and word splitting.
Signed-off-by: Michael Adam <obnox@redhat.com>
SC2046: Quote this to prevent word splitting.
SC2086: Double quote to prevent globbing and word splitting.
SC2162: read without -r will mangle backslashes.
Signed-off-by: Michael Adam <obnox@redhat.com>
This is how shellcheck complains:
SC2068: Double quote array expansions to avoid re-splitting elements.
SC2086: Double quote to prevent globbing and word splitting.
Signed-off-by: Michael Adam <obnox@redhat.com>
This removes the now-empty verify target.
The linting and formatting checks are now
at the 020 level in the test directory.
Signed-off-by: Michael Adam <obnox@redhat.com>
This is an as-is import of sunrpc codec without introducing any
functional code changes. There are few opportunities for cleanup and
optimizations and that'll be done in future.
Signed-off-by: Prashanth Pai <ppai@redhat.com>
make dist creates source tarballs of the GD2 source directory.
make dist-vendor creates tarballs including the vendor directory.
The generated tarballs contain a VERSION file, which is used by the
build script to set proper versions, gitsha and build-ids when building
GD2 from tarballs.
'dep' is the official dependency management experiment of the Golang
community. It is expected to become the official tool and the latest
glide release encourages users to switch to dep.
Some quick help,
- `dep ensure` installs dependencies that have been locked
- `dep ensure -upate` updates dependencies to the latest versions and
updates the lock file
- `dep ensure -add <package>` adds a new package.
`make vendor-install` and `make vendor-update` still work as expected.
[1]: https://github.com/golang/dep
[2]: https://github.com/Masterminds/glide/releases/tag/v0.13.0