Adding a redundant network path for the NFSroot on a running diskless system
The present application discloses a method, system, and computer system for adding a redundant network path for an NFS root on a diskless system. The method includes: (a) generating, by a system initialization script, a RAM disk, wherein the system initialization script is executed after an operating system switches a root mount point to an NFS filesystem and initialization is performed, (b) copying a binary to the RAM disk, (c) launching the binary as a user-space program, and (d) executing, by the user-space program, a command from an already-running NFS-backed user-space program to move the NFS on a redundant Ethernet path after the redundant Ethernet path has been initialized.
1 . A system for adding a redundant network path for an NFS root on a diskless system, comprising:
one or more processors configured to:
generate, by a system initialization script, a RAM disk, wherein the system initialization script is executed after an operating system switches a root mount point to an NFS filesystem and initialization is performed;
copy a binary to the RAM disk;
launch the binary as a user-space program, wherein the binary is a static binary that includes failover logic so that the user-space program performs a failover to the redundant Ethernet path without requiring additional code or libraries to be fetched over the NFS filesystem during the failover; and
execute, by the user-space program, a command from an already-running NFS-backed user-space program to move the NFS on a redundant Ethernet path after the redundant Ethernet path has been initialized; and
a memory coupled to the one or more processors and configured to provide the one or more processors with instructions.
2 . The system of claim 1 , wherein the operating system is Linux-based.
3 . The system of claim 1 , wherein the system initialization script is a run control (rc) script.
4 . The system of claim 1 , wherein the RAM disk is generated using a temporary filesystem (tmpfs).
5 . The system of claim 1 , wherein the redundant Ethernet path is a highly available Ethernet path.
6 . The system of claim 1 , wherein the binary is a static binary resident on a memory of the RAM disk.
7 . The system of claim 1 , wherein:
the binary comprises failover logic; and
in response to a breaking of a connection for the NFS filesystem, the failover logic in the binary is executed from the user-space program.
8 . The system of claim 1 , wherein the user-space program monitors a primary Ethernet path for a failure and in response to detecting the failure in the primary Ethernet path, initiates a failover to the redundant Ethernet path.
9 . The system of claim 8 , wherein the user-space program monitors the primary Ethernet path for the failure based at least in part on signing up for a kernel notification over a NETLINK socket for an interface state change.
10 . The system of claim 9 , wherein the user-space program checks a path from an Ethernet layer based at least in part on the kernel notification.
11 . The system of claim 1 , wherein the user-space program logs an occurrence of errors and corresponding error information.
12 . The system of claim 11 , wherein in response to determining a failed failover to the redundant Ethernet path, the user-space program logs an occurrence of the failed failover.
13 . The system of claim 1 , wherein the user-space program causes a connection with a server to failover to the redundant Ethernet based at least in part on bringing down a failed interface, removing an IP address for the failed interface, and adding the IP address with an earlier subnet mask on a redundant interface, and bringing the redundant interface up over the redundant Ethernet path.
14 . The system of claim 1 , wherein an NFS client running on the diskless system is TCP-based.
15 . The system of claim 1 , wherein a single IP address is used for communication over a primary Ethernet path and the redundant Ethernet path in the event of a controlled or autonomous switchover.
16 . The system of claim 1 , wherein the redundant Ethernet path is asymmetrical with respect to a primary Ethernet path.
17 . The system of claim 1 , wherein an NFS client running on the diskless system causes failover logic to be stored in to the RAM disk.
18 . The system of claim 1 , wherein the user-space program executes a ping to a server system to monitor a primary Ethernet path from an IP layer.
19 . The system of claim 1 , wherein the binary fully encapsulates failover logic for performing a switchover to the redundant Ethernet path.
20 . The system of claim 1 , wherein the binary comprises failover logic so that the user-space program performs a failover to the redundant Ethernet path without executing failover logic outside the RAM disk.
21 . The system of claim 1 , wherein the command is communicated to the user-space program over a named pipe.
22 . The system of claim 1 , wherein the already-running NFS-backed user-space program listens for completion of the move to the redundant Ethernet path across NFS revival, and in response triggers a post-path-move activity comprising at least one of adding specific routes or IP filters on a new network device assigned with a control path IP.
23 . The system of claim 1 , wherein the redundant Ethernet path comprises a logical portion of a data plane of a network processing machine that is configured by a control plane of the network processing machine, and wherein the data plane is connected to a distributed switching fabric that provides hardware-level redundancy across multiple switching cards.
24 . The system of claim 1 , wherein the user-space program is configured to perform an autonomous failover to the redundant Ethernet path upon detecting a failure of the primary Ethernet path without receiving a command from the already-running NFS-backed user-space program, and is further configured to perform a commanded failover in response to receiving the command from the already-running NFS-backed user-space program.
25 . A method for adding a redundant network path for an NFS root on a diskless system, comprising:
generating, by a system initialization script, a RAM disk, wherein the system initialization script is executed after an operating system switches a root mount point to an NFS filesystem and initialization is performed;
copying a binary to the RAM disk;
launching the binary as a user-space program, wherein the binary is a static binary that includes failover logic so that the user-space program performs a failover to the redundant Ethernet path without requiring additional code or libraries to be fetched over the NFS filesystem during the failover; and
executing, by the user-space program, a command from an already-running NFS-backed user-space program to move the NFS on a redundant Ethernet path after the redundant Ethernet path has been initialized.
26 . A computer program product embodied in a non-transitory computer readable medium and comprising computer instructions for:
generating, by a system initialization script, a RAM disk, wherein the system initialization script is executed after an operating system switches a root mount point to an NFS filesystem and initialization is performed;
copying a binary to the RAM disk;
launching the binary as a user-space program, wherein the binary is a static binary that includes failover logic so that the user-space program performs a failover to a redundant Ethernet path without requiring additional code or libraries to be fetched over the NFS filesystem during the failover; and
executing, by the user-space program, a command from an already-running NFS-backed user-space program to move the NFS on a redundant Ethernet path after the redundant Ethernet path has been initialized.