Horizon Runner
The Horizon Runner is the component of Project Horizon that configures a computer to match an input HorizonScript.
Locate HorizonScript
Functional Requirements
Runner.Locate.DetermineLocality
The system shall determine if the HorizonScript is stored locally or remotely using the following algorithm:
If the path to the HorizonScript is not provided, assume the HorizonScript is remote and end the calculation. Priority: Low.
If the path to the HorizonScript begins with a single "/" followed by an alphanumeric character, the HorizonScript is local.
If the path to the HorizonScript begins with a recognised valid protocol for downloading a HorizonScript followed by the characters "://", the HorizonScript is remote.
If the path to the HorizonScript begins with an alphanumeric character, the HorizonScript is local and relative to the path /etc/horizon.
If the path to the HorizonScript does not match any of the rules specified before this line, the path provided is invalid and the system shall return an error describing the specified path and the fact it is invalid.
Runner.Locate.Local
If the HorizonScript is local, the system shall ensure the HorizonScript specified exists at the specified path, is readable by the system, and is the correct format.
Runner.Locate.Local.Failure
If the HorizonScript fails the tests in Runner.Locate.Local, the system shall return an error describing the reason the HorizonScript could not be used.
Runner.Locate.Remote
If the HorizonScript is remote, the system shall configure the network and then ensure the HorizonScript specified is accessible, as described in the following requirements sections.
Runner.Locate.Remote.Configure
The system shall use the network settings configured by the Administrator on the command line, if they have been provided.
Runner.Locate.Remote.Configure.Automatic
If no network configuration was provided on the command line, the system shall initiate a DHCP request on each available network interface, waiting for a 15 second time out period before continuing to the next network interface. An "available network interface" is defined as a non-loopback network interface that currently has a carrier signal.
Runner.Locate.Remote.Configure.AutoFailure
If no network configuration can be found using DHCP, the system shall return an error describing the inability to configure a network connection.
Runner.Locate.Remote.FullAuto
If no HorizonScript path was provided, the system shall download the HorizonScript from a TFTP server using the filename MACADDRESS.installfile where MACADDRESS is the MAC address of the active network adaptor with colons (:) replaced by dashes (-). The system shall use the following algorithm to determine the TFTP server, using the first match.
The TFTP server specified in the DHCP options, if the DHCP response provided one.
The TFTP server specified on the command line, if one was provided.
The DHCP server, if DHCP was used to configure the network.
The default gateway IP.
Runner.Locate.Remote.Verify
The system shall ensure that the server where the HorizonScript is kept is reachable over the protocol specified and that the HorizonScript exists.
Runner.Locate.Remote.Download
The system shall download the HorizonScript from the remote server to /etc/horizon/.
Verify HorizonScript
Functional Requirements
Runner.Verify.Exception
If the HorizonScript fails any verification step performed by the system, the system shall report the error.
Runner.Verify.Exception.Install
If the system is running in an installation environment, the system shall report verification step failure to the listening agent.
Runner.Verify.Exception.Continue
The system shall support a mode where the system will continue verification after encountering a verification failure, to display all verification failures for a given HorizonScript.
Runner.Verify.Required
The system shall verify the presence of each required keyword in the HorizonScript: mount, network, hostname, pkginstall, and rootpw.
Runner.Verify.network
The system shall verify that a single network entry is present in the HorizonScript, and that the value is either true or false.
Runner.Verify.network.netaddress
If the value in the HorizonScript for the network key is true, the system shall verify that at least one netaddress key is present.
Runner.Verify.network.netaddress.NoNetwork
If the value in the HorizonScript for the network key is false, the system shall verify that no netaddress key is present.
Runner.Verify.network.netaddress.Validity
The system shall verify that each netaddress key has a valid form of at least two values in a space-separated tuple.
Runner.Verify.network.netaddress.Validity.Type
The system shall verify that the second value in each netaddress tuple is either dhcp or static.
Runner.Verify.network.netaddress.Validity.DHCP
The system shall verify that each netaddress key is a two value tuple if the second value is dhcp.
Runner.Verify.network.netaddress.Validity.Static
The system shall verify that each netaddress key is either a four value tuple or a five value tuple if the second value is static.
Runner.Verify.network.netaddress.Interface
If the system is running in an installation environment, the system shall ensure that the interface specified as the first value in each netaddress tuple is present on the system. Failure of this requirement is a "soft" error.
Runner.Verify.network.netaddress.Address
If the second value of the netaddress key is static, the system shall ensure that the third value in the tuple is a valid IPv4 or IPv6 address.
Runner.Verify.network.netaddress.Mask
If the second value of the netaddress key is static, the system shall ensure that the fourth value in the tuple is a valid prefix, in the form of a whole number between 1 and 32 inclusive if the third value is an IPv4 address, a whole number between 1 and 64 inclusive if the third value is an IPv6 address, or a network mask in the form of four octets separated by the period (.) symbol if the third value is an IPv4 address.
Runner.Verify.network.netaddress.Gateway
If the second value of the netaddress key is static, and the tuple contains a fifth value, the system shall ensure that the fifth value is a valid IP address of the same type as the third value in the tuple.
Runner.Verify.network.netaddress.Count
The system shall verify that netaddress is not specified more than 255 times per interface.
Runner.Verify.network.netssid
If the value in the HorizonScript for the network key is true, the system shall verify the validity of any present netssid key.
Runner.Verify.network.netssid.NoNetwork
If the value in the HorizonScript for the network key is false, the system shall verify that no netssid key is present.
Execute HorizonScript
Functional Requirements
Runner.Execute
The system shall execute the instructions provided in the HorizonScript in the order described.
Runner.Execute.Exception
The system shall report any exception encountered during execution to the listening agent, following the specification in .
Runner.Execute.Status
If an operation has taken more than 10 seconds, the system shall report the status of the operation to the listening agent, following the specification in .
Runner.Execute.StepBegin
When the system begins a step, the system shall report the step as beginning to the listening agent, following the specification in .
Runner.Execute.StepDone
When the system completes a step, the system shall report the step as completed to the listening agent, following the specification in .
Runner.Execute.Verify
The system shall verify the HorizonScript, using the process specified in the section , before execution.
Runner.Execute.Verify.Failure
If the HorizonScript fails verification, the system shall report a fatal exception () and stop execution.
Runner.Execute.diskid