455 Commits

Author SHA1 Message Date
Krutika Dhananjay
78a2e27ec7 glusterd: Log peer op status at the appropriate time
Change-Id: Ia8e1af082078f2f791708ba4faa4992bf291dd6e
BUG: 961339
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/5023
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-18 22:15:12 -07:00
Krishnan Parthasarathi
214dccb317 glusterd: Add a cmd for getting uuid of local node
Usage: gluster system:: uuid get

This is needed since we generate uuid of a node in a lazy manner. ie, we
generate a uuid for the node only on the first volume or peer operation,
when the node needs an external identity.  With this command, we can
force[1] the uuid generation, without a volume or peer operation performed.

[1]: Querying for uuid (or uuid get), forces uuid to come into
existence.

Change-Id: I62c8b6754117756aa4d773dd48af4ddeb1a1d878
BUG: 971661
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/5175
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2013-06-10 12:20:05 -07:00
Venkatesh Somyajulu
68a97ece53 cli: Remove unused port info from peer status.
Problem: "gluster peer status" on some nodes gives port info and fails to give
on other. But it is a hard coded value.

Fix: Removing the port info from command

Change-Id: I919f0349f252e658bfc13e60bb8e171da32eaf25
BUG: 964026
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/5027
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-05 05:28:17 -07:00
Jeff Darcy
1afbd1e899 cli: set min-op-version and max-op-version for getspec
Change-Id: I2185df5d6b560d9367ae404c91812048e1655180
BUG: 969193
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/5119
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-05-30 23:46:38 -07:00
Ravishankar N
0d415f7f8c glusterd: remove-brick: prevent removal from a replicate volume.
Prevent the removal of brick(s) from a plain replicate volume and
display the error message at the CLI.

Change-Id: I8e182404564147329d8cd364b7c7931d19f14570
BUG: 961669
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/4975
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-05-13 01:33:17 -07:00
Santosh Kumar Pradhan
fef1270fc2 gluster/CLI: crash upon executing "peer status" command
Problem:
While doing "gluster peer status", cli_cmd_peer_status_cbk() creates
the frame and passes as arg to gf_cli_list_friends() which sets
frame->local to GF_CLI_LIST_PEERS flag (value: 0x1). It expects
gf_cli_list_friends_cbk() [invoked through cli_cmd_submit()] to
reset frame->local to NULL. But if cli_cmd_submit() fails some
where before gf_cli_list_friends_cbk() gets invoked, then the
flag value remains in frame->local and causes a SEGV while
destroying the stack i.e. [CLI_STACK_DESTROY => cli_local_wipe()].

Fix:
In gf_cli_list_friends(), if cli_cmd_submit() fails, then
reset the value of frame->local to NULL.

Change-Id: Ied19f07eaf67e3bd42c75cdc2ff3729b0789e632
BUG: 961691
Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>
Reviewed-on: http://review.gluster.org/4976
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-05-10 05:38:53 -07:00
Ravishankar N
fc8aa43d46 cli: Avoid storing empty lines in command history
When the console manager is run in the interactive mode, it also saves
empty lines (i.e. the Enter key is pressed without running a command) in
it's command history. Avoid this by processing the line only if
readline() returns a non-empty string. Makes it easier to navigate the
history using arrow keys.

	modified:   cli/src/cli-rl.c

Change-Id: I0fcce394474589bb345b7c9ef39d25849dc0c2af
BUG: 957139
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/4894
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-04-28 22:26:52 -07:00
Niels de Vos
e6b6d1235d cli: add a command 'gluster pool list [--xml]'
* unlike 'gluster peer status', which lists only info about peers,
  this command lists localhost also in the list, so the sorted
  output from all the nodes should match.

* made the output script friendly by keeping it one output per line.

Change-Id: I853656753b35c617debbcceecbb71c8d6dd3c334
BUG: 764638
Original-review: http://review.gluster.org/4221
Original-author: Amar Tumballi <amarts@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/4862
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-04-26 04:28:06 -07:00
Krutika Dhananjay
c9800f0986 glusterd: changes in 'volume create' behaviour
This patch incorporates all the changes suggested on the behaviour of
'volume create' command in http://review.gluster.org/#change,4214
(comment #14, to be precise).

Change-Id: Iaac524a59738b177415595b18aa8a136090d3d25
BUG: 948729
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/4740
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-04-09 17:39:30 -07:00
Vijay Bellur
108475decf cli: Address a double free with volume info.
Crash is observed when volume info is performed on a
non-exisiting volume name and the output format is xml.

Change-Id: I88aa5d9dc954b1352f5cc3b5b38742c832bc1bb8
BUG: 949298
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/4785
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-04-08 14:22:28 -07:00
Bala.FA
144e24c8f9 cli: add more meaningful error messages
Change-Id: I6e88e6763fa537f4705427b4673d86e6443c2c98
BUG: 928648
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/4747
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-04-02 21:24:27 -07:00
M S Vishwanath Bhat
25053c9bda cli: Made volume top help string clear
nfs option is not applicable for read-perf and
write-perf
nfs option and brick option can not be used in
same command

Change-Id: I920ba0de011df0cc5e0adca6597aaea9372fe592
BUG: 924335
Signed-off-by: M S Vishwanath Bhat <vbhat@redhat.com>
Reviewed-on: http://review.gluster.org/4706
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-04-01 05:32:52 -07:00
Kaleb S. KEITHLEY
544945a128 config: better (i.e. more portable) test for libxml2
Over the weekend I tried to build on MacOS X¹ and ran into the following
issues:
1) The recent change to autogen.sh to test for pkg-config falls down.
2) After removing the pkg-config test in autogen.sh, w/o pkg-config the
   PKG_CHECK_MODULES macro invocation in configure[.ac] falls down. N.B.
   Solaris users run into this too, even through there's a (broken)
   pkg-config package that can be installed.
3) There are other problems in the code related to fuse that are beyond the
   scope of this.

It seems that pkg-config is only a requirement for the definition of the
PKG_CHECK_MODULES macro used to detect libxml2. Since this seems to be
inherently unportable — at least to MacOS X and Solaris — I'd like to:
A) Change the use of the PKG_CHECK_MODULES macro to the more portable
   AM_PATH_XML2 macro provided by the libxml2 package in
   /usr/.../share/aclocal/libxml.m4
2) Revisit the decision to add the check for pkg-config in autogen.sh in
   BZ 921817.

For now this is just an rfc. If people are agreeable I'll reenter this
change against BZ 921817.

¹Mountain Lion 10.8.3, XCode 4.6.1

Change-Id: I237b1ed8919088345b8fd943423b2a6ad289981b
BUG: 921817
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/4720
Reviewed-by: Justin Clift <jclift@redhat.com>
Tested-by: Justin Clift <jclift@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-03-25 14:50:25 -07:00
Kaushal M
78bf67f6d1 cli: Better message on rebalance/remove-brick stop
A better message is displayed when rebalance or remove-brick is stopped,
as migration may be still in progress.

Change-Id: I5f301cc66f349a1a85245f7d7508bf746756bdea
BUG: 923529
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4695
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-03-20 19:54:34 -07:00
Mohammed Junaid
598ca6bbaa object-storage: Restoring multi volume support in UFO.
* Currently, the users of UFO are restricted to use just one volume
  at any given point of time. This patch removes this limitation.

* The usage of gluster-swift-gen-builders has also changed. With this
  commit the users should mention the list of volumes that they want
  to expose through UFO. So, only the volumes mentioned during the
  ring file generation can be accessed.

  Usage: gluster-swift-gen-builders <vol-name1> [<vol-name2>]...

This is an intermediate fix until we remove the account, container and
object server processes. Once we have this frame work running, it will
completely eliminate the ring files.

Change-Id: I9ad3808519fec9c7c60ad846c4f8b653117a8337
BUG: 909053
Signed-off-by: Mohammed Junaid <junaid@redhat.com>
Reviewed-on: http://review.gluster.org/4485
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Peter Portante <pportant@redhat.com>
2013-03-07 00:55:34 -08:00
M. Mohan Kumar
8271ed2cda cli: Display option 'device vg' only when bd backend enabled
Change-Id: If61c237948f51d48305f4897b3f226eead10bae8
BUG: 912997
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-on: http://review.gluster.org/4555
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-02-20 11:01:07 -08:00
Avra Sengupta
bcb423555a glusterd: Added validation function for performance cache max and min size.
Change-Id: I0b8dbc4b65412b8aff24873f030c03e3dcfcb988
BUG: 782095
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4541
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-19 18:58:30 -08:00
Vijay Bellur
fc501a57bc Better mechanism to handle memory accounting
Memory accounting will now be enabled if:

1) Any glusterfs process is spawned with argument --mem-accounting.
2) DEBUG is defined.

Change-Id: I3345e114127a57ce61916be0e2c4e0049a4c3432
BUG: 834465
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/4523
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-17 16:55:37 -08:00
Venkatesh Somyajulu
1c430d2747 glusterd: "volume heal info" doesn't report output properly
Problem: "volume heal info" doesn't reports files to be healed when gluster*
         processes on one of the storage node is not running

Change-Id: Iff7d41407014624e4da9b70d710039ac14b48291
BUG: 880898
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/4371
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-04 17:41:16 -08:00
Avra Sengupta
b8d5fd2b88 glusterfs : Moved option files, and statedumps from /tmp
Change-Id: Ibdede396c4d6859225937316b7a59a661bcaf9f5
BUG: 764890
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4422
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-29 15:27:29 -08:00
Raghavendra Bhat
fd8b19af17 debug/trace: save the recent fops received in the event-history
* Make use of event-history in debug/trace xlator to dump the recent fops,
when statedump is given. trace xlator saves the fop it received along
with the time in the event-history and upon statedump signal, dumps its
history. The size of the event-history can be given as a xlator option.

* Make changes in trace to take logging into log-file or logging to
history as an option. By default both are off.

Change-Id: I12baee5805c6efb55735cead4e2093fb94d7a6a0
BUG: 797171
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4088
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-17 21:15:13 -08:00
Kaushal M
cea939a5b1 cli: output xml in pretty format
Gluster cli now prints XML outputs in 'pretty' format. This solves the problem
of empty elements occuring as two tags instead of being collapsed into one.

Change-Id: Iab7aeadcff29c18ae388b58e446a16e937ac09ed
BUG: 849293
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4355
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-16 23:59:48 -08:00
Niels de Vos
b9249c8f9f Fix format security errors with hardening build flags
These problems were found while building with the hardening options used
by Debian. In order to prevent introducing new unsafe constructs, the
options -Wformat" and -Werror=format-security are addeded to the CFLAGS
by configure.ac if the compiler supports them.

Also, a small spelling fix in posix-aio.c is included.

Change-Id: I1034311644fa3c21bc5a7b842c41a3ca79108b3f
BUG: 887278
Original-author: Patrick Matthäi <pmatthaei@debian.org>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/4311
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-16 17:44:43 -08:00
Kaushal M
f1b2faab5e cli: Fix task-id xml compilation
Change-Id: I92ada7d5ba1eb46024f47c4f32c517db27ada576
BUG: 857330
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4342
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2013-01-08 23:33:10 -08:00
Amar Tumballi
000e65d7af core: remove all the 'inner' functions in codebase
* move 'dict_keys_join()' from api/glfs_fops.c to libglusterfs/dict.c
  - also added an argument which is treated as a filter function if
    required, currently useful for fuse.

* now 'make CFLAGS="-std=gnu99 -pedantic" 2>&1 | grep nested' gives
  no output.

Change-Id: I4e18496fbd93ae1d3942026ef4931889cba015e8
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 875913
Reviewed-on: http://review.gluster.org/4187
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-19 23:35:29 -08:00
Kaushal M
5eb8bac561 glusterd, cli: Task id's for async tasks
This patch introduces task-id's for async tasks like rebalance, remove-brick and
replace-brick. An id is generated for each task when it is started and displayed
to the user in cli output. The status of running tasks is also included in the
output of "volume status" along with its id, so that a user can easily track the
progress of an async task.

Also,
 * added tests for this feature into the regression test suite.
 * added a python script for creating files, 'create-files.py', courtesy
   Vijaykumar Koppad (vkoppad@redhat.com) into the test suite.

This patch reverts the revert commit 698deb33d731df6de84da8ae8ee4045e1543a168.

BUG: 857330
Change-Id: Id43d7cb629a38f47f733fbc18cb4c5f2f0327c7a
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4294
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-19 13:32:49 -08:00
Avra Sengupta
e8c75fd929 cli: Making the op-ret check for gluster peer probe --xml more robust.
Change-Id: I75ca74a9e962ea47abbb2970e37dd182429b734b
BUG: 879490
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4335
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-12-19 00:49:36 -08:00
Avra Sengupta
09e4d0861c cli: Fixing the xml output in failure cases for gluster peer detach
Change-Id: I87aadec1949fccadde396b95f31eeb6832e461b4
BUG: 879494
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4336
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-12-19 00:14:35 -08:00
Avra Sengupta
c9c0fe3f7d cli: Fixing the xml output in failure cases for gluster peer probe
Change-Id: I9ebec995cbf47d9ced7140e37787e74ff9c63769
BUG: 879490
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4301
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-12-18 19:15:15 -08:00
Krutika Dhananjay
5886396d96 cli: fail vol set when value = empty string/string with all whitespaces
PROBLEMS:

a. 'volume set' operation accepts empty strings and strings containing
   all whitespaces for value. The result - subsequent attempts to start
   glusterd fail.

b. 'volume set group' operation, when passed an empty string or string
   containing all spaces as value, fopens the wrong file.

FIX:

Made volume set parser in cli check for and invalidate value if its length
is 0 after all the whitespaces have been stripped off.

Change-Id: I6792ee1fe9452d8e25e1fd1eeb1b9981be3389f1
BUG: 859927
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/4246
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-10 14:18:34 -08:00
Krutika Dhananjay
d0b0e59952 cli: cmd history echoes the last command string word twice with --mode=script
PROBLEM:

When a gluster command is executed with --mode=script option
enabled, the last word in the command string is echoed twice
in command history.

  Example:
  [2012-12-03 05:29:16.083176]  : volume start dis dis : SUCCESS

FIX:

Terminate argv with NULL when the words are shifted after omitting
"--mode=script" from it.

Change-Id: I3a2623efe02e58c97c34554988938a9299425492
BUG: 823081
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/4255
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-07 17:11:12 -08:00
Krutika Dhananjay
66e34de1be cli: add print-logdir option
Change-Id: I92fe55d72aa597cbac57a51d2e15b35d2bcfef0e
BUG: 823081
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/4275
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-07 17:10:56 -08:00
Anand Avati
6d1607becc Revert "glusterd: add "volume label" command"
This reverts commit dad16a51ba7e6b1c57529423c57257dbce97ee93

Test script causing "silent" failures during execution.

Change-Id: I26dbb8ed22256071cb415cc3aff572ef8372600e
Reviewed-on: http://review.gluster.org/4268
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-04 16:27:48 -08:00
Anand Avati
698deb33d7 Revert "glusterd, cli: Task id's for async tasks"
This reverts commit ed15521d4e5af2b52b78fd33711e7562f5273bc6

Strangely, the test scripts are "silently" passing for failures too. Reverting patch for now.

Change-Id: I802ec1634c7863dc373cc7dc4a47bd4baa72764e
Reviewed-on: http://review.gluster.org/4267
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-04 15:59:52 -08:00
Kaushal M
7b5a21707e glusterd, cli: Task id's for async tasks
This patch introduces task-id's for async tasks like rebalance, remove-brick and
replace-brick. An id is generated for each task when it is started and displayed
to the user in cli output. The status of running tasks is also included in the
output of "volume status" along with its id, so that a user can easily track the
progress of an async task.

Also,
 * added tests for this feature into the regression test suite.
 * added a python script for creating files, 'create-files.py', courtesy
   Vijaykumar Koppad (vkoppad@redhat.com) into the test suite.

Change-Id: Ib0c0d12e0d6c8f72ace48d303d7ff3102157e876
BUG: 857330
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/3942
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-04 14:44:36 -08:00
Jeff Darcy
924702de35 glusterd: add "volume label" command
This command is necessary when the local disk/filesystem containing a brick
is unexpectedly lost and then recreated.  Since 961bc80c, trying to start
the brick will fail because the trusted.glusterfs.volume-id xattr is
missing, and if we can't start it then we can't replace-brick or self-heal
so we're stuck in a permanently degraded state.  This command provides a
way to label the empty brick with the proper volume ID so that further
repair actions become possible.

Change-Id: I1c1e5273a018b7a6b8d0852daf111ddc3fddfdc2
BUG: 860297
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4259
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-04 14:42:30 -08:00
JulesWang
4675796361 cli: fix incorrect xml output of brick tag.
Incorrect output:
<brick>
  <brick>
  </brick>
</brick>

Expected output:
<brick></brick>
<brick></brick>

Change-Id: I40c30feda4e6f3f1ec5da4122f8965b61c511ae6
BUG: 880993
Signed-off-by: JulesWang <w.jq0722@gmail.com>
Reviewed-on: http://review.gluster.org/4262
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: Kaushal M <kaushal@redhat.com>
2012-12-03 20:42:09 -08:00
Kaushal M
3cade0a1e9 cli: Fix build when libxml2 is absent
Also added a note to the top of cli-xml-output.c, explaining the style of coding
to followed when adding code to it.

Change-Id: I7f90a9c075adb49a9e071771d136b6f01ea68d11
BUG: 882780
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4256
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-12-03 01:01:12 -08:00
M. Mohan Kumar
983d290f7b BD Backend: CLI to create a full/linked clone of a image
A new CLI command added to support cloning/snapshotting of a LV device

Syntax is:
$ gluster bd clone <volname>:<vg>/<lv> <newlv>

$ gluster bd snapshot <volname>:<vg>/<lv> <snap_lv> <size>

BUG: 805138
Change-Id: Idc2ac14525a3998329c742bf85a06326cac8cd54
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-on: http://review.gluster.org/3719
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-29 09:40:14 -08:00
M. Mohan Kumar
3c72850e8d BD Backend: CLI commands to create/delete image
Cli commands  added to create/delete a LV device.

The following command creates lv in a given vg.
$ gluster bd create <volname>:<vgname>/<lvname> <size>

The following command deletes lv in a given vg.
$ gluster bd delete <volname>:<vgname>/<lvname>

BUG: 805138
Change-Id: Ie4e100eca14e2ee32cf2bb4dd064b17230d673bf
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-on: http://review.gluster.org/3718
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-29 09:39:53 -08:00
M. Mohan Kumar
ca796eba11 BD Backend: Volume creation support
A new parameter type is added to volume create command. To use BD xlator
one has to specify following argument in addition to normal volume
create

device vg brick:<VG-NAME>

for example,
$ gluster volume create lv_volume device vg host:/vg1

Changes from previous version

* New type 'backend' added to volinfo structure to differentiate between
  posix and bd xlator
* Most of the volume related commands are updated to handle BD xlator,
  like add-brick, heal-brick etc refuse to work when volume is BD xlator
  type
* Only one VG (ie brick) can be specified for BD xlator during volume
  creation
* volume info shows VG info if its of type BD xlator

BUG: 805138
Change-Id: I0ff90aca04840c71f364fabb0ab43ce33f9278ce
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Reviewed-on: http://review.gluster.org/3717
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2012-11-29 09:39:25 -08:00
Raghavendra Bhat
fbfcb0ad2a glusterd, cli: implement gluster system uuid reset command
A commonly faced problem among glusterfs users is: after a fresh
installation of glusterfs in a virtual machine, the VM image is
cloned to make multiple instances of the server. This breaks
glusterd because right after glusterfs installation on the first
boot glusterd would have created the node UUID and this gets
inherited into the clone. The result is wierd behavior at the time
of peer probe where glusterd does not (yet) deal with UUID
collisions in a user friendly way.

To handle it gluster peer reset command is implemented which upon
execution changes the uuid of local glusterd.

Change-Id: If207dd2ad93ab94ef1a3253f409c21c442975f87
BUG: 811493
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/3637
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-11-28 16:28:55 -08:00
Krishnan Parthasarathi
cee1b62d01 glusterd: volume-sync shouldn't validate volume-id
- volume sync would overwrite volume information on local node
  from the hostname supplied. This warning is provided to the user.

- Also fixed a double free in volume-sync handler.

Change-Id: Icc68d9d563fb50ca58d5880921f063692e1e6882
BUG: 865700
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/4188
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-11-27 23:28:00 -08:00
Avra Sengupta
9e2aeea924 cli: XML output for "gluster volume geo-replication status"
Change-Id: I1a64bd5eb9b1040a2a2d9b97bfe9cc756835596e
BUG: 864506
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4227
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-27 22:29:10 -08:00
Pranith Kumar K
7c23a94516 mgmt/glusterd: Implementation of server-side quorum
Feature-page:
http://www.gluster.org/community/documentation/index.php/Features/Server-quorum

Change-Id: I747b222519e71022462343d2c1bcd3626e1f9c86
BUG: 839595
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.org/3811
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-23 23:14:50 -08:00
Kaushal M
d5999c107a cli: XML output for "geo-replication <VOL> {start|stop}"
Change-Id: I8d2213cc00deb458fb765b848d0e3452574cc98f
BUG: 864499
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4217
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-23 02:08:16 -08:00
Venky Shankar
1f64e5e3dd gsyncd / geo-rep: include hostname in status cmd
Including hostname of the node where geo-rep start was
initiated from. This helps any consumers of the status
command to identify and possibly issue commands on those
node(s).

Change-Id: I005083878a3a4794da3b7f3f7d2cc9d28f004e3f
BUG: 858218
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/4218
Reviewed-by: Csaba Henk <csaba@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-11-21 16:49:04 -08:00
Varun Shastry
0d9a38bb57 features/quota: Failure of quota commands if the dir-name contains ':' in it
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>
2012-11-09 02:44:04 -08:00
Krutika Dhananjay
0608244512 cli: Mark port as N/A in volume status when process is not online
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>
2012-10-30 23:07:47 -07:00
Csaba Henk
68433db9ba cli: introduce "--" as option terminator
This way it becomes possible to pass option-like arguments to
cli commands.

Change-Id: I8eb1a44ce5d1bfe901d2b3e7cc7bfb84bb3012c9
BUG: 815194
Signed-off-by: Csaba Henk <csaba@redhat.com>
Reviewed-on: http://review.gluster.org/4007
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-10-11 18:11:36 -07:00