232 Commits

Author SHA1 Message Date
Niels de Vos
4973d0ea60 build: correct the version in glusterfs-api.pc
The version in glusterfs-api.pc has moved backwards, breaking existing
versioned dependencies in QEMU. The following table contains the
GlusterFS version and the version for glusterfs-api.pc:

    .------------------------.
    | GlusterFS | pkg-config |
    |-----------+------------|
    |   3.4.x   |   4.3.4.x  |
    |   3.5.x   |   6.3.5.x  |
    |   3.6.x   |   7.3.6.x  |
    |   3.7.x   |   7.3.7.x  |
    |   master  |   7.x.y.z  |
    '------------------------'

BUG: 1211836
Change-Id: I62168a0ab4f0c78e61987371ae75a0d2dd56ced8
URL: http://thread.gmane.org/gmane.comp.emulators.qemu/330176
Reported-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/10308
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-04-24 05:22:03 -07:00
Raghavendra Talur
3fc4f31a78 configure.ac: print yes/no instead of 1/0 in output
POSIX_ACLS support in output of configure shows
0/1 instead of no/yes.

Added BUILD_POSIX_ACLS to make value consistent.

Change-Id: Ife728d0d03ff0eb03d4389fefc04507a76205ccd
BUG: 1185654
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/9848
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: NetBSD Build System
2015-04-13 05:38:24 +00:00
Niels de Vos
6eb27480b6 build: make contrib/uuid dependency optional
On Linux systems we should use the libuuid from the distribution and not
bundle and statically link the contrib/uuid/ bits.

libglusterfs/src/compat-uuid.h has been introduced and should become an
abstraction layer for different UUID APIs. Non-Linux operating systems
should implement their compatibility layer there.

Once all operating systems have an implementation in compat-uuid.h, we
can remove contrib/uuid/ from the repository completely.

Change-Id: I345e5357644be2521685e00358bb8c83c4ea0577
BUG: 1206587
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/10129
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-10 11:39:52 +00:00
Niels de Vos
9c37b68bc1 build: require cmocka >= 1.0.1
Our mem-pool unit test does a funky realloc(ptr, 0) as an alternative to
free(ptr). cmocka 1.0.0 has a bug where this is not handled correctly
and thinks to detect a memory leak. The next cmocka release will have
this bug fixed, making our unit tests require cmocka >= 1.0.1.

URL: https://cmocka.org/archive/cmocka/2015-02/0000059.html
Change-Id: I3d7f9b4cf7ace3f958158425ecbcc8f176579122
BUG: 1067059
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9801
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Andreas Schneider <asn@fedoraproject.org>
Tested-by: Andreas Schneider <asn@fedoraproject.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-03-31 04:11:17 -07:00
Mohammed Rafi KC
8277b02a94 build:change dependency for librdmacm to version >= 1.0.15
Thanks to Niels for the fix

Change-Id: I0954b6f498461dde2b986da9e0e45775175249c9
BUG: 1206744
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: http://review.gluster.org/10028
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-03-30 09:45:10 -07:00
Venky Shankar
7927e8747c features/bit-rot: Implementation of bit-rot xlator
This is the "Signer" -- responsible for signing files with their
checksums upon last file descriptor close (last release()).
The event notification facility provided by the changelog xlator
is made use of.

Moreover, checksums are as of now SHA256 hash of the object data
and is the only available hash at this point of time. Therefore,
there is no special "what hash to use" type check, although it's
does not take much to add various hashing algorithms to sign
objects with. Signatures are stored in extended attributes of the
objects along with the the type of hashing used to calculate the
signature. This makes thing future proof when other hash types
are added. The signature  infrastructure is provided by bitrot
stub: a little piece of code that sits over the POSIX xlator
providing interfaces to "get or set" objects signature and it's
staleness.

Since objects are signed upon receiving release() notification,
pre-existing data which are "never" modified would never be
signed. To counter this, an initial crawler thread is spawned
The crawler scans the entire brick for objects that are unsigned
or "missed" signing due to the server going offline (node reboots,
crashes, etc..) and triggers an explicit sign. This would also
sign objects when bit-rot is enabled for a volume and/or after
upgrade.

Change-Id: I1d9a98bee6cad1c39c35c53c8fb0fc4bad2bf67b
BUG: 1170075
Original-Author: Raghavendra Bhat <raghavendra@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/9711
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-24 10:55:32 -07:00
Venky Shankar
a20101e2e4 Bitrot Stub
Bitrot stub implements object versioning required for identifying
signature freshness. More details about versioning is explained
as a part of the "bitrot feature documentation" patch.

Change-Id: I2ad70d9eb109ba4a12148ab8d81336afda529ad9
BUG: 1170075
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/9709
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-24 06:37:19 -07:00
Krutika Dhananjay
6f389fbb81 features/shard: Introducing sharding translator
Based on the high-level design by Anand V. Avati which can be found @
https://gist.github.com/avati/af04f1030dcf52e16535#sharding-xlator-stripe-20

Still to-do:
        * complete implementation of inode write fops - [f]truncate,
          zerofill, fallocate, discard
        * introduce transaction mechanism in inode write fops
        * complete readv
        * Handle open with O_TRUNC
        * Handle unlinking of all shards during unlink/rename
        * Compute total ia_size and ia_blocks in lookup, readdirp, etc
        * wind fsync/flush on all shards

        Note: Most of the items above are related. Once we come up
        with a clean way to determine the last shard/shard count for
        a file/file size and the mgmt of sparse regions of the file,
        implementing them becomes trivial.

Change-Id: Id871379b53a4a916e4baa2e06f197dd8c0043b0f
BUG: 1200082
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/9841
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-19 10:59:31 -07:00
Ravishankar N
32ed7aa5ad afr: arbiter xlator
This patch adds the arbiter translator into the tree. This is a server
side xlator used for replica 3 volumes. It sits above posix and will be
loaded on the 3rd (last) brick of every afr subvolume in a replica 3
configuration. It intercepts inode read/write operations: reads are
unwound with ENOTCONN, inode writes are unwound with success without
actually passing them down to posix. Metadata operations are allowed to
pass through.

The CLI for creating a 3 way replica with arbiter is also added but kept
disabled (A 'normal' 3 way replica is created instead).

This patch is a part of the arbiter logic implementation for 3 way AFR,
details of which can be found at http://review.gluster.org/#/c/9656/

Change-Id: I395b81f49d5da52c466daf5c8518f1bbad9c16fa
BUG: 1199985
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/9840
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-19 10:45:49 -07:00
Joseph Fernandes
b4a0db5ee3 Adding ChangeTimeRecorder(CTR) Xlator to GlusterFS
**********************************************************************
                            ChangeTimeRecorder(CTR) Xlator           |
**********************************************************************
ChangeTimeRecorder(CTR) is server side xlator(translator) which sits
just above posix xlator. The main role of this xlator is to record the
access/write patterns on a file residing the brick. It records the
read(only data) and write(data and metadata) times and also count on
how many times a file is read or written. This xlator also captures
the hard links to a file(as its required by data tiering to move
files).

CTR Xlator is the consumer of libgfdb.

To Enable/Disable CTR Xlator:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 gluster volume set <volume-name> features.ctr-enabled {on/off}

To Enable/Disable Frequency Counter Recording in CTR Xlator:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 gluster volume set <volume-name> features.record-counters {on/off}

Change-Id: I5d3cf056af61ac8e3f8250321a27cb240a214ac2
BUG: 1194753
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-on: http://review.gluster.org/9935
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-19 01:31:29 -07:00
Venky Shankar
87a9d23627 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-03-18 21:22:33 -07:00
Avra Sengupta
7c4461329b snapshot/scheduling: A cron based scheduler for snapshot scheduling
GlusterFS volume snapshot provides point-in-time copy
of a GlusterFS volume. Currently, GlusterFS volume
snapshots can be easily scheduled by setting up 
cron jobs on one of the nodes in the GlusterFS
trusted storage pool. This has a single point failure (SPOF),
as scheduled jobs can be missed if the node running the cron
jobs dies.

The solution to the above problems is addressed in this patch.
The snap_scheduler.py helper script expects the user to install
the argparse python module before using it.

Further details for the same are available at:

http://www.gluster.org/community/documentation/index.php/Features/Scheduling_of_Snapshot

Change-Id: I2c357af5b7d3e66f270d20eef50cdeecdcbe15c7
BUG: 1198027
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/9788
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-18 18:31:54 -07:00
Joseph Fernandes
87c7fa3cfd Adding Libgfdb to GlusterFS
*************************************************************************
			Libgfdb						|
*************************************************************************
Libgfdb provides abstract mechanism to record extra/rich metadata
required for data maintenance, such as data tiering/classification.
It provides consumer with API for recording and querying, keeping
the consumer abstracted from the data store used beneath for storing data.
It works in a plug-and-play model, where data stores can be plugged-in.
Presently we have plugin for Sqlite3. In the future will provide recording
and querying performance optimizer. In the current implementation the schema
of metadata is fixed.

Schema:
~~~~~~
      GF_FILE_TB Table:
      ~~~~~~~~~~~~~~~~~
      This table has one entry per file inode. It holds the metadata required to
      make decisions in data maintenance.
      GF_ID (Primary key)	: File GFID (Universal Unique IDentifier in the namespace)
      W_SEC, W_MSEC 		: Write wind time in sec & micro-sec
      UW_SEC, UW_MSEC		: Write un-wind time in sec & micro-sec
      W_READ_SEC, W_READ_MSEC 	: Read wind time in sec & micro-sec
      UW_READ_SEC, UW_READ_MSEC : Read un-wind time in sec & micro-sec
      WRITE_FREQ_CNTR INTEGER	: Write Frequency Counter
      READ_FREQ_CNTR INTEGER	: Read Frequency Counter

      GF_FLINK_TABLE:
      ~~~~~~~~~~~~~~
      This table has all the hardlinks to a file inode.
      GF_ID		: File GFID               (Composite Primary Key)``|
      GF_PID		: Parent Directory GFID  (Composite Primary Key)   |-> Primary Key
      FNAME 		: File Base Name          (Composite Primary Key)__|
      FPATH 		: File Full Path (Its redundant for now, this will go)
      W_DEL_FLAG 	: This Flag is used for crash consistancy, when a link is unlinked.
                  	  i.e Set to 1 during unlink wind and during unwind this record
                          is deleted
      LINK_UPDATE 	: This Flag is used when a link is changed i.e rename.
                          Set to 1 when rename wind and set to 0 in rename unwind

Libgfdb API:
~~~~~~~~~~~
Refer libglusterfs/src/gfdb/gfdb_data_store.h

Change-Id: I2e9fbab3878ce630a7f41221ef61017dc43db11f
BUG: 1194753
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Signed-off-by: Dan Lambright <dlambrig@redhat.com>
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-on: http://review.gluster.org/9683
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-18 10:36:42 -07:00
Aravinda VK
7e98a0e0b1 feature/glusterfind: A tool to find incremental changes
Documentation is available in patch:
http://review.gluster.org/#/c/9800/

A tool which helps to get list of modified files or list of all files in
GlusterFS Volume using Changelog or find command.

Usage
=====
glusterfind --help

Create:
-------
glusterfind create --help

The tool creates status file $GLUSTERD_WORKDIR/SESSION/VOLUME/status
and records current timestamp to initiate the session. This timestamp
will be used as start time for next runs.

As part of create also generates ssh key and distributes to all peers.
and enables build.pgfid and changelog using volume set command.

Pre:
----
glusterfind pre --help

This command is used to generate the list of files modified after session
creation time or after last run. To get list of all files/dirs in Volume,
run pre command with `--full` argument.

The tool gets all nodes details using gluster volume info and runs node
agent for each brick in respective nodes via ssh command. Once these node
agents generate the output file, tool copies to local using scp. Merges all
the output files to generate the final output file.

Post:
-----
glusterfind post --help

After consuming the list, this sub command is called to update the session
time based on pre command status file.

List:
-----
glusterfind list --help

To view all the sessions

Delete:
-------
glusterfind delete --help

Delete session.

Known Issues
------------
1. Deleted files will not get listed, since we can't convert GFID to
   Path if file/dir is deleted.
2. Only new name will get listed if Renamed.
3. All hardlinks will get listed.

Change-Id: I82991feb0aea85cb6ec035fddbf80a2b276e86b0
BUG: 1193893
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/9682
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-18 02:54:25 -07:00
Meghana Madhusudhan
368dfd6959 NFS-Ganesha: Volume set option for managing NFS-Ganesha exports.
A dummy translator has been introduced as a place
holder for functions related to managing NFS-Ganesha
exports. A volume set option is introduced to
manage volume level exports.

gluster vol set <volname> ganesha.enable ON/OFF

1. gluster volume set <volname> ganesha.enable ON

It creates the export config file with a unique export ID.
Sends a DBus signal to export this volume dynamically.

2. gluster vol set <volname> ganesha.enable OFF

Unexports the specific volume. Deletes the specfic
config file related to the volume.

This change also removes the handling of the older
keys "nfs-ganesha.enable" and "nfs-ganesha.host"

Change-Id: I8d4a0b542326a6a0c8e4711600b106274d666587
BUG: 1188184
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/9585
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-03-18 01:53:22 -07:00
Kaleb S. KEITHLEY
d81182cf69 NFS-Ganesha: Install scripts, config files, and resource agent scripts
Resubmitting after a gerrit bug bungled the merge of
http://review.gluster.org/9621 (was it really a gerrit bug?)

Scripts related to NFS-Ganesha are in extras/ganesha/scripts.
Config files are in extras/ganesha/config.
Resource Agent files are in extras/ganesha/ocf

Files are copied to appropriate locations.

Change-Id: I137169f4d653ee2b7d6df14d41e2babd0ae8d10c
BUG: 1188184
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/9912
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-03-17 13:39:44 -07:00
Soumya Koduri
2b97b57cd8 Upcall: New xlator to store various states and send cbk events
Framework on the server-side, to handle certain state of the files
accessed and send notifications to the clients connected.

A generic and extensible framework, used to maintain states in
the glusterfsd process for each of the files accessed
(including the clients info doing the fops) and send
notifications to the respective glusterfs clients incase of
any change in that state.

This patch handles "Inode Update/Invalidation" upcall event.

Feature page:
        URL: http://www.gluster.org/community/documentation/index.php/Features/Upcall-infrastructure

Below link has a writeup which explains the code changes done -
        URL: https://soumyakoduri.wordpress.com/2015/02/25/glusterfs-understanding-upcall-infrastructure-and-cache-invalidation-support/

Change-Id: Ie3d724be9a3419fcf18901a753e8ec2df2ac802f
BUG: 1200262
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/9535
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-03-17 05:08:07 -07:00
Aravinda VK
79009691c0 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-03-17 04:56:24 -07:00
Anoop C S
0ef870741a Features/trash : Combined patches for trash translator
This is the combined patch set for supporting trash feature.
http://www.gluster.org/community/documentation/index.php/Features/Trash

Current patch includes the following features:
* volume set options for enabling trash globally and
  exclusively for internal operations like self-heal
  and re-balance
* volume set options for setting the eliminate
  path, trash directory path and maximum trashable
  file size.
* test script for checking the functionality of the
  feature
* brief documentation on different aspects of trash
  feature.

Change-Id: Ic7486982dcd6e295d1eba0f4d5ee6d33bf1b4cb3
BUG: 1132465
Signed-off-by: Anoop C S <achiraya@redhat.com>
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/8312
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-16 03:36:37 -07:00
Kotresh HR
7a9a66cc5f tools: Finds missing files in gluster volume given backend brickpath
The tool finds the missing files in a geo-replication slave volume.
The tool crawls backend .glusterfs of the brickpath, which is passed
as a parameter and stats each entry on slave volume mount to check
the presence of file. The mount used is aux-gfid-mount, hence no path
conversion is required and is fast. The tool needs to be run on every
node in cluster for each brickpath of geo-rep master volume to find
missing files on slave volume. The tool is generic enough and can be
used in non geo-replication context as well.

Most of the crawler code is leverged from Avati's xfind and is modified
to crawl only .glusterfs (https://github.com/avati/xsync)

Thanks Aravinda for scripts to convert gfid to path.

Change-Id: I84deaaaf638f7c571ff1319b67a3440fe27da810
BUG: 1187140
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/9503
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-15 21:20:03 -07:00
Kaleb S. KEITHLEY
8f34055a23 build: don't report (hide) systemtap config option
We don't actually support systemtap. We don't have any systemtap
enablement. The configure doesn't actually do anything to configure
systemtap support. It's confusing to show that systemtap is disabled,
someone might try to run --enable-systemtap, and then we'll show that
it's enabled, but it still doesn't actually do anything.

Hide it until such time as we actually have some real systemtap support

Change-Id: I8617121bee5bc724027e5f4d5eed00fd3c5a4ab2
BUG: 865734
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/9564
2015-03-10 10:22:13 -07:00
Niels de Vos
72dc1025dc posix: add ACL translation for the GF_POSIX_ACL_*_KEY xattr
Adding support for two virtual extended attributes that are used for
converting a binary POSIX ACL to a POSIX.1e long ACL text format. This
makes it possible to transfer the ACL over the network to a different OS
which can convert the POSIX.1e text format to its native structures.

The following xattrs are sent over RPC in SETXATTR/GETXATTR procedures,
and contain the POSIX.1e long ACL text format:

- glusterfs.posix.acl: maps to ACL_TYPE_ACCESS
- glusterfs.posix.default_acl: maps to ACL_TYPE_DEFAULT

acl_from_text() (from libacl) converts the text format into an acl_t
structure. This structure is then used by acl_set_file() to set the ACL
in the filesystem.

libacl-devel is needed for linking against libacl, so it has been added
to the BuildRequires in the .spec.

NetBSD does not support POSIX ACLs. Trying to get/set POSIX ACLs on a
storage server running NetBSD, an error will be returned with errno set
to ENOTSUP. Faking support, but not enforcing ACLs seems wrong to me.

URL: http://www.gluster.org/community/documentation/index.php/Features/Improved_POSIX_ACLs
BUG: 1185654
Change-Id: Ic5eb73d69190d3492df2f711d0436775eeea7de3
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9627
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
2015-03-09 13:53:00 -07:00
Niels de Vos
bc2e58a436 testing: Switch to cmocka the successor of cmockery2
This uses https://cmocka.org/ as the unit testing framework.

With this change, unit testing is made optional as well. We assume there
is no cmocka available while building. cmocka will be enabled by default
later on. For now, to build with cmocka run:

    $ ./configure --enable-cmocka

This change is based on the work of Andreas (replacing cmockery2 with
cmocka) and Kaleb (make cmockery2 an optional build dependency).

The only modifications I made, are additional #defines in unittest.h for
making sure the unit tests function as expected.

Change-Id: Iea4cbcdaf09996b49ffcf3680c76731459cb197e
BUG: 1067059
Merged-change: http://review.gluster.org/9762/
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Change-Id: Ia2e955481c102d5dce17695a9205395a6030e985
Reviewed-on: http://review.gluster.org/9738
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-03-05 13:51:37 -08:00
Kaushal M
30357bcfcd build, glusterd: Add liburcu to build system
This patch adds liburcu related checks to the build system and updates
the spec file to require 'userspace-rcu'.

liburcu >= 0.7 is required to build GlusterFS, but 0.8 and above is
preferred. For cases when liburcu 0.7.x is the available version, some
function definitions (currently just one) from liburcu-0.8.6 have been
made available in /contrib/userspace-rcu/.

This change was developed on the git branch at [1]. This commit is a
combination of the following commits on the development branch.
  a5cd6bd Add userspace-rcu checks to configure.ac
  fe5ced3 Add URCU libs to glusterd libtool flags
  1e43302 Add local definition of cds_list_add_tail_rcu for
          liburcu-0.7
  98da755 Move local definition of cds_list_add_tail_rcu into contrib
  8c44dfd Update spec file to include userspace-rcu0466e33 Rename
  rculist-additional.h to rculist-extra.h
  947c7b3 Add rculist-extra.h to dist
  19f32ad Address review comments 9605/1

[1]: https://github.com/kshlm/glusterfs/tree/urcu

Change-Id: Ifbb617d0dacce8fa01214f894badb9d8cdcaf56f
BUG: 1191030
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/9605
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-02-23 04:35:37 -08:00
Niels de Vos
c46070189e build: do not include automake/autoconf cache in the 'make dist' tarball
Remove the caches from the 'dist-hook' target that 'make dist' executes.

Also, there is no need to run ./configure inside contrib/argp-standalone
if it will not get used. configure.ac has been modified to only
configure the contrib/argp-standalone sources for distributions that do
not have the <argp.h> header available.

BUG: 1183538
Change-Id: Iedd67139ec83f0076e24ed0d575f9053ac1a94ec
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9463
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-01-30 10:55:49 -08:00
Niels de Vos
10e4add35f build: add a tmpfiles.d config file for /run/gluster
New distrubutions have a /run directory on a volatile tmpfs filesystem.
This causes /run/gluster to be removed with each reboot. A tmpfiles.d
configuration is used to create the directory on boot.

EL5 and EL-6 do not use /run, current Fedora versions do. By checking
%{_tmpfilesdir} in the .spec, we can identify if the distribution uses
tmpfiles.d.

Change-Id: I231e7d6603d573cb905246558e14a51577c0eb56
BUG: 1182934
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9458
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
2015-01-19 00:55:31 -08:00
Kaleb S. KEITHLEY
c49a77001b 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>
2015-01-12 09:16:08 -08:00
Niels de Vos
fcdac758ad build: only install geo-rep scripts when enabled
When geo-replication is not enabled, the related scripts should not get
installed. EPEL-5 does not support geo-replication, and the installed
but unpackaged scripts cause rebuilding for .el5 to fail.

BUG: 1169005
Change-Id: I1b6a352b73bd1ed1c5b330f54e26e81aed9a5a4e
Reported-by: Lalatendu Mohanty <lmohanty@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9221
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-12-07 06:16:08 -08:00
Emmanuel Dreyfus
c233d3e041 glupy: build fix if python and glusterfs prefix differ
If python is installed in ${pythonprefix} and glusterfs
in ${glusterfsprefix}, we have the following values:
${PYTHON}-config --prefix   => ${pythonprefix}
$libdir                     => ${glusterfsprefix}/lib

Using LDFLAGS="-L`${PYTHON}-config --prefix`/$libdir" we lookf for
python libraries in ${pythonprefix}/${glusterfsprefix}/lib while
we should be looking for ${pythonprefix}/lib

Replacing $libdir by lib breaks bug 1159248, so let us look in both
${pythonprefix}/lib and ${pythonprefix}/$libdir

BUG: 1129939
Change-Id: I2fef1b795235d1543a0e5ac619c6c2d59127fb66
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/9137
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-11-28 07:56:53 -08:00
Niels de Vos
66c789765d Replace copied (from rsync) checksum code by adler32() from zlib
The weak checksum code that is included in libglusterfs has initialy
been copied from the rsync sources. Instead of maintaining a copy of a
function, we should use a function from a shared library. The algorithm
seems to be Adler-32, zlib provides an implementation.

The strong checksum function has already been replaced by MD5 from
OpenSSL. It is time to also remove the comments about the origin of the
implementation, because it is not correct anymore.

Change-Id: I70c16ae1d1c36b458a035e4adb3e51a20afcf652
BUG: 1149943
Reported-by: Wade Mealing <wmealing@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9035
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-11-21 09:12:20 -08:00
Niels de Vos
6ba258d2b7 pkg-config: make the version in gluster-api.pc backwards compatible
Once we released gluster-api.pc with version=4. Since then we undid the
library versioning and replaced it with symbol-versioning. The current
libgfapi.so has version 0, but the symbols have the version from the
main package at the time they were added.

Because other packages (like samba) use the pkg-config version, we can
not drop it, or decrease the version easily. The simplest solution is to
keep the version=4 and add sub-digits for the actual package/symbol
versions. In future, the version in gluster-api.pc will be like 4.3.x.y.

Change-Id: If359c8de5b847a7e818199a7246636113837da2d
BUG: 1166232
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9154
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-11-20 09:57:19 -08:00
Niels de Vos
b6c553339c build: fix glupy linking warnings
While building glupy on x86_64, the following warnings are thrown:

  Making all in glupy
  Making all in src
    CC     glupy.lo
    CCLD   glupy.la
  /usr/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
  /usr/bin/ld: skipping incompatible /usr/lib/libutil.so when searching for -lutil
  /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
  /usr/bin/ld: skipping incompatible /usr/lib/librt.so when searching for -lrt
  /usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
  /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc

The libraries to link against are in /usr/lib64 on x86_64 in Fedora,
RHEL and CentOS. Other architectures or distributions may use a
different path. Instead of hardcoding "/lib" in configure.ac, the
variable $libdir should be used so that the path gets adapted to the
distribution and architecture.

Change-Id: Iae5db3ee8a62959ccb7f958d7c95eb77c4d4b1dd
BUG: 1159248
Reported-by: Kiran Patil <kiran@fractalio.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9033
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
2014-11-12 08:11:28 -08:00
Kaleb S. KEITHLEY
7e497871d1 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-07 00:23:34 -08:00
Emmanuel Dreyfus
1a735e300a glupy: portability fixes
Fixes portability problems so that NetBSD passes tests/features/glupy.t

- Use python-config to detect python build environment on all systems,
  not just Linux and Darwin.
- Get the site-package directory from python and make sure we install
  glupy.py there, Previously we installed within glusterfs prefix,
  which caused a problem if it was different that python's prefix.
- Set PYTHONPATH for tests so that the detected site-packages is used
  in python's search path. This should be useless, but let us have it
  just in case.
- Pass glupy.so path from glusterfsd to glupy.py through an
  environment variable and use it in CDLL instead of "", as the
  later seems not portable (at least it fails on NetBSD).
- Use gil_init_key pthread_getspecific to avoid deadlocks (that
  code was #ifdef out, perhaps because it was not needed on Linux,
  but it seems to be required for NetBSD.
- Recover the error message from Python and send it to the logs
  to help debugging problems.

BUG: 1129939
Change-Id: Icc71e77d6940f0759cc14c5c5cf7ca6fa431e0d2
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8978
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2014-11-05 22:28:09 -08:00
Pranith Kumar K
7e8eefca2c heal: glfs-heal implementation
Thanks a lot to Niels for helping me to get build stuff right.

Change-Id: I634f24d90cd856ceab3cc0c6e9a91003f443403e
BUG: 1147462
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/6529
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-10-15 01:22:02 -07:00
Emmanuel Dreyfus
473c34f895 Do not hardcode umount(8) path, emulate lazy umount
1) Use a system-dependent macro for umount(8) location instead of
relying on $PATH  to find it, for security and portability sake.

2) Introduce gf_umount_lazy() to replace umount -l (-l for lazy) invocations,
which is only supported on Linux; On Linux behavior in unchanged. On other
systems, we fork an external process (umountd) that will take care of
periodically attempt to unmount, and optionally rmdir.

BUG: 1129939
Change-Id: Ia91167c0652f8ddab85136324b08f87c5ac1e51d
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8649
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Csaba Henk <csaba@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-10-03 07:57:47 -07:00
Harshavardhana
2dd53eb4de porting: various fixes regression tests OSX/FreeBSD
- `wc -l` on OSX/FreeBSD adds spurious spaces, this clobbers
  up TAP output parsers - fix it.
- `umount -l` doesn't exist on OSX/FreeBSD use 'umount -f' if
   available.
- Add check for 'file' version, to handle mime type variations
  across versions
- Converge 'glusterfs --attribute-timeout=0 --entry-timeout=0'
  into '$GFS'
- Modify remaining 'mount -t nfs' to use 'mount_nfs'
- Update sha1sum for OSX to use 'openssl sha1'.

Change-Id: Id1012faa5d67a921513d220e7fa9cebafe830d34
BUG: 1131713
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8501
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-08-29 09:13:02 -07:00
Harshavardhana
c77a77ef0f osx: Enable qemu feature build on Darwin
Change-Id: Ie5d437aa6c52c180fd8d54680c5f882e75c0bf7e
BUG: 1089172
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8448
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-08-11 09:02:51 -07:00
Emmanuel Dreyfus
ccb5dc01b8 Always build EC xlator
Now EC xlator does not require MMX anymore, always build it.

BUG: 764655
Change-Id: I50a64e22c080f2759eaa57786e7f69c34f11f89c
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8451
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-08-10 15:14:09 -07:00
Emmanuel Dreyfus
b97ade3b05 Search zlib without pkg-config
NetBSD has zlib installed in base system and no .pc file for it. In
order to discover it, fallback to AC_CHECK_LIB is PKG_CHECK_MODULES
fail to find it.

This enables cdc xlator, and we pass tests/basic/cdc.t

BUG: 764655
Change-Id: Ide84402aa38edc2709d12e2530401c6b8c722529
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8437
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-08-09 15:29:26 -07:00
Harshavardhana
2ec6ea43f2 build: make GLUSTERD_WORKDIR rely on localstatedir
- Break-way from '/var/lib/glusterd' hard-coded previously,
  instead rely on 'configure' value from 'localstatedir'
- Provide 's/lib/db' as default working directory for gluster
  management daemon for BSD and Darwin based installations
- loff_t is really off_t on Darwin
- fix-off the warnings generated by clang on FreeBSD/Darwin
- Now 'tests/*' use GLUSTERD_WORKDIR a common variable for all
  platforms.
- Define proper environment for running tests, define correct PATH
  and LD_LIBRARY_PATH when running tests, so that the desired version
  of glusterfs is used, regardless where it is installed.
  (Thanks to manu@netbsd.org for this additional work)

Change-Id: I2339a0d9275de5939ccad3e52b535598064a35e7
BUG: 1111774
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8246
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-08-07 01:17:29 -07:00
Anders Blomdell
e8a1fc34ad Make RPM's with current git tag
1. clear autom4te.cache
2. autogen.sh
3. configure --with-previous-options

Change-Id: I90c1820d22207d18b1bb367444b21918467baea5
BUG: 1117921
Signed-off-by: Anders Blomdell <anders.blomdell@control.lth.se>
Reviewed-on: http://review.gluster.org/8293
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-07-30 08:07:11 -07:00
Emmanuel Dreyfus
5986d22e62 Attempt to fix cmockery2 build
The current code assumes cmockery2 is installed in default paths.
Use PKG_MODULES_CHECK to find it using pkg-config if it is not. If
not found by pkg-config, try AC_CHECK_LIB.

There are also some build flag adjustement so that local overrides
do not loose the required -I flags.

This includes and enhance http://review.gluster.org/8340/

BUG: 764655
Change-Id: Ide9f77d1e70afe3c1c5c57ae2b93127af6a425f9
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8365
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-07-27 11:57:24 -07:00
Emmanuel Dreyfus
1706151a42 Disable Erasure Code xlator if MMX is missing
Erasure Code xlator requires MMX instruction set.
Disable building it if MMX is missing.

BUG: 764655
Change-Id: Id9fe87db33e00c5630c1f3633ebd50fc4ebaec4d
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8366
Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-23 16:13:38 -07:00
Luis Pabon
13f644f783 build: Support for unit tests using Cmockery2
This patch will allow for developers to create unit tests for
their code.  Documentation has been added to the patch and
is available here:

doc/hacker-guide/en-US/markdown/unittest.md

Also, unit tests are run when RPM is created.

This patch is a replacement for http://review.gluster.org/#/c/7281
which removed unit test infrastucture from the repo due to multiple
conflicts.  Cmockery2 is now available in Fedora and EPEL, and soon
to be available in Debian and Ubuntu.  For all other operating
systems, please install from the source:

https://github.com/lpabon/cmockery2

BUG: 1067059

Change-Id: I1b36cb1f56fd10916f9bf535e8ad080a3358289f
Signed-off-by: Luis Pabón <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/7538
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-18 10:55:51 -07:00
Humble Chirammal
fc84c5af7b gfapi : remove gfapi.py to avoid confusion
python binding of libgfapi is evolving via libgfapi-python
project. The example available here confuses end users,
so removing it from this path.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
Bug Id: 1119328
> Reviewed-on: http://review.gluster.org/7920
> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
> Tested-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
> Reviewed-by: Thiago da Silva <thiago@redhat.com>
> Reviewed-by: Prashanth Pai <ppai@redhat.com>
> Reviewed-by: Vijay Bellur <vbellur@redhat.com>

Change-Id: I17b3aa0f0505342496019ce012cca21d84184027
Reviewed-on: http://review.gluster.org/8237
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-14 09:47:36 -07:00
Xavier Hernandez
ad112305a1 cluster/ec: Added erasure code translator
Change-Id: I293917501d5c2ca4cdc6303df30cf0b568cea361
BUG: 1118629
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: http://review.gluster.org/7749
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-11 10:33:40 -07:00
Harshavardhana
5723645715 porting: Enable 64bit inode properly on Darwin
Usage of -D__DARWIN_64_BIT_INO_T was wrong, use

-D_DARWIN_USE_64_BIT_INODE instead

Change-Id: I4b532232d0a61fe30f08c41ffeba50fff4ecd79e
BUG: 1089172
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8219
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-07-02 17:26:32 -07:00
Harshavardhana
1b74cf9929 porting: Port for FreeBSD rebased from Mike Ma's efforts
- Provides a working Gluster Management Daemon, CLI
- Provides a working GlusterFS server, GlusterNFS server
- Provides a working GlusterFS client
- execinfo port from FreeBSD is moved into ./contrib/libexecinfo
  for ease of portability on NetBSD. (FreeBSD 10 and OSX provide
  execinfo natively)
- More portability cleanups for Darwin, FreeBSD and NetBSD
- Provides a new rc script for FreeBSD

Change-Id: I8dff336f97479ca5a7f9b8c6b730051c0f8ac46f
BUG: 1111774
Original-Author: Mike Ma <mikemandarine@gmail.com>
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8141
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-07-02 17:20:34 -07:00
Vijay Bellur
85ee12f7c0 Revert "gfapi : remove gfapi.py to avoid confusion"
This reverts commit d0547a28f59d80ed572652af3e327b761c4e540f

Change-Id: I79ff562fff33d4ad7ca34c6442eb0e980890965a
Reviewed-on: http://review.gluster.org/8139
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-06-20 07:49:12 -07:00