Design document | |
---|---|
Revision | v1 |
Status | released (6.0.2) |
Review | create new issue |
This document describes design details for the PR-1032 requirements.
The design consists of four parts:
Host.reset_networking
, which removes all the
PIFs, Bonds, VLANs and tunnels associated with the given host, and a
call PIF.scan_bios
to bring back the PIFs with device names as
defined in the BIOS.xe-reset-networking
script that can be executed on a XenServer
host, which prepares the reset and causes the host to reboot.xe-reset-networking
.xe-reset-networking
, calls Host.reset_networking
and re-creates
the PIFs.The xe-reset-networking
script takes the following parameters:
Parameter | Description |
---|---|
-m , --master |
The IP address of the master. Optional if the host is pool slave, ignored otherwise. |
--device |
Device name of management interface. Optional. If not specified, it is taken from the firstboot data. |
--mode |
IP configuration mode for management interface. Optional. Either dhcp or static (default is dhcp ). |
--ip |
IP address for management interface. Required if --mode=static , ignored otherwise. |
--netmask |
Netmask for management interface. Required if --mode=static , ignored otherwise. |
--gateway |
Gateway for management interface. Optional; ignored if --mode=dhcp . |
--dns |
DNS server for management interface. Optional; ignored if --mode=dhcp . |
DNS server for management interface. Optional; ignored if --mode=dhcp
.
The script takes the following steps after processing the given parameters:
/etc/xensource/pool.conf
to determine whether the host is a
pool master or pool slave.pool.conf
file to
the one given in the -m
parameter, if present.service network stop
).interface-reconfigure --force
.MANAGEMENT_INTERFACE
and clear CURRENT_INTERFACES
in
/etc/xensource-inventory
./tmp/network-reset
to trigger XAPI to complete the
network reset after the reboot. This file should contain the full
configuration details of the management interface as key/value pairs
(format: <key>=<value>\n
), and looks similar to the firstboot data
files. The file contains at least the keys DEVICE
and MODE
, and
IP
, NETMASK
, GATEWAY
, or DNS
when appropriate.A new hidden API call:
Host.reset_networking
host
After reboot, in the XAPI start-up sequence trigged by the presence of
/tmp/network-reset
:
/tmp/network-reset
.Host.reset_networking
with a ref to the localhost.PIF.scan
with a ref to the localhost to recreate the
(physical) PIFs.PIF.reconfigure_ip
to configure the management interface.Host.management_reconfigure
./tmp/network-reset
.Add an “Emergency Network Reset” option under the “Network and
Management Interface” menu. Selecting this option will show some
explanation in the pane on the right-hand side. Pressing <Enter> will
bring up a dialogue to select the interfaces to use as management
interface after the reset. After choosing a device, the dialogue
continues with configuration options like in the “Configure Management
Interface” dialogue. After completing the dialogue, the same steps as
listed for xe-reset-networking
are executed.
Host.management_reconfigure
, pool
slaves may also use the network reset functionality to reconnect to
the master on its new IP.