summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Don't ignore all files that match (*o|*la|*lo)Peter Portante2012-11-211-3/+3
| | | | | | | | | | | | | | This has been hiding files in my tree, in particular, new directories that end with an "o". I am guessing here that these are really trying to just ignore .o, .la and .lo files. Change-Id: Ic438ca5c43188a63e9840512825f9ba05c359eeb Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4195 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pete Zaitcev <zaitcev@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* perf/io-threads: least-rate-limit least priority throttlingBrian Foster2012-11-214-2/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | The 'least-rate-limit' io-threads translator option enables throttling of least priority operations. This is initially intended as a debug/diagnostic tool for users who might experience overloaded servers via background activity (i.e., self-heal). least-rate-limit defines the maximum number of least priority operations the io-threads translator will dequeue in one second. If the specified rate limit is met, the worker threads sleep for the minimal amount of time before the next least priority operation becomes available (or until a new request arrives). The requests/second metric is generic and relative to a variety of factors involved with a background operation (server, storage, etc.). The most recent measured rate ("cached least rate") is added to the io-threads state dump content (kill -USR1) to serve as a reference point to throttle background activity under particular conditions. Change-Id: I80f2282992137d57b1becaa5c6ae3858c066862a BUG: 853680 Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.org/4119 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: check transaction type for eager-lock after it is setPranith Kumar K2012-11-211-6/+6
| | | | | | | | | | | | | | | | | | | | | | | Problem: Eager locking lk-owner decision is taken before transaction type is set. Default transaction type is DATA so all transactions are treated as DATA transactions at the time of eager-locking decision. Fix: Move the code that takes lk-owner decision after the transaction type is set. Test: Checked that the transaction type is set properly in gdb at the time of the lk-owner decision. Change-Id: I7607c7ff4f88c7ced5416a1cddb6586cf45d88f9 BUG: 861335 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4220 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libglusterfs: implement gf_strndupRaghavendra G2012-11-211-0/+19
| | | | | | | | | Change-Id: Ifb7bf22e8cf4ad1faccf7999c36919693912093f BUG: 808400 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.org/4135 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Put _check_key_is_zero_filled outside _xattrop_index_actionVenkatesh Somyajulu2012-11-202-11/+78
| | | | | | | | | Change-Id: Ifb89a3a911213b2816a540a104558e7c3c13e23a BUG: 874498 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/4182 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* posix: Fix volume will not start if brick has no volume-id attributeVenkatesh Somyajulu2012-11-202-7/+17
| | | | | | | | | | | | | | | | | | | | | | | Problem: If the extended attribute (trusted.glusterfs.volume-id) of a brick is absent and <gluster volume start volume-name> command is executed then curretly volume-id from the volume file will be set as an extended attribute of the brick and volume will get started. But if setup is such that brick is used as a mount point and before executing the <gluster volume start volume-name> command, nothing is mounted on the brick then all the file operations will take place at the brick but actual intention of the brick is to be used as mount point only. FIX: Do not start the volume if extended attribute (trusted.glusterfs.volume-id) is set absent. Change-Id: Id2462d87d6087e97e0b8831512fdbc3595f7078b BUG: 860297 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/4202 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* storage/posix: Make rchecksum O_DIRECT friendlyPranith Kumar K2012-11-204-23/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When posix-aio is enabled to perform aio fd is set with O_DIRECT whenever possible in read, writev fops. Rchecksum does not take this into account. If either offset/size/memory-buf passed to pread in rchecksum fop is not aligned, pread fails with EINVAL. Fix: Before doing pread necessary O_DIRECT manipulation is done when aio is enabled. Memory buffer passed to pread is now page-aligned. Test: 1) Create replica volume with aio enabled. 2) dd if=/dev/urandom of=a bs=1M count=1 3) kill one of the bricks in the replica pair 4) dd if=/dev/urandom of=a bs=1M count=1 5) bring back the brick. Self-heal succeeds after the change. The test above checks both rchecksum, writev fops that were changed in this patch. Change-Id: I186099a2854d4864c5b48086ab7bc5f1a7b27313 BUG: 866459 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4134 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* debug/error-gen: add the short write pseudo-errorBrian Foster2012-11-192-5/+36
| | | | | | | | | | | | | | Add a separate enum for pseudo-errors in the debug/error-gen translator and include a short write error. The short write error causes writev requests to return with some non-error value less than the size of the write request. BUG: 853690 Change-Id: I50b7d328386a8b78d03ce91b4c2ec83e0d32c9aa Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.org/4148 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tests: make _EXPECT handle more casesJeff Darcy2012-11-191-1/+1
| | | | | | | | | | | | | | | | | First issue is that _EXPECT wasn't handling args with spaces correctly. This was fixed by enclosing the entire expected-value expression in double quotes with a simple backslash escape for the end-of-line dollar sign. Second issue is that we were throwing away potentially useful debug information. Fixed by using egrep's -q option to suppress output, and eliminating redirections so that we can see any stderr output related to a script error. Change-Id: Ide3f49558dcece55bd90cad50b1ffc572592f11c Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4126 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: dump the layout information of directories onlyRaghavendra Bhat2012-11-191-9/+18
| | | | | | | | | | | | | | | testcase: The changes are for removing gf_log from statedump related sections in dht and using pthread_mutex_trylock in statedump sections. Changes are internal. So tests were done by attaching gdb to the process and executing by manually changing the values of some of the pointers. Change-Id: I41fa76c1812b462cb76f5bbf2fd14de080e73895 BUG: 843822 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4117 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* nfs: after resolving the entry use the linked inode instead of old inodeRaghavendra Bhat2012-11-192-1/+37
| | | | | | | | | Change-Id: I56add0c3c852d096ec70a0e35610f46c2d12980a BUG: 877885 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4205 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* fuse-bridge: fix posix-only configurationAnand Avati2012-11-192-0/+31
| | | | | | | | | | | | | | Recent changes in fuse-resolver had broken the use case of having a trivial configuration with only storage/posix translator. Fix it and include a regression test to avoid breakage in the future. Change-Id: I85cbcac4b5c2d3517dd03fd3dc6d07610697981b BUG: 868478 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4114 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterfsd: log all command line options in log fileAmar Tumballi2012-11-191-4/+14
| | | | | | | | | | | | | | | | | | this would help support to make sure the glusterfs process received all the required options, as not all the options set with 'mount -t glusterfs' will be visible with 'mount' command. also one need not bother checking 'ps ax | grep gluster' for getting all the details of the command. Change-Id: Idf635904074bc0892abb6b707ff91149e92a33e3 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 871063 Reviewed-on: http://review.gluster.org/4146 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* fuse: handle mountflags properlyNiels de Vos2012-11-194-14/+47
| | | | | | | | | | | | | | | | | | | | | | The internal mount API had no access to the generic mountflags used by mount(2). Thus the "ro" mount option that needs to be passed down to mount(2) as as a mountflag was incorrectly mangled into the fuse-specific mount parameter string (cf. http://review.gluster.com/655). This commit fixes the internal API and the "ro" issue. It also adds a check for the "rw" and "ro" mount options in tests/basic/mount.t. Thanks to Csaba Henk (csaba@) for suggestions and proposing an updated patch. Change-Id: I7f7bf49ae44d148f5c16f10736a0e412fb8f5e67 BUG: 853895 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/4163 Reviewed-by: Csaba Henk <csaba@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterfsd-mgmt: make brick-ops work in synctaskAmar Tumballi2012-11-191-0/+1
| | | | | | | | | | | this way, the main epoll thread is freed up to serve other requests. Change-Id: Iecf68aceb8bd84433d0f9fcd98d96c734a4cc134 BUG: 842955 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.org/4096 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/locks: fcntl(3) on F_GETLK must return first conflicting lockKrishnan Parthasarathi2012-11-183-1/+204
| | | | | | | | | | | - Added test program, getlk_owner.c to capture the bug when regressed. Change-Id: Ic2a0f6fa8d094c0f2e9f4a6febd278d4a2948223 BUG: 869724 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4164 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: copy peers that participate in volume xactionKrishnan Parthasarathi2012-11-182-12/+14
| | | | | | | | | | | | - To avoid working with a mutable list of peers in the scope of a volume xaction. Change-Id: I228ae96bccdce127026eff8320adb37b17e2cc6a BUG: 862834 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4113 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* nfs: do not change root inode if enable-ino32 is setRajesh Amaravathi2012-11-182-0/+29
| | | | | | | | | | | | | | | | When a user sets nfs.enable-ino32 on, the root inode, which must be 1, is jumbled during hashing of the gfid into 32 bits. This patch avoids doing that, and returns inode of 1 for the root inode. Change-Id: Ib65f2660998a95e1059be32bc298485c5cbe52df BUG: 864222 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4154 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* object-storage: final changes to remove swift diffPeter Portante2012-11-1637-669/+311
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Final set of changes to remove the diffs carried to make UFO work with OpenStack Swift. The code is now a complete layering on top of OpenStack Swift where we either "monkey patch" or subclass as necessary. See BZ 870589 (https://bugzilla.redhat.com/show_bug.cgi?id=870589). There are a lot of changes here due for the most part to rearranging the directory hierarchy to have create a proper python module hierarchy under the "gluster" namespace. Plugin references have been removed. The differences that used to be in the swift.diff file are now replaced with server implementations for account, container, object, and proxy that subclass the swift versions. Additionally, the plugins/conf directory has been moved to the "etc" directory, and the plugins/bin directory promoted a level. Unit tests pass. A new setup.py file is provided so that the install process can use it for creating all the necessary python install infrastructure (eggs and paste support). A new RPM spec file is provided which to properly install the new code, and the sample configuration files have been modified to reference the new python egg. Change-Id: I4316c1b66dca80f847fe9b0d583174689c175599 BUG: 870589 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4180 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* object-storage: refactor to use swift devicesPeter Portante2012-11-1623-243/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor code to use the devices configuration file setting for account, container, and object servers, dropping mount_path from the fs.conf file, and constructing new account, container and object server rings. This removes the next to last set of diffs in the swift diff file. See BZ 870589 (https://bugzilla.redhat.com/show_bug.cgi?id=870589). The key to the change is the dropping of the pre-built account, container and object rings, instead providing a script that will generate them for the user given the gluster volume name in use. In addition, we override the Swift check_mount() method and replace it with Gluster's which attempts to "auto-mount" if it is not already mounted. The following is an enumeration of the changes contained in this refactoring: * The refactoring to override the Swift check_mount() involved condensing a lot of code, removing redundancies and simplifying methods across a number of modules * Drop checking the mount point in the low level DiskDir, DiskAccount and DiskFile objects now that Swift's normal mount checking is used, and enable it by default in the template configuration file * Add missing get_container_timestamp() method for DiskAccount objects * Fix the plugin RPM spec file to provide the new ring builders, and while we were at it, finally fix the over-writing of the configuration files on install * Bug fixes * The monkey patched version of check_object_creation was not working correctly due to a missing import of HTTPBadRequest and a bad reference to validate_obj_name_component() * Only have the utils module import the plugins constraints module for the side effect of monkey patching if gluster is enabled * Removed the db_file.db file in the tree since it is created on the fly * Updated 2011 copyright notices to 2012 Change-Id: I8f4454576b1423021c9bbf3c36176f8db51e62c0 BUG: 870589 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4179 Reviewed-by: Pete Zaitcev <zaitcev@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com>
* object-storage: make proper refs to module varsPeter Portante2012-11-161-8/+4
| | | | | | | | | | | | Not sure how this worked before this, but mount_ip and mount_path do not exist, their uppercase versions do. Change-Id: I53e9b550991d17b5541ed4ada5f1bc9b3cb1b8b1 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4178 Reviewed-by: Pete Zaitcev <zaitcev@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* object-storage: reduce diffs, bury metadata updatePeter Portante2012-11-164-48/+29
| | | | | | | | | | | | | | Further reduce the diffs we have to carry by moving the Gluster specific metadata stored when we create an object to the DiskFile class's put() method. Change-Id: I8cef5412627d3ddfdadbf78ef947e067db5bf620 BUG: 870589 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4177 Reviewed-by: Pete Zaitcev <zaitcev@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com>
* object-storage: swift-diff removal: hide obj onlyPeter Portante2012-11-164-72/+47
| | | | | | | | | | | | | | | | | | | | | | | Towards swift-diff removal: hide object_only behavior inside DiskDir class objects. See BZ 870589 (https://bugzilla.redhat.com/show_bug.cgi?id=870589) One of the last few reasons for having the swift diff is the need to update the account and container information from the file system when the configuration is not for object-only use (meaning, other updates to the file system can come from clients other than UFO, which means UFO currently has to generate the necessary metadata for each request instead of caching it). This change moves that logic into the DiskDir class methods so that the container and account server code does not have to track that. Change-Id: If0970c77c72245facd09c2035083e681d6d80303 BUG: 870589 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4176 Reviewed-by: Pete Zaitcev <zaitcev@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com>
* object-storage: fix trailing whitespacePeter Portante2012-11-163-3/+1
| | | | | | | | | Change-Id: Ib3c671e693c2c332af98a593ca14c42c36f5ca76 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4175 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* object-storage: remove the device and part paramsPeter Portante2012-11-162-9/+6
| | | | | | | | | Change-Id: I60b4b1b976ad8359ba072d5d0ed6a8dd2087a738 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4174 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* object-storage: only update metadata that changesPeter Portante2012-11-161-2/+7
| | | | | | | | | | | | See BZ 868120 (https://bugzilla.redhat.com/show_bug.cgi?id=868120) Change-Id: Ia7f5562cff32eee30c5ca18652d5d9a5a2b18bf4 BUG: 868120 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4173 Reviewed-by: Pete Zaitcev <zaitcev@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* object-storage: DiskAccount subclassing of DiskDirPeter Portante2012-11-162-35/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes to make DiskAccount subclass DiskDir complete. This change helps reduce the diffs ahead of further refactoring. Note that DiskDir initializes all the same fields as DiskAccount, plus a few more, and ends up reading the metadata properly, while only adding a couple of fields not used for account purposes. This change also passes the account controller's logger for use by the DiskAccount class. Along the way we: * Remove the redundant update_account() method in the DiskCommon base class, since the update_container() method in DiskDir performs the exact same functionality * Remove the initialization of variables ahead of assignments in two cases, and also move the initialization of the list variables closer to where they are used * Collapse the imports from swift.plugins.utils into one statement * Use a temporary directory for the db_file.db when we find ourselves in a unit test environment Change-Id: I4dc59b416a66393adfe0ed32c7a62c79731d70c0 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4172 Reviewed-by: Pete Zaitcev <zaitcev@redhat.com> Tested-by: Pete Zaitcev <zaitcev@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com>
* object-storage: fix bad refs to check_acct_existsPeter Portante2012-11-161-4/+6
| | | | | | | | | | | | | | | | | Fix bad references to check_account_exists: this is a module local method, not provided by Glusterfs. Not sure how we missed this. More unit tests would help. Also added the ability to run the Swift tree unit tests with gluster artificially enabled to test as many code paths as possible ahead of full functional tests. Change-Id: Iaf696d34db8f841c887f03569e65321fca8894d1 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4171 Reviewed-by: Pete Zaitcev <zaitcev@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* object-storage: fix bad refs to REMOTE_CLUSTERPeter Portante2012-11-161-2/+2
| | | | | | | | | Change-Id: I07cd997ef9a98645a87792632f9dd612928678b7 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4170 Reviewed-by: Pete Zaitcev <zaitcev@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* object-storage: rename self.name to self.containerPeter Portante2012-11-161-11/+12
| | | | | | | | | | | | | | | | | Minor refactoring ahead of further diffs to add clarity to the code. Rename the DiskDir field from "name" to "container", which is what it is. Along the way, add a note regarding the one-to-one mapping of account name to gluster volume name, and fix the get_info() container method documentation to list all the dictionary keys returned. Change-Id: I659e1a9a070c16671287f17a170f9d77198534e7 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4169 Reviewed-by: Pete Zaitcev <zaitcev@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* object-storage: unused parameter cleanup & handl'nPeter Portante2012-11-161-6/+5
| | | | | | | | | | | | | | | | | | | Unsed parameter cleanup and handling changes. The device and partition parameters are not used. The account parameter is used in place of the device parameter. Rather than just making the device parameter reference the value of the account parameter, we just don't use the device parameter at all and make references to account. We also remove the device_path field from the class since it is unused. Additionally, we assert that we have a logger since the rest of the relies on that fact. Change-Id: Iea556319744ab4f729b1ce23d987650a164749db Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4168 Reviewed-by: Pete Zaitcev <zaitcev@redhat.com> Tested-by: Pete Zaitcev <zaitcev@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com>
* object-storage: add missing docs for paramsPeter Portante2012-11-161-3/+3
| | | | | | | | | | | Add missing documentation for constructor parameters. Change-Id: I3a656cd22f6a2a61e0b4d563c75c2f7fe68d3c54 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4167 Reviewed-by: Pete Zaitcev <zaitcev@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* object-storage: minor code cleanupsPeter Portante2012-11-161-5/+2
| | | | | | | | | | | | | | | | | | Apply a few minor code cleanups to help reduce future refactoring diffs. * Remove extra lines between methods so that all methods are consistently spaced by one line * Remove unused field meta_file * Add missing documentation for uid and gid parameters Change-Id: I0a38eb06680eb0709edfaa1828d09657823f778e Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4166 Reviewed-by: Pete Zaitcev <zaitcev@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* build: fix missing include (from missing backslash)Jeff Darcy2012-11-141-1/+1
| | | | | | | | | | | Caused by 1c4cb5237701bb138f9cce29036773086253f839. Change-Id: I9574b2316af6a5a0d59b5d80578016dfd5fc1ac9 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4191 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* NFS is picking up geo-rep's already open (read-only) file descriptorKaleb S. KEITHLEY2012-11-144-29/+80
| | | | | | | | | | | | | Add anonymous member to fd_t and use it instead of over-loading pid for geo-rep and self heal Change-Id: I4d6b29a044a8ed4b8f69ff6e3f35ee227739b2af Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> BUG: 874272 Reviewed-on: http://review.gluster.org/4185 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* ACLv3 - Access Control Lists V3Krishna Srinivas2012-11-1316-4/+1117
| | | | | | | | | | Change-Id: I43e544d6cdeac5e3880141477461e7c22cbf6e91 BUG: 847622 Signed-off-by: Krishna Srinivas <ksriniva@redhat.com> Reviewed-on: http://review.gluster.org/4045 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Add missing options to vme table.Kaushal M2012-11-131-0/+4
| | | | | | | | | Change-Id: Ifa48cb2c26dbbabe619e1bfbd41d9ecdce1150aa BUG: 814534 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4155 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* nfs: resolve parent inode during inode_loc_fillRajesh Amaravathi2012-11-122-0/+59
| | | | | | | | | | | | This commit resolves the parent inode in nfs_inode_loc_fill if the inode has a resolved path. Change-Id: If407c91c246b0b9f3349cedae0baec8bd6831d10 BUG: 872923 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4157 Reviewed-by: Krishna Srinivas <krishna.zresearch@gmail.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* socket: fix SSL breakage from re/connect handling changesJeff Darcy2012-11-122-7/+50
| | | | | | | | | Change-Id: Ia1f5aeec5628b61cad8a10a9cdc6d9f1c67ec653 BUG: 873367 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4158 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Fixed glusterd crash in volume add-brickKrutika Dhananjay2012-11-121-33/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEMS: a. glusterd crashes when add-brick operation fails on the machine other than the originator, owing to double free done on op_errstr: once in glusterd_op_begin_synctask and once through a dict unref on req_dict in gd_sync_task_begin. b. In gd_sync_task_begin, there's no need to place the error string in the dictionary, when it is never retrieved and used elsewhere. c. Command execution status is not logged into .cmd_log_history. FIX: For (a) and (b): Knocked off code that places the error string in req_dict. That way, both the problems are solved. For (b), passed op_ctx to glusterd_op_send_cli_response as it is needed to extract the command string before logging. Change-Id: I549a07ba5e31332b691a8cacd1ab32c2673810ba BUG: 862834 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4102 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* xlator/fuse: integrate fuse with event-historyRaghavendra Bhat2012-11-124-407/+595
| | | | | | | | | | | | | | | | | use event-history framework for saving and dumping (on necessity) important xlator specific information. Tests: Included the regression testcase. Change-Id: I6c0532e9ffe0b624286cdc4d2637b1bd2c0579e0 BUG: 858215 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Signed-off-by: root <root@thinkpad.(none)> Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/3925 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/quota: Failure of quota commands if the dir-name contains ':' in itVarun Shastry2012-11-093-14/+65
| | | | | | | | | | | | | | | | | | | | | PROBLEM: The first colon in the limit string is used to separate the path and the limit-value. The ':' in the path was the source of problem. FIX: Search for the last colon and separate based on the same. Added regression test. TEST: Create and set quota on directories with names containing ':' in start, middle and end. Change-Id: I363c8ad4cbfd02c23fc73974bef9aa8bc362d29c BUG: 848251 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/4137 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* object-storage: remove glusterfs filter requirementPeter Portante2012-11-0616-495/+429
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes https://bugzilla.redhat.com/show_bug.cgi?id=870589 Remove the Glusterfs object, transforming it into a module providing module data fields (like swift.common.constraints) and module methods for mounting/unmounting and access the gluster volume information. As a result, we can then remove the glusterfs filter from the pipeline since we no longer need to provide the Glusterfs object through all the plugin code paths. This is one more step closer to removing our dependency on modifying the Swift code directly with these changes. See It is also the first step to acknowledging that we are not a plugin, but a layering on top of Swift. The major piece of work here is based on a recognition that the plugins/Glusterfs.py module provided a Glusterfs class that instantiated instances of an object that always contained the same data from the configuration file. The fields of such an object were not being changed and were treated as read-only in all cases. Since the object's data was the same for all instantiations there was no need to pass the data from the glusterfs filter all the way down into the bowels of the Gluster_DiskFile and DiskDir objects. Taking advantage of the nature of that data, we now just have those fields read into module variables, and change the Glusterfs object methods into module level functions. Much of the changes result from the consequence of making that switch from object to module. Here are a few other changes made along the way: * Bump the release numbers in the spec files in recognition of these changes * Create the plugins/fs_utils.py module so that the methods in the plugins/Glusterfs.py module don't have to include plugins/utils.py, which would create a circular dependency * Note that this dependency comes from methods in plugins/utils.py depending on the module level constructs in plugins/Glusterfs.py so that we only store those values in one place * Changed plugins/DiskDir.py:DiskDir class to not check for, and/or optionally create, the /etc/swift/db_file.db at run time, just create it a module init time * Removed the duplicate strip_obj_storage_path() from plugins/DiskDir.py and utils.py and move it to the Glusterfs module * Used os.path.join in plugins/DiskDir.py where possible * Renamed the .conf files to .conf-gluster so that we don't clobber existing config files * This is not a complete change, as the spec file also needs to be modified to avoid the clobbering * See also https://bugzilla.redhat.com/show_bug.cgi?id=865867 * Removed the redundant DIR_TYPE definition in plugins/utils.py * Removed MOUNT_PATH from plugins/utils.py replacing references with that from Glusterfs * This actually fixes a bug if a user every used a different mount path from the default in fs.conf * Added ASYNCDIR definition to plugins/utils.py until such time as another refactoring can rely on the one from swift.obj.server * Renamed plugins/utils.py's plugin_enabled() function to Gluster_enabled() * The diffs we carry for Swift are now a bit smaller in that we no longer have to add the plugin() method, we don't have to keep a fs_object field in these objects, and we can reference the Glusterfs module directly * Unit tests were modified appropriately, but now need to be run in the context of a Swift tree; this is unfortunate, but further refactoring will address this Change-Id: Id5d2510d56364761c03b3979bc71187dbe2f82fe BUG: 870589 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4141 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* POSIX sh uses = and not ==Emmanuel Dreyfus2012-11-051-5/+5
| | | | | | | | | | BUG: 815227 Change-Id: I5a498f1b917fb658914133ee071783e7b8e0d025 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/4151 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* api/examples: updated examples to use new callsAnand Avati2012-11-051-0/+87
| | | | | | | | | | Change-Id: I865d0c52de268b27bbdb8786d3f4af5ef3ce3d9a BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4023 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* object-storage: use constants for directory namesPeter Portante2012-11-031-2/+4
| | | | | | | | | Change-Id: I6109ee55061eae53c4c6762ca31fb5c4b13f0071 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4140 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* object-storeage: refactor to use one memcache keyPeter Portante2012-11-034-65/+394
| | | | | | | | | | | | | | | Address BZ 868087: https://bugzilla.redhat.com/show_bug.cgi?id=868087 Store all of the data needed to generate the correct set of container and account details in one object, respectively, rather than using three seperate memcache keys. Change-Id: I46bf60c405b37cdb22727965bfd67bc5c410e77c BUG: 868087 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4139 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: 'volume set' changes for op-version supportKaushal M2012-10-315-168/+348
| | | | | | | | | | | | An op-version check is performed for the given keys during stage. The commit phase moves the cluster op-version to the required version if needed. Change-Id: Id5c387094dbec723df736b2ecdc49ff93c179e0e BUG: 814534 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/3780 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli: Mark port as N/A in volume status when process is not onlineKrutika Dhananjay2012-10-303-14/+88
| | | | | | | | | Change-Id: Ie11c7331e3bc58c0f934f424dde4341cdffb9e2c BUG: 861542 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4048 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: op-version handshake implementationKaushal M2012-10-3010-155/+882
| | | | | | | | | | | | | Brings in a new rpc program MGMT_HANDSHAKE, which implements the op-version handshake. This is required for bringing in the op-version feature as described in http://www.gluster.org/community/documentation/index.php/Features/Opversion Change-Id: I4333fd2714dbbd3a2a3fca5862cbb3c56615529e BUG: 814534 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/3688 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>