From eb8cacd9a964059d47d66c580dab2de479d7d022 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 15 May 2009 12:40:05 -0700 Subject: [PATCH] Rename vlogconf to ovs-appctl, for consistency and as a better name. The vlogconf program at one time only affected log levels. Now, it can do more, and probably will be expanded in the future, so appctl is a better name. --- INSTALL | 4 +-- README | 4 +-- debian/openvswitch-common.install | 2 +- debian/openvswitch-common.manpages | 2 +- debian/openvswitch-switch.logrotate | 2 +- lib/unixctl.c | 4 +-- lib/vlog.man | 4 +-- secchan/main.c | 2 +- secchan/secchan.8.in | 2 +- utilities/.gitignore | 4 +-- utilities/automake.mk | 18 ++++++------ utilities/dpctl.8.in | 4 +-- utilities/{vlogconf.8.in => ovs-appctl.8.in} | 31 +++++++++++++------- utilities/{vlogconf.c => ovs-appctl.c} | 0 utilities/ovs-controller.8.in | 2 +- vswitchd/brcompatd.8.in | 2 +- vswitchd/vswitchd.8.in | 2 +- xenserver/etc_init.d_vswitch | 4 +-- xenserver/vswitch-xen.spec | 6 ++-- 19 files changed, 54 insertions(+), 45 deletions(-) rename utilities/{vlogconf.8.in => ovs-appctl.8.in} (79%) rename utilities/{vlogconf.c => ovs-appctl.c} (100%) diff --git a/INSTALL b/INSTALL index 888ab016..dbab025f 100644 --- a/INSTALL +++ b/INSTALL @@ -152,10 +152,10 @@ distribution in the ordinary way using "configure" and "make". - Datapath administration utility: utilities/dpctl. - - Runtime logging configuration utility: utilities/vlogconf. - Some less important binaries will be built also: + - Runtime configuration utility: utilities/ovs-appctl. + - Simple OpenFlow controller: utilities/ovs-controller. - Secure channel executable: secchan/secchan. diff --git a/README b/README index 7b5cc9cd..e4a7c714 100644 --- a/README +++ b/README @@ -39,8 +39,8 @@ This distribution includes some additional software as well: - ovs-controller, a simple OpenFlow switch - - vlogconf, a utility that can adjust the logging levels of a - running secchan, ovs-controller, or vswitchd. + - vlog-appctl, a utility that can control OpenVSwitch daemons, + adjusting their logging levels among other uses. - ovs-pki, a utility for creating and managing the public-key infrastructure for OpenFlow switches. diff --git a/debian/openvswitch-common.install b/debian/openvswitch-common.install index 6dd50e37..1967ccc1 100644 --- a/debian/openvswitch-common.install +++ b/debian/openvswitch-common.install @@ -1,3 +1,3 @@ +_debian/utilities/ovs-appctl usr/sbin _debian/utilities/ovs-parse-leaks usr/bin _debian/utilities/ovs-pki usr/sbin -_debian/utilities/vlogconf usr/sbin diff --git a/debian/openvswitch-common.manpages b/debian/openvswitch-common.manpages index 4994a1e3..99c48bd0 100644 --- a/debian/openvswitch-common.manpages +++ b/debian/openvswitch-common.manpages @@ -1,2 +1,2 @@ -_debian/utilities/vlogconf.8 +_debian/utilities/ovs-appctl.8 _debian/utilities/ovs-pki.8 diff --git a/debian/openvswitch-switch.logrotate b/debian/openvswitch-switch.logrotate index 5c253088..41394e86 100644 --- a/debian/openvswitch-switch.logrotate +++ b/debian/openvswitch-switch.logrotate @@ -6,6 +6,6 @@ missingok rotate 30 postrotate - vlogconf --target /var/run/secchan.pid --reopen + ovs-appctl --target /var/run/secchan.pid --reopen endscript } diff --git a/lib/unixctl.c b/lib/unixctl.c index 269d5493..4c7f15dc 100644 --- a/lib/unixctl.c +++ b/lib/unixctl.c @@ -184,8 +184,8 @@ unixctl_command_reply(struct unixctl_conn *conn, * * A program that (optionally) daemonizes itself should call this function * *after* daemonization, so that the socket name contains the pid of the - * daemon instead of the pid of the program that exited. (Otherwise, "vlogconf - * --target .pid" will fail.) + * daemon instead of the pid of the program that exited. (Otherwise, + * "ovs-appctl --target .pid" will fail.) * * Returns 0 if successful, otherwise a positive errno value. If successful, * sets '*serverp' to the new unixctl_server, otherwise to NULL. */ diff --git a/lib/vlog.man b/lib/vlog.man index 0e439f86..0bd8a26e 100644 --- a/lib/vlog.man +++ b/lib/vlog.man @@ -7,7 +7,7 @@ Sets the logging level for \fImodule\fR in \fIfacility\fR to .RS .IP \(bu \fImodule\fR may be any valid module name (as displayed by the -\fB--list\fR action on \fBvlogconf\fR(8)), or the special name +\fB--list\fR action on \fBovs-appctl\fR(8)), or the special name \fBANY\fR to set the logging levels for all modules. .IP \(bu @@ -35,7 +35,7 @@ Sets the maximum logging verbosity level, equivalent to .TP \fB-vPATTERN:\fIfacility\fB:\fIpattern\fR, \fB--verbose=PATTERN:\fIfacility\fB:\fIpattern\fR Sets the log pattern for \fIfacility\fR to \fIpattern\fR. Refer to -\fBvlogconf\fR(8) for a description of the valid syntax for \fIpattern\fR. +\fBovs-appctl\fR(8) for a description of the valid syntax for \fIpattern\fR. .TP \fB--log-file\fR[\fB=\fIfile\fR] diff --git a/secchan/main.c b/secchan/main.c index b9ba4d44..1b5d5cca 100644 --- a/secchan/main.c +++ b/secchan/main.c @@ -146,7 +146,7 @@ main(int argc, char *argv[]) die_if_already_running(); daemonize(); - /* Start listening for vlogconf requests. */ + /* Start listening for ovs-appctl requests. */ error = unixctl_server_create(NULL, &unixctl); if (error) { ovs_fatal(error, "Could not listen for unixctl connections"); diff --git a/secchan/secchan.8.in b/secchan/secchan.8.in index 6bf2c66b..e456c530 100644 --- a/secchan/secchan.8.in +++ b/secchan/secchan.8.in @@ -455,8 +455,8 @@ require the controller to send the CA certificate, but .SH "SEE ALSO" .BR dpctl (8), +.BR ovs\-appctl (8), .BR ovs-discover (8), .BR ovs\-controller (8), .BR ovs-pki (8), -.BR vlogconf (8), .BR vswitchd.conf (5) diff --git a/utilities/.gitignore b/utilities/.gitignore index 5f54285a..7cfc5c49 100644 --- a/utilities/.gitignore +++ b/utilities/.gitignore @@ -3,6 +3,8 @@ /dpctl /dpctl.8 /nlmon +/ovs-appctl +/ovs-appctl.8 /ovs-cfg-mod /ovs-cfg-mod.8 /ovs-controller @@ -15,6 +17,4 @@ /ovs-pki /ovs-pki-cgi /ovs-pki.8 -/vlogconf -/vlogconf.8 /ovs-wdt diff --git a/utilities/automake.mk b/utilities/automake.mk index c23a4f8a..35c303c3 100644 --- a/utilities/automake.mk +++ b/utilities/automake.mk @@ -1,6 +1,6 @@ bin_PROGRAMS += \ - utilities/vlogconf \ utilities/dpctl \ + utilities/ovs-appctl \ utilities/ovs-cfg-mod \ utilities/ovs-controller \ utilities/ovs-discover \ @@ -13,6 +13,7 @@ dist_sbin_SCRIPTS += utilities/ovs-monitor EXTRA_DIST += \ utilities/dpctl.8.in \ + utilities/ovs-appctl.8.in \ utilities/ovs-cfg-mod.8.in \ utilities/ovs-controller.8.in \ utilities/ovs-discover.8.in \ @@ -20,10 +21,10 @@ EXTRA_DIST += \ utilities/ovs-parse-leaks.in \ utilities/ovs-pki-cgi.in \ utilities/ovs-pki.8.in \ - utilities/ovs-pki.in \ - utilities/vlogconf.8.in + utilities/ovs-pki.in DISTCLEANFILES += \ utilities/dpctl.8 \ + utilities/ovs-appctl.8 \ utilities/ovs-cfg-mod.8 \ utilities/ovs-controller.8 \ utilities/ovs-discover.8 \ @@ -31,23 +32,22 @@ DISTCLEANFILES += \ utilities/ovs-parse-leaks \ utilities/ovs-pki \ utilities/ovs-pki.8 \ - utilities/ovs-pki-cgi \ - utilities/vlogconf.8 + utilities/ovs-pki-cgi man_MANS += \ utilities/dpctl.8 \ + utilities/ovs-appctl.8 \ utilities/ovs-cfg-mod.8 \ utilities/ovs-controller.8 \ utilities/ovs-discover.8 \ utilities/ovs-kill.8 \ - utilities/ovs-pki.8 \ - utilities/vlogconf.8 + utilities/ovs-pki.8 utilities_dpctl_SOURCES = utilities/dpctl.c utilities_dpctl_LDADD = lib/libopenvswitch.a $(FAULT_LIBS) $(SSL_LIBS) -utilities_vlogconf_SOURCES = utilities/vlogconf.c -utilities_vlogconf_LDADD = lib/libopenvswitch.a +utilities_ovs_appctl_SOURCES = utilities/ovs-appctl.c +utilities_ovs_appctl_LDADD = lib/libopenvswitch.a utilities_ovs_cfg_mod_SOURCES = utilities/ovs-cfg-mod.c utilities_ovs_cfg_mod_LDADD = lib/libopenvswitch.a diff --git a/utilities/dpctl.8.in b/utilities/dpctl.8.in index a8828317..c88d3d3b 100644 --- a/utilities/dpctl.8.in +++ b/utilities/dpctl.8.in @@ -641,5 +641,5 @@ Prints the flow entries in the switch. .BR vswitchd (8), .BR secchan (8), -.BR ovs\-controller (8), -.BR vlogconf (8) +.BR ovs\-appctl (8), +.BR ovs\-controller (8) diff --git a/utilities/vlogconf.8.in b/utilities/ovs-appctl.8.in similarity index 79% rename from utilities/vlogconf.8.in rename to utilities/ovs-appctl.8.in index 279e778c..5204a800 100644 --- a/utilities/vlogconf.8.in +++ b/utilities/ovs-appctl.8.in @@ -4,14 +4,14 @@ . ns . IP "\\$1" .. -.TH vlogconf 8 "April 2009" "OpenVSwitch" "OpenVSwitch Manual" -.ds PN vlogconf +.TH ovs\-appctl 8 "April 2009" "OpenVSwitch" "OpenVSwitch Manual" +.ds PN ovs\-appctl .SH NAME -vlogconf \- configuration utility for OpenVSwitch logging in userspace +ovs\-appctl \- utility for configuring running OpenVSwitch daemons .SH SYNOPSIS -\fBvlogconf\fR [\fB-h\fR | \fB--help\fR] [\fItarget\fR...] [\fIaction\fR...] +\fBovs\-appctl\fR [\fB-h\fR | \fB--help\fR] [\fItarget\fR...] [\fIaction\fR...] .sp 1 The available \fItarget\fR options are: .br @@ -26,25 +26,31 @@ The available \fIaction\fR options are: [\fB-e\fR | \fB--execute=\fIcommand\fR] .SH DESCRIPTION -The \fBvlogconf\fR program configures the logging system used by -OpenVSwitch userspace programs. The logging configuration may be modified -while OpenVSwitch programs are running. +The \fBovs\-appctl\fR program connects to one or more running +OpenVSwitch daemons (such as \fBvswitchd\fR(8)), as specified by the +user, and sends them commands to query or modify their behavior. +Its primary purpose is currently to adjust daemons' logging levels. -\fBvlogconf\fR applies one or more actions to each of one or more +\fBovs\-appctl\fR applies one or more actions to each of one or more target processes. Targets may be specified using: .IP "\fB-t \fIsocket\fR" .IQ "\fB--target=\fIsocket\fR" The specified \fIsocket\fR must be the name of a Unix domain socket -for a \fBvlogconf\fR-controllable process. If \fIsocket\fR does not +for a \fBovs\-appctl\fR-controllable process. If \fIsocket\fR does not begin with \fB/\fR, it is treated as relative to \fB@RUNDIR@\fR. +Each OpenVSwitch daemon by default creates a socket named +\fB@RUNDIR@/\fIprogram\fB.\fIpid\fB.ctl\fR, where \fIprogram\fR is +the program's name (such as \fBvswitchd\fR) and \fIpid\fR is the +daemon's PID. + .PP The available actions are: .IP "\fB-l\fR" .IQ "\fB--list\fR" -Print the list of known modules and their current logging levels to +Print the list of known logging modules and their current levels to stdout. .IP "\fB-s\fR \fImodule\fR[\fB:\fIfacility\fR[\fB:\fIlevel\fR]]" @@ -76,7 +82,7 @@ expanded as follows: The name of the application logging the message, e.g. \fBsecchan\fR. .IP \fB%c\fR -The name of the module (as shown by \fBvlogconf --list\fR) logging +The name of the module (as shown by \fBovs\-appctl --list\fR) logging the message. .IP \fB%d\fR @@ -140,6 +146,9 @@ Causes the target application to close and reopen its log file. (This is useful after rotating log files, to cause a new log file to be used.) +This has no effect if the target application was not invoked with the +\fB--log-file\fR option. + .IP "\fB-e \fIcommand\fR" .IQ "\fB--execute=\fIcommand\fR" Passes the specified \fIcommand\fR literally to the target application diff --git a/utilities/vlogconf.c b/utilities/ovs-appctl.c similarity index 100% rename from utilities/vlogconf.c rename to utilities/ovs-appctl.c diff --git a/utilities/ovs-controller.8.in b/utilities/ovs-controller.8.in index ca8bff1b..0f8e775f 100644 --- a/utilities/ovs-controller.8.in +++ b/utilities/ovs-controller.8.in @@ -129,4 +129,4 @@ To bind locally to port 6633 (the default) and wait for incoming connections fro .BR dpctl (8), .BR secchan (8), -.BR vlogconf (8) +.BR ovs\-appctl (8) diff --git a/vswitchd/brcompatd.8.in b/vswitchd/brcompatd.8.in index 7566f6d7..0efac4ef 100644 --- a/vswitchd/brcompatd.8.in +++ b/vswitchd/brcompatd.8.in @@ -44,7 +44,7 @@ Sets the maximum time to wait for \fIconfig\fR to become unlocked to \fBbrcompatd\fR requires the \fBbrcompat_mod.ko\fR kernel module to be loaded. .SH "SEE ALSO" +.BR ovs-appctl (8), .BR vswitchd (8), .BR vswitchd.conf (5), -.BR vlogconf (8), \fBINSTALL\fR in the OpenVSwitch distribution. diff --git a/vswitchd/vswitchd.8.in b/vswitchd/vswitchd.8.in index 2285094c..737ef364 100644 --- a/vswitchd/vswitchd.8.in +++ b/vswitchd/vswitchd.8.in @@ -81,7 +81,7 @@ future, this restriction may be lifted. Only Linux 2.6.\fIx\fR is currently supported. . .SH "SEE ALSO" +.BR ovs-appctl (8), .BR vswitchd.conf (5), .BR brcompatd (8), -.BR vlogconf (8), \fBINSTALL\fR in the OpenVSwitch distribution. diff --git a/xenserver/etc_init.d_vswitch b/xenserver/etc_init.d_vswitch index 19fd2cd2..8be18cb7 100755 --- a/xenserver/etc_init.d_vswitch +++ b/xenserver/etc_init.d_vswitch @@ -63,7 +63,7 @@ BRCOMPATD_VALGRIND_OPT="${BRCOMPATD_VALGRIND_OPT:-}" vswitchd="$VSWITCH_BASE/sbin/vswitchd" brcompatd="$VSWITCH_BASE/sbin/brcompatd" dpctl="$VSWITCH_BASE/bin/dpctl" -vlogconf="$VSWITCH_BASE/bin/vlogconf" +appctl="$VSWITCH_BASE/bin/ovs-appctl" if [ "$ENABLE_FAKE_PROC_NET" == "y" ]; then @@ -164,7 +164,7 @@ function remove_modules { function reload_vswitchd { if [ -f "$VSWITCHD_PIDFILE" ]; then - "$vlogconf" \ + "$appctl" \ --target=vswitchd.$(cat "$VSWITCHD_PIDFILE").ctl \ --execute=vswitchd/reload fi diff --git a/xenserver/vswitch-xen.spec b/xenserver/vswitch-xen.spec index 1b1db623..a768ca37 100644 --- a/xenserver/vswitch-xen.spec +++ b/xenserver/vswitch-xen.spec @@ -252,12 +252,12 @@ fi /root/vswitch/scripts/XSFeatureNiciraVSwitch.pyo /root/vswitch/sbin/brcompatd /root/vswitch/sbin/vswitchd -/root/vswitch/bin/ovs-cfg-mod /root/vswitch/bin/dpctl -/root/vswitch/bin/vlogconf +/root/vswitch/bin/ovs-appctl +/root/vswitch/bin/ovs-cfg-mod /root/vswitch/share/man/man5/vswitchd.conf.5 /root/vswitch/share/man/man8/brcompatd.8 +/root/vswitch/share/man/man8/ovs-appctl.8 /root/vswitch/share/man/man8/ovs-cfg-mod.8 /root/vswitch/share/man/man8/dpctl.8 -/root/vswitch/share/man/man8/vlogconf.8 /root/vswitch/share/man/man8/vswitchd.8 -- 2.30.2