Forráskód Böngészése

Change the last references from objctl to cmapctl

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Angus Salkeld 14 éve
szülő
commit
a516a1f9e4

+ 1 - 1
INSTALL

@@ -168,7 +168,7 @@ I start up wireshark to see if there are any snmp traps been sent
 as I am too lazy to setup a manager to receive traps.
 
 run a program that talks to corosync e.g.
-$ corosync-objctl
+$ corosync-cmapctl
 
 And you should get traps
 

+ 1 - 1
corosync.spec.in

@@ -177,7 +177,7 @@ fi
 %{_mandir}/man8/corosync_overview.8*
 %{_mandir}/man8/corosync.8*
 %{_mandir}/man8/corosync-blackbox.8*
-%{_mandir}/man8/corosync-objctl.8*
+%{_mandir}/man8/corosync-cmapctl.8*
 %{_mandir}/man8/corosync-keygen.8*
 %{_mandir}/man8/corosync-cfgtool.8*
 %{_mandir}/man8/corosync-cpgtool.8*

+ 9 - 11
cts/agents/mem_leak_test.sh

@@ -28,10 +28,9 @@ _object_test_()
   temp_file=/tmp/object.txt
   COUNT=1
 
-  corosync-objctl -c usr
-  corosync-objctl -w usr.angus=456
-  corosync-objctl -w usr.angus=4123
-  corosync-objctl -d usr
+  corosync-cmapctl -s usr.angus u32 456
+  corosync-cmapctl -s usr.angus u32 4123
+  corosync-cmapctl -d usr.angus
 
   BEFORE=$(get_mem $TYPE)
   # this loop is just to ignore the first iteration
@@ -41,12 +40,12 @@ _object_test_()
 
     find $f | sed "s|\.|_|g" | sed "s|/|.|g" | while read l
     do 
-      echo $l.count=$count >> $temp_file
+      echo $l.count u32 $count >> $temp_file
       let COUNT="$COUNT+1"
     done
 
-    corosync-objctl -p $temp_file
-    corosync-objctl -d usr
+    corosync-cmapctl -p $temp_file
+    corosync-cmapctl -D usr
   done
   AFTER=$(get_mem $TYPE)
   let DIFF="$AFTER - $BEFORE"
@@ -65,7 +64,7 @@ _session_test_()
   echo _session_test_
   COUNT=1
 
-  corosync-objctl -h >/dev/null
+  corosync-cmap -h >/dev/null
   corosync-cfgtool -h >/dev/null
   corosync-quorumtool -h >/dev/null
 
@@ -76,11 +75,10 @@ _session_test_()
 
   find /usr/bin | sed "s|\.|_|g" | sed "s|/|.|g" | while read l
   do 
-    corosync-objctl -c $l
-    corosync-objctl -w $l.value=$COUNT
+    corosync-cmapctl -s $l u32 $COUNT
     let COUNT="$COUNT+1"
   done
-  corosync-objctl -d usr
+  corosync-cmapctl -D usr
   AFTER=$(get_mem $TYPE)
   let DIFF="$AFTER - $BEFORE"
   echo $DIFF

+ 3 - 3
cts/agents/shm_leak_audit.sh

@@ -1,13 +1,13 @@
 #!/bin/bash
 
 
-/etc/init.d/corosync status >/dev/null
+service corosync status >/dev/null
 CS_STATUS=$?
 
 if [ $CS_STATUS -eq 0 ]
 then
 	# corosync running
-	active=$(corosync-objctl runtime.connections. | grep active | cut -d= -f2)
+	active=$(corosync-cmapctl runtime.connections. | grep active | cut -d= -f2)
 	if [ $active -lt 2 ]
 	then
 		FILES=$(ls /dev/shm/qb-*)
@@ -16,7 +16,7 @@ then
 			echo $f
 		done
 	else
-		pids=$(corosync-objctl runtime.connections. | grep client_pid | cut -d= -f2)
+		pids=$(corosync-cmapctl runtime.connections. | grep client_pid | cut -d= -f2)
 
 		FILES=$(ls /dev/shm/qb-*)
 		for f in $FILES

+ 5 - 5
cts/corotests.py

@@ -1252,7 +1252,7 @@ check that we do NOT get watchdog'ed
         no_w.setwatch()
         time.sleep(2)
 
-        self.CM.rsh(node, 'corosync-objctl -d resources.system.memory_used')
+        self.CM.rsh(node, 'corosync-cmapctl -d resources.system.memory_used')
 
         yes_matched = yes_w.look()
         no_matched = no_w.look()
@@ -1299,7 +1299,7 @@ check that we do NOT get watchdog'ed
             if poll_period < 500:
                 poll_period = 500
             self.CM.log("setting poll_period to: %d" % poll_period)
-            self.CM.rsh(node, 'corosync-objctl -w resources.system.memory_used.poll_period=%d' % poll_period)
+            self.CM.rsh(node, 'corosync-cmapctl -s resources.system.memory_used.poll_period str %d' % poll_period)
             sleep_time = poll_period * 2 / 1000
             if sleep_time < 1:
                 sleep_time = 1
@@ -1334,19 +1334,19 @@ confirm reboot action
 
         # get the uptime
         up_before = self.CM.rsh(node, 'cut -d. -f1 /proc/uptime', 1).rstrip()
-        cmd = 'corosync-objctl resources.system.memory_used. | grep current | cut -d= -f2'
+        cmd = 'corosync-cmapctl resources.system.memory_used. | grep current | cut -d= -f2'
         mem_current_str = self.CM.rsh(node, cmd, 1).rstrip()
         mem_new_max = int(mem_current_str) + 5
 
         self.CM.log("current mem usage: %s, new max:%d" % (mem_current_str, mem_new_max))
-        cmd = 'corosync-objctl -w resources.system.memory_used.max=' + str(mem_new_max)
+        cmd = 'corosync-cmapctl -s resources.system.memory_used.max str ' + str(mem_new_max)
         self.CM.rsh(node, cmd)
 
         self.CM.rsh(node, 'memhog -r10000 200m', synchronous=0)
 
         self.CM.log("wait for it to reboot")
         time.sleep(60 * 3)
-        cmd = 'corosync-objctl resources.system.memory_used. | grep current | cut -d= -f2'
+        cmd = 'corosync-cmapctl resources.system.memory_used. | grep current | cut -d= -f2'
         mem_current_str = self.CM.rsh(node, cmd, 1).rstrip()
         self.CM.log("current mem usage: %s" % (mem_current_str))
 

+ 1 - 1
man/Makefile.am

@@ -39,7 +39,7 @@ EXTRA_DIST		= index.html
 dist_man_MANS = \
 	corosync.conf.5 \
 	corosync.8 \
-	corosync-objctl.8 \
+	corosync-cmapctl.8 \
 	corosync-blackbox.8 \
 	corosync-keygen.8 \
 	corosync-cfgtool.8 \

+ 1 - 1
man/corosync-blackbox.8

@@ -63,7 +63,7 @@ Finishing replay: records found [2609]
 .br
 .SH SEE ALSO
 .BR corosync-fplay (8),
-.BR corosync-objctl (8),
+.BR corosync-cmapctl (8),
 .SH AUTHOR
 Angus Salkeld
 .PP

+ 85 - 0
man/corosync-cmapctl.8

@@ -0,0 +1,85 @@
+.\"/*
+.\" * Copyright (C) 2010 Red Hat, Inc.
+.\" *
+.\" * All rights reserved.
+.\" *
+.\" * Author: Angus Salkeld <asalkeld@redhat.com>
+.\" *
+.\" * This software licensed under BSD license, the text of which follows:
+.\" *
+.\" * Redistribution and use in source and binary forms, with or without
+.\" * modification, are permitted provided that the following conditions are met:
+.\" *
+.\" * - Redistributions of source code must retain the above copyright notice,
+.\" *   this list of conditions and the following disclaimer.
+.\" * - Redistributions in binary form must reproduce the above copyright notice,
+.\" *   this list of conditions and the following disclaimer in the documentation
+.\" *   and/or other materials provided with the distribution.
+.\" * - Neither the name of the MontaVista Software, Inc. nor the names of its
+.\" *   contributors may be used to endorse or promote products derived from this
+.\" *   software without specific prior written permission.
+.\" *
+.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+.\" * THE POSSIBILITY OF SUCH DAMAGE.
+.\" */
+.TH COROSYNC-CMAP 8 2012-01-23
+.SH NAME
+corosync-cmapctl: \- A tool for accessing the object database.
+.SH DESCRIPTION
+usage:  corosync\-cmapctl [\-b] [\-dghsTtp] [params...]
+.HP
+\fB\-b\fR show binary values
+.SS "Set key:"
+.IP
+corosync\-cmapctl \fB\-s\fR key_name type value
+.IP
+where type is one of ([i|u][8|16|32|64] | flt | dbl | str | bin)
+for bin, value is file name (or \- for stdin)
+.SS "Load settings from a file:"
+.IP
+corosync\-cmapctl \fB\-p\fR filename
+.IP
+the format of the file is:
+<key_name> <type> <value>
+.SS "Delete key:"
+.IP
+corosync\-cmapctl \fB\-d\fR key_name...
+.SS "Delete multiple keys with prefix:"
+.IP
+corosync\-cmapctl \fB\-D\fR key_prefix...
+.SS "Get key:"
+.IP
+corosync\-cmapctl [\-b] \fB\-g\fR key_name...
+.SS "Display all keys:"
+.IP
+corosync\-cmapctl [\-b]
+.SS "Display keys with prefix key_name:"
+.IP
+corosync\-cmapctl [\-b] key_name...
+.SS "Track changes on keys with key_name:"
+.IP
+corosync\-cmapctl [\-b] \fB\-t\fR key_name
+.SS "Track changes on keys with key prefix:"
+.IP
+corosync\-cmapctl [\-b] \fB\-T\fR key_prefix
+.SH "SEE ALSO"
+The full documentation for
+.B corosync-cmapctl:
+is maintained as a Texinfo manual.  If the
+.B info
+and
+.B corosync-cmapctl:
+programs are properly installed at your site, the command
+.IP
+.B info corosync-cmapctl:
+.PP
+should give you access to the complete manual.

+ 1 - 1
man/corosync-notifyd.8

@@ -138,7 +138,7 @@ signal sender=:1.216 -> dest=(null destination) serial=6 path=/com/redhat/cluste
    string "left"
 .SH SEE ALSO
 .BR corosync (8),
-.BR corosync-objctl (8),
+.BR corosync-cmapctl (8),
 .BR dbus-monitor (1),
 .SH AUTHOR
 Angus Salkeld

+ 0 - 120
man/corosync-objctl.8

@@ -1,120 +0,0 @@
-.\"/*
-.\" * Copyright (c) 2008 Allied Telesis Labs NZ.
-.\" *
-.\" * All rights reserved.
-.\" *
-.\" * Author: Angus Salkeld (angus.salkeld@alliedtelesis.co.nz)
-.\" *
-.\" * This software licensed under BSD license, the text of which follows:
-.\" *
-.\" * Redistribution and use in source and binary forms, with or without
-.\" * modification, are permitted provided that the following conditions are met:
-.\" *
-.\" * - Redistributions of source code must retain the above copyright notice,
-.\" *   this list of conditions and the following disclaimer.
-.\" * - Redistributions in binary form must reproduce the above copyright notice,
-.\" *   this list of conditions and the following disclaimer in the documentation
-.\" *   and/or other materials provided with the distribution.
-.\" * - Neither the name of the MontaVista Software, Inc. nor the names of its
-.\" *   contributors may be used to endorse or promote products derived from this
-.\" *   software without specific prior written permission.
-.\" *
-.\" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-.\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-.\" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-.\" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-.\" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-.\" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-.\" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-.\" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-.\" * THE POSSIBILITY OF SUCH DAMAGE.
-.\" */
-.TH COROSYNC-OBJCTL 8 2008-07-29
-.SH NAME
-corosync-objctl \- Configure objects in the Object Database
-.SH SYNOPSIS
-.B "corosync-objctl [\-b] [\-c|\-w|\-d|\-a|\-t\-h] <OBJECT-SPEC>..."
-.SH DESCRIPTION
-.B corosync-objctl
-is used to configure objects within the object database at runtime.
-.SH OBJECT-SPEC
-.TP
-There are two types of entities
-.B Objects
-and
-.B Key=Value pairs
-.TP
-.B Objects
-Objects are container like entities that can hold other entities.
-They are specified as "objectA"."objectB".
-An example is logging.logger.
-.TP
-.B Key=Value pairs
-These are the entities that actually hold values (read database "fields").
-They are specified as object.key=value or just object.key if you are reading.
-.SH OPTIONS
-.TP
-.B -c
-Create a new object.
-.TP
-.B -d
-Delete an existing object.
-.TP
-.B -w
-Use this option when you want to write a new value to a key.
-.TP
-.B -a
-Display all values currently available.
-.TP
-.B -t
-Track changes to an object and it's children. As changes are made to the object
-they are printed out. this is kind of like a "tail -f" for the object database.
-.TP
-.B -h
-Print basic usage.
-.TP
-.B -b
-Display binary values in BASH backslash escape sequences format.
-.SH EXAMPLES
-.TP
-Print the objOne object (shouldn't exist yet).
-$ corosync-objctl objOne
-.TP
-Create the objOne object.
-$ corosync-objctl -c objOne
-.TP
-Print the objOne object (empty).
-$ corosync-objctl objOne
-.br
-objOne
-.TP
-Write two new keys to the objOne object.
-$ corosync-objctl -w objOne.max=3000 objOne.min=100
-.TP
-Print the objOne object (with the two new keys).
-$ corosync-objctl objOne
-.br
-objOne.min=100
-.br
-objOne.max=3000
-.TP
-Delete the objOne.min key
-$ corosync-objctl -d objOne.min=100
-.TP
-Prove that is gone.
-$ corosync-objctl objOne
-.br
-objOne.max=3000
-.TP
-Delete the whole objOne object.
-$ corosync-objctl -d objOne
-.TP
-Prove that is gone.
-$ corosync-objctl objOne
-.SH SEE ALSO
-.BR confdb_initialize (3),
-.SH AUTHOR
-Angus Salkeld
-.PP

+ 2 - 2
man/corosync-pload.8

@@ -45,7 +45,7 @@ All nodes will begin transmitting messages and they will stop when
 .PP
 To view the progress of this execute:
 .PP
-$ corosync-objctl runtime.services.pload.
+$ corosync-cmapctl runtime.services.pload.
 .br
 runtime.services.pload.service_id=13
 .br
@@ -63,7 +63,7 @@ and the time that this took.
 corosync[4931]: [PLOAD ] 1500000 Writes 300 bytes per write  30.838 seconds runtime, 48640.968 TP/S, 13.916 MB/S.
 .TP
 .SH SEE ALSO
-.BR corosync-objctl (8)
+.BR corosync-cmapctl (8)
 .SH AUTHOR
 Angus Salkeld
 .PP

+ 2 - 2
man/index.html

@@ -59,8 +59,8 @@
       Description of corosync-notifyd tool.
       <br>
 
-      <a href="corosync-objctl.8.html">corosync-objctl(8)</a>:
-      Description of corosync-objctl tool.
+      <a href="corosync-cmapctl.8.html">corosync-cmapctl(8)</a>:
+      Description of corosync-cmapctl tool.
       <br>
 
       <a href="corosync-pload.8.html">corosync-pload(8)</a>:

+ 0 - 1
tools/.gitignore

@@ -2,7 +2,6 @@ corosync-cfgtool
 corosync-cpgtool
 corosync-fplay
 corosync-keygen
-corosync-objctl
 corosync-pload
 corosync-quorumtool
 corosync-notifyd

+ 2 - 2
tools/corosync-blackbox

@@ -29,7 +29,7 @@
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 # THE POSSIBILITY OF SUCH DAMAGE.
 
-corosync-objctl -w runtime.blackbox.dump_state=$(date +%s)
-corosync-objctl -w runtime.blackbox.dump_flight_data=$(date +%s)
+corosync-cmapctl -s runtime.blackbox.dump_state str $(date +%s)
+corosync-cmapctl -s runtime.blackbox.dump_flight_data str $(date +%s)
 corosync-fplay