474 Commits

Author SHA1 Message Date
Kaushal M
91cd0eae2c cli,glusterd: Task parameters in xml output
This patch introduces task parameters for the asynchronus task shown in
volume status. The parameters are only given for xml output. The
parameters shown currently are,
- source and destination bricks for replace-brick tasks
  ......
        <tasks>
          <task>
            <type>Replace brick</type>
            <id>3d1a1005-9d2e-4ae0-bd62-577bc1d333a3</id>
            <status>1</status>
            <params>
              <srcBrick>archm:/export/test4</srcBrick>
              <dstBrick>archm:/export/test-replace1</dstBrick>
            </params>
          </task>
        </tasks>
  ......
- list of bricks being removed for remove-brick tasks
  ......
        <tasks>
          <task>
            <type>Remove brick</type>
            <id>901c20ca-0da2-41de-8669-5f0caca6b846</id>
            <status>1</status>
            <params>
              <brick>archm:/export/test2</brick>
              <brick>archm:/export/test3</brick>
            </params>
          </task>
        </tasks>
  ......

The changes for non-xml output will be done in a subsequent patch.

Change-Id: I322afe2f83ed8adeddb99f7962c25911204dc204
BUG: 916577
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/5771
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2013-09-13 03:38:04 -07:00
Aravinda VK
cd7951aa31 cli: Add statusStr xml tag to task list and rebalance/remove brick status
New xml tag statusStr added to following gluster cli commands
gluster volume status all --xml (For Task status)
gluster volume rebalance <VOLNAME> status --xml
gluster volume remove-brick <VOLNAME> <BRICK1..> status --xml

Example(volume status all):
<task>
    <type>Rebalance</type>
    <id>82d8d122-8738-4144-8507-d93fc98b61df</id>
    <status>3</status>
    <statusStr>completed</statusStr>
</task>

Example(volume rebalance <VOL> status)
<node>
    <nodeName>localhost</nodeName>
    <files>0</files>
    <size>0</size>
    <lookups>0</lookups>
    <failures>0</failures>
    <status>3</status>
    <statusStr>completed</statusStr>
</node>

Also modified task status as string instead of showing number
in gluster volume status all

Example:
Status of volume: gv1
Gluster process                                         Port    Online  Pid
------------------------------------------------------------------------------
Brick sumne.sumne:/gfs/b1                               49154   Y       15489
Brick sumne.sumne:/gfs/b2                               49155   Y       15493
NFS Server on localhost                                 N/A     N       15913

           Task                                      ID         Status
           ----                                      --         ------
      Rebalance    82d8d122-8738-4144-8507-d93fc98b61df      completed

BUG: 1003521
Change-Id: Ib283016af4c18132fb13fb33d44075782d77823c
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/5739
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-09-12 10:57:22 -07:00
Kaushal M
7d9bc0d214 cli: Fix 'status all' xml output when volumes are not started
CLI now only outputs one XML document for 'status all' only containing
those volumes which are started.

BUG: 1004218
Change-Id: Id4130fe59b3b74475d8bd1cc8134ac59a28f1b7e
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/5773
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-09-11 09:28:45 -07:00
Venky Shankar
fe98c2902f glusterd/cli: Geo-Replication "status detail" cmd
Provides detailed status info in the following format

                    MASTER <master-vol>  SLAVE <slave-vol>

NODE   HEALTH   UPTIME  FILES SYNCD  FILES PENDING  BYTES PENDING  DELETES PENDING
-----------------------------------------------------------------------------------

This patch introdues "status detail" command to show crawl related
information in CLI. These values are "pulled" from gsyncd when
"status detail" is executed.

Change-Id: I1fdaf7180eacce054a864d34971dc160bd7301e1
BUG: 990420
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/5590
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Tested-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-09-04 19:50:49 -07:00
Venky Shankar
c7cc5252a3 glusterd: Saving geo-rep session details in a more specific path
Now saving the session details in
/var/lib/glusterd/geo-replication/<mastervol>_<slaveip>_<slavevol>
repo to distinguish between two master-slave sessions where the
slavename is same across two different clusters.

Change-Id: I57c93f55cc9bd4fe2bffe579028aaf5e4335b223
BUG: 991501
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/5488
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-09-04 19:27:19 -07:00
Timothy Asir
c12fccc473 cli: Add server uuid into volume brick info xml
Add server uuid as an attribute to the existing brick details in the
volume info cli xml output.
Currently, when a node has more than one ip, the oVirt-engine fails
to map the corresponding server using the ip alone.
If we get the host uuid along with brick details in volume info
command it will be easy for ovirt-engine to find out the
server and thereby we can avoid confusion in finding the server.

Change-Id: I3c9c9acea80e10e0b2977477759d9af045e48959
BUG: 955588
Signed-off-by: Timothy Asir <tjeyasin@redhat.com>
Reviewed-on: http://review.gluster.org/4875
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-08-18 05:24:10 -07:00
Bala.FA
4e63eafaed log: set ident to openlog
at syslog side, log message is identified by its properties like
programname, pid, etc.  brick/mount processes need to be identified
uniquely as they are different process of gluterfsd/glusterfs.  At
rsyslog side, log separated by programname/app-name with pid works but
bit hard to identify them in long run which process is for what
brick/mount.

This patch fixes by setting identity string at openlog() which sets
programname/app-name as similar to old style log file prefixed by
gluster, glusterd, glusterfs or glusterfsd

Change-Id: Ia05068943fa67ae1663aaded1444cf84ea648db8
BUG: 928648
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/5541
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-08-13 07:07:43 -07:00
Kaushal M
572f5f0a85 cli,glusterd: Fix when tasks are shown in 'volume status'
Asynchronous tasks are shown in 'volume status' only for a normal volume
status request for either all volumes or a single volume.

Change-Id: I9d47101511776a179d213598782ca0bbdf32b8c2
BUG: 888752
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/5308
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-08-03 05:51:16 -07:00
shishir gowda
e306698b00 cluster/dht: Treat migration failures due to space constraints as skipped
Currently rebalance/remove-brick op's display migration failed count even
for files which failed due to space issues (not enough space for file, or
migration leading to cluster imbalance)

These will now be counted as skipped, and rebalance/remove-brick status
will display the additional counter

Change-Id: I674904d380b5f8300e9ca9e6af557c3d30d6cff4
BUG: 989846
Signed-off-by: shishir gowda <sgowda@redhat.com>
Reviewed-on: http://review.gluster.org/5399
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-07-30 23:55:59 -07:00
Avra Sengupta
355ff31dff glusterd: Fixing create force issues while it returned true everytime.
Now geo-rep create force will return true if a node is down, and log an
appropriate message. It will also return true with an appropriate log
message if the slave verification fails.

However it will not return true if the config file is deleted, ot corrupted,
so as not to get the state_file's path. It will also fail if the slave url
is invalid. If the push-pem option is given and
/var/lib/glusterd/geo-replication/common_secret.pem.pub is not present, then
also the create force command will fail.

Change-Id: Ie7532a0884ddf9c3008bd30832d171d5b53b540e
BUG: 988314
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/5405
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-07-29 04:42:40 -07:00
Avra Sengupta
c6b8143b9f cli : Display error messages if virt file has been deleted or is invalid.
"gluster volume set <VOLNAME> group virt" will display error message
if virt file is deleted or is invalid.

Change-Id: Icb202b6a445597fcd9a3dcef8001891f2601a115
BUG: 916127
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4586
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-07-27 21:27:15 -07:00
Vijay Bellur
d16cdf141d cli, glusterd: Cleanup logging of bd op commands.
This patch prevents messages of the form "bd op: %s : SUCCESS"
from being logged in .cmd_log_history.

Change-Id: Iebeb7e26d409bf99b9c8df0a5c1c5a5d30d78a61
BUG: 823081
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/4871
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-by: M. Mohan Kumar <mohan@in.ibm.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-07-27 03:48:05 -07:00
Avra Sengupta
5757ed2727 glusterd/cli changes for distributed geo-rep
Commands:
gluster system:: execute gsec_create
gluster volume geo-rep <master> <slave-url> create [push-pem] [force]
gluster volume geo-rep <master> <slave-url> start [force]
gluster volume geo-rep <master> <slave-url> stop [force]
gluster volume geo-rep <master> <slave-url> delete
gluster volume geo-rep <master> <slave-url> config
gluster volume geo-rep <master> <slave-url> status

The geo-replication is distributed. The session will be created, and
gsyncd will be spawned on all relevant nodes, instead of only one
node.

geo-rep: Collecting status detail related data

Added persistent store for saving information about
TotalFilesSynced, TotalSyncTime, TotalBytesSynced

Changes in the status information in socket:
Existing(Ex):
FilesSynced=2;BytesSynced=2507;Uptime=00:26:01;

New(Ex):
FilesSynced=2;BytesSynced=2507;Uptime=00:26:01;SyncTime=0.69978;
TotalSyncTime=2.890044;TotalFilesSynced=6;TotalBytesSynced=143640;

Persistent details stored in
/var/lib/glusterd/geo-replication/${mastervol}/${eSlave}-detail.status

Change-Id: I1db7fc13ffca2e415c05200b0109b1254067f111
BUG: 847839
Original Author: Avra Sengupta <asengupt@redhat.com>
Original Author: Venky Shankar <vshankar@redhat.com>
Original Author: Aravinda VK <avishwan@redhat.com>
Original Author: Amar Tumballi <amarts@redhat.com>
Original Author: Csaba Henk <csaba@redhat.com>
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/5132
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2013-07-26 13:19:18 -07:00
susant
e45e0037f6 cli :remove-brick process output leads to ambiguity
The output of remove-brick  status as "Not started" leads to
ambiguity.We should not show the status of the Server nodes
which do not participate in the remove-brick process.

Change-Id: I85fea40deb15f3e2dd5487d881f48c9aff7221de
BUG: 986896
Signed-off-by: susant <spalai@redhat.com>
Reviewed-on: http://review.gluster.org/5383
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-07-24 11:05:04 -07:00
Venkatesh Somyajulu
59dde88921 cli: gluster volume heal commands are more elaborative
1. "gluster volume heal volume-name"
output :Launching heal operation to perform index self heal on volume volume-name has been successful

2. "gluster volume heal volume-name full"
Output :Launching heal operation to perform full self heal on volume volume-name has been successful

3. "gluster volume heal volume-name info"
Output :Gathering list of entries to be healed on volume volume-name has been successful 

4. "gluster volume heal volume-name info healed"
Output :Gathering list of healed entries on volume volume-name has been successful 

5. "gluster volume heal volume-name info split-brain"
Output :Gathering list of split brain entries on volume volume-name has been successful 

6. "gluster volume heal volume-name info heal-failed"    
Output :Gathering list of heal failed entries on volume volume-name has been successful 

Change-Id: I74c90e8129d23d513ddb7879358a9d21c94a5c0d
BUG: 978936
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/5286
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-07-24 05:18:05 -07:00
Venkatesh Somyajulu
50cfc2d8e8 cli: Increased timeout for gluster volume heal commnads
Problem:
If number of files are very large, then gluster volume heal
volumename info commnads take large time. So timeout of 2
minutes seems to be insufficient.

Fix:
Increased timeout to 10 minutes

Change-Id: I5f847163e01c4afbb587b726833ad80183f1a928
BUG: 986945
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/5372
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-07-23 02:52:42 -07:00
Ravishankar N
07833f13d4 cli: check for null in is_server_debug_xlator()
Command: gluster volume set <volname> diagnostics.client-log-level trace
Expected output:
"volume set: failed: option log-level trace: 'trace' is not valid
(possible options are DEBUG, WARNING, ERROR, INFO, CRITICAL, NONE,
TRACE.)"
Current output: gluster cli receives a segmentation fault
Fix: check for NULL before calling strstr

Change-Id: If4c7a85a635849a388cf122543e12349c109643c
BUG: 982174
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/5298
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-07-12 04:14:12 -07:00
Venkatesh Somyajulu
b3cc221844 cli: Fix remove brick cli out for wrong volume name
Problem:  gluster volume remove-brick command, was not printing the error in
          case of volume-name specified is wrong.

Fix:      Fix will print error message to indicate that provided volume name is
          invalid. Although patch for bug 961669
          http://review.gluster.org/#/c/4975/ does print cli-output now, but
          still xml is unable to use the response values

Change-Id: I2ee1df86c1e756fb8e93b4d6bbdd102b4f368f87
BUG: 961307
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/4972
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-07-04 05:25:31 -07:00
Venkatesh Somyajulu
291344f9c8 cli: Fix in letter case in volume heal output
Change-Id: I25d13444c2cbff9b26642e91677ad1e09e77aa1e
BUG: 978936
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/5259
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-07-03 22:29:52 -07:00
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