Re: first contribution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

here's my first (very minor) contribution:

Added/activated the debug-level "normal" and made it the default. Modified some connection specific log messages from "debug" to "normal" level. Added some connection specific "normal" log messages.

My next contribution will be support for syslog logging.

Corin

On 10.01.2009 22:28, Anand Avati wrote:
1. tla get the source
2. modify necessary files
3. tla diff -D -pw > summary.diff.txt

mail summary.diff.txt to the list (inline msg)

avati

2009/1/10 Corin Langosch <corinl@xxxxxx>:
  
hi avati,

could you please tell me how to make the patch?

i'm really sorry for all these questions... :o(

corin

On 10.01.2009 00:32, Anand Avati wrote:

Corin,
  Please paste the patch inline to gluster-devel list.

Avati

On Jan 9, 2009 1:51 PM, "Corin Langosch" <corinl@xxxxxx> wrote:

hi avati,

i just wanted to commit my first (minor) contribution, but when i run
'EDITOR="nano" ./commit.sh' it gives me some errors like //These files
would be source but lack inventory ids (`tla add' or a tagline
perhaps?):// and //These files violate naming conventions://. How to
prepare the source tree before committing?

My first contrib is to add/activate the debug-level "normal" and make it
the default. I also added a "connection established" message using this
debug-level to socket.c, as this is neither debug nor a warning but
still very usefull information.

Corin


    
  
* local directory is at gluster@xxxxxxxxxx/glusterfs--mainline--3.0--patch-842
* comparing to gluster@xxxxxxxxxx/glusterfs--mainline--3.0--patch-842
M  configure.ac
M  glusterfsd/src/glusterfsd.c
M  glusterfsd/src/glusterfsd.h
M  libglusterfs/src/logging.h
M  xlators/protocol/client/src/client-protocol.c
M  xlators/protocol/server/src/server-protocol.c
M  transport/socket/src/socket.c

* modified files

--- orig/configure.ac
+++ mod/configure.ac
@@ -14,7 +14,7 @@ dnl
 dnl You should have received a copy of the GNU General Public License
 dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-AC_INIT([glusterfs],[1.4.0tla842],[gluster-users@xxxxxxxxxxx])
+AC_INIT([glusterfs],[1.4.0tla843],[gluster-users@xxxxxxxxxxx])
 
 AM_INIT_AUTOMAKE
 
--- orig/glusterfsd/src/glusterfsd.c
+++ mod/glusterfsd/src/glusterfsd.c
@@ -90,8 +90,8 @@ static struct argp_option gf_options[] =
 	 "File to use as VOLFILE [default : "DEFAULT_CLIENT_VOLUME_FILE" or "
 	 DEFAULT_SERVER_VOLUME_FILE"]"},
  	{"log-level", ARGP_LOG_LEVEL_KEY, "LOGLEVEL", 0, 
- 	 "Logging severity.  Valid options are DEBUG, WARNING, ERROR, "
-	 "CRITICAL and NONE [default: WARNING]"},
+ 	 "Logging severity.  Valid options are DEBUG, NORMAL, WARNING, ERROR, "
+	 "CRITICAL and NONE [default: NORMAL]"},
  	{"log-file", ARGP_LOG_FILE_KEY, "LOGFILE", 0, 
  	 "File to use for logging [default: " 
 	 DEFAULT_LOG_FILE_DIRECTORY "/" PACKAGE_NAME ".log" "]"},
--- orig/glusterfsd/src/glusterfsd.h
+++ mod/glusterfsd/src/glusterfsd.h
@@ -28,7 +28,7 @@
 #define DEFAULT_CLIENT_VOLUME_FILE            CONFDIR "/glusterfs.vol"
 #define DEFAULT_SERVER_VOLUME_FILE            CONFDIR "/glusterfsd.vol"
 #define DEFAULT_LOG_FILE_DIRECTORY            DATADIR "/log/glusterfs"
-#define DEFAULT_LOG_LEVEL                     GF_LOG_WARNING
+#define DEFAULT_LOG_LEVEL                     GF_LOG_NORMAL
 
 #define DEFAULT_EVENT_POOL_SIZE            16384
 
--- orig/libglusterfs/src/logging.h
+++ mod/libglusterfs/src/logging.h
@@ -121,6 +121,7 @@ void 
 gf_log_set_loglevel (gf_loglevel_t level);
 
 #define GF_DEBUG(xl, format, args...) gf_log ((xl)->name, GF_LOG_DEBUG, format, ##args)
+#define GF_NORMAL(xl, format, args...) gf_log ((xl)->name, GF_LOG_NORMAL, format, ##args)
 #define GF_WARNING(xl, format, args...) gf_log ((xl)->name, GF_LOG_WARNING, format, ##args)
 #define GF_ERROR(xl, format, args...) gf_log ((xl)->name, GF_LOG_ERROR, format, ##args)
 
--- orig/transport/socket/src/socket.c
+++ mod/transport/socket/src/socket.c
@@ -729,6 +729,8 @@ socket_connect_finish (transport_t *this
 		goto unlock;
 	      }
 
+	    GF_NORMAL(this->xl, "connection established");
+
 	    priv->connected = 1;
 	    priv->connect_finish_log = 0;
 	    event = GF_EVENT_CHILD_UP;
--- orig/xlators/protocol/client/src/client-protocol.c
+++ mod/xlators/protocol/client/src/client-protocol.c
@@ -5690,7 +5690,7 @@ client_protocol_reconnect (void *trans_p
 		if (cprivate->connected == 0) {
 			tv.tv_sec = 10;
 
-			gf_log (trans->xl->name, GF_LOG_DEBUG, 
+			gf_log (trans->xl->name, GF_LOG_NORMAL, 
 				"attempting reconnect");
 			transport_connect (trans);
 
@@ -6263,6 +6263,8 @@ notify (xlator_t *this,
 		struct timeval tv = {0, 0};
 		xlator_list_t *parent = NULL;
 
+		gf_log (this->name, GF_LOG_NORMAL, "connection lost");
+
 		parent = this->parents;
 		while (parent) {
 			parent->xlator->notify (parent->xlator,
--- orig/xlators/protocol/server/src/server-protocol.c
+++ mod/xlators/protocol/server/src/server-protocol.c
@@ -6852,7 +6852,7 @@ mop_setvolume (call_frame_t *frame,
 	ret = gf_authenticate (params, config_params, 
 			       server_private->auth_modules);
 	if (ret == AUTH_ACCEPT) {
-		gf_log (trans->xl->name, GF_LOG_DEBUG,
+		gf_log (trans->xl->name, GF_LOG_NORMAL,
 			"accepted client from %s",
 			peerinfo->identifier);
 		op_ret = 0;
@@ -7762,6 +7762,11 @@ notify (xlator_t *this,
 		break;
 	case GF_EVENT_POLLERR:
 	{
+		peer_info_t *peerinfo = NULL;
+
+		peerinfo = &(trans->peerinfo);
+		gf_log (trans->xl->name, GF_LOG_NORMAL, "lost client from %s", peerinfo->identifier);
+
 		ret = -1;
 		transport_disconnect (trans);
 	}


[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux