2015-05-27 12:55:50 +05:30
dnl Copyright (c) 2006-2016 Red Hat, Inc. <http://www.redhat.com>
2012-08-27 16:48:55 +05:30
dnl This file is part of GlusterFS.
2009-02-18 17:36:07 +05:30
dnl
2012-08-27 16:48:55 +05:30
dnl This file is licensed to you under your choice of the GNU Lesser
dnl General Public License, version 3 or any later version (LGPLv3 or
dnl later), or the GNU General Public License, version 2 (GPLv2), in all
dnl cases as published by the Free Software Foundation.
2009-02-18 17:36:07 +05:30
2014-02-27 12:39:43 +05:30
AC_INIT([glusterfs],
2014-06-29 18:56:44 -07:00
[m4_esyscmd([build-aux/pkg-version --version])],
[gluster-users@gluster.org],,[https://github.com/gluster/glusterfs.git])
2014-02-27 12:39:43 +05:30
AC_SUBST([PACKAGE_RELEASE],
[m4_esyscmd([build-aux/pkg-version --release])])
2009-02-18 17:36:07 +05:30
2018-12-04 11:38:48 -05:00
AM_INIT_AUTOMAKE([tar-pax foreign])
2014-06-29 18:56:44 -07:00
2014-04-17 15:54:34 -07:00
# Removes warnings when using automake 1.14 around (...but option 'subdir-objects' is disabled )
#but libglusterfs fails to build with contrib (Then are not set up that way?)
#AM_INIT_AUTOMAKE([subdir-objects])
2009-02-18 17:36:07 +05:30
2011-07-26 17:23:27 +03:00
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
2011-08-05 14:04:43 +05:30
if make --help 2>&1 | grep -q no-print-directory; then
2011-08-05 14:52:01 +05:30
AM_MAKEFLAGS="$AM_MAKEFLAGS --no-print-directory";
fi
2017-05-08 12:55:49 -04:00
AC_CONFIG_HEADERS([config.h site.h])
2009-02-18 17:36:07 +05:30
AC_CONFIG_FILES([Makefile
2013-06-17 13:44:10 -04:00
libglusterfs/Makefile
libglusterfs/src/Makefile
2013-06-01 16:17:57 +05:30
geo-replication/src/peer_gsec_create
geo-rep: mountbroker user management
Non root geo-replication setup is now simplified. This
patch provides cli for mountbroker user and options management
To set Options,
gluster system:: execute mountbroker opt <KEY> <VALUE>
# for example,
gluster system:: execute mountbroker opt mountbroker-root /var/mountbroker-root
gluster system:: execute mountbroker opt geo-replication-log-group geogroup
gluster system:: execute mountbroker opt rpc-auth-allow-insecure on
To remove option,
gluster system:: execute mountbroker optdel <KEY>
# for example,
gluster system:: execute mountbroker optdel geo-replication-log-group
To add/edit user,
gluster system:: execute mountbroker user <USERNAME> <VOLUMES>
# for example
gluster system:: execute mountbroker user geoaccount slavevol1,slavevol2
To remove user,
gluster system:: execute mountbroker userdel <USERNAME>
# for example
gluster system:: execute mountbroker userdel geoaccount
For info,
gluster system:: execute mountbroker info
gluster system:: execute mountbroker -j info
For JSON output add -j after mountbroker, for example,
gluster system:: execute mountbroker -j user geoaccount slavevol1,slavevol2
PS: Each peer prints its own JSON output, aggregator required from consumer side
BUG: 1136312
Change-Id: Ie52210c0bcc91ac2ffd3ba58988222ffca62b47f
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/9398
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: darshan n <dnarayan@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-01-06 18:20:45 +05:30
geo-replication/src/peer_mountbroker
geo-rep: Simplify Non root user(mountbroker) Setup
Setting up Non root Geo-replication is troublesome. Lot of steps
involved like user setup, directory creation, setting up proper
permissions, editing glusterd.vol file etc.
Introducing `gluster-mountbroker` command, with this tool non root
user setup steps are(Run the following commands in any one Slave
node),
gluster-mountbroker setup <MOUNT ROOT> <GROUP>
For example,
gluster-mountbroker setup /var/mountbroker-root geogroup
Add user using,
gluster-mountbroker add <VOLUME> <USER>
For example,
gluster-mountbroker add slavevol geoaccount
Remove user or Volume using,
gluster-mountbroker remove [--volume <VOLUME>] [--user <USER>]
Example,
gluster-mountbroker remove --volume slavevol --user geoaccount
gluster-mountbroker remove --user geoaccount
gluster-mountbroker remove --volume slavevol
Check the status of setup using,
gluster-mountbroker status
Once the changes are complete, restart glusterd in all Slave nodes.
and follow the Geo-rep instructions.
Change-Id: Ied3fa009df6a886b24ddd86d39283fcfcff68c82
BUG: 1343333
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/14544
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
2016-05-26 15:52:53 +05:30
geo-replication/src/peer_mountbroker.py
2016-06-15 13:54:37 +05:30
geo-replication/src/peer_georep-sshkey.py
2015-02-18 19:07:23 +05:30
extras/peer_add_secret_pub
2016-08-24 15:19:53 +05:30
geo-replication/syncdaemon/conf.py
2017-06-21 12:56:14 +05:30
geo-replication/gsyncd.conf
2016-08-26 14:05:07 +05:30
extras/snap_scheduler/conf.py
2013-06-17 13:44:10 -04:00
glusterfsd/Makefile
glusterfsd/src/Makefile
2010-06-28 02:49:46 +00:00
rpc/Makefile
rpc/rpc-lib/Makefile
rpc/rpc-lib/src/Makefile
rpc/rpc-transport/Makefile
rpc/rpc-transport/socket/Makefile
rpc/rpc-transport/socket/src/Makefile
2010-08-30 08:03:52 +00:00
rpc/rpc-transport/rdma/Makefile
rpc/rpc-transport/rdma/src/Makefile
2010-07-14 16:26:17 +00:00
rpc/xdr/Makefile
rpc/xdr/src/Makefile
build: libgfxdr.so calls GF_FREE(), needs to link with -lglusterfs
The previous change to remove the xdrgen script exposed (or
created) a recursive build dependency: libglusterfs needs the
generated headers, and libgfxdr should be linked with libglusterfs
for GF_FREE/__gf_free.
(Much grumbling about libglusterfs being the kitchen sink of gluster
elided. This would not be necessary if there were two or more libs,
a gluster "runtime" library with common gluster code shared by the
xlators and daemons, and a utility library with things like the
rbtree, memory allocation, and whatnot.)
So. Link at build time or link at runtime? For truth-and-beauty, link
with libglusterfs.so at build time. Without truth-and-beauty, don't
link with libglusterfs and rely on the other things that link with
libglusterfs to provide resolution of __gf_free().
Truth-and-beauty it is. But how to generate the headers first, then
build libglusterfs, then come back and build libgfxdr? Autotools is a
maze of twisty passages, all different. Things that work with gnu
make on linux don't work with the BSD make. Finally I hit on this
solution. Add a shadow directory where make only generates the headers,
then build libglusterfs using the generated headers, and finally build
libgfxdr and link with libglusterfs.
See original BZ 1330604
change http://review.gluster.org/14085
Change-Id: Iede8a30e3103176cb8f0b054885f30fcb352492b
BUG: 1429696
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: https://review.gluster.org/16873
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2017-03-08 14:44:50 -05:00
rpc/xdr/gen/Makefile
2013-06-17 13:44:10 -04:00
xlators/Makefile
2014-06-29 18:56:44 -07:00
xlators/meta/Makefile
xlators/meta/src/Makefile
2013-06-17 13:44:10 -04:00
xlators/mount/Makefile
xlators/mount/fuse/Makefile
xlators/mount/fuse/src/Makefile
xlators/mount/fuse/utils/mount.glusterfs
xlators/mount/fuse/utils/mount_glusterfs
xlators/mount/fuse/utils/Makefile
xlators/storage/Makefile
xlators/storage/posix/Makefile
xlators/storage/posix/src/Makefile
xlators/cluster/Makefile
xlators/cluster/afr/Makefile
xlators/cluster/afr/src/Makefile
xlators/cluster/dht/Makefile
xlators/cluster/dht/src/Makefile
2014-05-05 12:57:34 +02:00
xlators/cluster/ec/Makefile
xlators/cluster/ec/src/Makefile
2013-06-17 13:44:10 -04:00
xlators/performance/Makefile
xlators/performance/write-behind/Makefile
xlators/performance/write-behind/src/Makefile
xlators/performance/read-ahead/Makefile
xlators/performance/read-ahead/src/Makefile
2013-07-02 10:47:00 -04:00
xlators/performance/readdir-ahead/Makefile
xlators/performance/readdir-ahead/src/Makefile
2013-06-17 13:44:10 -04:00
xlators/performance/io-threads/Makefile
xlators/performance/io-threads/src/Makefile
xlators/performance/io-cache/Makefile
xlators/performance/io-cache/src/Makefile
xlators/performance/symlink-cache/Makefile
xlators/performance/symlink-cache/src/Makefile
xlators/performance/quick-read/Makefile
xlators/performance/quick-read/src/Makefile
xlators/performance/open-behind/Makefile
xlators/performance/open-behind/src/Makefile
2011-09-24 16:14:11 +05:30
xlators/performance/md-cache/Makefile
xlators/performance/md-cache/src/Makefile
2016-04-21 17:20:09 +05:30
xlators/performance/decompounder/Makefile
xlators/performance/decompounder/src/Makefile
2017-04-12 15:24:14 +05:30
xlators/performance/nl-cache/Makefile
xlators/performance/nl-cache/src/Makefile
2013-06-17 13:44:10 -04:00
xlators/debug/Makefile
2017-02-21 14:35:52 +01:00
xlators/debug/sink/Makefile
xlators/debug/sink/src/Makefile
2013-06-17 13:44:10 -04:00
xlators/debug/trace/Makefile
xlators/debug/trace/src/Makefile
xlators/debug/error-gen/Makefile
xlators/debug/error-gen/src/Makefile
2017-06-20 15:24:33 +05:30
xlators/debug/delay-gen/Makefile
xlators/debug/delay-gen/src/Makefile
2013-06-17 13:44:10 -04:00
xlators/debug/io-stats/Makefile
xlators/debug/io-stats/src/Makefile
xlators/protocol/Makefile
xlators/protocol/auth/Makefile
xlators/protocol/auth/addr/Makefile
xlators/protocol/auth/addr/src/Makefile
xlators/protocol/auth/login/Makefile
xlators/protocol/auth/login/src/Makefile
xlators/protocol/client/Makefile
xlators/protocol/client/src/Makefile
xlators/protocol/server/Makefile
xlators/protocol/server/src/Makefile
xlators/features/Makefile
2015-03-19 12:33:51 +00:00
xlators/features/arbiter/Makefile
xlators/features/arbiter/src/Makefile
2018-02-01 12:18:38 +05:30
xlators/features/thin-arbiter/Makefile
xlators/features/thin-arbiter/src/Makefile
2014-04-17 15:54:34 -07:00
xlators/features/changelog/Makefile
xlators/features/changelog/src/Makefile
xlators/features/changelog/lib/Makefile
xlators/features/changelog/lib/src/Makefile
2013-06-17 13:44:10 -04:00
xlators/features/locks/Makefile
xlators/features/locks/src/Makefile
xlators/features/quota/Makefile
xlators/features/quota/src/Makefile
2011-01-27 05:23:31 +00:00
xlators/features/marker/Makefile
xlators/features/marker/src/Makefile
2016-03-16 21:37:22 +05:30
xlators/features/selinux/Makefile
xlators/features/selinux/src/Makefile
dentry fop serializer: added new server side xlator for dentry fop serialization
Problems addressed by this xlator :
[1]. To prevent race between parallel mkdir,mkdir and lookup etc.
Fops like mkdir/create, lookup, rename, unlink, link that happen on a
particular dentry must be serialized to ensure atomicity.
Another possible case can be a fresh lookup to find existance of a path
whose gfid is not set yet. Further, storage/posix employs a ctime based
heuristic 'is_fresh_file' (interval time is less than 1 second of current
time) to check fresh-ness of file. With serialization of these two fops
(lookup & mkdir), we eliminate the race altogether.
[2]. Staleness of dentries
This causes exponential increase in traversal time for any inode in the
subtree of the directory pointed by stale dentry.
Cause : Stale dentry is created because of following two operations:
a. dentry creation due to inode_link, done during operations like
lookup, mkdir, create, mknod, symlink, create and
b. dentry unlinking due to various operations like rmdir, rename,
unlink.
The reason is __inode_link uses __is_dentry_cyclic, which explores
all possible path to avoid cyclic link formation during inode
linkage. __is_dentry_cyclic explores stale-dentry(ies) and its
all ancestors which is increases traversing time exponentially.
Implementation : To acheive this all fops on dentry must take entry locks
before they proceed, once they have acquired locks, they perform the fop
and then release the lock.
Some documentation from email conversation:
[1] http://www.gluster.org/pipermail/gluster-devel/2015-December/047314.html
[2] http://www.gluster.org/pipermail/gluster-devel/2015-August/046428.html
With this patch, the feature is optional, enable it by running:
`gluster volume set $volname features.sdfs enable`
Also the feature is tested for a month without issues in the
experiemental branch for all the regression.
Change-Id: I6e80ba3cabfa6facd5dda63bd482b9bf18b6b79b
Fixes: #397
BUG: 1304962
Signed-off-by: Sakshi Bansal <sabansal@redhat.com>
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
2018-01-22 14:38:17 +05:30
xlators/features/sdfs/Makefile
xlators/features/sdfs/src/Makefile
2013-06-17 13:44:10 -04:00
xlators/features/read-only/Makefile
xlators/features/read-only/src/Makefile
2012-03-26 14:33:41 +05:30
xlators/features/compress/Makefile
xlators/features/compress/src/Makefile
2018-02-12 10:37:15 +05:30
xlators/features/namespace/Makefile
xlators/features/namespace/src/Makefile
2013-06-17 13:44:10 -04:00
xlators/features/quiesce/Makefile
xlators/features/quiesce/src/Makefile
2014-02-05 13:02:34 +05:30
xlators/features/barrier/Makefile
xlators/features/barrier/src/Makefile
2012-02-02 19:14:28 +05:30
xlators/features/index/Makefile
xlators/features/index/src/Makefile
2013-07-31 22:57:12 +05:30
xlators/features/gfid-access/Makefile
xlators/features/gfid-access/src/Makefile
2015-02-27 15:14:08 +05:30
xlators/features/trash/Makefile
xlators/features/trash/src/Makefile
2014-05-07 20:13:43 +05:30
xlators/features/snapview-server/Makefile
xlators/features/snapview-server/src/Makefile
xlators/features/snapview-client/Makefile
xlators/features/snapview-client/src/Makefile
2015-02-15 23:35:56 +05:30
xlators/features/upcall/Makefile
xlators/features/upcall/src/Makefile
2014-11-21 11:47:23 +05:30
xlators/features/shard/Makefile
xlators/features/shard/src/Makefile
2015-02-09 18:28:21 +05:30
xlators/features/bit-rot/Makefile
xlators/features/bit-rot/src/Makefile
xlators/features/bit-rot/src/stub/Makefile
2015-02-15 15:05:19 +05:30
xlators/features/bit-rot/src/bitd/Makefile
2015-05-27 12:55:50 +05:30
xlators/features/leases/Makefile
xlators/features/leases/src/Makefile
2018-03-09 20:07:19 +05:30
xlators/features/cloudsync/Makefile
xlators/features/cloudsync/src/Makefile
2018-04-30 04:43:58 -04:00
xlators/features/utime/Makefile
xlators/features/utime/src/Makefile
2018-05-22 19:55:27 +05:30
xlators/features/cloudsync/src/cloudsync-plugins/Makefile
xlators/features/cloudsync/src/cloudsync-plugins/src/Makefile
xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/Makefile
xlators/features/cloudsync/src/cloudsync-plugins/src/cloudsyncs3/src/Makefile
2013-03-01 16:18:26 +05:30
xlators/playground/Makefile
2013-06-17 13:44:10 -04:00
xlators/playground/template/Makefile
xlators/playground/template/src/Makefile
2011-07-01 17:18:10 +00:00
xlators/system/Makefile
xlators/system/posix-acl/Makefile
xlators/system/posix-acl/src/Makefile
2013-05-14 16:07:03 -04:00
xlators/nfs/Makefile
xlators/nfs/server/Makefile
xlators/nfs/server/src/Makefile
xlators/mgmt/Makefile
xlators/mgmt/glusterd/Makefile
xlators/mgmt/glusterd/src/Makefile
2010-07-08 08:16:13 +00:00
cli/Makefile
cli/src/Makefile
2013-06-17 13:44:10 -04:00
doc/Makefile
extras/Makefile
2014-06-29 18:56:44 -07:00
extras/glusterd.vol
2016-05-31 13:39:05 +05:30
extras/cliutils/Makefile
2013-06-17 13:44:10 -04:00
extras/init.d/Makefile
extras/init.d/glusterd.plist
2010-09-13 03:40:16 +00:00
extras/init.d/glusterd-Debian
extras/init.d/glusterd-Redhat
2014-06-21 02:00:23 -07:00
extras/init.d/glusterd-FreeBSD
2010-09-13 03:40:16 +00:00
extras/init.d/glusterd-SuSE
2016-10-26 20:16:23 -04:00
extras/init.d/glustereventsd-Debian
2016-08-31 08:33:44 +05:30
extras/init.d/glustereventsd-Redhat
extras/init.d/glustereventsd-FreeBSD
2013-06-17 13:44:10 -04:00
extras/systemd/Makefile
extras/systemd/glusterd.service
eventsapi: Gluster Eventing Feature implementation
[Depends on http://review.gluster.org/14627]
Design is available in `glusterfs-specs`, A change from the design
is support of webhook instead of Websockets as discussed in the design
http://review.gluster.org/13115
Since Websocket support depends on REST APIs, I will add Websocket support
once REST APIs patch gets merged
Usage:
Run following command to start/stop Eventsapi server in all Peers,
which will collect the notifications from any Gluster daemon and emits
to configured client.
gluster-eventsapi start|stop|restart|reload
Status of running services can be checked using,
gluster-eventsapi status
Events listener is a HTTP(S) server which listens to events emited by
the Gluster. Create a HTTP Server to listen on POST and register that
URL using,
gluster-eventsapi webhook-add <URL> [--bearer-token <TOKEN>]
For example, if HTTP Server running in `http://192.168.122.188:9000`
then add that URL using,
gluster-eventsapi webhook-add http://192.168.122.188:9000
If it expects a Token then specify it using `--bearer-token` or `-t`
We can also test Webhook if all peer nodes can send message or not
using,
gluster-eventsapi webhook-test <URL> [--bearer-token <TOKEN>]
Configurations can be viewed/updated using,
gluster-eventsapi config-get [--name]
gluster-eventsapi config-set <NAME> <VALUE>
gluster-eventsapi config-reset <NAME|all>
If any one peer node was down during config-set/reset or webhook
modifications, Run sync command from good node when a peer node comes
back. Automatic update is not yet implemented.
gluster-eventsapi sync
Basic Events Client(HTTP Server) is included with the code, Start
running the client with required port and start listening to the
events.
/usr/share/glusterfs/scripts/eventsdash.py --port 8080
Default port is 9000, if no port is specified, once it started running
then configure gluster-eventsapi to send events to that client.
Eventsapi Client can be outside of the Cluster, it can be run event on
Windows. But only requirement is the client URL should be accessible
by all peer nodes.(Or ngrok(https://ngrok.com) like tools can be used)
Events implemented with this patch,
- Volume Create
- Volume Start
- Volume Stop
- Volume Delete
- Peer Attach
- Peer Detach
It is easy to add/support more events, since it touches Gluster cmd
code and to avoid merge conflicts I will add support for more events
once this patch merges.
BUG: 1334044
Change-Id: I316827ac9dd1443454df7deffe4f54835f7f6a08
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/14248
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-05-05 18:34:41 +05:30
extras/systemd/glustereventsd.service
2017-05-19 12:21:37 +05:30
extras/systemd/glusterfssharedstorage.service
2015-01-16 13:48:49 +01:00
extras/run-gluster.tmpfiles
2013-06-17 13:44:10 -04:00
extras/benchmarking/Makefile
2012-04-23 13:22:42 +05:30
extras/hook-scripts/Makefile
2013-06-17 13:44:10 -04:00
extras/ocf/Makefile
extras/ocf/glusterd
extras/ocf/volume
extras/LinuxRPM/Makefile
2013-06-01 16:17:57 +05:30
extras/geo-rep/Makefile
2016-04-29 13:03:40 +05:30
extras/geo-rep/schedule_georep.py
2015-08-22 01:09:53 +05:30
extras/firewalld/Makefile
2013-10-15 17:25:51 +05:30
extras/hook-scripts/add-brick/Makefile
extras/hook-scripts/add-brick/pre/Makefile
extras/hook-scripts/add-brick/post/Makefile
2014-01-02 14:03:18 -05:00
extras/hook-scripts/create/Makefile
extras/hook-scripts/create/post/Makefile
extras/hook-scripts/delete/Makefile
extras/hook-scripts/delete/pre/Makefile
2014-03-06 19:09:13 +05:30
extras/hook-scripts/start/Makefile
extras/hook-scripts/start/post/Makefile
extras/hook-scripts/set/Makefile
extras/hook-scripts/set/post/Makefile
extras/hook-scripts/stop/Makefile
extras/hook-scripts/stop/pre/Makefile
2014-03-24 13:58:38 +05:30
extras/hook-scripts/reset/Makefile
extras/hook-scripts/reset/post/Makefile
extras/hook-scripts/reset/pre/Makefile
2015-02-09 18:03:20 +05:30
extras/snap_scheduler/Makefile
eventsapi: Gluster Eventing Feature implementation
[Depends on http://review.gluster.org/14627]
Design is available in `glusterfs-specs`, A change from the design
is support of webhook instead of Websockets as discussed in the design
http://review.gluster.org/13115
Since Websocket support depends on REST APIs, I will add Websocket support
once REST APIs patch gets merged
Usage:
Run following command to start/stop Eventsapi server in all Peers,
which will collect the notifications from any Gluster daemon and emits
to configured client.
gluster-eventsapi start|stop|restart|reload
Status of running services can be checked using,
gluster-eventsapi status
Events listener is a HTTP(S) server which listens to events emited by
the Gluster. Create a HTTP Server to listen on POST and register that
URL using,
gluster-eventsapi webhook-add <URL> [--bearer-token <TOKEN>]
For example, if HTTP Server running in `http://192.168.122.188:9000`
then add that URL using,
gluster-eventsapi webhook-add http://192.168.122.188:9000
If it expects a Token then specify it using `--bearer-token` or `-t`
We can also test Webhook if all peer nodes can send message or not
using,
gluster-eventsapi webhook-test <URL> [--bearer-token <TOKEN>]
Configurations can be viewed/updated using,
gluster-eventsapi config-get [--name]
gluster-eventsapi config-set <NAME> <VALUE>
gluster-eventsapi config-reset <NAME|all>
If any one peer node was down during config-set/reset or webhook
modifications, Run sync command from good node when a peer node comes
back. Automatic update is not yet implemented.
gluster-eventsapi sync
Basic Events Client(HTTP Server) is included with the code, Start
running the client with required port and start listening to the
events.
/usr/share/glusterfs/scripts/eventsdash.py --port 8080
Default port is 9000, if no port is specified, once it started running
then configure gluster-eventsapi to send events to that client.
Eventsapi Client can be outside of the Cluster, it can be run event on
Windows. But only requirement is the client URL should be accessible
by all peer nodes.(Or ngrok(https://ngrok.com) like tools can be used)
Events implemented with this patch,
- Volume Create
- Volume Start
- Volume Stop
- Volume Delete
- Peer Attach
- Peer Detach
It is easy to add/support more events, since it touches Gluster cmd
code and to avoid merge conflicts I will add support for more events
once this patch merges.
BUG: 1334044
Change-Id: I316827ac9dd1443454df7deffe4f54835f7f6a08
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/14248
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-05-05 18:34:41 +05:30
events/Makefile
events/src/Makefile
events/src/eventsapiconf.py
events/tools/Makefile
2013-06-17 13:44:10 -04:00
contrib/fuse-util/Makefile
2014-09-21 13:57:47 +02:00
contrib/umountd/Makefile
2013-06-17 13:44:10 -04:00
glusterfs-api.pc
2013-06-04 14:20:58 +05:30
libgfchangelog.pc
2013-06-17 13:44:10 -04:00
api/Makefile
api/src/Makefile
2013-09-30 09:05:14 +02:00
api/examples/Makefile
2014-04-17 15:54:34 -07:00
geo-replication/Makefile
geo-replication/src/Makefile
geo-replication/syncdaemon/Makefile
2015-01-29 15:53:19 +05:30
tools/Makefile
tools/gfind_missing_files/Makefile
2013-12-15 08:05:04 +05:30
heal/Makefile
heal/src/Makefile
2015-02-18 19:07:23 +05:30
glusterfs.spec
2018-01-18 15:24:00 -05:00
tools/glusterfind/src/tool.conf
tools/glusterfind/glusterfind
tools/glusterfind/Makefile
2015-06-21 23:36:12 +02:00
tools/glusterfind/src/Makefile
2017-07-20 17:08:12 +05:30
tools/setgfid2path/Makefile
2017-10-10 13:23:50 +02:00
tools/setgfid2path/src/Makefile])
2009-02-18 17:36:07 +05:30
AC_CANONICAL_HOST
AC_PROG_CC
2012-10-03 09:30:27 -04:00
AC_DISABLE_STATIC
2009-02-18 17:36:07 +05:30
AC_PROG_LIBTOOL
2014-10-29 20:35:10 +01:00
AC_SUBST([shrext_cmds])
2009-02-18 17:36:07 +05:30
2014-04-22 13:27:35 -07:00
AC_CHECK_PROG([RPCGEN], [rpcgen], [yes], [no])
if test "x$RPCGEN" = "xno"; then
AC_MSG_ERROR([`rpcgen` not found, glusterfs needs `rpcgen` exiting..])
fi
2014-03-26 16:55:12 -07:00
2014-02-09 21:57:45 -05:00
# Initialize CFLAGS before usage
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug],
[Enable debug build options.]))
if test "x$enable_debug" = "xyes"; then
BUILD_DEBUG=yes
2017-05-14 12:34:15 +05:30
CFLAGS="${CFLAGS} -g -rdynamic -O0 -DDEBUG"
2014-02-09 21:57:45 -05:00
else
BUILD_DEBUG=no
2017-05-14 12:34:15 +05:30
CFLAGS="${CFLAGS} -g -rdynamic"
Halo Replication feature for AFR translator
Summary:
Halo Geo-replication is a feature which allows Gluster or NFS clients to write
locally to their region (as defined by a latency "halo" or threshold if you
like), and have their writes asynchronously propagate from their origin to the
rest of the cluster. Clients can also write synchronously to the cluster
simply by specifying a halo-latency which is very large (e.g. 10seconds) which
will include all bricks.
In other words, it allows clients to decide at mount time if they desire
synchronous or asynchronous IO into a cluster and the cluster can support both
of these modes to any number of clients simultaneously.
There are a few new volume options due to this feature:
halo-shd-latency: The threshold below which self-heal daemons will
consider children (bricks) connected.
halo-nfsd-latency: The threshold below which NFS daemons will consider
children (bricks) connected.
halo-latency: The threshold below which all other clients will
consider children (bricks) connected.
halo-min-replicas: The minimum number of replicas which are to
be enforced regardless of latency specified in the above 3 options.
If the number of children falls below this threshold the next
best (chosen by latency) shall be swapped in.
New FUSE mount options:
halo-latency & halo-min-replicas: As descripted above.
This feature combined with multi-threaded SHD support (D1271745) results in
some pretty cool geo-replication possibilities.
Operational Notes:
- Global consistency is gaurenteed for synchronous clients, this is provided by
the existing entry-locking mechanism.
- Asynchronous clients on the other hand and merely consistent to their region.
Writes & deletes will be protected via entry-locks as usual preventing
concurrent writes into files which are undergoing replication. Read operations
on the other hand should never block.
- Writes are allowed from _any_ region and propagated from the origin to all
other regions. The take away from this is care should be taken to ensure
multiple writers do not write the same files resulting in a gfid split-brain
which will require resolution via split-brain policies (majority, mtime &
size). Recommended method for preventing this is using the nfs-auth feature to
define which region for each share has RW permissions, tiers not in the origin
region should have RO perms.
TODO:
- Synchronous clients (including the SHD) should choose clients from their own
region as preferred sources for reads. Most of the plumbing is in place for
this via the child_latency array.
- Better GFID split brain handling & better dent type split brain handling
(i.e. create a trash can and move the offending files into it).
- Tagging in addition to latency as a means of defining which children you wish
to synchronously write to
Test Plan:
- The usual suspects, clang, gcc w/ address sanitizer & valgrind
- Prove tests
Reviewers: jackl, dph, cjh, meyering
Reviewed By: meyering
Subscribers: ethanr
Differential Revision: https://phabricator.fb.com/D1272053
Tasks: 4117827
Change-Id: I694a9ab429722da538da171ec528406e77b5e6d1
BUG: 1428061
Signed-off-by: Kevin Vigor <kvigor@fb.com>
Reviewed-on: http://review.gluster.org/16099
Reviewed-on: https://review.gluster.org/16177
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2017-03-21 08:23:25 -07:00
fi
2018-08-09 15:52:19 +02:00
AC_ARG_ENABLE([asan],
AC_HELP_STRING([--enable-asan],
[Enable Address Sanitizer support]))
if test "x$enable_asan" = "xyes"; then
BUILD_ASAN=yes
2018-08-10 01:32:22 +02:00
AC_CHECK_LIB([asan], [__asan_report_error], ,
2018-08-09 15:52:19 +02:00
[AC_MSG_ERROR([libasan.so not found, this is required for --enable-asan])])
GF_CFLAGS="${GF_CFLAGS} -O1 -g -fsanitize=address -fno-omit-frame-pointer"
dnl -lasan always need to be the first library, otherwise libxml complains
GF_LDFLAGS="-lasan ${GF_LDFLAGS}"
else
BUILD_ASAN=no
fi
2018-11-13 12:53:17 +01:00
AC_ARG_ENABLE([atan],
AC_HELP_STRING([--enable-tsan],
[Enable ThreadSanitizer support]))
if test "x$enable_tsan" = "xyes"; then
BUILD_TSAN=yes
AC_CHECK_LIB([tsan], [__tsan_init], ,
[AC_MSG_ERROR([libtsan.so not found, this is required for --enable-tsan])])
GF_CFLAGS="${GF_CFLAGS} -O2 -g -fsanitize=thread"
GF_LDFLAGS="${GF_LDFLAGS} -ltsan"
else
BUILD_TSAN=no
fi
2018-03-28 09:01:05 -04:00
dnl When possible, prefer libtirpc over glibc rpc.
dnl
dnl On newer linux with only libtirpc, use libtirpc. (Specifying
dnl --without-libtirpc is an error.)
dnl
dnl on older linux with glibc rpc and WITH libtirpc, use libtirpc
dnl by default except when configured with --without-libtirpc.
dnl
dnl on old linux with glibc rpc and WITHOUT libtirpc, default to
dnl use glibc rpc.
dnl
2017-11-20 20:44:45 +00:00
AC_ARG_WITH([libtirpc],
2018-01-18 15:24:00 -05:00
[AC_HELP_STRING([--without-libtirpc], [Use legacy glibc RPC.])],
2018-03-28 09:01:05 -04:00
[with_libtirpc="no"], [with_libtirpc="yes"])
2018-01-18 15:24:00 -05:00
2018-03-28 09:01:05 -04:00
dnl ipv6-default is off by default
dnl
dnl ipv6-default requires libtirpc. (glibc rpc does not support IPv6.)
dnl ipv6-default can only be enabled if libtipc is enabled.
dnl
2018-01-18 15:24:00 -05:00
AC_ARG_WITH([ipv6-default],
AC_HELP_STRING([--with-ipv6-default], [Set IPv6 as default.]),
2018-03-28 09:01:05 -04:00
[with_ipv6_default=${with_libtirpc}], [with_ipv6_default="no"])
2017-11-20 20:44:45 +00:00
2018-05-10 18:25:56 +05:30
AC_CHECK_FILE([/etc/centos-release])
if test "x$ac_cv_file__etc_centos_release" = "xyes"; then
if grep "release 6" /etc/centos-release; then
with_ipv6_default="no"
2017-04-28 16:44:29 -07:00
fi
fi
2018-08-09 15:52:19 +02:00
dnl On some distributions '-ldl' isn't automatically added to LIBS
AC_CHECK_LIB([dl], [dlopen], [LIB_DL=-ldl])
AC_SUBST(LIB_DL)
2016-12-15 13:41:14 -08:00
AC_ARG_ENABLE([privport_tracking],
AC_HELP_STRING([--disable-privport_tracking],
[Disable internal tracking of privileged ports.]))
TRACK_PRIVPORTS="yes"
if test x"$enable_privport_tracking" = x"no"; then
TRACK_PRIVPORTS="no"
AC_DEFINE(GF_DISABLE_PRIVPORT_TRACKING, 1,
[Disable internal tracking of privileged ports.])
fi
2014-05-04 01:04:11 -07:00
case $host_os in
darwin*)
if ! test "`/usr/bin/sw_vers | grep ProductVersion: | cut -f 2 | cut -d. -f2`" -ge 7; then
AC_MSG_ERROR([You need at least OS X 10.7 (Lion) to build Glusterfs])
fi
# OSX version lesser than 9 has llvm/clang optimization issues which leads to various segfaults
if test "`/usr/bin/sw_vers | grep ProductVersion: | cut -f 2 | cut -d. -f2`" -lt 9; then
CFLAGS="${CFLAGS} -g -O0 -DDEBUG"
fi
;;
esac
2017-02-27 22:37:00 -08:00
# --enable-valgrind prevents calling dlclose(), this leaks memory
AC_ARG_ENABLE([valgrind],
AC_HELP_STRING([--enable-valgrind],
[Enable valgrind for resource leak debugging.]))
if test "x$enable_valgrind" = "xyes"; then
AC_DEFINE(RUN_WITH_VALGRIND, 1, [define if all processes should run under valgrind])
fi
2014-07-08 15:36:45 +02:00
AC_ARG_WITH([previous-options],
[AS_HELP_STRING([--with-previous-options],
[read config.status for configure options])
],
[ if test -r ./config.status && \
args=$(grep 'ac_cs_config=' config.status | \
2018-04-10 10:26:01 +08:00
sed -e 's/.*"\(.*\)".*/\1/' -e "s/'//g" -e "s/--with-previous-options//g") ; then
2014-07-08 15:36:45 +02:00
echo "###"
echo "### Rerunning as '$0 $args'"
echo "###"
exec $0 $args
fi
])
2012-07-12 15:51:41 -07:00
AC_ARG_WITH(pkgconfigdir,
[ --with-pkgconfigdir=DIR pkgconfig file in DIR @<:@LIBDIR/pkgconfig@:>@],
[pkgconfigdir=$withval],
[pkgconfigdir='${libdir}/pkgconfig'])
AC_SUBST(pkgconfigdir)
2009-03-25 02:19:14 +01:00
AC_ARG_WITH(mountutildir,
[ --with-mountutildir=DIR mount helper utility in DIR @<:@/sbin@:>@],
[mountutildir=$withval],
[mountutildir='/sbin'])
AC_SUBST(mountutildir)
2013-06-17 13:44:10 -04:00
AC_ARG_WITH(systemddir,
2016-07-19 12:55:03 +02:00
[ --with-systemddir=DIR systemd service files in DIR @<:@PREFIX/lib/systemd/system@:>@],
2013-06-17 13:44:10 -04:00
[systemddir=$withval],
2016-07-19 12:55:03 +02:00
[systemddir='${prefix}/lib/systemd/system'])
2013-06-17 13:44:10 -04:00
AC_SUBST(systemddir)
2016-07-19 12:55:03 +02:00
AM_CONDITIONAL([USE_SYSTEMD], test [ -d '/usr/lib/systemd/system' ])
2013-06-17 13:44:10 -04:00
2009-10-27 05:52:16 -07:00
AC_ARG_WITH(initdir,
[ --with-initdir=DIR init.d scripts in DIR @<:@/etc/init.d@:>@],
[initdir=$withval],
[initdir='/etc/init.d'])
AC_SUBST(initdir)
2010-05-28 07:00:42 +00:00
AC_ARG_WITH(launchddir,
[ --with-launchddir=DIR launchd services in DIR @<:@/Library/LaunchDaemons@:>@],
[launchddir=$withval],
[launchddir='/Library/LaunchDaemons'])
AC_SUBST(launchddir)
2015-01-16 13:48:49 +01:00
AC_ARG_WITH(tmpfilesdir,
AC_HELP_STRING([--with-tmpfilesdir=DIR],
[tmpfiles config in DIR, disabled by default]),
[tmpfilesdir=$withval],
[tmpfilesdir=''])
AC_SUBST(tmpfilesdir)
2012-02-20 16:25:43 +01:00
AC_ARG_WITH([ocf],
2012-11-06 10:13:07 +01:00
[AS_HELP_STRING([--without-ocf], [build OCF-compliant cluster resource agents])],
2012-02-20 16:25:43 +01:00
,
2012-11-06 10:13:07 +01:00
[OCF_SUBDIR='ocf'],
)
AC_SUBST(OCF_SUBDIR)
2012-02-20 16:25:43 +01:00
2018-01-31 16:38:34 +01:00
AC_ARG_WITH([server],
[AS_HELP_STRING([--without-server], [do not build server components])],
[with_server='no'],
[with_server='yes'],
)
AM_CONDITIONAL([WITH_SERVER], [test x$with_server = xyes])
2009-02-18 17:36:07 +05:30
# LEX needs a check
AC_PROG_LEX
if test "x${LEX}" != "xflex" -a "x${FLEX}" != "xlex"; then
AC_MSG_ERROR([Flex or lex required to build glusterfs.])
fi
2011-11-29 15:20:48 -08:00
dnl
dnl Word sizes...
dnl
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
SIZEOF_SHORT=$ac_cv_sizeof_short
SIZEOF_INT=$ac_cv_sizeof_int
SIZEOF_LONG=$ac_cv_sizeof_long
SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long
AC_SUBST(SIZEOF_SHORT)
AC_SUBST(SIZEOF_INT)
AC_SUBST(SIZEOF_LONG)
AC_SUBST(SIZEOF_LONG_LONG)
2009-02-18 17:36:07 +05:30
# YACC needs a check
AC_PROG_YACC
if test "x${YACC}" = "xbyacc" -o "x${YACC}" = "xyacc" -o "x${YACC}" = "x"; then
AC_MSG_ERROR([GNU Bison required to build glusterfs.])
fi
AC_CHECK_TOOL([LD],[ld])
Replace GPLV3 MD5 with OpenSSL MD5
Ric asked me to look at replacing the GPL licensed MD5 code with
something better, i.e. perhaps faster, and with a less restrictive
license, etc. So I took a couple hour holiday from working on
wrapping up the client_t and did this.
OpenSSL (nee SSLeay) is released under the OpenSSL license, a BSD/MIT
style license. OpenSSL (libcrypto.so) is used on Linux, OS X and *BSD,
Open Solaris, etc. IOW it's universally available on the platforms we
care about. It's written by Eric Young (eay), now at EMC/RSA, and I
can say from experience that the OpenSSL implementation of MD5 (at least)
is every bit as fast as RSA's proprietary implementation (primarily
because the implementations are very, very similar.) The last time I
surveyed MD5 implementations I found they're all pretty much the same
speed.
I changed the APIs (and ABIs) for the strong and weak checksums.
Strictly speaking I didn't need to do that. They're only called on
short strings of data, i.e. pathnames, so using int32_t and uint32_t
is ostensibly okay. My change is arguably a better, more general API
for this sort of thing. It's also what bit me when gerrit/jenkins
validation failed due to glusterfs segv-ing. (I didn't pay close enough
attention to the implementation of the weak checksum. But it forced me
to learn what gerrit/jenkins are doing and going forward I can do better
testing before submitting to gerrit.)
Now resubmitting with a BZ
Change-Id: I545fade1604e74fc68399894550229bd57a5e0df
BUG: 807718
Signed-off-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.com/3019
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2012-03-27 11:14:23 -04:00
AC_CHECK_LIB([crypto], [MD5], , AC_MSG_ERROR([OpenSSL crypto library is required to build glusterfs]))
2009-02-18 17:36:07 +05:30
AC_CHECK_LIB([pthread], [pthread_mutex_init], , AC_MSG_ERROR([Posix threads library is required to build glusterfs]))
Replace GPLV3 MD5 with OpenSSL MD5
Ric asked me to look at replacing the GPL licensed MD5 code with
something better, i.e. perhaps faster, and with a less restrictive
license, etc. So I took a couple hour holiday from working on
wrapping up the client_t and did this.
OpenSSL (nee SSLeay) is released under the OpenSSL license, a BSD/MIT
style license. OpenSSL (libcrypto.so) is used on Linux, OS X and *BSD,
Open Solaris, etc. IOW it's universally available on the platforms we
care about. It's written by Eric Young (eay), now at EMC/RSA, and I
can say from experience that the OpenSSL implementation of MD5 (at least)
is every bit as fast as RSA's proprietary implementation (primarily
because the implementations are very, very similar.) The last time I
surveyed MD5 implementations I found they're all pretty much the same
speed.
I changed the APIs (and ABIs) for the strong and weak checksums.
Strictly speaking I didn't need to do that. They're only called on
short strings of data, i.e. pathnames, so using int32_t and uint32_t
is ostensibly okay. My change is arguably a better, more general API
for this sort of thing. It's also what bit me when gerrit/jenkins
validation failed due to glusterfs segv-ing. (I didn't pay close enough
attention to the implementation of the weak checksum. But it forced me
to learn what gerrit/jenkins are doing and going forward I can do better
testing before submitting to gerrit.)
Now resubmitting with a BZ
Change-Id: I545fade1604e74fc68399894550229bd57a5e0df
BUG: 807718
Signed-off-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.com/3019
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2012-03-27 11:14:23 -04:00
2009-02-18 17:36:07 +05:30
AC_CHECK_FUNC([dlopen], [has_dlopen=yes], AC_CHECK_LIB([dl], [dlopen], , AC_MSG_ERROR([Dynamic linking library required to build glusterfs])))
2014-04-17 15:54:34 -07:00
AC_CHECK_LIB([readline], [rl_do_undo], [RL_UNDO="yes"], [RL_UNDO="no"])
2009-02-18 17:36:07 +05:30
2014-05-27 05:30:29 +02:00
AC_CHECK_LIB([intl], [gettext])
2009-02-18 17:36:07 +05:30
AC_CHECK_HEADERS([sys/xattr.h])
2014-04-17 15:54:34 -07:00
AC_CHECK_HEADERS([sys/ioctl.h], AC_DEFINE(HAVE_IOCTL_IN_SYS_IOCTL_H, 1, [have sys/ioctl.h]))
2009-02-18 17:36:07 +05:30
AC_CHECK_HEADERS([sys/extattr.h])
2015-11-05 19:57:51 +05:30
AC_CHECK_HEADERS([openssl/dh.h])
AC_CHECK_HEADERS([openssl/ecdh.h])
libglusterfs/rot-buffs: rotational buffers
This patch introduces rotational buffers aiming at the classic
multiple producer and multiple consumer problem. A fixed set
of buffer list is allocated during initialization, where each
list consist of a list of buffers. Each buffer is an iovec
pointing to a memory region of fixed allocation size. Multiple
producers write data to these buffers. A buffer list starts with
a single buffer (iovec) and allocates more when required (although
this can be preallocatd in multiples of k).
rot-buffs allow multiple producers to write data parallely with
a bit of extra cost of taking locks. Therefore, it's much suited
for large writes. Multiple producers are allowed to write in the
buffer parallely by "reserving" write space for selected number
of bytes and returning pointer to the start of the reserved area.
The write size is selected by the producer before it starts the
write (which is often known). Therefore, the write itself need not
be serialized -- just the space reservation needs to be done safely.
The other part is when a consumer kicks in to consume what has
been produced. At this point, a buffer list switch is performed.
The "current" buffer list pointer is safely pointed to the next
available buffer list. New writes are now directed to the just
switched buffer list (the old buffer list is now considered out
of rotation). Note that the old buffer still may have producers
in progress (pending writes), so the consumer has to wait till
the writers are drained. Currently this is the slow path for
producers (write completion) and needs to be improved.
Currently, there is special handling for cases where the number
of consumers match (or exceed) the number of producers, which
could result in writer starvation. In this scenario, when a
consumers requests a buffer list for consumption, a check is
performed for writer starvation and consumption is denied
until at least another buffer list is ready of the producer
for writes, i.e., one (or more) consumer(s) completed, thereby
putting the buffer list back in rotation.
[
NOTE:
I've not performance tested this producer-consumer model
yet. It's being used in changelog for event notification.
The list of buffers (iovecs) are directly passed to RPC
layer.
]
Change-Id: I88d235522b05ab82509aba861374a2312bff57f2
BUG: 1170075
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/9706
Tested-by: Vijay Bellur <vbellur@redhat.com>
2015-02-03 19:03:30 +05:30
dnl Math library
2015-05-17 15:26:03 +02:00
AC_CHECK_LIB([m], [pow], [MATH_LIB='-lm'], [MATH_LIB=''])
libglusterfs/rot-buffs: rotational buffers
This patch introduces rotational buffers aiming at the classic
multiple producer and multiple consumer problem. A fixed set
of buffer list is allocated during initialization, where each
list consist of a list of buffers. Each buffer is an iovec
pointing to a memory region of fixed allocation size. Multiple
producers write data to these buffers. A buffer list starts with
a single buffer (iovec) and allocates more when required (although
this can be preallocatd in multiples of k).
rot-buffs allow multiple producers to write data parallely with
a bit of extra cost of taking locks. Therefore, it's much suited
for large writes. Multiple producers are allowed to write in the
buffer parallely by "reserving" write space for selected number
of bytes and returning pointer to the start of the reserved area.
The write size is selected by the producer before it starts the
write (which is often known). Therefore, the write itself need not
be serialized -- just the space reservation needs to be done safely.
The other part is when a consumer kicks in to consume what has
been produced. At this point, a buffer list switch is performed.
The "current" buffer list pointer is safely pointed to the next
available buffer list. New writes are now directed to the just
switched buffer list (the old buffer list is now considered out
of rotation). Note that the old buffer still may have producers
in progress (pending writes), so the consumer has to wait till
the writers are drained. Currently this is the slow path for
producers (write completion) and needs to be improved.
Currently, there is special handling for cases where the number
of consumers match (or exceed) the number of producers, which
could result in writer starvation. In this scenario, when a
consumers requests a buffer list for consumption, a check is
performed for writer starvation and consumption is denied
until at least another buffer list is ready of the producer
for writes, i.e., one (or more) consumer(s) completed, thereby
putting the buffer list back in rotation.
[
NOTE:
I've not performance tested this producer-consumer model
yet. It's being used in changelog for event notification.
The list of buffers (iovecs) are directly passed to RPC
layer.
]
Change-Id: I88d235522b05ab82509aba861374a2312bff57f2
BUG: 1170075
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/9706
Tested-by: Vijay Bellur <vbellur@redhat.com>
2015-02-03 19:03:30 +05:30
AC_SUBST(MATH_LIB)
2018-07-23 11:35:16 +02:00
dnl depend on libuuid.so
2015-04-03 18:14:13 +02:00
PKG_CHECK_MODULES([UUID], [uuid],
2017-02-02 12:10:12 +00:00
[have_uuid=yes
2015-04-03 18:14:13 +02:00
AC_DEFINE(HAVE_LIBUUID, 1, [have libuuid.so])
PKGCONFIG_UUID=uuid],
2018-07-23 11:35:16 +02:00
[have_uuid=no])
2017-02-02 12:10:12 +00:00
AM_CONDITIONAL([HAVE_LIBUUID], [test x$have_uuid = xyes])
2015-05-17 15:26:03 +02:00
dnl older version of libuuid (from e2fsprogs) require including uuid/uuid.h
saved_CFLAGS=${CFLAGS}
CFLAGS="${CFLAGS} ${UUID_CFLAGS}"
2017-02-02 12:10:12 +00:00
AC_CHECK_HEADER([uuid.h], [], [AC_CHECK_HEADER([uuid/uuid.h])],
[[#if HAVE_UUID_H
#include <uuid.h>
#endif
]])
2015-05-17 15:26:03 +02:00
CFLAGS=${saved_CFLAGS}
if test "x$ac_cv_header_uuid_uuid_h" = "xyes"; then
UUID_CFLAGS="${UUID_CFLAGS} -I$(pkg-config --variable=includedir uuid)/uuid"
2018-07-23 11:35:16 +02:00
have_uuid=yes
fi
if test "x$have_uuid" != "xyes"; then
case $host_os in
*freebsd*)
AC_MSG_ERROR([e2fsprogs-libuuid is required to build glusterfs])
;;
linux*)
AC_MSG_ERROR([libuuid is required to build glusterfs])
;;
*)
AC_MSG_ERROR([a Linux compatible libuuid is required to build glusterfs])
;;
esac
2015-05-17 15:26:03 +02:00
fi
2015-04-03 18:14:13 +02:00
dnl libglusterfs needs uuid.h, practically everything depends on it
GF_CPPFLAGS="${GF_CPPFLAGS} ${UUID_CFLAGS}"
dnl PKGCONFIG_UUID is used for the dependency in *.pc.in files
AC_SUBST(PKGCONFIG_UUID)
2015-02-10 19:13:35 +01:00
dnl NetBSD does not support POSIX ACLs :-(
case $host_os in
2015-07-02 14:29:17 -04:00
*netbsd* | darwin*)
AC_MSG_WARN([platform does not support POSIX ACLs... disabling them])
2015-02-10 19:13:35 +01:00
ACL_LIBS=''
USE_POSIX_ACLS='0'
2015-03-10 15:13:29 +05:30
BUILD_POSIX_ACLS='no'
2015-02-10 19:13:35 +01:00
;;
*)
AC_CHECK_HEADERS([sys/acl.h], ,
AC_MSG_ERROR([Support for POSIX ACLs is required]))
USE_POSIX_ACLS='1'
2015-03-10 15:13:29 +05:30
BUILD_POSIX_ACLS='yes'
2015-02-10 19:13:35 +01:00
case $host_os in
linux*)
ACL_LIBS='-lacl'
;;
solaris*)
ACL_LIBS='-lsec'
;;
*freebsd*)
ACL_LIBS='-lc'
;;
darwin*)
ACL_LIBS='-lc'
;;
esac
if test "x${ACL_LIBS}" = "x-lacl"; then
AC_CHECK_HEADERS([acl/libacl.h], , AC_MSG_ERROR([libacl is required for building on ${host_os}]))
fi
;;
esac
AC_SUBST(ACL_LIBS)
AC_SUBST(USE_POSIX_ACLS)
2014-11-02 19:15:49 +01:00
# libglusterfs/checksum
Replace GPLV3 MD5 with OpenSSL MD5
Ric asked me to look at replacing the GPL licensed MD5 code with
something better, i.e. perhaps faster, and with a less restrictive
license, etc. So I took a couple hour holiday from working on
wrapping up the client_t and did this.
OpenSSL (nee SSLeay) is released under the OpenSSL license, a BSD/MIT
style license. OpenSSL (libcrypto.so) is used on Linux, OS X and *BSD,
Open Solaris, etc. IOW it's universally available on the platforms we
care about. It's written by Eric Young (eay), now at EMC/RSA, and I
can say from experience that the OpenSSL implementation of MD5 (at least)
is every bit as fast as RSA's proprietary implementation (primarily
because the implementations are very, very similar.) The last time I
surveyed MD5 implementations I found they're all pretty much the same
speed.
I changed the APIs (and ABIs) for the strong and weak checksums.
Strictly speaking I didn't need to do that. They're only called on
short strings of data, i.e. pathnames, so using int32_t and uint32_t
is ostensibly okay. My change is arguably a better, more general API
for this sort of thing. It's also what bit me when gerrit/jenkins
validation failed due to glusterfs segv-ing. (I didn't pay close enough
attention to the implementation of the weak checksum. But it forced me
to learn what gerrit/jenkins are doing and going forward I can do better
testing before submitting to gerrit.)
Now resubmitting with a BZ
Change-Id: I545fade1604e74fc68399894550229bd57a5e0df
BUG: 807718
Signed-off-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.com/3019
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2012-03-27 11:14:23 -04:00
AC_CHECK_HEADERS([openssl/md5.h])
2014-11-02 19:15:49 +01:00
AC_CHECK_LIB([z], [adler32], [ZLIB_LIBS="-lz"], AC_MSG_ERROR([zlib is required to build glusterfs]))
AC_SUBST(ZLIB_LIBS)
Replace GPLV3 MD5 with OpenSSL MD5
Ric asked me to look at replacing the GPL licensed MD5 code with
something better, i.e. perhaps faster, and with a less restrictive
license, etc. So I took a couple hour holiday from working on
wrapping up the client_t and did this.
OpenSSL (nee SSLeay) is released under the OpenSSL license, a BSD/MIT
style license. OpenSSL (libcrypto.so) is used on Linux, OS X and *BSD,
Open Solaris, etc. IOW it's universally available on the platforms we
care about. It's written by Eric Young (eay), now at EMC/RSA, and I
can say from experience that the OpenSSL implementation of MD5 (at least)
is every bit as fast as RSA's proprietary implementation (primarily
because the implementations are very, very similar.) The last time I
surveyed MD5 implementations I found they're all pretty much the same
speed.
I changed the APIs (and ABIs) for the strong and weak checksums.
Strictly speaking I didn't need to do that. They're only called on
short strings of data, i.e. pathnames, so using int32_t and uint32_t
is ostensibly okay. My change is arguably a better, more general API
for this sort of thing. It's also what bit me when gerrit/jenkins
validation failed due to glusterfs segv-ing. (I didn't pay close enough
attention to the implementation of the weak checksum. But it forced me
to learn what gerrit/jenkins are doing and going forward I can do better
testing before submitting to gerrit.)
Now resubmitting with a BZ
Change-Id: I545fade1604e74fc68399894550229bd57a5e0df
BUG: 807718
Signed-off-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.com/3019
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2012-03-27 11:14:23 -04:00
2013-05-08 08:54:11 -04:00
AC_CHECK_HEADERS([linux/falloc.h])
2016-09-28 14:29:23 +02:00
AC_CHECK_HEADERS([linux/oom.h], AC_DEFINE(HAVE_LINUX_OOM_H, 1, [have linux/oom.h]))
2009-02-18 17:36:07 +05:30
dnl Mac OS X does not have spinlocks
AC_CHECK_FUNC([pthread_spin_init], [have_spinlock=yes])
if test "x${have_spinlock}" = "xyes"; then
AC_DEFINE(HAVE_SPINLOCK, 1, [define if found spinlock])
fi
AC_SUBST(HAVE_SPINLOCK)
dnl some os may not have GNU defined strnlen function
AC_CHECK_FUNC([strnlen], [have_strnlen=yes])
if test "x${have_strnlen}" = "xyes"; then
AC_DEFINE(HAVE_STRNLEN, 1, [define if found strnlen])
fi
AC_SUBST(HAVE_STRNLEN)
AC_CHECK_FUNC([setfsuid], [have_setfsuid=yes])
AC_CHECK_FUNC([setfsgid], [have_setfsgid=yes])
if test "x${have_setfsuid}" = "xyes" -a "x${have_setfsgid}" = "xyes"; then
AC_DEFINE(HAVE_SET_FSID, 1, [define if found setfsuid setfsgid])
fi
2014-04-17 15:54:34 -07:00
dnl test umount2 function
AC_CHECK_FUNC([umount2], [have_umount2=yes])
if test "x${have_umount2}" = "xyes"; then
AC_DEFINE(HAVE_UMOUNT2, 1, [define if found umount2])
fi
2009-02-18 17:36:07 +05:30
2016-08-24 14:02:08 +05:30
dnl Check Python Availability
have_python=no
core: python3
see https://review.gluster.org/#/c/19788/,
https://review.gluster.org/#/c/19871/,
https://review.gluster.org/#/c/19952/,
https://review.gluster.org/#/c/20104/,
https://review.gluster.org/#/c/20162/,
https://review.gluster.org/#/c/20185/,
https://review.gluster.org/#/c/20207/,
https://review.gluster.org/#/c/20227/,
https://review.gluster.org/#/c/20307/,
https://review.gluster.org/#/c/20320/,
https://review.gluster.org/#/c/20332/,
https://review.gluster.org/#/c/20364/,
https://review.gluster.org/#/c/20441/, and
https://review.gluster.org/#/c/20484
shebangs changed from /usr/bin/python2 to /usr/bin/python3.
(Reminder, various distribution packaging guidelines require use
of explicit python version and don't allow '#!/usr/bin/env python',
regardless of how handy that idiom may be.)
glusterfs.spec(.in) package python{2,3}-gluster and python2 or
python3 dependencies as appropriate.
configure(.ac):
+ test for and use python2 or python3 as appropriate. If build
machine has python2 and python3, use python3. Override by
setting PYTHON=/usr/bin/python2 when running configure.
+ PYTHONDEV_CPPFLAGS from python[23]-config --includes is a
better match to the original python sysconfig.get_python_inc().
All those other extraneous flags breaks the build.
+ Only change the shebangs once. Changing them over and over
again, e.g., during a `make glusterrpms` in extras/LinuxRPM
just sends make (is it really make that's looping?) into an
infinite loop. If you figure out why, let me know.
+ Oldest python2 is python2.6 on CentOS 6 and Debian 8 (Jessie).
Everything else has 2.7 or 3.x
+ logic from https://review.gluster.org/c/glusterfs/+/21050, which
needs to be removed/merged after that patch is merged.
Builds on CentOS 6, CentOS 7, Fedora 28, Fedora rawhide, and the
mysterious RHEL > 7.
Change-Id: Idae21d3b6f58b32372e1daa0d234e491e563198f
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-08-29 11:09:27 -04:00
dnl if the user has not specified a python, pick one
if test -z "${PYTHON}"; then
case $host_os in
freebsd*)
if test -x /usr/local/bin/python3; then
PYTHON=/usr/local/bin/python3
else
PYTHON=/usr/local/bin/python2
fi
;;
*)
if test -x /usr/bin/python3; then
PYTHON=/usr/bin/python3
else
PYTHON=/usr/bin/python2
fi
;;
esac
fi
2018-03-28 10:14:39 -04:00
AM_PATH_PYTHON([2.6],,[:])
core: python3
see https://review.gluster.org/#/c/19788/,
https://review.gluster.org/#/c/19871/,
https://review.gluster.org/#/c/19952/,
https://review.gluster.org/#/c/20104/,
https://review.gluster.org/#/c/20162/,
https://review.gluster.org/#/c/20185/,
https://review.gluster.org/#/c/20207/,
https://review.gluster.org/#/c/20227/,
https://review.gluster.org/#/c/20307/,
https://review.gluster.org/#/c/20320/,
https://review.gluster.org/#/c/20332/,
https://review.gluster.org/#/c/20364/,
https://review.gluster.org/#/c/20441/, and
https://review.gluster.org/#/c/20484
shebangs changed from /usr/bin/python2 to /usr/bin/python3.
(Reminder, various distribution packaging guidelines require use
of explicit python version and don't allow '#!/usr/bin/env python',
regardless of how handy that idiom may be.)
glusterfs.spec(.in) package python{2,3}-gluster and python2 or
python3 dependencies as appropriate.
configure(.ac):
+ test for and use python2 or python3 as appropriate. If build
machine has python2 and python3, use python3. Override by
setting PYTHON=/usr/bin/python2 when running configure.
+ PYTHONDEV_CPPFLAGS from python[23]-config --includes is a
better match to the original python sysconfig.get_python_inc().
All those other extraneous flags breaks the build.
+ Only change the shebangs once. Changing them over and over
again, e.g., during a `make glusterrpms` in extras/LinuxRPM
just sends make (is it really make that's looping?) into an
infinite loop. If you figure out why, let me know.
+ Oldest python2 is python2.6 on CentOS 6 and Debian 8 (Jessie).
Everything else has 2.7 or 3.x
+ logic from https://review.gluster.org/c/glusterfs/+/21050, which
needs to be removed/merged after that patch is merged.
Builds on CentOS 6, CentOS 7, Fedora 28, Fedora rawhide, and the
mysterious RHEL > 7.
Change-Id: Idae21d3b6f58b32372e1daa0d234e491e563198f
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-08-29 11:09:27 -04:00
if test -n "${PYTHON}"; then
2016-08-24 14:02:08 +05:30
have_python=yes
fi
core: python3
see https://review.gluster.org/#/c/19788/,
https://review.gluster.org/#/c/19871/,
https://review.gluster.org/#/c/19952/,
https://review.gluster.org/#/c/20104/,
https://review.gluster.org/#/c/20162/,
https://review.gluster.org/#/c/20185/,
https://review.gluster.org/#/c/20207/,
https://review.gluster.org/#/c/20227/,
https://review.gluster.org/#/c/20307/,
https://review.gluster.org/#/c/20320/,
https://review.gluster.org/#/c/20332/,
https://review.gluster.org/#/c/20364/,
https://review.gluster.org/#/c/20441/, and
https://review.gluster.org/#/c/20484
shebangs changed from /usr/bin/python2 to /usr/bin/python3.
(Reminder, various distribution packaging guidelines require use
of explicit python version and don't allow '#!/usr/bin/env python',
regardless of how handy that idiom may be.)
glusterfs.spec(.in) package python{2,3}-gluster and python2 or
python3 dependencies as appropriate.
configure(.ac):
+ test for and use python2 or python3 as appropriate. If build
machine has python2 and python3, use python3. Override by
setting PYTHON=/usr/bin/python2 when running configure.
+ PYTHONDEV_CPPFLAGS from python[23]-config --includes is a
better match to the original python sysconfig.get_python_inc().
All those other extraneous flags breaks the build.
+ Only change the shebangs once. Changing them over and over
again, e.g., during a `make glusterrpms` in extras/LinuxRPM
just sends make (is it really make that's looping?) into an
infinite loop. If you figure out why, let me know.
+ Oldest python2 is python2.6 on CentOS 6 and Debian 8 (Jessie).
Everything else has 2.7 or 3.x
+ logic from https://review.gluster.org/c/glusterfs/+/21050, which
needs to be removed/merged after that patch is merged.
Builds on CentOS 6, CentOS 7, Fedora 28, Fedora rawhide, and the
mysterious RHEL > 7.
Change-Id: Idae21d3b6f58b32372e1daa0d234e491e563198f
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-08-29 11:09:27 -04:00
dnl Use pkg-config to get runtime search path missing from ${PYTHON}-config
2018-03-28 10:14:39 -04:00
dnl Just do "true" on failure so that configure does not bail out
core: python3
see https://review.gluster.org/#/c/19788/,
https://review.gluster.org/#/c/19871/,
https://review.gluster.org/#/c/19952/,
https://review.gluster.org/#/c/20104/,
https://review.gluster.org/#/c/20162/,
https://review.gluster.org/#/c/20185/,
https://review.gluster.org/#/c/20207/,
https://review.gluster.org/#/c/20227/,
https://review.gluster.org/#/c/20307/,
https://review.gluster.org/#/c/20320/,
https://review.gluster.org/#/c/20332/,
https://review.gluster.org/#/c/20364/,
https://review.gluster.org/#/c/20441/, and
https://review.gluster.org/#/c/20484
shebangs changed from /usr/bin/python2 to /usr/bin/python3.
(Reminder, various distribution packaging guidelines require use
of explicit python version and don't allow '#!/usr/bin/env python',
regardless of how handy that idiom may be.)
glusterfs.spec(.in) package python{2,3}-gluster and python2 or
python3 dependencies as appropriate.
configure(.ac):
+ test for and use python2 or python3 as appropriate. If build
machine has python2 and python3, use python3. Override by
setting PYTHON=/usr/bin/python2 when running configure.
+ PYTHONDEV_CPPFLAGS from python[23]-config --includes is a
better match to the original python sysconfig.get_python_inc().
All those other extraneous flags breaks the build.
+ Only change the shebangs once. Changing them over and over
again, e.g., during a `make glusterrpms` in extras/LinuxRPM
just sends make (is it really make that's looping?) into an
infinite loop. If you figure out why, let me know.
+ Oldest python2 is python2.6 on CentOS 6 and Debian 8 (Jessie).
Everything else has 2.7 or 3.x
+ logic from https://review.gluster.org/c/glusterfs/+/21050, which
needs to be removed/merged after that patch is merged.
Builds on CentOS 6, CentOS 7, Fedora 28, Fedora rawhide, and the
mysterious RHEL > 7.
Change-Id: Idae21d3b6f58b32372e1daa0d234e491e563198f
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-08-29 11:09:27 -04:00
dnl Note: python 2.6's devel pkg (e.g. in CentOS/RHEL 6) does not have
dnl pkg-config files, so this work-around instead
if test "x${PYTHON_VERSION}" = "x2.6"; then
PYTHON_CFLAGS=$(python-config --includes)
PYTHON_LIBS=$(python-config --libs)
else
PKG_CHECK_MODULES([PYTHON], "python-${PYTHON_VERSION}",,true)
fi
2016-08-24 14:02:08 +05:30
core: python3
see https://review.gluster.org/#/c/19788/,
https://review.gluster.org/#/c/19871/,
https://review.gluster.org/#/c/19952/,
https://review.gluster.org/#/c/20104/,
https://review.gluster.org/#/c/20162/,
https://review.gluster.org/#/c/20185/,
https://review.gluster.org/#/c/20207/,
https://review.gluster.org/#/c/20227/,
https://review.gluster.org/#/c/20307/,
https://review.gluster.org/#/c/20320/,
https://review.gluster.org/#/c/20332/,
https://review.gluster.org/#/c/20364/,
https://review.gluster.org/#/c/20441/, and
https://review.gluster.org/#/c/20484
shebangs changed from /usr/bin/python2 to /usr/bin/python3.
(Reminder, various distribution packaging guidelines require use
of explicit python version and don't allow '#!/usr/bin/env python',
regardless of how handy that idiom may be.)
glusterfs.spec(.in) package python{2,3}-gluster and python2 or
python3 dependencies as appropriate.
configure(.ac):
+ test for and use python2 or python3 as appropriate. If build
machine has python2 and python3, use python3. Override by
setting PYTHON=/usr/bin/python2 when running configure.
+ PYTHONDEV_CPPFLAGS from python[23]-config --includes is a
better match to the original python sysconfig.get_python_inc().
All those other extraneous flags breaks the build.
+ Only change the shebangs once. Changing them over and over
again, e.g., during a `make glusterrpms` in extras/LinuxRPM
just sends make (is it really make that's looping?) into an
infinite loop. If you figure out why, let me know.
+ Oldest python2 is python2.6 on CentOS 6 and Debian 8 (Jessie).
Everything else has 2.7 or 3.x
+ logic from https://review.gluster.org/c/glusterfs/+/21050, which
needs to be removed/merged after that patch is merged.
Builds on CentOS 6, CentOS 7, Fedora 28, Fedora rawhide, and the
mysterious RHEL > 7.
Change-Id: Idae21d3b6f58b32372e1daa0d234e491e563198f
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-08-29 11:09:27 -04:00
PYTHON_CFLAGS=$(echo ${PYTHON_CFLAGS} | sed -e 's|-I|-isystem |')
2016-08-24 14:02:08 +05:30
2018-03-28 10:14:39 -04:00
BUILD_PYTHON_SITE_PACKAGES=${pythondir}
2016-08-24 14:02:08 +05:30
AC_SUBST(BUILD_PYTHON_SITE_PACKAGES)
core: python3
see https://review.gluster.org/#/c/19788/,
https://review.gluster.org/#/c/19871/,
https://review.gluster.org/#/c/19952/,
https://review.gluster.org/#/c/20104/,
https://review.gluster.org/#/c/20162/,
https://review.gluster.org/#/c/20185/,
https://review.gluster.org/#/c/20207/,
https://review.gluster.org/#/c/20227/,
https://review.gluster.org/#/c/20307/,
https://review.gluster.org/#/c/20320/,
https://review.gluster.org/#/c/20332/,
https://review.gluster.org/#/c/20364/,
https://review.gluster.org/#/c/20441/, and
https://review.gluster.org/#/c/20484
shebangs changed from /usr/bin/python2 to /usr/bin/python3.
(Reminder, various distribution packaging guidelines require use
of explicit python version and don't allow '#!/usr/bin/env python',
regardless of how handy that idiom may be.)
glusterfs.spec(.in) package python{2,3}-gluster and python2 or
python3 dependencies as appropriate.
configure(.ac):
+ test for and use python2 or python3 as appropriate. If build
machine has python2 and python3, use python3. Override by
setting PYTHON=/usr/bin/python2 when running configure.
+ PYTHONDEV_CPPFLAGS from python[23]-config --includes is a
better match to the original python sysconfig.get_python_inc().
All those other extraneous flags breaks the build.
+ Only change the shebangs once. Changing them over and over
again, e.g., during a `make glusterrpms` in extras/LinuxRPM
just sends make (is it really make that's looping?) into an
infinite loop. If you figure out why, let me know.
+ Oldest python2 is python2.6 on CentOS 6 and Debian 8 (Jessie).
Everything else has 2.7 or 3.x
+ logic from https://review.gluster.org/c/glusterfs/+/21050, which
needs to be removed/merged after that patch is merged.
Builds on CentOS 6, CentOS 7, Fedora 28, Fedora rawhide, and the
mysterious RHEL > 7.
Change-Id: Idae21d3b6f58b32372e1daa0d234e491e563198f
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-08-29 11:09:27 -04:00
# Eval two times to expand fully. First eval replaces $exec_prefix into $prefix
# Second eval will expand $prefix
build_python_site_packages_temp="${pythondir}"
eval build_python_site_packages_temp=\"${build_python_site_packages_temp}\"
eval build_python_site_packages_temp=\"${build_python_site_packages_temp}\"
BUILD_PYTHON_SITE_PACKAGES_EXPANDED=${build_python_site_packages_temp}
AC_SUBST(BUILD_PYTHON_SITE_PACKAGES_EXPANDED)
2016-08-24 14:02:08 +05:30
2009-02-18 17:36:07 +05:30
# FUSE section
AC_ARG_ENABLE([fuse-client],
2013-06-17 13:44:10 -04:00
AC_HELP_STRING([--disable-fuse-client],
[Do not build the fuse client. NOTE: you cannot mount glusterfs without the client]))
2009-02-18 17:36:07 +05:30
BUILD_FUSE_CLIENT=no
2009-07-13 22:28:07 +02:00
if test "x$enable_fuse_client" != "xno"; then
2009-02-18 17:36:07 +05:30
FUSE_CLIENT_SUBDIR=fuse
BUILD_FUSE_CLIENT="yes"
fi
2018-12-05 20:37:53 +05:30
AC_SUBST(FUSE_CLIENT_SUBDIR)
# end FUSE section
2017-09-12 15:34:15 -04:00
AC_CHECK_LIB([ssl], TLS_method, [HAVE_OPENSSL_1_1="yes"], [HAVE_OPENSSL_1_1="no"])
if test "x$HAVE_OPENSSL_1_1" = "xyes"; then
AC_DEFINE([HAVE_TLS_METHOD], [1], [Using OpenSSL-1.1 TLS_method])
else
AC_CHECK_LIB([ssl], TLSv1_2_method, [AC_DEFINE([HAVE_TLSV1_2_METHOD], [1], [Using OpenSSL-1.0 TLSv1_2_method])])
fi
2015-05-17 15:26:03 +02:00
2009-02-18 17:36:07 +05:30
2009-08-11 18:26:11 -07:00
# FUSERMOUNT section
AC_ARG_ENABLE([fusermount],
2013-06-17 13:44:10 -04:00
AC_HELP_STRING([--disable-fusermount],
[Use system's fusermount]))
2009-08-11 18:26:11 -07:00
2013-04-03 13:38:00 -07:00
BUILD_FUSERMOUNT="yes"
2013-04-10 17:51:37 +02:00
if test "x$enable_fusermount" = "xno"; then
2014-06-21 02:00:23 -07:00
BUILD_FUSERMOUNT="no"
2013-04-03 13:38:00 -07:00
else
2014-06-21 02:00:23 -07:00
AC_DEFINE(GF_FUSERMOUNT, 1, [Use our own fusermount])
FUSERMOUNT_SUBDIR="contrib/fuse-util"
2009-08-11 18:26:11 -07:00
fi
AC_SUBST(FUSERMOUNT_SUBDIR)
#end FUSERMOUNT section
2009-02-18 17:36:07 +05:30
# EPOLL section
AC_ARG_ENABLE([epoll],
2013-06-17 13:44:10 -04:00
AC_HELP_STRING([--disable-epoll],
[Use poll instead of epoll.]))
2009-02-18 17:36:07 +05:30
BUILD_EPOLL=no
if test "x$enable_epoll" != "xno"; then
AC_CHECK_HEADERS([sys/epoll.h],
[BUILD_EPOLL=yes],
2013-06-17 13:44:10 -04:00
[BUILD_EPOLL=no])
2009-02-18 17:36:07 +05:30
fi
# end EPOLL section
# IBVERBS section
AC_ARG_ENABLE([ibverbs],
2013-06-17 13:44:10 -04:00
AC_HELP_STRING([--disable-ibverbs],
[Do not build the ibverbs transport]))
2009-02-18 17:36:07 +05:30
if test "x$enable_ibverbs" != "xno"; then
AC_CHECK_LIB([ibverbs],
[ibv_get_device_list],
2013-06-17 13:44:10 -04:00
[HAVE_LIBIBVERBS="yes"],
[HAVE_LIBIBVERBS="no"])
2013-09-17 19:27:57 -07:00
AC_CHECK_LIB([rdmacm], [rdma_create_id], [HAVE_RDMACM="yes"], [HAVE_RDMACM="no"])
2015-03-27 23:43:05 +05:30
if test "x$HAVE_RDMACM" = "xyes" ; then
AC_CHECK_DECLS(
[RDMA_OPTION_ID_REUSEADDR],
[],
[AC_ERROR([Need at least version 1.0.15 of librdmacm])],
[[#include <rdma/rdma_cma.h>]])
fi
2009-02-18 17:36:07 +05:30
fi
2012-12-18 12:47:43 +05:30
if test "x$enable_ibverbs" = "xyes"; then
if test "x$HAVE_LIBIBVERBS" = "xno"; then
echo "ibverbs-transport requested, but libibverbs is not present."
exit 1
fi
if test "x$HAVE_RDMACM" = "xno"; then
echo "ibverbs-transport requested, but librdmacm is not present."
exit 1
fi
2009-02-18 17:36:07 +05:30
fi
2010-08-31 03:20:29 +00:00
BUILD_RDMA=no
2009-02-18 17:36:07 +05:30
BUILD_IBVERBS=no
2012-12-18 12:47:43 +05:30
if test "x$enable_ibverbs" != "xno" -a "x$HAVE_LIBIBVERBS" = "xyes" -a "x$HAVE_RDMACM" = "xyes"; then
2009-02-18 17:36:07 +05:30
IBVERBS_SUBDIR=ib-verbs
BUILD_IBVERBS=yes
2010-08-31 03:20:29 +00:00
RDMA_SUBDIR=rdma
BUILD_RDMA=yes
2009-02-18 17:36:07 +05:30
fi
AC_SUBST(IBVERBS_SUBDIR)
2010-08-31 03:20:29 +00:00
AC_SUBST(RDMA_SUBDIR)
2009-02-18 17:36:07 +05:30
# end IBVERBS section
2011-01-27 05:23:35 +00:00
# SYNCDAEMON section
AC_ARG_ENABLE([georeplication],
2013-06-17 13:44:10 -04:00
AC_HELP_STRING([--disable-georeplication],
[Do not install georeplication components]))
2011-01-27 05:23:35 +00:00
BUILD_SYNCDAEMON=no
2011-02-17 07:31:18 +00:00
case $host_os in
linux*)
2011-08-12 09:17:44 +02:00
#do nothing
;;
netbsd*)
2011-02-17 07:31:18 +00:00
#do nothing
;;
*)
#disabling geo replication for non-linux platforms
2013-06-17 13:44:10 -04:00
enable_georeplication=no
2011-02-17 07:31:18 +00:00
;;
esac
2011-02-24 00:08:46 +00:00
SYNCDAEMON_COMPILE=0
2018-03-28 10:14:39 -04:00
if test "x${with_server}" = "xyes" -a "x${enable_georeplication}" != "xno"; then
if test "x${have_python}" = "xno" ; then
AC_MSG_ERROR([only python 2 and 3 are supported])
2011-01-27 05:23:35 +00:00
else
2018-03-28 10:14:39 -04:00
SYNCDAEMON_SUBDIR=geo-replication
SYNCDAEMON_COMPILE=1
BUILD_SYNCDAEMON="yes"
AC_MSG_CHECKING([if python has ctypes support...])
if "${PYTHON}" -c 'import ctypes' 2>/dev/null; then
AC_MSG_RESULT("yes")
else
AC_MSG_ERROR([python does not have ctypes support])
fi
2011-01-27 05:23:35 +00:00
fi
fi
2011-02-24 00:08:46 +00:00
AC_SUBST(SYNCDAEMON_COMPILE)
2011-01-27 05:23:35 +00:00
AC_SUBST(SYNCDAEMON_SUBDIR)
# end SYNCDAEMON section
2014-12-01 09:21:32 +01:00
# only install scripts from extras/geo-rep when enabled
2018-01-31 16:38:34 +01:00
if test "x${with_server}" = "xyes" -a "x$enable_georeplication" != "xno"; then
2014-12-01 09:21:32 +01:00
GEOREP_EXTRAS_SUBDIR=geo-rep
fi
AC_SUBST(GEOREP_EXTRAS_SUBDIR)
2015-05-17 15:26:03 +02:00
AM_CONDITIONAL(USE_GEOREP, test "x$enable_georeplication" != "xno")
2014-12-01 09:21:32 +01:00
eventsapi: Gluster Eventing Feature implementation
[Depends on http://review.gluster.org/14627]
Design is available in `glusterfs-specs`, A change from the design
is support of webhook instead of Websockets as discussed in the design
http://review.gluster.org/13115
Since Websocket support depends on REST APIs, I will add Websocket support
once REST APIs patch gets merged
Usage:
Run following command to start/stop Eventsapi server in all Peers,
which will collect the notifications from any Gluster daemon and emits
to configured client.
gluster-eventsapi start|stop|restart|reload
Status of running services can be checked using,
gluster-eventsapi status
Events listener is a HTTP(S) server which listens to events emited by
the Gluster. Create a HTTP Server to listen on POST and register that
URL using,
gluster-eventsapi webhook-add <URL> [--bearer-token <TOKEN>]
For example, if HTTP Server running in `http://192.168.122.188:9000`
then add that URL using,
gluster-eventsapi webhook-add http://192.168.122.188:9000
If it expects a Token then specify it using `--bearer-token` or `-t`
We can also test Webhook if all peer nodes can send message or not
using,
gluster-eventsapi webhook-test <URL> [--bearer-token <TOKEN>]
Configurations can be viewed/updated using,
gluster-eventsapi config-get [--name]
gluster-eventsapi config-set <NAME> <VALUE>
gluster-eventsapi config-reset <NAME|all>
If any one peer node was down during config-set/reset or webhook
modifications, Run sync command from good node when a peer node comes
back. Automatic update is not yet implemented.
gluster-eventsapi sync
Basic Events Client(HTTP Server) is included with the code, Start
running the client with required port and start listening to the
events.
/usr/share/glusterfs/scripts/eventsdash.py --port 8080
Default port is 9000, if no port is specified, once it started running
then configure gluster-eventsapi to send events to that client.
Eventsapi Client can be outside of the Cluster, it can be run event on
Windows. But only requirement is the client URL should be accessible
by all peer nodes.(Or ngrok(https://ngrok.com) like tools can be used)
Events implemented with this patch,
- Volume Create
- Volume Start
- Volume Stop
- Volume Delete
- Peer Attach
- Peer Detach
It is easy to add/support more events, since it touches Gluster cmd
code and to avoid merge conflicts I will add support for more events
once this patch merges.
BUG: 1334044
Change-Id: I316827ac9dd1443454df7deffe4f54835f7f6a08
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/14248
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-05-05 18:34:41 +05:30
# Events section
AC_ARG_ENABLE([events],
AC_HELP_STRING([--disable-events],
[Do not install Events components]))
BUILD_EVENTS=no
EVENTS_ENABLED=0
EVENTS_SUBDIR=
if test "x$enable_events" != "xno"; then
EVENTS_SUBDIR=events
EVENTS_ENABLED=1
BUILD_EVENTS="yes"
2018-03-28 10:14:39 -04:00
if test "x${have_python}" = "xno"; then
if test "x${enable_events}" = "xyes"; then
AC_MSG_ERROR([python 2 or 3 required. exiting.])
eventsapi: Gluster Eventing Feature implementation
[Depends on http://review.gluster.org/14627]
Design is available in `glusterfs-specs`, A change from the design
is support of webhook instead of Websockets as discussed in the design
http://review.gluster.org/13115
Since Websocket support depends on REST APIs, I will add Websocket support
once REST APIs patch gets merged
Usage:
Run following command to start/stop Eventsapi server in all Peers,
which will collect the notifications from any Gluster daemon and emits
to configured client.
gluster-eventsapi start|stop|restart|reload
Status of running services can be checked using,
gluster-eventsapi status
Events listener is a HTTP(S) server which listens to events emited by
the Gluster. Create a HTTP Server to listen on POST and register that
URL using,
gluster-eventsapi webhook-add <URL> [--bearer-token <TOKEN>]
For example, if HTTP Server running in `http://192.168.122.188:9000`
then add that URL using,
gluster-eventsapi webhook-add http://192.168.122.188:9000
If it expects a Token then specify it using `--bearer-token` or `-t`
We can also test Webhook if all peer nodes can send message or not
using,
gluster-eventsapi webhook-test <URL> [--bearer-token <TOKEN>]
Configurations can be viewed/updated using,
gluster-eventsapi config-get [--name]
gluster-eventsapi config-set <NAME> <VALUE>
gluster-eventsapi config-reset <NAME|all>
If any one peer node was down during config-set/reset or webhook
modifications, Run sync command from good node when a peer node comes
back. Automatic update is not yet implemented.
gluster-eventsapi sync
Basic Events Client(HTTP Server) is included with the code, Start
running the client with required port and start listening to the
events.
/usr/share/glusterfs/scripts/eventsdash.py --port 8080
Default port is 9000, if no port is specified, once it started running
then configure gluster-eventsapi to send events to that client.
Eventsapi Client can be outside of the Cluster, it can be run event on
Windows. But only requirement is the client URL should be accessible
by all peer nodes.(Or ngrok(https://ngrok.com) like tools can be used)
Events implemented with this patch,
- Volume Create
- Volume Start
- Volume Stop
- Volume Delete
- Peer Attach
- Peer Detach
It is easy to add/support more events, since it touches Gluster cmd
code and to avoid merge conflicts I will add support for more events
once this patch merges.
BUG: 1334044
Change-Id: I316827ac9dd1443454df7deffe4f54835f7f6a08
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/14248
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-05-05 18:34:41 +05:30
fi
2018-03-28 10:14:39 -04:00
AC_MSG_WARN([python not found, disabling events])
eventsapi: Gluster Eventing Feature implementation
[Depends on http://review.gluster.org/14627]
Design is available in `glusterfs-specs`, A change from the design
is support of webhook instead of Websockets as discussed in the design
http://review.gluster.org/13115
Since Websocket support depends on REST APIs, I will add Websocket support
once REST APIs patch gets merged
Usage:
Run following command to start/stop Eventsapi server in all Peers,
which will collect the notifications from any Gluster daemon and emits
to configured client.
gluster-eventsapi start|stop|restart|reload
Status of running services can be checked using,
gluster-eventsapi status
Events listener is a HTTP(S) server which listens to events emited by
the Gluster. Create a HTTP Server to listen on POST and register that
URL using,
gluster-eventsapi webhook-add <URL> [--bearer-token <TOKEN>]
For example, if HTTP Server running in `http://192.168.122.188:9000`
then add that URL using,
gluster-eventsapi webhook-add http://192.168.122.188:9000
If it expects a Token then specify it using `--bearer-token` or `-t`
We can also test Webhook if all peer nodes can send message or not
using,
gluster-eventsapi webhook-test <URL> [--bearer-token <TOKEN>]
Configurations can be viewed/updated using,
gluster-eventsapi config-get [--name]
gluster-eventsapi config-set <NAME> <VALUE>
gluster-eventsapi config-reset <NAME|all>
If any one peer node was down during config-set/reset or webhook
modifications, Run sync command from good node when a peer node comes
back. Automatic update is not yet implemented.
gluster-eventsapi sync
Basic Events Client(HTTP Server) is included with the code, Start
running the client with required port and start listening to the
events.
/usr/share/glusterfs/scripts/eventsdash.py --port 8080
Default port is 9000, if no port is specified, once it started running
then configure gluster-eventsapi to send events to that client.
Eventsapi Client can be outside of the Cluster, it can be run event on
Windows. But only requirement is the client URL should be accessible
by all peer nodes.(Or ngrok(https://ngrok.com) like tools can be used)
Events implemented with this patch,
- Volume Create
- Volume Start
- Volume Stop
- Volume Delete
- Peer Attach
- Peer Detach
It is easy to add/support more events, since it touches Gluster cmd
code and to avoid merge conflicts I will add support for more events
once this patch merges.
BUG: 1334044
Change-Id: I316827ac9dd1443454df7deffe4f54835f7f6a08
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/14248
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-05-05 18:34:41 +05:30
EVENTS_SUBDIR=
EVENTS_ENABLED=0
BUILD_EVENTS="no"
else
AC_DEFINE(USE_EVENTS, 1, [define if events enabled])
fi
fi
AC_SUBST(EVENTS_ENABLED)
AC_SUBST(EVENTS_SUBDIR)
2018-03-28 10:14:39 -04:00
AM_CONDITIONAL([BUILD_EVENTS], [test "x${BUILD_EVENTS}" = "xyes"])
eventsapi: Gluster Eventing Feature implementation
[Depends on http://review.gluster.org/14627]
Design is available in `glusterfs-specs`, A change from the design
is support of webhook instead of Websockets as discussed in the design
http://review.gluster.org/13115
Since Websocket support depends on REST APIs, I will add Websocket support
once REST APIs patch gets merged
Usage:
Run following command to start/stop Eventsapi server in all Peers,
which will collect the notifications from any Gluster daemon and emits
to configured client.
gluster-eventsapi start|stop|restart|reload
Status of running services can be checked using,
gluster-eventsapi status
Events listener is a HTTP(S) server which listens to events emited by
the Gluster. Create a HTTP Server to listen on POST and register that
URL using,
gluster-eventsapi webhook-add <URL> [--bearer-token <TOKEN>]
For example, if HTTP Server running in `http://192.168.122.188:9000`
then add that URL using,
gluster-eventsapi webhook-add http://192.168.122.188:9000
If it expects a Token then specify it using `--bearer-token` or `-t`
We can also test Webhook if all peer nodes can send message or not
using,
gluster-eventsapi webhook-test <URL> [--bearer-token <TOKEN>]
Configurations can be viewed/updated using,
gluster-eventsapi config-get [--name]
gluster-eventsapi config-set <NAME> <VALUE>
gluster-eventsapi config-reset <NAME|all>
If any one peer node was down during config-set/reset or webhook
modifications, Run sync command from good node when a peer node comes
back. Automatic update is not yet implemented.
gluster-eventsapi sync
Basic Events Client(HTTP Server) is included with the code, Start
running the client with required port and start listening to the
events.
/usr/share/glusterfs/scripts/eventsdash.py --port 8080
Default port is 9000, if no port is specified, once it started running
then configure gluster-eventsapi to send events to that client.
Eventsapi Client can be outside of the Cluster, it can be run event on
Windows. But only requirement is the client URL should be accessible
by all peer nodes.(Or ngrok(https://ngrok.com) like tools can be used)
Events implemented with this patch,
- Volume Create
- Volume Start
- Volume Stop
- Volume Delete
- Peer Attach
- Peer Detach
It is easy to add/support more events, since it touches Gluster cmd
code and to avoid merge conflicts I will add support for more events
once this patch merges.
BUG: 1334044
Change-Id: I316827ac9dd1443454df7deffe4f54835f7f6a08
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/14248
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-05-05 18:34:41 +05:30
# end Events section
2014-08-09 23:54:15 -07:00
# CDC xlator - check if libz is present if so enable HAVE_LIB_Z
2014-08-08 12:01:34 +02:00
BUILD_CDC=yes
PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.0],,
2014-08-19 18:24:23 -07:00
[AC_CHECK_LIB([z], [deflate], [ZLIB_LIBS="-lz"],
2014-08-08 12:01:34 +02:00
[BUILD_CDC=no])])
echo -n "features requiring zlib enabled: "
if test "x$BUILD_CDC" = "xyes" ; then
echo "yes"
AC_DEFINE(HAVE_LIB_Z, 1, [define if zlib is present])
else
echo "no"
fi
2014-08-19 18:24:23 -07:00
AC_SUBST(ZLIB_CFLAGS)
AC_SUBST(ZLIB_LIBS)
2012-03-26 14:33:41 +05:30
# end CDC xlator secion
2015-08-22 01:09:53 +05:30
#start firewalld section
BUILD_FIREWALLD="no"
AC_ARG_ENABLE([firewalld],
AC_HELP_STRING([--enable-firewalld],
[enable installation configuration for firewalld]),
[BUILD_FIREWALLD="${enableval}"], [BUILD_FIREWALLD="no"])
2018-01-31 16:38:34 +01:00
if test "x${with_server}" = "xyes" -a "x${BUILD_FIREWALLD}" = "xyes"; then
2017-01-06 17:16:38 +01:00
if !(test -d /usr/lib/firewalld/services 1>/dev/null 2>&1) ; then
2015-08-22 01:09:53 +05:30
BUILD_FIREWALLD="no (firewalld not installed)"
fi
fi
AM_CONDITIONAL([USE_FIREWALLD],test ["x${BUILD_FIREWALLD}" = "xyes"])
#endof firewald section
2013-04-08 16:49:34 +05:30
# xml-output
AC_ARG_ENABLE([xml-output],
AC_HELP_STRING([--disable-xml-output],
[Disable the xml output]))
BUILD_XML_OUTPUT="yes"
if test "x$enable_xml_output" != "xno"; then
2018-07-30 17:15:35 +02:00
PKG_CHECK_MODULES([XML], [libxml-2.0], [], [no_xml="yes"])
2013-04-08 16:49:34 +05:30
if test "x${no_xml}" = "x"; then
AC_DEFINE([HAVE_LIB_XML], [1], [Define to 1 if using libxml2.])
else
2015-02-18 19:45:23 +05:30
if test "x$enable_georeplication" != "xno"; then
2014-02-19 18:51:26 +05:30
AC_MSG_ERROR([libxml2 devel libraries not found])
2015-02-18 19:45:23 +05:30
else
AC_MSG_WARN([libxml2 devel libraries not found disabling XML support])
2014-02-19 18:51:26 +05:30
BUILD_XML_OUTPUT="no"
2015-02-18 19:45:23 +05:30
fi
2014-02-19 18:51:26 +05:30
2013-04-08 16:49:34 +05:30
fi
else
2014-02-19 18:51:26 +05:30
if test "x$enable_georeplication" != "xno"; then
AC_MSG_ERROR([geo-replication requires xml output])
fi
2013-04-08 16:49:34 +05:30
BUILD_XML_OUTPUT="no"
2013-03-25 08:22:16 -04:00
fi
2013-04-08 16:49:34 +05:30
# end of xml-output
2011-01-27 05:23:35 +00:00
2018-05-22 19:55:27 +05:30
dnl cloudsync section
BUILD_CLOUDSYNC="no"
AC_CHECK_LIB([curl], [curl_easy_setopt], [LIBCURL="-lcurl"])
core: python3
see https://review.gluster.org/#/c/19788/,
https://review.gluster.org/#/c/19871/,
https://review.gluster.org/#/c/19952/,
https://review.gluster.org/#/c/20104/,
https://review.gluster.org/#/c/20162/,
https://review.gluster.org/#/c/20185/,
https://review.gluster.org/#/c/20207/,
https://review.gluster.org/#/c/20227/,
https://review.gluster.org/#/c/20307/,
https://review.gluster.org/#/c/20320/,
https://review.gluster.org/#/c/20332/,
https://review.gluster.org/#/c/20364/,
https://review.gluster.org/#/c/20441/, and
https://review.gluster.org/#/c/20484
shebangs changed from /usr/bin/python2 to /usr/bin/python3.
(Reminder, various distribution packaging guidelines require use
of explicit python version and don't allow '#!/usr/bin/env python',
regardless of how handy that idiom may be.)
glusterfs.spec(.in) package python{2,3}-gluster and python2 or
python3 dependencies as appropriate.
configure(.ac):
+ test for and use python2 or python3 as appropriate. If build
machine has python2 and python3, use python3. Override by
setting PYTHON=/usr/bin/python2 when running configure.
+ PYTHONDEV_CPPFLAGS from python[23]-config --includes is a
better match to the original python sysconfig.get_python_inc().
All those other extraneous flags breaks the build.
+ Only change the shebangs once. Changing them over and over
again, e.g., during a `make glusterrpms` in extras/LinuxRPM
just sends make (is it really make that's looping?) into an
infinite loop. If you figure out why, let me know.
+ Oldest python2 is python2.6 on CentOS 6 and Debian 8 (Jessie).
Everything else has 2.7 or 3.x
+ logic from https://review.gluster.org/c/glusterfs/+/21050, which
needs to be removed/merged after that patch is merged.
Builds on CentOS 6, CentOS 7, Fedora 28, Fedora rawhide, and the
mysterious RHEL > 7.
Change-Id: Idae21d3b6f58b32372e1daa0d234e491e563198f
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-08-29 11:09:27 -04:00
if test -n "$LIBCURL";then
2018-05-22 19:55:27 +05:30
HAVE_LIBCURL="yes"
fi
AC_CHECK_HEADERS([openssl/hmac.h openssl/evp.h openssl/bio.h openssl/buffer.h], [HAVE_OPENSSL="yes"])
if test "x$HAVE_LIBCURL" = "xyes" -a "x$HAVE_OPENSSL" = "xyes";then
HAVE_AMAZONS3="yes"
fi
AM_CONDITIONAL([BUILD_AMAZONS3_PLUGIN], [test "x$HAVE_AMAZONS3" = "xyes"])
if test "x$HAVE_AMAZONS3" = "xyes";then
BUILD_CLOUDSYNC="yes"
fi
AM_CONDITIONAL([BUILD_CLOUDSYNC], [test "x$BUILD_CLOUDSYNC" = "xyes"])
dnl end cloudsync section
2014-01-02 14:03:18 -05:00
dnl SELinux feature enablement
case $host_os in
linux*)
AC_ARG_ENABLE([selinux],
AC_HELP_STRING([--disable-selinux],
[Disable SELinux features]),
[USE_SELINUX="${enableval}"], [USE_SELINUX="yes"])
;;
*)
USE_SELINUX=no
;;
esac
AM_CONDITIONAL(USE_SELINUX, test "x${USE_SELINUX}" = "xyes")
dnl end of SELinux feature enablement
2014-06-21 02:00:23 -07:00
AC_CHECK_HEADERS([execinfo.h], [have_backtrace=yes])
2009-02-18 17:36:07 +05:30
if test "x${have_backtrace}" = "xyes"; then
AC_DEFINE(HAVE_BACKTRACE, 1, [define if found backtrace])
fi
AC_SUBST(HAVE_BACKTRACE)
2014-06-29 18:56:44 -07:00
if test "x${have_backtrace}" != "xyes"; then
AC_TRY_COMPILE([#include <math.h>], [double x=0.0; x=ceil(0.0);],
2015-05-17 15:26:03 +02:00
[],
2014-06-29 18:56:44 -07:00
AC_MSG_ERROR([need math library for libexecinfo]))
fi
2014-06-21 02:00:23 -07:00
2009-02-18 17:36:07 +05:30
dnl glusterfs prints memory usage to stderr by sending it SIGUSR1
AC_CHECK_FUNC([malloc_stats], [have_malloc_stats=yes])
if test "x${have_malloc_stats}" = "xyes"; then
AC_DEFINE(HAVE_MALLOC_STATS, 1, [define if found malloc_stats])
fi
AC_SUBST(HAVE_MALLOC_STATS)
dnl Linux, Solaris, Cygwin
AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec])
dnl FreeBSD, NetBSD
AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec])
2012-03-30 15:58:43 +02:00
case $host_os in
2013-06-17 13:44:10 -04:00
*netbsd*)
2014-05-21 05:45:39 +02:00
CFLAGS="${CFLAGS} -D_INCOMPLETE_XOPEN_C063 -DCONFIG_MACHINE_BSWAP_H"
2013-06-17 13:44:10 -04:00
;;
2012-03-30 15:58:43 +02:00
esac
2011-08-12 09:12:27 +02:00
AC_CHECK_FUNC([linkat], [have_linkat=yes])
if test "x${have_linkat}" = "xyes"; then
AC_DEFINE(HAVE_LINKAT, 1, [define if found linkat])
fi
AC_SUBST(HAVE_LINKAT)
2009-02-18 17:36:07 +05:30
2013-10-10 04:19:16 -07:00
dnl check for Monotonic clock
2014-08-09 23:54:15 -07:00
AC_CHECK_LIB([rt], [clock_gettime], ,
AC_MSG_WARN([System doesn't have monotonic clock using contrib]))
2013-10-10 04:19:16 -07:00
2018-07-27 08:45:48 +00:00
dnl check for argp, FreeBSD has the header in /usr/local/include
case $host_os in
*freebsd*)
CFLAGS="${CFLAGS} -isystem /usr/local/include"
ARGP_LDADD=-largp
;;
esac
dnl argp-standalone does not provide a pkg-config file
2009-02-18 17:36:07 +05:30
AC_CHECK_HEADER([argp.h], AC_DEFINE(HAVE_ARGP, 1, [have argp]))
2018-07-27 08:45:48 +00:00
if test "x$ac_cv_header_argp_h" != "xyes"; then
AC_MSG_ERROR([argp.h not found, install libargp or argp-standalone])
2009-02-18 17:36:07 +05:30
fi
2018-07-27 08:45:48 +00:00
AC_SUBST(ARGP_LDADD)
2009-02-18 17:36:07 +05:30
2017-03-29 13:44:03 +02:00
dnl Check for atomic operation support
2017-11-07 13:45:03 +01:00
AC_MSG_CHECKING([for gcc __atomic builtins])
AC_TRY_LINK([], [int v; __atomic_load_n(&v, __ATOMIC_ACQUIRE);],
[have_atomic_builtins=yes], [have_atomic_builtins=no])
2017-03-29 13:44:03 +02:00
if test "x${have_atomic_builtins}" = "xyes"; then
AC_DEFINE(HAVE_ATOMIC_BUILTINS, 1, [define if __atomic_*() builtins are available])
fi
AC_SUBST(HAVE_ATOMIC_BUILTINS)
2017-11-07 13:45:03 +01:00
AC_MSG_RESULT([$have_atomic_builtins])
2017-03-29 13:44:03 +02:00
dnl __sync_*() will not be needed if __atomic_*() is available
2017-11-07 13:45:03 +01:00
AC_MSG_CHECKING([for gcc __sync builtins])
AC_TRY_LINK([], [__sync_synchronize();],
[have_sync_builtins=yes], [have_sync_builtins=no])
if test "x${have_sync_builtins}" = "xyes"; then
2017-03-29 13:44:03 +02:00
AC_DEFINE(HAVE_SYNC_BUILTINS, 1, [define if __sync_*() builtins are available])
2014-02-12 18:37:55 -08:00
fi
2017-03-29 13:44:03 +02:00
AC_SUBST(HAVE_SYNC_BUILTINS)
2017-11-07 13:45:03 +01:00
AC_MSG_RESULT([$have_sync_builtins])
2014-02-12 18:37:55 -08:00
2009-02-18 17:36:07 +05:30
AC_CHECK_HEADER([malloc.h], AC_DEFINE(HAVE_MALLOC_H, 1, [have malloc.h]))
AC_CHECK_FUNC([llistxattr], [have_llistxattr=yes])
if test "x${have_llistxattr}" = "xyes"; then
AC_DEFINE(HAVE_LLISTXATTR, 1, [define if llistxattr exists])
fi
2014-04-17 15:54:34 -07:00
AC_CHECK_FUNC([fdatasync], [have_fdatasync=no])
2009-02-18 17:36:07 +05:30
if test "x${have_fdatasync}" = "xyes"; then
AC_DEFINE(HAVE_FDATASYNC, 1, [define if fdatasync exists])
fi
2013-05-08 08:54:11 -04:00
AC_CHECK_FUNC([fallocate], [have_fallocate=yes])
if test "x${have_fallocate}" = "xyes"; then
AC_DEFINE(HAVE_FALLOCATE, 1, [define if fallocate exists])
fi
AC_CHECK_FUNC([posix_fallocate], [have_posix_fallocate=yes])
if test "x${have_posix_fallocate}" = "xyes"; then
AC_DEFINE(HAVE_POSIX_FALLOCATE, 1, [define if posix_fallocate exists])
fi
2017-02-18 00:49:02 +01:00
BUILD_NANOSECOND_TIMESTAMPS=no
AC_CHECK_FUNC([utimensat], [have_utimensat=yes])
if test "x${have_utimensat}" = "xyes"; then
BUILD_NANOSECOND_TIMESTAMPS=yes
AC_DEFINE(HAVE_UTIMENSAT, 1, [define if utimensat exists])
fi
2015-06-21 16:59:15 +02:00
OLD_CFLAGS=${CFLAGS}
CFLAGS="-D_GNU_SOURCE"
AC_CHECK_DECL([SEEK_HOLE], , , [#include <unistd.h>])
if test "x${ac_cv_have_decl_SEEK_HOLE}" = "xyes"; then
AC_DEFINE(HAVE_SEEK_HOLE, 1, [define if SEEK_HOLE is available])
fi
CFLAGS=${OLD_CFLAGS}
2018-10-11 15:16:41 +05:30
AC_CHECK_FUNC([accept4], [have_accept4=yes])
if test "x${have_accept4}" = "xyes"; then
AC_DEFINE(HAVE_ACCEPT4, 1, [define if accept4 exists])
fi
AC_CHECK_FUNC([paccept], [have_paccept=yes])
if test "x${have_paccept}" = "xyes"; then
AC_DEFINE(HAVE_PACCEPT, 1, [define if paccept exists])
fi
2013-09-17 19:27:57 -07:00
# Check the distribution where you are compiling glusterfs on
2009-03-01 05:35:18 -08:00
GF_DISTRIBUTION=
AC_CHECK_FILE([/etc/debian_version])
AC_CHECK_FILE([/etc/SuSE-release])
AC_CHECK_FILE([/etc/redhat-release])
if test "x$ac_cv_file__etc_debian_version" = "xyes"; then
GF_DISTRIBUTION=Debian
fi
if test "x$ac_cv_file__etc_SuSE_release" = "xyes"; then
GF_DISTRIBUTION=SuSE
fi
if test "x$ac_cv_file__etc_redhat_release" = "xyes"; then
GF_DISTRIBUTION=Redhat
fi
AC_SUBST(GF_DISTRIBUTION)
2009-02-18 17:36:07 +05:30
GF_HOST_OS=""
2018-08-09 15:52:19 +02:00
GF_LDFLAGS="${GF_LDFLAGS} -rdynamic"
2009-02-18 17:36:07 +05:30
2018-03-28 09:01:05 -04:00
dnl see --with-libtirpc option check above, libtirpc(-devel) is required for
dnl ipv6-default
if test "x${with_libtirpc}" = "xyes" || test "x${with_ipv6_default}" = "xyes" ; then
2017-11-20 20:56:34 +00:00
PKG_CHECK_MODULES([TIRPC], [libtirpc],
2018-03-28 09:01:05 -04:00
[with_libtirpc="yes"; GF_CFLAGS="$GF_CFLAGS $TIRPC_CFLAGS"; GF_LDFLAGS="$GF_LDFLAGS $TIRPC_LIBS";],
[with_libtirpc="missing"; with_ipv6_default="no"])
2017-11-20 20:44:45 +00:00
fi
2018-03-28 09:01:05 -04:00
if test "x${with_libtirpc}" = "xmissing" ; then
2018-01-18 15:24:00 -05:00
AC_CHECK_HEADERS([rpc/rpc.h],[
AC_MSG_WARN([
---------------------------------------------------------------------------------
2018-03-28 09:01:05 -04:00
libtirpc (and/or ipv6-default) were enabled but libtirpc-devel is not installed.
Disabling libtirpc and ipv6-default and falling back to legacy glibc rpc headers.
This is a transitional warning message. Eventually it will be an error message.
2018-01-18 15:24:00 -05:00
---------------------------------------------------------------------------------])],[
AC_MSG_ERROR([
---------------------------------------------------------------------------------
2018-03-28 09:01:05 -04:00
libtirpc (and/or ipv6-default) were enabled but libtirpc-devel is not installed
and there were no legacy glibc rpc headers and library to fall back to.
2018-01-18 15:24:00 -05:00
---------------------------------------------------------------------------------])])
fi
if test "x$with_ipv6_default" = "xyes" ; then
2017-11-20 20:44:45 +00:00
GF_CFLAGS="$GF_CFLAGS -DIPV6_DEFAULT"
2017-04-28 16:44:29 -07:00
fi
2014-04-17 15:54:34 -07:00
dnl check for gcc -Werror=format-security
2015-05-17 15:26:03 +02:00
saved_CFLAGS=$CFLAGS
CFLAGS="-Wformat -Werror=format-security"
2012-12-14 10:48:46 +01:00
AC_MSG_CHECKING([whether $CC accepts -Werror=format-security])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [cc_werror_format_security=yes], [cc_werror_format_security=no])
echo $cc_werror_format_security
if test "x$cc_werror_format_security" = "xno"; then
2015-05-17 15:26:03 +02:00
CFLAGS="$saved_CFLAGS"
2012-12-14 10:48:46 +01:00
else
2015-05-17 15:26:03 +02:00
CFLAGS="$saved_CFLAGS $CFLAGS"
GF_CFLAGS="$GF_CFLAGS $CFLAGS"
2012-12-14 10:48:46 +01:00
fi
2014-04-17 15:54:34 -07:00
dnl check for gcc -Werror=implicit-function-declaration
2015-05-17 15:26:03 +02:00
saved_CFLAGS=$CFLAGS
2015-11-23 12:20:09 +05:30
saved_GF_CFLAGS=$GF_CFLAGS
2015-05-17 15:26:03 +02:00
CFLAGS="-Werror=implicit-function-declaration"
2015-11-23 12:20:09 +05:30
GF_CFLAGS="-Werror=implicit-function-declaration"
2013-07-30 18:22:48 +02:00
AC_MSG_CHECKING([whether $CC accepts -Werror=implicit-function-declaration])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [cc_werror_implicit=yes], [cc_werror_implicit=no])
echo $cc_werror_implicit
if test "x$cc_werror_implicit" = "xno"; then
2015-05-17 15:26:03 +02:00
CFLAGS="$saved_CFLAGS"
2015-11-23 12:20:09 +05:30
GF_CFLAGS="$saved_GF_CFLAGS"
2013-07-30 18:22:48 +02:00
else
2015-05-17 15:26:03 +02:00
CFLAGS="$saved_CFLAGS $CFLAGS"
2015-11-23 12:20:09 +05:30
GF_CFLAGS="$saved_GF_CFLAGS $GF_CFLAGS"
2013-07-30 18:22:48 +02:00
fi
2014-04-17 15:54:34 -07:00
dnl clang is mostly GCC-compatible, but its version is much lower,
dnl so we have to check for it.
AC_MSG_CHECKING([if compiling with clang])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([], [[
#ifndef __clang__
not clang
#endif
]])],
[CLANG=yes], [CLANG=no])
AC_MSG_RESULT([$CLANG])
if test "x$CLANG" = "xyes"; then
2015-04-03 18:14:13 +02:00
GF_CFLAGS="${GF_CFLAGS} -Wno-gnu"
2014-04-17 15:54:34 -07:00
fi
2014-06-21 02:00:23 -07:00
if test "x$ac_cv_header_execinfo_h" = "xno"; then
# The reason is that __builtin_frame_address(n) for n > 0 seems
# to just crash on most platforms when -fomit-stack-pointer is
# specified, which seems to be the default for many platforms on
# -O2. The documentation says that __builtin_frame_address()
# should return NULL in case it can't get the frame, but it
# seems to crash instead.
# execinfo.c in ./contrib/libexecinfo uses __builtin_frame_address(n)
# for providing cross platform backtrace*() functions.
if test "x$CLANG" = "xno"; then
2015-04-03 18:14:13 +02:00
GF_CFLAGS="${GF_CFLAGS} -fno-omit-frame-pointer"
2014-06-21 02:00:23 -07:00
fi
fi
2014-04-17 15:54:34 -07:00
2015-02-18 19:07:23 +05:30
old_prefix=$prefix
if test "x$prefix" = xNONE; then
2018-01-18 15:24:00 -05:00
prefix=$ac_default_prefix
2015-02-18 19:07:23 +05:30
fi
2017-04-21 19:11:24 +02:00
old_exec_prefix=$exec_prefix
if test "x$exec_prefix" = xNONE; then
2018-01-18 15:24:00 -05:00
exec_prefix="$(eval echo $prefix)"
2017-04-21 19:11:24 +02:00
fi
GLUSTERFS_LIBEXECDIR="$(eval echo $libexecdir)/glusterfs"
GLUSTERFSD_MISCDIR="$(eval echo $prefix)/var/lib/misc/glusterfsd"
2015-02-18 19:07:23 +05:30
prefix=$old_prefix
2017-04-21 19:11:24 +02:00
exec_prefix=$old_exec_prefix
2015-02-18 19:07:23 +05:30
2014-06-29 18:56:44 -07:00
### Dirty hacky stuff to make LOCALSTATEDIR work
if test "x$prefix" = xNONE; then
2017-04-21 19:11:24 +02:00
test $localstatedir = '${prefix}/var' && localstatedir=$ac_default_prefix/var
2014-06-29 18:56:44 -07:00
localstatedir=/var
fi
2017-04-21 19:11:24 +02:00
localstatedir="$(eval echo ${localstatedir})"
LOCALSTATEDIR=$localstatedir
2014-06-29 18:56:44 -07:00
geo-rep: mountbroker user management
Non root geo-replication setup is now simplified. This
patch provides cli for mountbroker user and options management
To set Options,
gluster system:: execute mountbroker opt <KEY> <VALUE>
# for example,
gluster system:: execute mountbroker opt mountbroker-root /var/mountbroker-root
gluster system:: execute mountbroker opt geo-replication-log-group geogroup
gluster system:: execute mountbroker opt rpc-auth-allow-insecure on
To remove option,
gluster system:: execute mountbroker optdel <KEY>
# for example,
gluster system:: execute mountbroker optdel geo-replication-log-group
To add/edit user,
gluster system:: execute mountbroker user <USERNAME> <VOLUMES>
# for example
gluster system:: execute mountbroker user geoaccount slavevol1,slavevol2
To remove user,
gluster system:: execute mountbroker userdel <USERNAME>
# for example
gluster system:: execute mountbroker userdel geoaccount
For info,
gluster system:: execute mountbroker info
gluster system:: execute mountbroker -j info
For JSON output add -j after mountbroker, for example,
gluster system:: execute mountbroker -j user geoaccount slavevol1,slavevol2
PS: Each peer prints its own JSON output, aggregator required from consumer side
BUG: 1136312
Change-Id: Ie52210c0bcc91ac2ffd3ba58988222ffca62b47f
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/9398
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: darshan n <dnarayan@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-01-06 18:20:45 +05:30
old_prefix=$prefix
if test "x$prefix" = xNONE; then
prefix=$ac_default_prefix
fi
2017-04-21 19:11:24 +02:00
GLUSTERD_VOLFILE="$(eval echo ${sysconfdir})/glusterfs/glusterd.vol"
geo-rep: mountbroker user management
Non root geo-replication setup is now simplified. This
patch provides cli for mountbroker user and options management
To set Options,
gluster system:: execute mountbroker opt <KEY> <VALUE>
# for example,
gluster system:: execute mountbroker opt mountbroker-root /var/mountbroker-root
gluster system:: execute mountbroker opt geo-replication-log-group geogroup
gluster system:: execute mountbroker opt rpc-auth-allow-insecure on
To remove option,
gluster system:: execute mountbroker optdel <KEY>
# for example,
gluster system:: execute mountbroker optdel geo-replication-log-group
To add/edit user,
gluster system:: execute mountbroker user <USERNAME> <VOLUMES>
# for example
gluster system:: execute mountbroker user geoaccount slavevol1,slavevol2
To remove user,
gluster system:: execute mountbroker userdel <USERNAME>
# for example
gluster system:: execute mountbroker userdel geoaccount
For info,
gluster system:: execute mountbroker info
gluster system:: execute mountbroker -j info
For JSON output add -j after mountbroker, for example,
gluster system:: execute mountbroker -j user geoaccount slavevol1,slavevol2
PS: Each peer prints its own JSON output, aggregator required from consumer side
BUG: 1136312
Change-Id: Ie52210c0bcc91ac2ffd3ba58988222ffca62b47f
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/9398
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: darshan n <dnarayan@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-01-06 18:20:45 +05:30
prefix=$old_prefix
2009-02-18 17:36:07 +05:30
case $host_os in
linux*)
GF_HOST_OS="GF_LINUX_HOST_OS"
2013-06-17 13:44:10 -04:00
GF_FUSE_CFLAGS="-DFUSERMOUNT_DIR=\\\"\$(bindir)\\\""
2014-06-29 18:56:44 -07:00
GLUSTERD_WORKDIR="${LOCALSTATEDIR}/lib/glusterd"
2013-06-17 13:44:10 -04:00
;;
2009-02-18 17:36:07 +05:30
solaris*)
GF_HOST_OS="GF_SOLARIS_HOST_OS"
2015-04-03 18:14:13 +02:00
GF_CFLAGS="${GF_CFLAGS} -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -m64"
2009-12-18 12:38:04 +00:00
BUILD_FUSE_CLIENT=no
FUSE_CLIENT_SUBDIR=""
2014-06-29 18:56:44 -07:00
GLUSTERD_WORKDIR="${LOCALSTATEDIR}/lib/glusterd"
2013-06-17 13:44:10 -04:00
;;
2011-05-20 16:56:27 +00:00
*netbsd*)
2013-06-17 13:44:10 -04:00
GF_HOST_OS="GF_BSD_HOST_OS"
2015-04-03 18:14:13 +02:00
GF_CFLAGS="${GF_CFLAGS} -D_INCOMPLETE_XOPEN_C063"
2013-06-17 13:44:10 -04:00
GF_CFLAGS="${GF_CFLAGS} -DTHREAD_UNSAFE_BASENAME"
GF_CFLAGS="${GF_CFLAGS} -DTHREAD_UNSAFE_DIRNAME"
2014-06-21 02:00:23 -07:00
GF_FUSE_CFLAGS="-DFUSERMOUNT_DIR=\\\"\$(sbindir)\\\""
2018-07-27 08:45:48 +00:00
GF_LDADD="${ARGP_LDADD}"
2013-06-17 13:44:10 -04:00
if test "x$ac_cv_header_execinfo_h" = "xyes"; then
2018-08-09 15:52:19 +02:00
GF_LDFLAGS="${GF_LDFLAGS} -lexecinfo"
2013-06-17 13:44:10 -04:00
fi
GF_FUSE_LDADD="-lperfuse"
BUILD_FUSE_CLIENT=yes
LEXLIB=""
2014-06-21 02:00:23 -07:00
BUILD_FUSERMOUNT=no
FUSERMOUNT_SUBDIR=""
2014-06-29 18:56:44 -07:00
GLUSTERD_WORKDIR="${LOCALSTATEDIR}/db/glusterd"
2013-06-17 13:44:10 -04:00
;;
2014-06-21 02:00:23 -07:00
*freebsd*)
2009-02-18 17:36:07 +05:30
GF_HOST_OS="GF_BSD_HOST_OS"
2018-07-27 08:45:48 +00:00
GF_CFLAGS="${GF_CFLAGS} -O0"
2013-06-17 13:44:10 -04:00
GF_CFLAGS="${GF_CFLAGS} -DTHREAD_UNSAFE_BASENAME"
GF_CFLAGS="${GF_CFLAGS} -DTHREAD_UNSAFE_DIRNAME"
2014-06-21 02:00:23 -07:00
GF_CFLAGS="${GF_CFLAGS} -D_LIBGEN_H_"
GF_CFLAGS="${GF_CFLAGS} -DO_DSYNC=0"
GF_CFLAGS="${GF_CFLAGS} -Dxdr_quad_t=xdr_longlong_t"
GF_CFLAGS="${GF_CFLAGS} -Dxdr_u_quad_t=xdr_u_longlong_t"
GF_FUSE_CFLAGS="-DFUSERMOUNT_DIR=\\\"\$(sbindir)\\\""
2018-07-27 08:45:48 +00:00
GF_LDADD="${ARGP_LDADD}"
2013-06-17 13:44:10 -04:00
if test "x$ac_cv_header_execinfo_h" = "xyes"; then
2018-08-09 15:52:19 +02:00
GF_LDFLAGS="${GF_LDFLAGS} -lexecinfo"
2013-06-17 13:44:10 -04:00
fi
2014-06-29 18:56:44 -07:00
BUILD_FUSE_CLIENT=yes
2014-06-21 02:00:23 -07:00
BUILD_FUSERMOUNT=no
FUSERMOUNT_SUBDIR=""
2014-06-29 18:56:44 -07:00
GLUSTERD_WORKDIR="${LOCALSTATEDIR}/db/glusterd"
2013-06-17 13:44:10 -04:00
;;
2009-02-18 17:36:07 +05:30
darwin*)
GF_HOST_OS="GF_DARWIN_HOST_OS"
2013-06-17 13:44:10 -04:00
LIBTOOL=glibtool
2014-07-01 19:03:52 -07:00
GF_CFLAGS="${GF_CFLAGS} -D_REENTRANT -D_XOPEN_SOURCE "
GF_CFLAGS="${GF_CFLAGS} -D_DARWIN_USE_64_BIT_INODE "
2013-06-17 13:44:10 -04:00
GF_CFLAGS="${GF_CFLAGS} -DTHREAD_UNSAFE_BASENAME"
GF_CFLAGS="${GF_CFLAGS} -DTHREAD_UNSAFE_DIRNAME"
2018-07-27 08:45:48 +00:00
GF_LDADD="${ARGP_LDADD}"
2018-08-09 15:52:19 +02:00
GF_LDFLAGS="${GF_LDFLAGS}"
2013-06-17 13:44:10 -04:00
GF_FUSE_CFLAGS="-I\$(CONTRIBDIR)/macfuse"
2014-04-17 15:54:34 -07:00
BUILD_FUSERMOUNT="no"
FUSERMOUNT_SUBDIR=""
2014-06-29 18:56:44 -07:00
GLUSTERD_WORKDIR="${LOCALSTATEDIR}/db/glusterd"
2013-06-17 13:44:10 -04:00
;;
2009-02-18 17:36:07 +05:30
esac
api: versioned symbols in libgfapi.so for compatibility
Use versioned symbols to keep libgfapi at libgfapi.so.0.0.0
Revisited to address broken build on Mac OS X
See http://review.gluster.org/9036
Rebased to include http://review.gluster.org/#/c/9376/ (glfs_resolve())
but note that gerrit's "Rebase Change" couldn't do it.
N.B. noticed that glfs_get_volumeid() decl in glfs.h was missing
the __THROW, added it.
On systems using ELF and the GNU toolchain, symbol versions are created
with a .symver asm operand in the .c source file. Clang is claimed to
be compatible with gcc, so we'll pretend for now that this also works
with clang.
On Mac OS X, aliases are created with __asm "magic" in the .h header
file. In the normal case, when both the decl and defn match, that's
all that's needed. In our case though the decl and defn don't match ---
we have, e.g. a defn such as 'int glfs_foo(...)' and the corresponding
decl is 'int pub_glfs_foo(...)'. To make this work we create the necessary
aliases in the library at link time with the -alias_list link option.
Note that this results in there being pairs of symbols in the .dylib,
e.g. _pub_glfs_foo and _glfs_foo$GFAPI_3.4.0. We could use another
link option, -unexported_symbols_list to elide the _pub_glfs_* symbols.
(And we probably should.)
Linux symbol versioning was essentially copied from Solaris; in general
I would expect this to "just work" on Solaris, but until someone tries
we don't really know.
Change-Id: Icb96a3c2d80be7b6d7a6849bb9168f03a947f47c
BUG: 1160709
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/9143
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
2014-11-18 11:08:16 -05:00
case $host_os in
darwin*)
GFAPI_EXTRA_LDFLAGS='-Wl,-alias_list,$(top_srcdir)/api/src/gfapi.aliases'
;;
*)
GFAPI_EXTRA_LDFLAGS='-Wl,--version-script=$(top_srcdir)/api/src/gfapi.map'
;;
esac
2016-04-29 13:03:40 +05:30
# Default value for sbindir
prefix_temp=$prefix
exec_prefix_temp=$exec_prefix
test "${prefix}" = "NONE" && prefix="${ac_default_prefix}"
test "${exec_prefix}" = "NONE" && exec_prefix='${prefix}'
sbintemp="${sbindir}"
eval sbintemp=\"${sbintemp}\"
eval sbintemp=\"${sbintemp}\"
SBIN_DIR=${sbintemp}
eventsapi: Gluster Eventing Feature implementation
[Depends on http://review.gluster.org/14627]
Design is available in `glusterfs-specs`, A change from the design
is support of webhook instead of Websockets as discussed in the design
http://review.gluster.org/13115
Since Websocket support depends on REST APIs, I will add Websocket support
once REST APIs patch gets merged
Usage:
Run following command to start/stop Eventsapi server in all Peers,
which will collect the notifications from any Gluster daemon and emits
to configured client.
gluster-eventsapi start|stop|restart|reload
Status of running services can be checked using,
gluster-eventsapi status
Events listener is a HTTP(S) server which listens to events emited by
the Gluster. Create a HTTP Server to listen on POST and register that
URL using,
gluster-eventsapi webhook-add <URL> [--bearer-token <TOKEN>]
For example, if HTTP Server running in `http://192.168.122.188:9000`
then add that URL using,
gluster-eventsapi webhook-add http://192.168.122.188:9000
If it expects a Token then specify it using `--bearer-token` or `-t`
We can also test Webhook if all peer nodes can send message or not
using,
gluster-eventsapi webhook-test <URL> [--bearer-token <TOKEN>]
Configurations can be viewed/updated using,
gluster-eventsapi config-get [--name]
gluster-eventsapi config-set <NAME> <VALUE>
gluster-eventsapi config-reset <NAME|all>
If any one peer node was down during config-set/reset or webhook
modifications, Run sync command from good node when a peer node comes
back. Automatic update is not yet implemented.
gluster-eventsapi sync
Basic Events Client(HTTP Server) is included with the code, Start
running the client with required port and start listening to the
events.
/usr/share/glusterfs/scripts/eventsdash.py --port 8080
Default port is 9000, if no port is specified, once it started running
then configure gluster-eventsapi to send events to that client.
Eventsapi Client can be outside of the Cluster, it can be run event on
Windows. But only requirement is the client URL should be accessible
by all peer nodes.(Or ngrok(https://ngrok.com) like tools can be used)
Events implemented with this patch,
- Volume Create
- Volume Start
- Volume Stop
- Volume Delete
- Peer Attach
- Peer Detach
It is easy to add/support more events, since it touches Gluster cmd
code and to avoid merge conflicts I will add support for more events
once this patch merges.
BUG: 1334044
Change-Id: I316827ac9dd1443454df7deffe4f54835f7f6a08
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/14248
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-05-05 18:34:41 +05:30
sysconfdirtemp="${sysconfdir}"
eval sysconfdirtemp=\"${sysconfdirtemp}\"
SYSCONF_DIR=${sysconfdirtemp}
2016-04-29 13:03:40 +05:30
prefix=$prefix_temp
exec_prefix=$exec_prefix_temp
AC_SUBST(SBIN_DIR)
eventsapi: Gluster Eventing Feature implementation
[Depends on http://review.gluster.org/14627]
Design is available in `glusterfs-specs`, A change from the design
is support of webhook instead of Websockets as discussed in the design
http://review.gluster.org/13115
Since Websocket support depends on REST APIs, I will add Websocket support
once REST APIs patch gets merged
Usage:
Run following command to start/stop Eventsapi server in all Peers,
which will collect the notifications from any Gluster daemon and emits
to configured client.
gluster-eventsapi start|stop|restart|reload
Status of running services can be checked using,
gluster-eventsapi status
Events listener is a HTTP(S) server which listens to events emited by
the Gluster. Create a HTTP Server to listen on POST and register that
URL using,
gluster-eventsapi webhook-add <URL> [--bearer-token <TOKEN>]
For example, if HTTP Server running in `http://192.168.122.188:9000`
then add that URL using,
gluster-eventsapi webhook-add http://192.168.122.188:9000
If it expects a Token then specify it using `--bearer-token` or `-t`
We can also test Webhook if all peer nodes can send message or not
using,
gluster-eventsapi webhook-test <URL> [--bearer-token <TOKEN>]
Configurations can be viewed/updated using,
gluster-eventsapi config-get [--name]
gluster-eventsapi config-set <NAME> <VALUE>
gluster-eventsapi config-reset <NAME|all>
If any one peer node was down during config-set/reset or webhook
modifications, Run sync command from good node when a peer node comes
back. Automatic update is not yet implemented.
gluster-eventsapi sync
Basic Events Client(HTTP Server) is included with the code, Start
running the client with required port and start listening to the
events.
/usr/share/glusterfs/scripts/eventsdash.py --port 8080
Default port is 9000, if no port is specified, once it started running
then configure gluster-eventsapi to send events to that client.
Eventsapi Client can be outside of the Cluster, it can be run event on
Windows. But only requirement is the client URL should be accessible
by all peer nodes.(Or ngrok(https://ngrok.com) like tools can be used)
Events implemented with this patch,
- Volume Create
- Volume Start
- Volume Stop
- Volume Delete
- Peer Attach
- Peer Detach
It is easy to add/support more events, since it touches Gluster cmd
code and to avoid merge conflicts I will add support for more events
once this patch merges.
BUG: 1334044
Change-Id: I316827ac9dd1443454df7deffe4f54835f7f6a08
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/14248
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-05-05 18:34:41 +05:30
AC_SUBST(SYSCONF_DIR)
2016-04-29 13:03:40 +05:30
2014-09-21 13:57:47 +02:00
# lazy umount emulation
UMOUNTD_SUBDIR=""
if test "x${GF_HOST_OS}" != "xGF_LINUX_HOST_OS" ; then
UMOUNTD_SUBDIR="contrib/umountd"
fi
AC_SUBST(UMOUNTD_SUBDIR)
2014-04-17 15:54:34 -07:00
2012-08-03 15:46:22 +05:30
# enable debug section
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug],
[Enable debug build options.]))
2016-12-15 09:06:00 -08:00
AC_ARG_ENABLE([mempool],
AC_HELP_STRING([--disable-mempool],
[Disable the Gluster memory pooler.]))
USE_MEMPOOL="yes"
if test "x$enable_mempool" = "xno"; then
USE_MEMPOOL="no"
AC_DEFINE(GF_DISABLE_MEMPOOL, 1, [Disable the Gluster memory pooler.])
fi
2014-04-17 15:54:34 -07:00
log: enhance syslog logging using CEE format
This patch enables to use syslog as log target in addition to the
default. The logs are sent in CEE format (http://cee.mitre.org/).
This logging can be disabled using compile time option by
./configure --disable-syslog
(or)
rpmbuild glusterfs.tar.gz --without syslog
The framework provides two api
void gf_openlog (const char *ident, int option, int facility);
void gf_syslog (int error_code, int facility_priority, char *format, ...);
consumers need to call gf_openlog() prior to gf_syslog() like the way
traditional syslog function calls. error_code is mandatory when using
gf_syslog(). For example,
gf_openlog (NULL, -1, -1);
gf_syslog (GF_ERR_DEV, LOG_ERR, "error reading configuration file");
Using syslog, admin is free to configure logger to
* reduce repeated log messages
* forward logs to remote logger
* execute a command on certain log pattern
* alert people for certain log pattern by email, snmp etc
* and many more
Change-Id: Ibacbcbbc547192893fc4a46b387496b622e4811f
BUG: 928648
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/4915
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-04-30 17:39:30 +05:30
# syslog section
AC_ARG_ENABLE([syslog],
2014-04-17 15:54:34 -07:00
AC_HELP_STRING([--disable-syslog],
[Disable syslog for logging]))
log: enhance syslog logging using CEE format
This patch enables to use syslog as log target in addition to the
default. The logs are sent in CEE format (http://cee.mitre.org/).
This logging can be disabled using compile time option by
./configure --disable-syslog
(or)
rpmbuild glusterfs.tar.gz --without syslog
The framework provides two api
void gf_openlog (const char *ident, int option, int facility);
void gf_syslog (int error_code, int facility_priority, char *format, ...);
consumers need to call gf_openlog() prior to gf_syslog() like the way
traditional syslog function calls. error_code is mandatory when using
gf_syslog(). For example,
gf_openlog (NULL, -1, -1);
gf_syslog (GF_ERR_DEV, LOG_ERR, "error reading configuration file");
Using syslog, admin is free to configure logger to
* reduce repeated log messages
* forward logs to remote logger
* execute a command on certain log pattern
* alert people for certain log pattern by email, snmp etc
* and many more
Change-Id: Ibacbcbbc547192893fc4a46b387496b622e4811f
BUG: 928648
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/4915
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-04-30 17:39:30 +05:30
USE_SYSLOG="yes"
if test "x$enable_syslog" != "xno"; then
AC_DEFINE(GF_USE_SYSLOG, 1, [Use syslog for logging])
else
USE_SYSLOG="no"
fi
AM_CONDITIONAL([ENABLE_SYSLOG], [test x$USE_SYSLOG = xyes])
#end syslog section
2010-07-08 08:16:13 +00:00
BUILD_READLINE=no
AC_CHECK_LIB([readline -lcurses],[readline],[RLLIBS="-lreadline -lcurses"])
AC_CHECK_LIB([readline -ltermcap],[readline],[RLLIBS="-lreadline -ltermcap"])
AC_CHECK_LIB([readline -lncurses],[readline],[RLLIBS="-lreadline -lncurses"])
core: python3
see https://review.gluster.org/#/c/19788/,
https://review.gluster.org/#/c/19871/,
https://review.gluster.org/#/c/19952/,
https://review.gluster.org/#/c/20104/,
https://review.gluster.org/#/c/20162/,
https://review.gluster.org/#/c/20185/,
https://review.gluster.org/#/c/20207/,
https://review.gluster.org/#/c/20227/,
https://review.gluster.org/#/c/20307/,
https://review.gluster.org/#/c/20320/,
https://review.gluster.org/#/c/20332/,
https://review.gluster.org/#/c/20364/,
https://review.gluster.org/#/c/20441/, and
https://review.gluster.org/#/c/20484
shebangs changed from /usr/bin/python2 to /usr/bin/python3.
(Reminder, various distribution packaging guidelines require use
of explicit python version and don't allow '#!/usr/bin/env python',
regardless of how handy that idiom may be.)
glusterfs.spec(.in) package python{2,3}-gluster and python2 or
python3 dependencies as appropriate.
configure(.ac):
+ test for and use python2 or python3 as appropriate. If build
machine has python2 and python3, use python3. Override by
setting PYTHON=/usr/bin/python2 when running configure.
+ PYTHONDEV_CPPFLAGS from python[23]-config --includes is a
better match to the original python sysconfig.get_python_inc().
All those other extraneous flags breaks the build.
+ Only change the shebangs once. Changing them over and over
again, e.g., during a `make glusterrpms` in extras/LinuxRPM
just sends make (is it really make that's looping?) into an
infinite loop. If you figure out why, let me know.
+ Oldest python2 is python2.6 on CentOS 6 and Debian 8 (Jessie).
Everything else has 2.7 or 3.x
+ logic from https://review.gluster.org/c/glusterfs/+/21050, which
needs to be removed/merged after that patch is merged.
Builds on CentOS 6, CentOS 7, Fedora 28, Fedora rawhide, and the
mysterious RHEL > 7.
Change-Id: Idae21d3b6f58b32372e1daa0d234e491e563198f
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-08-29 11:09:27 -04:00
if test -n "$RLLIBS"; then
2014-05-16 16:58:20 +02:00
if test "x$RL_UNDO" = "xyes"; then
2014-04-17 15:54:34 -07:00
AC_DEFINE(HAVE_READLINE, 1, [readline enabled CLI])
BUILD_READLINE=yes
else
BUILD_READLINE="no (present but missing undo)"
fi
2010-07-08 08:16:13 +00:00
fi
2011-09-30 13:29:18 +05:30
BUILD_LIBAIO=no
AC_CHECK_LIB([aio],[io_setup],[LIBAIO="-laio"])
core: python3
see https://review.gluster.org/#/c/19788/,
https://review.gluster.org/#/c/19871/,
https://review.gluster.org/#/c/19952/,
https://review.gluster.org/#/c/20104/,
https://review.gluster.org/#/c/20162/,
https://review.gluster.org/#/c/20185/,
https://review.gluster.org/#/c/20207/,
https://review.gluster.org/#/c/20227/,
https://review.gluster.org/#/c/20307/,
https://review.gluster.org/#/c/20320/,
https://review.gluster.org/#/c/20332/,
https://review.gluster.org/#/c/20364/,
https://review.gluster.org/#/c/20441/, and
https://review.gluster.org/#/c/20484
shebangs changed from /usr/bin/python2 to /usr/bin/python3.
(Reminder, various distribution packaging guidelines require use
of explicit python version and don't allow '#!/usr/bin/env python',
regardless of how handy that idiom may be.)
glusterfs.spec(.in) package python{2,3}-gluster and python2 or
python3 dependencies as appropriate.
configure(.ac):
+ test for and use python2 or python3 as appropriate. If build
machine has python2 and python3, use python3. Override by
setting PYTHON=/usr/bin/python2 when running configure.
+ PYTHONDEV_CPPFLAGS from python[23]-config --includes is a
better match to the original python sysconfig.get_python_inc().
All those other extraneous flags breaks the build.
+ Only change the shebangs once. Changing them over and over
again, e.g., during a `make glusterrpms` in extras/LinuxRPM
just sends make (is it really make that's looping?) into an
infinite loop. If you figure out why, let me know.
+ Oldest python2 is python2.6 on CentOS 6 and Debian 8 (Jessie).
Everything else has 2.7 or 3.x
+ logic from https://review.gluster.org/c/glusterfs/+/21050, which
needs to be removed/merged after that patch is merged.
Builds on CentOS 6, CentOS 7, Fedora 28, Fedora rawhide, and the
mysterious RHEL > 7.
Change-Id: Idae21d3b6f58b32372e1daa0d234e491e563198f
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-08-29 11:09:27 -04:00
if test -n "$LIBAIO"; then
2011-09-30 13:29:18 +05:30
AC_DEFINE(HAVE_LIBAIO, 1, [libaio based POSIX enabled])
BUILD_LIBAIO=yes
fi
2017-03-27 16:09:56 -04:00
dnl gnfs section
BUILD_GNFS="no"
AC_ARG_ENABLE([gnfs],
AC_HELP_STRING([--enable-gnfs],
[Enable legacy gnfs server xlator.]))
2018-01-31 16:38:34 +01:00
if test "x${with_server}" = "xyes" -a "x$enable_gnfs" = "xyes"; then
2017-03-27 16:09:56 -04:00
BUILD_GNFS="yes"
fi
AM_CONDITIONAL([BUILD_GNFS], [test x$BUILD_GNFS = xyes])
dnl end gnfs section
2015-01-06 15:12:59 +05:30
dnl Check for userspace-rcu
2016-02-02 19:28:49 +05:30
PKG_CHECK_MODULES([URCU], [liburcu-bp], [],
[AC_CHECK_HEADERS([urcu-bp.h],
[URCU_LIBS='-lurcu-bp'],
AC_MSG_ERROR([liburcu-bp not found]))])
2015-01-06 15:12:59 +05:30
PKG_CHECK_MODULES([URCU_CDS], [liburcu-cds >= 0.8], [],
[PKG_CHECK_MODULES([URCU_CDS], [liburcu-cds >= 0.7],
2016-02-02 19:28:49 +05:30
[AC_DEFINE(URCU_OLD, 1, [Define if liburcu 0.6 or 0.7 is found])],
[AC_CHECK_HEADERS([urcu/cds.h],
[AC_DEFINE(URCU_OLD, 1, [Define if liburcu 0.6 or 0.7 is found])
URCU_CDS_LIBS='-lurcu-cds'],
[AC_MSG_ERROR([liburcu-cds not found])])])])
2015-01-06 15:12:59 +05:30
2015-02-18 14:47:01 +01:00
BUILD_UNITTEST="no"
AC_ARG_ENABLE([cmocka],
AC_HELP_STRING([--enable-cmocka],
[Enable cmocka build options.]))
if test "x$enable_cmocka" = "xyes"; then
BUILD_UNITTEST="yes"
2015-03-03 00:27:34 +01:00
PKG_CHECK_MODULES([UNITTEST], [cmocka >= 1.0.1], [BUILD_UNITTEST="yes"],
[AC_MSG_ERROR([cmocka library is required to build glusterfs])]
)
2015-02-18 14:47:01 +01:00
fi
AM_CONDITIONAL([UNITTEST], [test x$BUILD_UNITTEST = xyes])
dnl Define UNIT_TESTING only for building cmocka binaries.
UNITTEST_CFLAGS="${UNITTEST_CFLAGS} -DUNIT_TESTING=1"
dnl Add cmocka for unit tests
case $host_os in
freebsd*)
dnl remove --coverage on FreeBSD due to a known llvm packaging bug
UNITTEST_CFLAGS="${UNITTEST_CPPFLAGS} ${UNITTEST_CFLAGS} -g -DDEBUG -O0"
UNITTEST_LDFLAGS="${UNITTEST_LIBS} ${UNITTEST_LDFLAGS}"
;;
*)
UNITTEST_CFLAGS="${UNITTEST_CPPFLAGS} ${UNITTEST_CFLAGS} -g -DDEBUG -O0 --coverage"
UNITTEST_LDFLAGS="${UNITTEST_LIBS} ${UNITTEST_LDFLAGS}"
;;
esac
AC_SUBST(UNITTEST_CFLAGS)
AC_SUBST(UNITTEST_LDFLAGS)
2013-11-26 12:58:31 -05:00
AC_SUBST(CFLAGS)
# end enable debug section
2015-12-01 11:50:54 +01:00
# EC dynamic code generation section
EC_DYNAMIC_SUPPORT="none"
EC_DYNAMIC_ARCH="none"
AC_ARG_ENABLE([ec-dynamic],
AC_HELP_STRING([--disable-ec-dynamic],
[Disable all dynamic code generation extensions for EC module]))
AC_ARG_ENABLE([ec-dynamic-intel],
AC_HELP_STRING([--disable-ec-dynamic-intel],
[Disable all INTEL dynamic code generation extensions for EC module]))
AC_ARG_ENABLE([ec-dynamic-arm],
AC_HELP_STRING([--disable-ec-dynamic-arm],
[Disable all ARM dynamic code generation extensions for EC module]))
AC_ARG_ENABLE([ec-dynamic-x64],
AC_HELP_STRING([--disable-ec-dynamic-x64],
[Disable dynamic INTEL x64 code generation for EC module]))
AC_ARG_ENABLE([ec-dynamic-sse],
AC_HELP_STRING([--disable-ec-dynamic-sse],
[Disable dynamic INTEL SSE code generation for EC module]))
AC_ARG_ENABLE([ec-dynamic-avx],
AC_HELP_STRING([--disable-ec-dynamic-avx],
[Disable dynamic INTEL AVX code generation for EC module]))
AC_ARG_ENABLE([ec-dynamic-neon],
AC_HELP_STRING([--disable-ec-dynamic-neon],
[Disable dynamic ARM NEON code generation for EC module]))
if test "x$enable_ec_dynamic" != "xno"; then
case $host in
x86_64*)
if test "x$enable_ec_dynamic_intel" != "xno"; then
if test "x$enable_ec_dynamic_x64" != "xno"; then
EC_DYNAMIC_SUPPORT="$EC_DYNAMIC_SUPPORT x64"
AC_DEFINE(USE_EC_DYNAMIC_X64, 1, [Defined if using dynamic INTEL x64 code])
fi
if test "x$enable_ec_dynamic_sse" != "xno"; then
EC_DYNAMIC_SUPPORT="$EC_DYNAMIC_SUPPORT sse"
AC_DEFINE(USE_EC_DYNAMIC_SSE, 1, [Defined if using dynamic INTEL SSE code])
fi
if test "x$enable_ec_dynamic_avx" != "xno"; then
EC_DYNAMIC_SUPPORT="$EC_DYNAMIC_SUPPORT avx"
AC_DEFINE(USE_EC_DYNAMIC_AVX, 1, [Defined if using dynamic INTEL AVX code])
fi
if test "x$EC_DYNAMIC_SUPPORT" != "xnone"; then
EC_DYNAMIC_ARCH="intel"
fi
fi
;;
arm*)
if test "x$enable_ec_dynamic_arm" != "xno"; then
if test "x$enable_ec_dynamic_neon" != "xno"; then
EC_DYNAMIC_SUPPORT="$EC_DYNAMIC_SUPPORT neon"
AC_DEFINE(USE_EC_DYNAMIC_NEON, 1, [Defined if using dynamic ARM NEON code])
fi
if test "x$EC_DYNAMIC_SUPPORT" != "xnone"; then
EC_DYNAMIC_ARCH="arm"
fi
fi
;;
esac
EC_DYNAMIC_SUPPORT="${EC_DYNAMIC_SUPPORT#none }"
fi
AM_CONDITIONAL([ENABLE_EC_DYNAMIC_INTEL], [test "x$EC_DYNAMIC_ARCH" = "xintel"])
AM_CONDITIONAL([ENABLE_EC_DYNAMIC_ARM], [test "x$EC_DYNAMIC_ARCH" = "xarm"])
AM_CONDITIONAL([ENABLE_EC_DYNAMIC_X64], [test "x${EC_DYNAMIC_SUPPORT##*x64*}" = "x"])
AM_CONDITIONAL([ENABLE_EC_DYNAMIC_SSE], [test "x${EC_DYNAMIC_SUPPORT##*sse*}" = "x"])
AM_CONDITIONAL([ENABLE_EC_DYNAMIC_AVX], [test "x${EC_DYNAMIC_SUPPORT##*avx*}" = "x"])
AM_CONDITIONAL([ENABLE_EC_DYNAMIC_NEON], [test "x${EC_DYNAMIC_SUPPORT##*neon*}" = "x"])
AC_SUBST(USE_EC_DYNAMIC_X64)
AC_SUBST(USE_EC_DYNAMIC_SSE)
AC_SUBST(USE_EC_DYNAMIC_AVX)
AC_SUBST(USE_EC_DYNAMIC_NEON)
# end EC dynamic code generation section
2015-05-17 15:26:03 +02:00
dnl libglusterfs.so uses math functions
GF_LDADD="${GF_LDADD} ${MATH_LIB}"
2018-05-10 18:25:56 +05:30
case $host_os in
dnl Can't use libtool's portable "-no-undefined" as it seems to be ignored on Linux
linux*)
GF_NO_UNDEFINED='-Wl,--no-undefined'
;;
darwin*)
GF_NO_UNDEFINED='-Wl,-undefined'
;;
*)
dnl There's an issue on FreeBSD with reference to __progname used in some parts of code
GF_NO_UNDEFINED=''
;;
esac
build: cleanup xlator link, --no-undefined, libuuid
While attempting to build a (pre-)5.0 of glusterfs on Ubuntu
bionic and cosmic, it became apparent that there are some gremlins
hiding in the combination of the xlator export-symbols, the newish
addition of -Wl,--no-undefined, and the new switch to libuuid from
the old contrib/uuid.
Note: even though Fedora 28 (and later) and Ubuntu bionic (and
later) have the same nominal version of libtool, the Fedora version
appears to do a better job of recursing through dependencies to
determine the libraries to link with.
Examination of the build logs showed that despite appearing to work
on Fedora, not all xlators and shared libs were linked with -Wl,
--no-undefined, and -luuid. And in the case of the gnfs xlator, it
was not only not linked with -Wl,--no-undefined but alsos not linked
with -lgfxdr and -lgfrpc.
Added GF_XLATOR_LDFLAGS, similar to GF_XLATOR_DEFAULT_LDFLAGS.
GF_XLATOR_DEFAULT_LDFLAGS is for xlators that export/expose the
default or common set of symbols. GF_XLATOR_LDFLAGS is for those
remaining xlators that export/expose non-default symbols, e.g. dht
and glupy. This removes the need in the future to add things like
$(UUID_LIBS) to every xlator's Makefile.am. Just add it to
GF_XLATOR_LDFLAGS and GF_XLATOR_DEFAULT_LDFLAGS in configure.ac
and you're done.
This patch was tested on Fedora 28 (build, rpmbuild), Fedora
Rawhide/30 (rpmbuild), RHEL8 (rpmbuild), CentOS7 (rpmbuild), Fedora
koji --scratch build for f30/rawhide, and a Launchpad build for
Ubuntu cosmic/18.10.
Change-Id: Ieca104fa5c5d3c094e701c8ca4a73754dd0292b0
updates: bz#1193929
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-09-11 14:17:02 -04:00
dnl GF_XLATOR_DEFAULT_LDFLAGS is for most xlators that expose a common set of symbols
GF_XLATOR_DEFAULT_LDFLAGS='-avoid-version -export-symbols $(top_srcdir)/xlators/xlator.sym $(UUID_LIBS) $(GF_NO_UNDEFINED)'
2018-10-03 17:13:09 +05:30
dnl GF_XLATOR_LDFLAGS is for xlators that expose extra symbols, e.g. dht
build: cleanup xlator link, --no-undefined, libuuid
While attempting to build a (pre-)5.0 of glusterfs on Ubuntu
bionic and cosmic, it became apparent that there are some gremlins
hiding in the combination of the xlator export-symbols, the newish
addition of -Wl,--no-undefined, and the new switch to libuuid from
the old contrib/uuid.
Note: even though Fedora 28 (and later) and Ubuntu bionic (and
later) have the same nominal version of libtool, the Fedora version
appears to do a better job of recursing through dependencies to
determine the libraries to link with.
Examination of the build logs showed that despite appearing to work
on Fedora, not all xlators and shared libs were linked with -Wl,
--no-undefined, and -luuid. And in the case of the gnfs xlator, it
was not only not linked with -Wl,--no-undefined but alsos not linked
with -lgfxdr and -lgfrpc.
Added GF_XLATOR_LDFLAGS, similar to GF_XLATOR_DEFAULT_LDFLAGS.
GF_XLATOR_DEFAULT_LDFLAGS is for xlators that export/expose the
default or common set of symbols. GF_XLATOR_LDFLAGS is for those
remaining xlators that export/expose non-default symbols, e.g. dht
and glupy. This removes the need in the future to add things like
$(UUID_LIBS) to every xlator's Makefile.am. Just add it to
GF_XLATOR_LDFLAGS and GF_XLATOR_DEFAULT_LDFLAGS in configure.ac
and you're done.
This patch was tested on Fedora 28 (build, rpmbuild), Fedora
Rawhide/30 (rpmbuild), RHEL8 (rpmbuild), CentOS7 (rpmbuild), Fedora
koji --scratch build for f30/rawhide, and a Launchpad build for
Ubuntu cosmic/18.10.
Change-Id: Ieca104fa5c5d3c094e701c8ca4a73754dd0292b0
updates: bz#1193929
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-09-11 14:17:02 -04:00
GF_XLATOR_LDFLAGS='-avoid-version $(UUID_LIBS) $(GF_NO_UNDEFINED)'
2015-07-31 14:11:15 -04:00
2009-02-18 17:36:07 +05:30
AC_SUBST(GF_HOST_OS)
AC_SUBST(GF_CFLAGS)
AC_SUBST(GF_LDFLAGS)
AC_SUBST(GF_LDADD)
2011-05-20 16:56:27 +00:00
AC_SUBST(GF_FUSE_LDADD)
2010-05-17 07:06:58 +00:00
AC_SUBST(GF_FUSE_CFLAGS)
2010-07-08 08:16:13 +00:00
AC_SUBST(RLLIBS)
2011-09-30 13:29:18 +05:30
AC_SUBST(LIBAIO)
2011-08-05 14:04:43 +05:30
AC_SUBST(AM_MAKEFLAGS)
2011-08-05 14:52:01 +05:30
AC_SUBST(AM_LIBTOOLFLAGS)
2018-05-10 18:25:56 +05:30
AC_SUBST(GF_NO_UNDEFINED)
2015-07-31 14:11:15 -04:00
AC_SUBST(GF_XLATOR_DEFAULT_LDFLAGS)
build: cleanup xlator link, --no-undefined, libuuid
While attempting to build a (pre-)5.0 of glusterfs on Ubuntu
bionic and cosmic, it became apparent that there are some gremlins
hiding in the combination of the xlator export-symbols, the newish
addition of -Wl,--no-undefined, and the new switch to libuuid from
the old contrib/uuid.
Note: even though Fedora 28 (and later) and Ubuntu bionic (and
later) have the same nominal version of libtool, the Fedora version
appears to do a better job of recursing through dependencies to
determine the libraries to link with.
Examination of the build logs showed that despite appearing to work
on Fedora, not all xlators and shared libs were linked with -Wl,
--no-undefined, and -luuid. And in the case of the gnfs xlator, it
was not only not linked with -Wl,--no-undefined but alsos not linked
with -lgfxdr and -lgfrpc.
Added GF_XLATOR_LDFLAGS, similar to GF_XLATOR_DEFAULT_LDFLAGS.
GF_XLATOR_DEFAULT_LDFLAGS is for xlators that export/expose the
default or common set of symbols. GF_XLATOR_LDFLAGS is for those
remaining xlators that export/expose non-default symbols, e.g. dht
and glupy. This removes the need in the future to add things like
$(UUID_LIBS) to every xlator's Makefile.am. Just add it to
GF_XLATOR_LDFLAGS and GF_XLATOR_DEFAULT_LDFLAGS in configure.ac
and you're done.
This patch was tested on Fedora 28 (build, rpmbuild), Fedora
Rawhide/30 (rpmbuild), RHEL8 (rpmbuild), CentOS7 (rpmbuild), Fedora
koji --scratch build for f30/rawhide, and a Launchpad build for
Ubuntu cosmic/18.10.
Change-Id: Ieca104fa5c5d3c094e701c8ca4a73754dd0292b0
updates: bz#1193929
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-09-11 14:17:02 -04:00
AC_SUBST(GF_XLATOR_LDFLAGS)
2009-02-18 17:36:07 +05:30
2009-08-11 18:26:11 -07:00
CONTRIBDIR='$(top_srcdir)/contrib'
AC_SUBST(CONTRIBDIR)
2012-10-02 10:42:01 -04:00
GF_CPPDEFINES='-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS)'
2017-05-08 12:55:49 -04:00
GF_CPPINCLUDES='-include $(top_builddir)/config.h -include $(top_builddir)/site.h -I$(top_srcdir)/libglusterfs/src -I$(top_builddir)/libglusterfs/src'
2015-04-03 18:14:13 +02:00
GF_CPPFLAGS="$GF_CPPFLAGS $GF_CPPDEFINES $GF_CPPINCLUDES"
2012-10-01 16:09:26 -04:00
AC_SUBST([GF_CPPFLAGS])
2010-09-03 13:58:11 +00:00
2014-06-21 02:00:23 -07:00
AM_CONDITIONAL([GF_LINUX_HOST_OS], test "${GF_HOST_OS}" = "GF_LINUX_HOST_OS")
Replace GPLV3 MD5 with OpenSSL MD5
Ric asked me to look at replacing the GPL licensed MD5 code with
something better, i.e. perhaps faster, and with a less restrictive
license, etc. So I took a couple hour holiday from working on
wrapping up the client_t and did this.
OpenSSL (nee SSLeay) is released under the OpenSSL license, a BSD/MIT
style license. OpenSSL (libcrypto.so) is used on Linux, OS X and *BSD,
Open Solaris, etc. IOW it's universally available on the platforms we
care about. It's written by Eric Young (eay), now at EMC/RSA, and I
can say from experience that the OpenSSL implementation of MD5 (at least)
is every bit as fast as RSA's proprietary implementation (primarily
because the implementations are very, very similar.) The last time I
surveyed MD5 implementations I found they're all pretty much the same
speed.
I changed the APIs (and ABIs) for the strong and weak checksums.
Strictly speaking I didn't need to do that. They're only called on
short strings of data, i.e. pathnames, so using int32_t and uint32_t
is ostensibly okay. My change is arguably a better, more general API
for this sort of thing. It's also what bit me when gerrit/jenkins
validation failed due to glusterfs segv-ing. (I didn't pay close enough
attention to the implementation of the weak checksum. But it forced me
to learn what gerrit/jenkins are doing and going forward I can do better
testing before submitting to gerrit.)
Now resubmitting with a BZ
Change-Id: I545fade1604e74fc68399894550229bd57a5e0df
BUG: 807718
Signed-off-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.com/3019
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2012-03-27 11:14:23 -04:00
AM_CONDITIONAL([GF_DARWIN_HOST_OS], test "${GF_HOST_OS}" = "GF_DARWIN_HOST_OS")
2014-06-21 02:00:23 -07:00
AM_CONDITIONAL([GF_BSD_HOST_OS], test "${GF_HOST_OS}" = "GF_BSD_HOST_OS")
2018-07-26 13:07:04 +00:00
if test "${GF_HOST_OS}" = "GF_BSD_HOST_OS"; then
AC_DEFINE(GF_BSD_HOST_OS, 1, [This is a BSD compatible OS.])
fi
2009-02-18 17:36:07 +05:30
2014-06-29 18:56:44 -07:00
AC_SUBST(GLUSTERD_WORKDIR)
AM_CONDITIONAL([GF_INSTALL_GLUSTERD_WORKDIR], test ! -d ${GLUSTERD_WORKDIR} && test -d ${sysconfdir}/glusterd )
geo-rep: mountbroker user management
Non root geo-replication setup is now simplified. This
patch provides cli for mountbroker user and options management
To set Options,
gluster system:: execute mountbroker opt <KEY> <VALUE>
# for example,
gluster system:: execute mountbroker opt mountbroker-root /var/mountbroker-root
gluster system:: execute mountbroker opt geo-replication-log-group geogroup
gluster system:: execute mountbroker opt rpc-auth-allow-insecure on
To remove option,
gluster system:: execute mountbroker optdel <KEY>
# for example,
gluster system:: execute mountbroker optdel geo-replication-log-group
To add/edit user,
gluster system:: execute mountbroker user <USERNAME> <VOLUMES>
# for example
gluster system:: execute mountbroker user geoaccount slavevol1,slavevol2
To remove user,
gluster system:: execute mountbroker userdel <USERNAME>
# for example
gluster system:: execute mountbroker userdel geoaccount
For info,
gluster system:: execute mountbroker info
gluster system:: execute mountbroker -j info
For JSON output add -j after mountbroker, for example,
gluster system:: execute mountbroker -j user geoaccount slavevol1,slavevol2
PS: Each peer prints its own JSON output, aggregator required from consumer side
BUG: 1136312
Change-Id: Ie52210c0bcc91ac2ffd3ba58988222ffca62b47f
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/9398
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: darshan n <dnarayan@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-01-06 18:20:45 +05:30
AC_SUBST(GLUSTERD_VOLFILE)
2015-02-18 19:07:23 +05:30
AC_SUBST(GLUSTERFS_LIBEXECDIR)
AC_SUBST(GLUSTERFSD_MISCDIR)
2012-05-15 22:12:53 +05:30
build: Start using library versioning for various libraries
According to libtool three individual numbers stand for
CURRENT:REVISION:AGE, or C:R:A for short. The libtool
script typically tacks these three numbers onto the end
of the name of the .so file it creates. The formula for
calculating the file numbers on Linux and Solaris is
/path/to/library/<library_name>.(C - A).(A).(R)
As you release new versions of your library, you will
update the library's C:R:A. Although the rules for changing
these version numbers can quickly become confusing, a few
simple tips should help keep you on track. The libtool
documentation goes into greater depth.
In essence, every time you make a change to the library and
release it, the C:R:A should change. A new library should start
with 0:0:0. Each time you change the public interface
(i.e., your installed header files), you should increment the
CURRENT number. This is called your interface number. The main
use of this interface number is to tag successive revisions
of your API.
The AGE number is how many consecutive versions of the API the
current implementation supports. Thus if the CURRENT library
API is the sixth published version of the interface and it is
also binary compatible with the fourth and fifth versions
(i.e., the last two), the C:R:A might be 6:0:2. When you break
binary compatibility, you need to set AGE to 0 and of course
increment CURRENT.
The REVISION marks a change in the source code of the library
that doesn't affect the interface-for example, a minor bug fix.
Anytime you increment CURRENT, you should set REVISION back to 0.
Change-Id: Id72e74c1642c804fea6f93ec109135c7c16f1810
BUG: 862082
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/5645
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-08-17 13:01:23 -07:00
dnl pkg-config versioning
2014-11-20 16:26:36 +01:00
dnl
2015-04-16 17:46:49 +05:30
dnl Once we released gluster-api.pc with version=7. Since then we undid the
2014-11-20 16:26:36 +01:00
dnl library versioning and replaced it with symbol-versioning. The current
dnl libgfapi.so has version 0, but the symbols have the version from the main
dnl package at the time they were added.
dnl
dnl Because other packages (like samba) use the pkg-config version, we can not
dnl drop it, or decrease the version easily. The simplest solution is to keep
2015-04-16 17:46:49 +05:30
dnl the version=7 and add sub-digits for the actual package/symbol versions.
GFAPI_VERSION="7."${PACKAGE_VERSION}
build: Start using library versioning for various libraries
According to libtool three individual numbers stand for
CURRENT:REVISION:AGE, or C:R:A for short. The libtool
script typically tacks these three numbers onto the end
of the name of the .so file it creates. The formula for
calculating the file numbers on Linux and Solaris is
/path/to/library/<library_name>.(C - A).(A).(R)
As you release new versions of your library, you will
update the library's C:R:A. Although the rules for changing
these version numbers can quickly become confusing, a few
simple tips should help keep you on track. The libtool
documentation goes into greater depth.
In essence, every time you make a change to the library and
release it, the C:R:A should change. A new library should start
with 0:0:0. Each time you change the public interface
(i.e., your installed header files), you should increment the
CURRENT number. This is called your interface number. The main
use of this interface number is to tag successive revisions
of your API.
The AGE number is how many consecutive versions of the API the
current implementation supports. Thus if the CURRENT library
API is the sixth published version of the interface and it is
also binary compatible with the fourth and fifth versions
(i.e., the last two), the C:R:A might be 6:0:2. When you break
binary compatibility, you need to set AGE to 0 and of course
increment CURRENT.
The REVISION marks a change in the source code of the library
that doesn't affect the interface-for example, a minor bug fix.
Anytime you increment CURRENT, you should set REVISION back to 0.
Change-Id: Id72e74c1642c804fea6f93ec109135c7c16f1810
BUG: 862082
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/5645
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-08-17 13:01:23 -07:00
LIBGFCHANGELOG_VERSION="0.0.1"
AC_SUBST(GFAPI_VERSION)
AC_SUBST(LIBGFCHANGELOG_VERSION)
dnl libtool versioning
LIBGFXDR_LT_VERSION="0:1:0"
LIBGFRPC_LT_VERSION="0:1:0"
LIBGLUSTERFS_LT_VERSION="0:1:0"
LIBGFCHANGELOG_LT_VERSION="0:1:0"
api: versioned symbols in libgfapi.so for compatibility
Use versioned symbols to keep libgfapi at libgfapi.so.0.0.0
Some nits uncovered:
+ there are a couple functions declared that do not have an
associated definition, e.g. glfs_truncate(), glfs_caller_specific_init()
+ there are seven private/internal functions used by heal/src/glfsheal
and the gfapi master xlator (glfs-master.c): glfs_loc_touchup(),
glfs_active_subvol(), and glfs_subvol_done(), glfs_init_done(),
glfs_resolve_at(), glfs_free_from_ctx(), and glfs_new_from_ctx();
which are not declared in glfs.h;
+ for this initial pass at versioned symbols, we use the earliest version
of all public symbols, i.e. those for which there are declarations in
glfs.h or glfs-handles.h.
Further investigation as we do backports to 3.6, 3.4, and 3.4
will be required to determine if older implementations need to
be preserved (forward ported) and their associated alias(es) and
symbol version(s) defined.
FWIW, we should consider linking all of our libraries with a map, it'll
result in a cleaner ABI. Perhaps something for an intern to do or a
Google Summer of Code project.
Change-Id: I499456807a5cd26acb39843216ece4276f8e9b84
BUG: 1160709
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/9036
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-11-03 16:07:30 -05:00
GFAPI_LT_VERSION="0:0:0"
build: Start using library versioning for various libraries
According to libtool three individual numbers stand for
CURRENT:REVISION:AGE, or C:R:A for short. The libtool
script typically tacks these three numbers onto the end
of the name of the .so file it creates. The formula for
calculating the file numbers on Linux and Solaris is
/path/to/library/<library_name>.(C - A).(A).(R)
As you release new versions of your library, you will
update the library's C:R:A. Although the rules for changing
these version numbers can quickly become confusing, a few
simple tips should help keep you on track. The libtool
documentation goes into greater depth.
In essence, every time you make a change to the library and
release it, the C:R:A should change. A new library should start
with 0:0:0. Each time you change the public interface
(i.e., your installed header files), you should increment the
CURRENT number. This is called your interface number. The main
use of this interface number is to tag successive revisions
of your API.
The AGE number is how many consecutive versions of the API the
current implementation supports. Thus if the CURRENT library
API is the sixth published version of the interface and it is
also binary compatible with the fourth and fifth versions
(i.e., the last two), the C:R:A might be 6:0:2. When you break
binary compatibility, you need to set AGE to 0 and of course
increment CURRENT.
The REVISION marks a change in the source code of the library
that doesn't affect the interface-for example, a minor bug fix.
Anytime you increment CURRENT, you should set REVISION back to 0.
Change-Id: Id72e74c1642c804fea6f93ec109135c7c16f1810
BUG: 862082
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/5645
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-08-17 13:01:23 -07:00
AC_SUBST(LIBGFXDR_LT_VERSION)
AC_SUBST(LIBGFRPC_LT_VERSION)
AC_SUBST(LIBGLUSTERFS_LT_VERSION)
AC_SUBST(LIBGFCHANGELOG_LT_VERSION)
AC_SUBST(GFAPI_LT_VERSION)
api: versioned symbols in libgfapi.so for compatibility
Use versioned symbols to keep libgfapi at libgfapi.so.0.0.0
Revisited to address broken build on Mac OS X
See http://review.gluster.org/9036
Rebased to include http://review.gluster.org/#/c/9376/ (glfs_resolve())
but note that gerrit's "Rebase Change" couldn't do it.
N.B. noticed that glfs_get_volumeid() decl in glfs.h was missing
the __THROW, added it.
On systems using ELF and the GNU toolchain, symbol versions are created
with a .symver asm operand in the .c source file. Clang is claimed to
be compatible with gcc, so we'll pretend for now that this also works
with clang.
On Mac OS X, aliases are created with __asm "magic" in the .h header
file. In the normal case, when both the decl and defn match, that's
all that's needed. In our case though the decl and defn don't match ---
we have, e.g. a defn such as 'int glfs_foo(...)' and the corresponding
decl is 'int pub_glfs_foo(...)'. To make this work we create the necessary
aliases in the library at link time with the -alias_list link option.
Note that this results in there being pairs of symbols in the .dylib,
e.g. _pub_glfs_foo and _glfs_foo$GFAPI_3.4.0. We could use another
link option, -unexported_symbols_list to elide the _pub_glfs_* symbols.
(And we probably should.)
Linux symbol versioning was essentially copied from Solaris; in general
I would expect this to "just work" on Solaris, but until someone tries
we don't really know.
Change-Id: Icb96a3c2d80be7b6d7a6849bb9168f03a947f47c
BUG: 1160709
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/9143
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
2014-11-18 11:08:16 -05:00
AC_SUBST(GFAPI_EXTRA_LDFLAGS)
build: Start using library versioning for various libraries
According to libtool three individual numbers stand for
CURRENT:REVISION:AGE, or C:R:A for short. The libtool
script typically tacks these three numbers onto the end
of the name of the .so file it creates. The formula for
calculating the file numbers on Linux and Solaris is
/path/to/library/<library_name>.(C - A).(A).(R)
As you release new versions of your library, you will
update the library's C:R:A. Although the rules for changing
these version numbers can quickly become confusing, a few
simple tips should help keep you on track. The libtool
documentation goes into greater depth.
In essence, every time you make a change to the library and
release it, the C:R:A should change. A new library should start
with 0:0:0. Each time you change the public interface
(i.e., your installed header files), you should increment the
CURRENT number. This is called your interface number. The main
use of this interface number is to tag successive revisions
of your API.
The AGE number is how many consecutive versions of the API the
current implementation supports. Thus if the CURRENT library
API is the sixth published version of the interface and it is
also binary compatible with the fourth and fifth versions
(i.e., the last two), the C:R:A might be 6:0:2. When you break
binary compatibility, you need to set AGE to 0 and of course
increment CURRENT.
The REVISION marks a change in the source code of the library
that doesn't affect the interface-for example, a minor bug fix.
Anytime you increment CURRENT, you should set REVISION back to 0.
Change-Id: Id72e74c1642c804fea6f93ec109135c7c16f1810
BUG: 862082
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/5645
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-08-17 13:01:23 -07:00
2015-02-10 19:13:35 +01:00
GFAPI_LIBS="${ACL_LIBS}"
AC_SUBST(GFAPI_LIBS)
2014-06-29 18:56:44 -07:00
dnl this change necessary for run-tests.sh
AC_CONFIG_FILES([tests/env.rc],[ln -s ${ac_abs_builddir}/env.rc ${ac_abs_srcdir}/env.rc 2>/dev/null])
2009-02-18 17:36:07 +05:30
AC_OUTPUT
echo
echo "GlusterFS configure summary"
echo "==========================="
2012-11-29 21:46:05 +05:30
echo "FUSE client : $BUILD_FUSE_CLIENT"
echo "Infiniband verbs : $BUILD_IBVERBS"
echo "epoll IO multiplex : $BUILD_EPOLL"
echo "fusermount : $BUILD_FUSERMOUNT"
echo "readline : $BUILD_READLINE"
echo "georeplication : $BUILD_SYNCDAEMON"
echo "Linux-AIO : $BUILD_LIBAIO"
2013-05-13 15:03:22 -04:00
echo "Enable Debug : $BUILD_DEBUG"
2018-08-09 15:52:19 +02:00
echo "Enable ASAN : $BUILD_ASAN"
2018-11-13 12:53:17 +01:00
echo "Enable TSAN : $BUILD_TSAN"
log: enhance syslog logging using CEE format
This patch enables to use syslog as log target in addition to the
default. The logs are sent in CEE format (http://cee.mitre.org/).
This logging can be disabled using compile time option by
./configure --disable-syslog
(or)
rpmbuild glusterfs.tar.gz --without syslog
The framework provides two api
void gf_openlog (const char *ident, int option, int facility);
void gf_syslog (int error_code, int facility_priority, char *format, ...);
consumers need to call gf_openlog() prior to gf_syslog() like the way
traditional syslog function calls. error_code is mandatory when using
gf_syslog(). For example,
gf_openlog (NULL, -1, -1);
gf_syslog (GF_ERR_DEV, LOG_ERR, "error reading configuration file");
Using syslog, admin is free to configure logger to
* reduce repeated log messages
* forward logs to remote logger
* execute a command on certain log pattern
* alert people for certain log pattern by email, snmp etc
* and many more
Change-Id: Ibacbcbbc547192893fc4a46b387496b622e4811f
BUG: 928648
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/4915
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-04-30 17:39:30 +05:30
echo "Use syslog : $USE_SYSLOG"
2013-04-08 16:49:34 +05:30
echo "XML output : $BUILD_XML_OUTPUT"
Transparent data encryption and metadata authentication
.. in the systems with non-trusted server
This new functionality can be useful in various cloud technologies.
It is implemented via a special encryption/crypt translator,which
works on the client side and performs encryption and authentication;
1. Class of supported algorithms
The crypt translator can support any atomic symmetric block cipher
algorithms (which require to pad plain/cipher text before performing
encryption/decryption transform (see glossary in atom.c for
definitions). In particular, it can support algorithms with the EOF
issue (which require to pad the end of file by extra-data).
Crypt translator performs translations
user -> (offset, size) -> (aligned-offset, padded-size) ->server
(and backward), and resolves individual FOPs (write(), truncate(),
etc) to read-modify-write sequences.
A volume can contain files encrypted by different algorithms of the
mentioned class. To change some option value just reconfigure the
volume.
Currently only one algorithm is supported: AES_XTS.
Example of algorithms, which can not be supported by the crypt
translator:
1. Asymmetric block cipher algorithms, which inflate data, e.g. RSA;
2. Symmetric block cipher algorithms with inline MACs for data
authentication.
2. Implementation notes.
a) Atomic algorithms
Since any process in a stackable file system manipulates with local
data (which can be obsoleted by local data of another process), any
atomic cipher algorithm without proper support can lead to non-POSIX
behavior. To resolve the "collisions" we introduce locks: before
performing FOP->read(), FOP->write(), etc. the process should first
lock the file.
b) Algorithms with EOF issue
Such algorithms require to pad the end of file with some extra-data.
Without proper support this will result in losing information about
real file size. Keeping a track of real file size is a responsibility
of the crypt translator. A special extended attribute with the name
"trusted.glusterfs.crypt.att.size" is used for this purpose. All files
contained in bricks of encrypted volume do have "padded" sizes.
3. Non-trusted servers and
Metadata authentication
We assume that server, where user's data is stored on is non-trusted.
It means that the server can be subjected to various attacks directed
to reveal user's encrypted personal data. We provide protection
against such attacks.
Every encrypted file has specific private attributes (cipher algorithm
id, atom size, etc), which are packed to a string (so-called "format
string") and stored as a special extended attribute with the name
"trusted.glusterfs.crypt.att.cfmt". We protect the string from
tampering. This protection is mandatory, hardcoded and is always on.
Without such protection various attacks (based on extending the scope
of per-file secret keys) are possible.
Our authentication method has been developed in tight collaboration
with Red Hat security team and is implemented as "metadata loader of
version 1" (see file metadata.c). This method is NIST-compliant and is
based on checking 8-byte per-hardlink MACs created(updated) by
FOP->create(), FOP->link(), FOP->unlink(), FOP->rename() by the
following unique entities:
. file (hardlink) name;
. verified file's object id (gfid).
Every time, before manipulating with a file, we check it's MACs at
FOP->open() time. Some FOPs don't require a file to be opened (e.g.
FOP->truncate()). In such cases the crypt translator opens the file
mandatory.
4. Generating keys
Unique per-file keys are derived by NIST-compliant methods from the
a) parent key;
b) unique verified object-id of the file (gfid);
Per-volume master key, provided by user at mount time is in the root
of this "tree of keys".
Those keys are used to:
1) encrypt/decrypt file data;
2) encrypt/decrypt file metadata;
3) create per-file and per-link MACs for metadata authentication.
5. Instructions
Getting started with crypt translator
Example:
1) Create a volume "myvol" and enable encryption:
# gluster volume create myvol pepelac:/vols/xvol
# gluster volume set myvol encryption on
2) Set location (absolute pathname) of your master key:
# gluster volume set myvol encryption.master-key /home/me/mykey
3) Set other options to override default options, if needed.
Start the volume.
4) On the client side make sure that the file /home/me/mykey exists
and contains proper per-volume master key (that is 256-bit AES
key). This key has to be in hex form, i.e. should be represented
by 64 symbols from the set {'0', ..., '9', 'a', ..., 'f'}.
The key should start at the beginning of the file. All symbols at
offsets >= 64 are ignored.
5) Mount the volume "myvol" on the client side:
# glusterfs --volfile-server=pepelac --volfile-id=myvol /mnt
After successful mount the file which contains master key may be
removed. NOTE: Keeping the master key between mount sessions is in
user's competence.
**********************************************************************
WARNING! Losing the master key will make content of all regular files
inaccessible. Mount with improper master key allows to access content
of directories: file names are not encrypted.
**********************************************************************
6. Options of crypt translator
1) "master-key": specifies location (absolute pathname) of the file
which contains per-volume master key. There is no default location
for master key.
2) "data-key-size": specifies size of per-file key for data encryption
Possible values:
. "256" default value
. "512"
3) "block-size": specifies atom size. Possible values:
. "512"
. "1024"
. "2048"
. "4096" default value;
7. Test cases
Any workload, which involves the following file operations:
->create();
->open();
->readv();
->writev();
->truncate();
->ftruncate();
->link();
->unlink();
->rename();
->readdirp().
8. TODOs:
1) Currently size of IOs issued by crypt translator is restricted
by block_size (4K by default). We can use larger IOs to improve
performance.
Change-Id: I2601fe95c5c4dc5b22308a53d0cbdc071d5e5cee
BUG: 1030058
Signed-off-by: Edward Shishkin <edward@redhat.com>
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4667
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-03-13 21:56:46 +01:00
echo "Encryption xlator : $BUILD_CRYPT_XLATOR"
2015-02-18 14:47:01 +01:00
echo "Unit Tests : $BUILD_UNITTEST"
2016-12-15 13:41:14 -08:00
echo "Track priv ports : $TRACK_PRIVPORTS"
2015-03-10 15:13:29 +05:30
echo "POSIX ACLs : $BUILD_POSIX_ACLS"
2014-01-02 14:03:18 -05:00
echo "SELinux features : $USE_SELINUX"
2015-08-22 01:09:53 +05:30
echo "firewalld-config : $BUILD_FIREWALLD"
eventsapi: Gluster Eventing Feature implementation
[Depends on http://review.gluster.org/14627]
Design is available in `glusterfs-specs`, A change from the design
is support of webhook instead of Websockets as discussed in the design
http://review.gluster.org/13115
Since Websocket support depends on REST APIs, I will add Websocket support
once REST APIs patch gets merged
Usage:
Run following command to start/stop Eventsapi server in all Peers,
which will collect the notifications from any Gluster daemon and emits
to configured client.
gluster-eventsapi start|stop|restart|reload
Status of running services can be checked using,
gluster-eventsapi status
Events listener is a HTTP(S) server which listens to events emited by
the Gluster. Create a HTTP Server to listen on POST and register that
URL using,
gluster-eventsapi webhook-add <URL> [--bearer-token <TOKEN>]
For example, if HTTP Server running in `http://192.168.122.188:9000`
then add that URL using,
gluster-eventsapi webhook-add http://192.168.122.188:9000
If it expects a Token then specify it using `--bearer-token` or `-t`
We can also test Webhook if all peer nodes can send message or not
using,
gluster-eventsapi webhook-test <URL> [--bearer-token <TOKEN>]
Configurations can be viewed/updated using,
gluster-eventsapi config-get [--name]
gluster-eventsapi config-set <NAME> <VALUE>
gluster-eventsapi config-reset <NAME|all>
If any one peer node was down during config-set/reset or webhook
modifications, Run sync command from good node when a peer node comes
back. Automatic update is not yet implemented.
gluster-eventsapi sync
Basic Events Client(HTTP Server) is included with the code, Start
running the client with required port and start listening to the
events.
/usr/share/glusterfs/scripts/eventsdash.py --port 8080
Default port is 9000, if no port is specified, once it started running
then configure gluster-eventsapi to send events to that client.
Eventsapi Client can be outside of the Cluster, it can be run event on
Windows. But only requirement is the client URL should be accessible
by all peer nodes.(Or ngrok(https://ngrok.com) like tools can be used)
Events implemented with this patch,
- Volume Create
- Volume Start
- Volume Stop
- Volume Delete
- Peer Attach
- Peer Detach
It is easy to add/support more events, since it touches Gluster cmd
code and to avoid merge conflicts I will add support for more events
once this patch merges.
BUG: 1334044
Change-Id: I316827ac9dd1443454df7deffe4f54835f7f6a08
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/14248
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-05-05 18:34:41 +05:30
echo "Events : $BUILD_EVENTS"
2015-12-01 11:50:54 +01:00
echo "EC dynamic support : $EC_DYNAMIC_SUPPORT"
2016-12-15 09:06:00 -08:00
echo "Use memory pools : $USE_MEMPOOL"
2017-02-18 00:49:02 +01:00
echo "Nanosecond m/atimes : $BUILD_NANOSECOND_TIMESTAMPS"
2018-01-31 16:38:34 +01:00
echo "Server components : $with_server"
2017-03-27 16:09:56 -04:00
echo "Legacy gNFS server : $BUILD_GNFS"
2018-01-18 15:24:00 -05:00
echo "IPV6 default : $with_ipv6_default"
echo "Use TIRPC : $with_libtirpc"
2018-03-28 10:14:39 -04:00
echo "With Python : ${PYTHON_VERSION}"
2018-05-22 19:55:27 +05:30
echo "Cloudsync : $BUILD_CLOUDSYNC"
2009-02-18 17:36:07 +05:30
echo