227 Commits

Author SHA1 Message Date
shishir gowda
4c1c8feee4 TOP: exit status should be non-zero for success
The fault was incorrect loop. An extra iteration was being performed,
and dict_get failed due to non-existant data leading to status being
set to non-zero

Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2882 (Make volume top command exit status as zero on success)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2882
2011-05-27 00:19:15 -07:00
Csaba Henk
9072b817b0 reimplement invocation of external programs with run API
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2562 (invoke external commands precisely with fork + exec)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2562
2011-05-26 08:55:22 -07:00
Csaba Henk
6ff690a54e Revert "temporary workaround for mtab update race thingy"
This reverts commit 59b9ab45a01d52e197ab6f76fd71e64910396d57.

[c5d781e0 made this temporary workaround unnecessary]

Conflicts:

	xlators/features/marker/utils/syncdaemon/resource.py

Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2690 (race between mtab updates of mount and umount)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2690
2011-05-26 08:55:10 -07:00
Venky Shankar
2cd8411a02 cli log level command and per translator log level
Signed-off-by: Venky Shankar <venky@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2714 (implement cli log level command)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2714
2011-05-20 11:01:49 -07:00
Csaba Henk
86c818a98a cli: taking my revenge for forcing "geo-replication" into commandline
Accept unambigous initial fragments of keywords, eg.

  gluster vol geo stat

is recognized. Compared to readline integration:

- no external dependency
- works in shell too
- works for inner keywords of operations
  (as in above example, or "vol crea <vol> repl 3 ...")
- you save pressing tabs :)

If not desired in customer builds, can be disabled by an #ifdef
(not integrated into build system as of now); however, I think
folks in house could like it.

Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2757 (refactory gsync/gsyncd/syncdaemon/whatever to geo-replication)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2757
2011-05-11 19:17:56 -07:00
Csaba Henk
97fdc05ab8 glusterd / cli / rpc: move geo-replication reply parameters into dict
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2785 (gsyncd logs on slave side go to /dev/null)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785
2011-05-09 13:26:48 -07:00
Csaba Henk
625f779dba cli: fix up parsing of geo-replication status
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2785 (gsyncd logs on slave side go to /dev/null)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785
2011-04-22 04:05:20 -07:00
Csaba Henk
de80950428 cli: adhere to timeouts properly
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2785 (gsyncd logs on slave side go to /dev/null)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785
2011-04-22 04:05:20 -07:00
Kaushik BV
5e59de561e mgmt/glusterd: fix up the buffer sizes to accomodate a correct estimate of sizes of the snprintf invocations, and errout if not feasible
Signed-off-by: Kaushik BV <kaushikbv@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2561 (gsyncd command's must be preconfigured)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2561
2011-04-22 04:05:20 -07:00
Kaushik BV
2017d5ed79 cli: check if gsyncd is present in the configured place, enable geo-replication if present
Signed-off-by: Kaushik BV <kaushikbv@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2744 (make geo-replication package friendly)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2744
2011-04-22 03:52:28 -07:00
Kaushik BV
49603aec03 cli: changes in struct cli_cmd to disable gluster command at run-time
Signed-off-by: Kaushik BV <kaushikbv@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2744 (make geo-replication package friendly)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2744
2011-04-22 03:52:24 -07:00
Amar Tumballi
92e982b9d2 gluster volume create: fix help message with transport option 'tcp, rdma'
used to create a volume which listens on both sockets and ibverbs

Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2742 (cli help for volume create is not upto date)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2742
2011-04-21 07:38:38 -07:00
Csaba Henk
14f9c126c1 glusterd / cli: make the needed changes to let a masterless geo-rep config request get thru
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2785 (gsyncd logs on slave side go to /dev/null)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785
2011-04-21 07:38:23 -07:00
Csaba Henk
14b9fab371 cli: change geo-replication syntax to support slave-only invocation
(for sake of slave side configurability).

Also pulled out sub-op, now we have

  volume geo-replication [<VOLNAME>] [<SLAVE-URL>] {start|stop|config|status} [options...]

-- more convenient to use when working on a given session (ie. we just change the
geo-rep subcommands), and aligns better with other volume commands, cf. eg.

  volume replace-brick <VOLNAME> <BRICK> <NEW-BRICK> {start|pause|abort|status|commit}

Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2785 (gsyncd logs on slave side go to /dev/null)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785
2011-04-21 00:39:55 -07:00
Csaba Henk
0dd8c38d17 geo-replication: revamp CONFIG command
Drop the config_type RPC req field, use just a "subop" key in the param dict.

Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2785 (gsyncd logs on slave side go to /dev/null)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785
2011-04-21 00:39:50 -07:00
Csaba Henk
0a38334bd3 cli: make it possible to set per-command timeouts for connection
Also make getwd command impatient, having it to time out in 1 sec

Signed-off-by: Csaba Henk <csaba@lowlife.hu>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2785 (gsyncd logs on slave side go to /dev/null)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785
2011-04-19 02:30:23 -07:00
Csaba Henk
184fba3788 cli: implement "system:: getwd" command
Signed-off-by: Csaba Henk <csaba@lowlife.hu>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2785 (gsyncd logs on slave side go to /dev/null)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785
2011-04-19 02:30:18 -07:00
Csaba Henk
cc6d5c6609 cli: preliminary cleanup for system:: commands
Signed-off-by: Csaba Henk <csaba@lowlife.hu>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2785 (gsyncd logs on slave side go to /dev/null)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785
2011-04-19 02:30:14 -07:00
Pranith Kumar K
4d644dda66 cli: Fix profile info alignment
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2794 (Alignment is not proper in profile volume info)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2794
2011-04-18 04:31:56 -07:00
Kaushik BV
2f9ce3f4fd mgmt/glusterd: change the cli output of geo-rep start/stop to resemble the output of volume start/stop
Signed-off-by: Kaushik BV <kaushikbv@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 1570 (geosync related changes)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1570
2011-04-18 04:31:52 -07:00
Kaushik BV
72b57e311f cli: UI cleanup for geo-replication command
* provide a unified output in case of failure of geo-replication session
   * provide a better formatting  of the output geo-replication status command
   * update the help option of geo-replication command
   * fix few typos

Signed-off-by: Kaushik BV <kaushikbv@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2536 (gsync service introspection)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2536
2011-04-17 21:41:12 -07:00
Kaushik BV
91b3d10880 cli: removal of dead code due to the code movement of geo-rep start from cli to glusterd.
Signed-off-by: Kaushik BV <kaushikbv@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2676 ([glusterfs-3.2.0qa7]: glusterfs server crashed)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2676
2011-04-17 21:41:08 -07:00
Kaushik BV
3a621ae053 mgmt/glusterd : change of syntax of geo-replication command
master is referred as a volume name rather than a URL scheme.

old syntax:

   > volume geo-replication start :vol-foo /bar/boo

new syntax:

   > volume geo-replication start vol-foo /bar/boo

Signed-off-by: Kaushik BV <kaushikbv@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2786 (Having to prepend geo-replication master vol with colon spoils the UI)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2786
2011-04-17 21:41:03 -07:00
Kaushik BV
4b813b3d14 mgmt/glusterd: unify the geo-replication status rpc messages.
the intelligence of determining the type of status command is now at glusterd,
rather then explicitly setting it while parsing at cli.

Signed-off-by: Kaushik BV <kaushikbv@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2536 (gsync service introspection)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2536
2011-04-17 21:40:59 -07:00
Amar Tumballi
c9d85b6268 cli: check for connectivity before doing mount
in quota limit list.

Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2732 (Quota: the local mount on server fails while using quota list command)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2732
2011-04-16 10:51:57 -07:00
Pranith Kumar K
a70c0034cc mgmt/glusterd: Fix percentage latency formula
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2783 (Fix percentage latency and precisions of profile info)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2783
2011-04-16 04:10:46 -07:00
shishir gowda
49b796949c TOP: validate bs/count pair for write/read-perf measurement
If either one the above args are supplied, the other arg should be
supplied too.

Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2771 (bs or count tag missing with volume top write-perf/read-perf command blocks glusterd)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2771
2011-04-15 23:33:14 -07:00
Krishnan Parthasarathi
cfe11cd627 top: Modified integer bounds check for count/bs
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2721 (Incorrect validation message in gluster top CLI)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2721
2011-04-15 04:28:46 -07:00
Csaba Henk
0dfe24fc9f use "geo-replication" all over as the official name of this feature
Use GEOREP macro if you want to refer to the feature in code.

Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2757 (refactory gsync/gsyncd/syncdaemon/whatever to geo-replication)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2757
2011-04-15 00:31:08 -07:00
Pranith Kumar K
4175e092e3 mgmt/glusterd: restart gsyncd on glusterd restart
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2761 (Restart gsyncd processes on glusterd restart)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2761
2011-04-14 11:41:26 -07:00
Amar Tumballi
9b0374043e cli: add log file for cli instead of '/dev/null'
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2737 (there is no log file for gluster cli)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2737
2011-04-14 04:07:49 -07:00
Kaushik BV
93cb168fb3 mgmt/glusterd: Implementation of volume gsync status [master [slave]]
Changes made in the path of gsync start/stop as well, where we
maintain a list of  active gsync sessions, hence gsync stop could be
executed at all nodes.
A new dict in glusterd_volinfo_t added to maintain an active list
of gsync slaves running on each master.

Signed-off-by: Kaushik BV <kaushikbv@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2536 (gsync service introspection)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2536
2011-04-14 01:00:55 -07:00
shishir gowda
1875dd6c05 glusterd: Respond to cli with empty iobref is serialize fails.
This usually happens if the size exceeds 128k. Earlier the cli used
to hang if the response exceeded 128k size.

Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2725 (volume top displays "error" for path max)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2725
2011-04-14 01:00:41 -07:00
Csaba Henk
6608d60aa6 cli: simplfy gsysnc configuration command
New syntax is

 volume gsync config <master> <slave> [[!]opt [val]]

In details:

- instead of "volume gsyncd configure M S config-get-all" :
             "volume gsyncd config M S"
- instead of "volume gsyncd configure M S config-get O" :
             "volume gsyncd config M S O"
- instead of "volume gsyncd configure M S config-del O" :
             "volume gsyncd config M S !O"
- instead of "volume gsyncd configure M S config-set O V" :
             "volume gsyncd config M S O V"

Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2738 ("volume gsync configure <master> <slave> config-<subop> ..." is overly verbose)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2738
2011-04-13 04:43:27 -07:00
Kaushik BV
ebd99e25bf cli: join value arguments of "gsync config-set" with spaces
When a given gsync tunable is supposed to hold a command (which
can take options), it's quite possible that it spaces in its value.
Try to approximate this situation by joining the leftover arguments.

Signed-off-by: Kaushik BV <kaushikbv@gluster.com>
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2713 ([glusterfs-3.2.0qa10]: config-set works only for one value)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2713
2011-04-13 04:43:22 -07:00
Pranith Kumar K
bc16a1e999 mgmt/glusterd: volume reset force implementation
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2729 (Implement force option for volume reset)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2729
2011-04-13 00:39:03 -07:00
Pranith Kumar K
10ad4b52e0 cli: Fix typo in top help string
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2719 (Incorrect help string for volume top)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2719
2011-04-12 21:50:26 -07:00
Csaba Henk
59b9ab45a0 temporary workaround for mtab update race thingy
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2690 (race between mtab updates of mount and umount)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2690
2011-04-12 21:49:52 -07:00
Venky Shankar
2a65986468 build fixes
Signed-off-by: Venky Shankar <venky@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2550 (build warnings)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2550
2011-04-11 23:50:28 -07:00
Junaid
f5625e628f cli: Validating the cli quota options.
Signed-off-by: Junaid <junaid@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2612 (quota limit-set not in line with help)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2612
2011-04-11 05:43:57 -07:00
Junaid
0a05984fd9 cli: Cleanup the maintainence mount points used by quota.
Signed-off-by: Junaid <junaid@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2704 (Stale mount-points seen after execting quota list command)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2704
2011-04-10 23:52:24 -07:00
Amar Tumballi
62e1096fb0 removed reference to GF_LOG_NORMAL
instead used GF_LOG_INFO, which is more standard log level.

Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@gluster.com>

BUG: 2669 (RuntimeError: cannot recognize log level "normal")
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2669
2011-04-07 11:40:25 -07:00
Raghavendra G
282109ed02 features/marker, cli: use appropriate conversion specifiers.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Vijay Bellur <vijay@gluster.com>

BUG: 2649 (Quota: size field is not getting updated properly)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2649
2011-04-06 10:51:55 -07:00
Csaba Henk
f338193a70 syncdaemon: refine intermal configuration of gsyncd
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2561 (gsyncd command's must be preconfigured)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2561
2011-04-04 08:02:30 -07:00
Csaba Henk
01b3dff29a syncdaemon: add monitor mode to support autorestart
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2537 (gsync autorestart)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2537
2011-04-04 08:02:27 -07:00
Csaba Henk
f007eb1a07 syncdaemon; adding corresponding pcloses to gsyncd invocation via popen
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2427 (set a proper default for remote syncdaemon)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2427
2011-04-01 11:19:17 -07:00
shishir gowda
cd4fd271c6 Replace strdup call to gf_strdup as GF_FREE is being called
Also, fix validation of bs and count to <= 0.

Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2645 (volume top write-perf results in memory corruption)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2645
2011-04-01 06:08:33 -07:00
shishir gowda
498dbbc506 TOP: Improve output format
Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2614 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2614
2011-03-31 05:04:45 -07:00
shishir gowda
c68b1e28ae TOP: Validate command options
Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2628 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2628
2011-03-31 05:04:42 -07:00
shishir gowda
58974b02b6 TOP: handle list-cnt behaviour uniformly.
Valid range is 0-100. if list-cnt is 0 or there are no files in the list,
handle it uniformly.

Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2622 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2622
2011-03-31 05:04:36 -07:00