On Monday 29 June 2009 10:53:37 Tim Evers wrote:
> Hi,
>
> I did not find another way to report bugs (if I missed it please give me
> a hint) so I report two minor "bugs" here:
>
> 1. A typo: drbdsetup gives a warning if outdated-wfc-timeout is not set,
> but it calls it outdate-wfc-timeout which is misleading.
>
> (degr_wfc_timeout < outdated_wfc_timeout || outdated_wfc_timeout == 0)) {
>                         outdated_wfc_timeout = wfc_timeout;
>                         fprintf(stderr, "outdate-wfc-timeout has to be
> shorter than degr-wfc-timeout\n"
>
> 2. The init Skript calls drbdadm sh-mod-parms to get info on how many
> devices may be used. If no ressources are defined during startup drbdadm
> throws an error an does not return the configured value. So setting up
> the correct module parameters fails silently.
>

Hi Tim,

Posting such issues here is fine.
Thanks for pointing these two out!

best,
  Philipp
-- 
: Dipl-Ing Philipp Reisner
: LINBIT | Your Way to High Availability
: Tel: +43-1-8178292-50, Fax: +43-1-8178292-82
: http://www.linbit.com

DRBD(R) and LINBIT(R) are registered trademarks of LINBIT, Austria.

commit 2033fbf646fe835590fa6486270af63c3502733e
Author: Philipp Reisner <[email protected]>
Date:   Mon Jun 29 11:46:22 2009 +0200

    Typofix in drbdsetup. Do not exit() in drbdadm, if no resources and cmd does not need resources.

diff --git a/user/drbdadm_main.c b/user/drbdadm_main.c
index 762ae81..fb06297 100644
--- a/user/drbdadm_main.c
+++ b/user/drbdadm_main.c
@@ -3142,16 +3142,16 @@ int main(int argc, char **argv)
 	if (is_dump || dry_run || config_from_stdin)
 		do_register_minor = 0;
 
-	if (config == NULL) {
-		fprintf(stderr, "no resources defined!\n");
-		exit(0);	/* THINK exit here? what code? */
-	}
-
 	count_resources_or_die();
 
 	uc_node(global_options.usage_count);
 
 	if (cmd->res_name_required) {
+		if (config == NULL) {
+			fprintf(stderr, "no resources defined!\n");
+			exit(E_usage);
+		}
+
 		global_validate_maybe_expand_die_if_invalid(!is_dump);
 
 		if (optind == argc || !strcmp(argv[optind], "all")) {
diff --git a/user/drbdsetup.c b/user/drbdsetup.c
index fd73e08..b4a8777 100644
--- a/user/drbdsetup.c
+++ b/user/drbdsetup.c
@@ -1947,8 +1947,8 @@ static int events_cmd(struct drbd_cmd *cm, int minor, int argc ,char **argv)
 		if (0 < degr_wfc_timeout &&
 		    (degr_wfc_timeout < outdated_wfc_timeout || outdated_wfc_timeout == 0)) {
 			outdated_wfc_timeout = wfc_timeout;
-			fprintf(stderr, "outdate-wfc-timeout has to be shorter than degr-wfc-timeout\n"
-					"outdate-wfc-timeout implicitly set to degr-wfc-timeout (%ds)\n",
+			fprintf(stderr, "outdated-wfc-timeout has to be shorter than degr-wfc-timeout\n"
+					"outdated-wfc-timeout implicitly set to degr-wfc-timeout (%ds)\n",
 					degr_wfc_timeout);
 		}
 
_______________________________________________
drbd-user mailing list
[email protected]
http://lists.linbit.com/mailman/listinfo/drbd-user

Reply via email to