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

[dm-devel] Some issues noticed in my testing.

Hi Christophe,
I noticed a failure in multipath-tools-0.4.2 when executing the
following scenario.

i) Run multipathd & multipath with 1 of 2 paths in the system available.
ii)activate the other path.
iii) run multipath again.

Expect the newly inserted path to be incorporated into the original path
groups. Does not happen. Traced it to a problem in the pgcmp2 function.
Patch below should fix it. Also in step iii) above running multipath
with a parameter (conf->dev) will not include the additional path into
the particular mp because the select_alias function not called in the
coalesce_paths function so the strncmp(mpp->alias,conf->dev,....) in
main will always fail. Patch below should fix it. 

Also while testing with a modified scsi_debug driver (to expose multiple
paths to the same device) noticed that sysfs vendor name for the
scsi_debug device is "Linux   " which fails to match with a "Linux"
vendor name in the conf name and so device specific settings are not
picked up. Think it is a good idea to chomp off trailing whitespace from
vendor and product names. See patches below.  Regards,


"Views expressed are mine, and not those of Intel Corporation" 

diff -r /home/rcaushik/multipath-tools-0.4.2/libmultipath/hwtable.c
> int  strcmp_chomp(char *str1, char *str2);
< 		    strcmp(hwe->vendor, vendor) == 0 &&
> 		    strcmp_chomp(hwe->vendor, vendor) == 0 &&
< 			strcmp(hwe->product, product) == 0))
> 			strcmp_chomp(hwe->product, product) == 0))
> int  strcmp_chomp(char *str1, char *str2)
> {
> 	int i;
> 	char s1[PARAMS_SIZE],s2[PARAMS_SIZE];
>         if(!str1 || !str2)
> 		return 1;
> 	strncpy(s1,str1,PARAMS_SIZE);
> 	strncpy(s2,str2,PARAMS_SIZE);
> 	for(i=strlen(s1)-1;i >=0 && isspace(s1[i]); --i) ;
> 	s1[++i]='\0';
> 	for(i=strlen(s2)-1;i >=0 && isspace(s2[i]); --i) ;
> 	s2[++i]='\0';
> 	return(strcmp(s1,s2));
> }
diff -r /home/rcaushik/multipath-tools-0.4.2/multipath/main.c
> 		select_alias(mpp);
< 				break;
> 				/* break; */

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