pvfs2-ping-update.patch:
-------------------------
This patch is a subset of what Bart originally posted in this thread:
http://www.beowulf-underground.org/pipermail/pvfs2-developers/2006-April/001925.html
There are no whitespace changes, and this should apply to what is in CVS
now. Some of the functional changes from the previous patch were
already integrated, but this adds the remaining ones. It fills in a few
more output details and continues in other cases where a particular
server may have problems but it would still be helpful to see results
from the others.
-Phil
Index: pvfs2_src/src/apps/admin/pvfs2-ping.c
===================================================================
--- pvfs2_src/src/apps/admin/pvfs2-ping.c (revision 1617)
+++ pvfs2_src/src/apps/admin/pvfs2-ping.c (revision 1618)
@@ -84,7 +84,7 @@
}
printf("\n(3) Initializing each file system found "
- "in tab file: %s...\n\n", tab->tabfile_name);
+ "in tab file: %s...\n", tab->tabfile_name);
for(i=0; i<tab->mntent_count; i++)
{
@@ -117,8 +117,12 @@
if(ret < 0)
{
fprintf(stderr, "Failure: could not find filesystem for %s "
- "in pvfstab\n", user_opts->fs_path_real);
- return(-1);
+ "in pvfs2tab %s\n", user_opts->fs_path_real, tab->tabfile_name);
+ for (i = 0; i < tab->mntent_count; i++)
+ {
+ fprintf(stderr, "Entry %d: %s\n", i, tab->mntent_array[i].mnt_dir);
+ }
+ return(-1);
}
print_mntent(tab->mntent_array, tab->mntent_count);
@@ -140,10 +144,9 @@
ret = noop_all_servers(cur_fs);
if(ret < 0)
{
- PVFS_perror("noop_all_servers", ret);
- fprintf(stderr, "Failure: could not communicate with "
+ fprintf(stderr, "Failure: could not communicate with "
"one of the servers.\n");
- return(-1);
+ err = 1;
}
printf("\n(6) Verifying that fsid %ld is acceptable "
@@ -177,11 +180,14 @@
PVFS_perror("PVFS_mgmt_setparam_all", ret);
fprintf(stderr, "Failure: not all servers accepted fsid %ld\n",
(long)cur_fs);
- if(ret == -PVFS_EDETAIL) print_error_details(error_details);
- PVFS_error_details_free(error_details);
- return(-1);
+ if (ret == -PVFS_EDETAIL)
+ print_error_details(error_details);
+ err = 1;
}
- printf("\n Ok; all servers understand fs_id %ld\n", (long)cur_fs);
+ else
+ {
+ printf("\n Ok; all servers understand fs_id %ld\n", (long) cur_fs);
+ }
printf("\n(7) Verifying that root handle is owned by one server...\n");
@@ -212,8 +218,7 @@
print_root_check_error_details(error_details);
}
- PVFS_error_details_free(error_details);
- return(-1);
+ err = 1;
}
PVFS_error_details_free(error_details);
@@ -224,12 +229,18 @@
PVFS_sys_finalize();
- printf("=========================================="
- "===================\n");
- printf("\nThe PVFS filesystem at %s appears to be "
- "correctly configured.\n\n",
- user_opts->fs_path_real);
-
+ printf("=============================================================\n");
+ if (err)
+ {
+ printf("\nThe PVFS2 filesystem at %s appears to have "
+ "problems.\n\n", user_opts->fs_path_real);
+ }
+ else
+ {
+ printf("\nThe PVFS2 filesystem at %s appears to be "
+ "correctly configured.\n\n", user_opts->fs_path_real);
+ }
+
return(ret);
}
_______________________________________________
Pvfs2-developers mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers