LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File fix_ccs_tool_create.patch of Package cluster (Project home:sschapiro:openstack:upstream)

commit b4317363d5db48458a015ac4d4de63a5048a9509
Author: Christine Caulfield <ccaulfie@redhat.com>
Date:   Fri May 21 09:09:26 2010 +0100

    config: Fix ccs_tool create -n
    
    Make 'ccs_tool create -n <x>' create a skeleton with <x> nodes rather
    than <x-1>.
    
    Resolves: rhbz#594626
    
    Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>

diff --git a/config/tools/ccs_tool/editconf.c b/config/tools/ccs_tool/editconf.c
index 323c561..a0371b4 100644
--- a/config/tools/ccs_tool/editconf.c
+++ b/config/tools/ccs_tool/editconf.c
@@ -1031,7 +1031,7 @@ void create_skeleton(int argc, char **argv)
 	}
 
 	fprintf(outfile, "  <clusternodes>\n");
-	for (i=1; i< numnodes; i++) {
+	for (i=1; i <= numnodes; i++) {
 		fprintf(outfile, "    <clusternode name=\"NEEDNAME-%02d\" votes=\"1\" nodeid=\"%d\">\n", i, i);
 		fprintf(outfile, "      <fence>\n");
 		fprintf(outfile, "        <method name=\"single\">\n");