On Debian there is a need for the init scripts to die gracefully
if module insertion fails. In such a case it is desirable to print
some sort of informative message.
By adding the load-kmod sub-command to ovs-ctl init scripts
may try to load modules and take appropriate action on failure
or then try to start the daemons.
\fBovs\-ctl version
.br
\fBovs\-ctl
\fBovs\-ctl version
.br
\fBovs\-ctl
+[\fIoptions\fR]
+\fBload\-kmod\fR
+.br
+\fBovs\-ctl
\fB\-\-system\-id=random\fR|\fIuuid\fR
[\fIoptions\fR]
\fBforce\-reload\-kmod\fR
\fB\-\-system\-id=random\fR|\fIuuid\fR
[\fIoptions\fR]
\fBforce\-reload\-kmod\fR
\fBforce\-kmod\-reload\fR internally stops and starts OVS, so it
accepts all of the options accepted by the \fBstart\fR command.
.
\fBforce\-kmod\-reload\fR internally stops and starts OVS, so it
accepts all of the options accepted by the \fBstart\fR command.
.
+.SH "The ``load\-kmod'' command"
+.
+.PP
+The \fBload\-kmod\fR command loads the openvswitch kernel modules if
+they are not already loaded. This operation also occurs as part of
+the \fBstart\fR command. The motivation for providing the \fBload\-kmod\fR
+command is to allow errors when loading modules to be handled separatetly
+from other errors that may occur when running the \fBstart\fR command.
+.
+.PP
+By default the \fBload\-kmod\fR command attempts to load the
+openvswitch_mod kernel module. If the \fB\-\-brcompat\fR option is
+specified then the brcompat_mod kernel module is also loaded.
+.
.SH "The ``enable\-protocol'' command"
.
.PP
.SH "The ``enable\-protocol'' command"
.
.PP
action "Inserting brcompat module" modprobe brcompat_mod
}
action "Inserting brcompat module" modprobe brcompat_mod
}
+insert_mod_if_required () {
+ insert_openvswitch_mod_if_required || return 1
+ if test X"$BRCOMPAT" = Xyes; then
+ insert_brcompat_mod_if_required || return 1
+ fi
+}
+
ovs_vsctl () {
ovs-vsctl --no-wait --timeout=5 "$@"
}
ovs_vsctl () {
ovs-vsctl --no-wait --timeout=5 "$@"
}
- insert_openvswitch_mod_if_required || return 1
- if test X"$BRCOMPAT" = Xyes; then
- insert_brcompat_mod_if_required || return 1
- fi
+ insert_mod_if_required || return 1
if daemon_is_running ovsdb-server; then
log_success_msg "ovsdb-server is already running"
if daemon_is_running ovsdb-server; then
log_success_msg "ovsdb-server is already running"
stop stop Open vSwitch daemons
status check whether Open vSwitch daemons are running
version print versions of Open vSwitch daemons
stop stop Open vSwitch daemons
status check whether Open vSwitch daemons are running
version print versions of Open vSwitch daemons
+ load-kmod insert modules if not already present
force-reload-kmod save OVS network device state, stop OVS, unload kernel
module, reload kernel module, start OVS, restore state
enable-protocol enable protocol specified in options with iptables
force-reload-kmod save OVS network device state, stop OVS, unload kernel
module, reload kernel module, start OVS, restore state
enable-protocol enable protocol specified in options with iptables
--ovs-vswitchd-priority=NICE set ovs-vswitchd's niceness (default: $OVS_VSWITCHD_PRIORITY)
--ovs-brcompatd-priority=NICE set ovs-brcompatd's niceness (default: $OVS_BRCOMPATD_PRIORITY)
--ovs-vswitchd-priority=NICE set ovs-vswitchd's niceness (default: $OVS_VSWITCHD_PRIORITY)
--ovs-brcompatd-priority=NICE set ovs-brcompatd's niceness (default: $OVS_BRCOMPATD_PRIORITY)
-Options for "start", "force-reload-kmod", "status", and "version":
+Options for "start", "force-reload-kmod", "load-kmod", "status", and "version":
--brcompat enable Linux bridge compatibility module and daemon
File location options:
--brcompat enable Linux bridge compatibility module and daemon
File location options:
force-reload-kmod)
force_reload_kmod
;;
force-reload-kmod)
force_reload_kmod
;;
+ load-kmod)
+ insert_mod_if_required
+ ;;
enable-protocol)
enable_protocol
;;
enable-protocol)
enable_protocol
;;