2.3. Running install-lockss
install-lockss is a script in the LOCKSS Installer that installs the infrastructure necessary to run the LOCKSS stack on your host system, notably K3s.
This section describes how to run install-lockss.
2.3.1. Invoking install-lockss
To start the installation process, follow these steps as root:
Double-check that you are operating in the
rootsession established for the entirety of this chapter [1] by typing:whoami
and verifying that the output is
root.Navigate to the LOCKSS Installer Directory, symbolically:
cd <LOCKSS_INSTALLER_DIR>Run this command:
scripts/install-lockss
install-lockss will run through successive phases, each of which is described below from Section 2.3.2 (Checking System Prerequisites) to Section 2.3.10 (Final Steps of install-lockss).
Tip
Error conditions and what to do about them
2.3.2. Checking System Prerequisites
During this phase, install-lockss will check that certain system prerequisites are met. This phase begins with the heading:
Checking system prerequisites...
No user interaction is expected; if everything goes well, you will see this message:
[success] System prerequisites checked
and install-lockss will successfully proceed to Section 2.3.3 (Checking K3s Prerequisites).
Error conditions and what to do about them
2.3.3. Checking K3s Prerequisites
During this phase, install-lockss will check that certain prerequisites to installing K3s are met. This phase begins with this heading:
Checking K3s prerequisites...
No user interaction is expected; if everything goes well, you will see this message:
[success] K3s prerequisites checked
and install-lockss will successfully proceed to Section 2.3.4 (Configuring iptables for K3s).
Error conditions and what to do about them
2.3.4. Configuring iptables for K3s
During this phase, install-lockss will configure iptables to work with K3s, if applicable. This phase begins with the heading:
Configuring iptables for K3s...
In many situations, no configuration of iptables is needed; you will see one of these messages:
[success] Skipping (iptables is not on the PATH nor run via Alternatives)
[success] Skipping (iptables version is older than 1.8.0)
[success] Skipping (iptables version is newer than 1.8.3)
[success] Skipping (iptables is in legacy mode)
[success] Skipping (iptables is not run via Alternatives)
and install-lockss will successfully proceed to Section 2.3.5 (Configuring firewalld for K3s).
Otherwise, you will receive the following prompt:
Switch iptables to legacy mode via Alternatives?
Enter Y to accept the proposed iptables configuration, or enter N to bypass, or hit Enter to accept the default in square brackets [2].
Warning
If you select N to bypass the proposed iptables configuration, you will see the warning:
[Warning] Leaving iptables unchanged; see manual for details
and install-lockss will keep going. But K3s may malfunction without further intervention; see Troubleshooting iptables for details.
Error conditions and what to do about them
2.3.5. Configuring firewalld for K3s
During this phase, install-lockss will configure firewalld to work with K3s, if applicable. This phase begins with the heading:
Configuring firewalld for K3s...
In many situations, no configuration of firewalld is needed; you will see one of these messages:
[success] Skipping (firewall-cmd is not on the PATH)
[success] Skipping (firewalld is not running)
and install-lockss will successfully proceed to Section 2.3.6 (Configuring ufw for K3s).
Otherwise, you will receive the following prompt:
Add 10.42.0.0/16 and 10.43.0.0/16 to firewalld's trusted zone?
Enter Y to accept the proposed firewalld configuration, or enter N to bypass, or hit Enter to accept the default in square brackets [2].
Warning
If you select N to bypass the proposed firewalld configuration, you will see the warning:
[Warning] Leaving firewalld unchanged; see manual for details
and install-lockss will keep going. But K3s may malfunction without further intervention; see Troubleshooting firewalld for details.
Error conditions and what to do about them
2.3.6. Configuring ufw for K3s
During this phase, install-lockss will configure ufw to work with K3s, if necessary. This phase begins with the heading:
Configuring ufw for K3s...
In many situations, no configuration of ufw is needed; you will see one of these messages:
[success] Skipping (ufw is not on the PATH)
[success] Skipping (ufw is not active)
and install-lockss will successfully proceed to Section 2.3.7 (Configuring CoreDNS for K3s).
Otherwise, you will receive the following prompt:
Allow traffic from 10.42.0.0/16 and 10.43.0.0/16 via ufw?
Enter Y to accept the proposed ufw configuration, or enter N to bypass, or hit Enter to accept the default in square brackets [2].
Warning
If you select N to bypass the proposed ufw configuration, you will see the warning:
[Warning] Leaving ufw unchanged; see manual for details
and install-lockss will keep going. But K3s may malfunction without further intervention. See Troubleshooting ufw for details.
Error conditions and what to do about them
2.3.7. Configuring CoreDNS for K3s
During this phase, install-lockss will configure CoreDNS to work with K3s, if necessary. This phase begins with the heading:
Configuring CoreDNS for K3s...
In many situations, no configuration of firewalld is needed; you will see this message:
[success] Using system resolv.conf files
and install-lockss will successfully proceed to Section 2.3.8 (Installing K3s).
Otherwise [4], you will receive a message including CoreDNS does not allow a loopback address to be given to Kubernetes pods as an upstream DNS server, and the following prompt:
IP address(es) of DNS resolvers, separated by ';'
Enter a semicolon-separated list of DNS server IP addresses that are not loopback addresses. A suggested value will be offered to you in square brackets, consisting of non-loopback IP addresses collected from your host system's DNS configuration; you can simply hit Enter to accept the suggested value [3].
Error conditions and what to do about them
2.3.8. Installing K3s
During this phase, install-lockss will install K3s 1.31.5+k3s1, if applicable. This phase begins with the heading:
Installing K3s...
This phase consists of these steps:
In this step, install-lockss will determine if K3s 1.31.5+k3s1 (the intended version of K3s for LOCKSS 2.0.90-beta2 NOT YET RELEASED) needs to be installed. There are five scenarios:
K3s is not present on the host system. If K3s is not present on the host system, install-lockss will display
K3s is not present, and will install K3s 1.31.5+k3s1 in the next step.An older version of K3s is present on the host system. If an older version of K3s than 1.31.5+k3s1 is present on the host system, install-lockss will display
Detected K3s version <detected_version> is older than expected version <intended_version>, and you will receive the following prompt:Upgrade K3s from <detected_version> to <intended_version>?
Enter Y and install-lockss will install K3s 1.31.5+k3s1 in the next step, or enter N and install-lockss will not install K3s 1.31.5+k3s1 in the next step, or hit Enter to accept the default in square brackets [2].
The intended version of K3s is already present on the host system. If K3s 1.31.5+k3s1 is already present on the host system, install-lockss will display
K3s version <intended_version> is already installed; skipping, and will not install K3s 1.31.5+k3s1 in the next step.A newer version of K3s is present on the host system. If a newer version of K3s than 1.31.5+k3s1 is present on the host system, install-lockss will display
Detected K3s version <detected_version> is more recent than expected version <intended_version>, and will not install K3s 1.31.5+k3s1 in the next step.K3s is present on the host system, but the detected and intended version numbers cannot be compared automatically. If K3s is present on the host system, but the detected version cannot be compared automatically to the intended version 1.31.5+k3s1, install-lockss will display
[Warning] Detected K3s version <detected_version>, expected version <intended_version>, comparison failure, skipping, and will not install K3s in the next step.
In this step, install-lockss will act on its determination from the previous step:
If install-lockss determined in the previous step that it will not install K3s 1.31.5+k3s1, you will see the confirmation
Not installing K3s; nothing will happen in this step, and install-lockss will proceed to the next step.If install-lockss determined in the previous step that it will install K3s 1.31.5+k3s1, you will see the confirmation
Installing K3s version <intended_version>, and install-lockss will proceed as follows:First, install-lockss will ask you to specify the K3s data directory with this prompt:
K3s data directory
By default, this is
/var/lib/rancher/k3s. However, if/varis space-limited, you should specify a different directory that has ample space, and is not backed by NFS or legacy XFS withftype=0.Enter a suitable directory path for the K3s data directory, or hit Enter to accept the default in square brackets [3] [5].
Then install-lockss will attempt to determine the filesystem type of the specified K3s data directory. In many situations, it will simply display the filesystem type in a message similar to this (for example,
<filesystem_type>might beext4):Filesystem type of <path_of_k3s_dir> (<mountpoint_of_k3s_dir>) is <filesystem_type>; proceedingError conditions and warnings, and what to do about them
Then install-lockss will download the K3s Installer from https://get.k3s.io/ and invoke it with suitable options. This may take several minutes, during which the output to the console will be from the K3s Installer, not from install-lockss.
Depending on your operating system and other factors, the K3s Installer may install additional software packages or configure system components.
Error conditions and what to do about them
Finally, whether or not K3s was installed in the previous step, install-lockss will store Kubernetes configuration data as the
lockssuser in the fileconfig/k8s.cfg(relative to the LOCKSS Installer Directory).Error conditions and what to do about them
2.3.9. Testing the K3s Node
During this phase, install-lockss runs a series of tests to verify that the K3s node is operational and its networking and DNS infrastructure is working. This phase begins with the heading:
Testing the K3s node...
No user interaction is expected. If all tests pass, you will see the message:
[success] Tested the K3s node
and install-lockss will successfully proceed to Section 2.3.10 (Final Steps of install-lockss).
Otherwise, you will see an error message corresponding to the test that did not pass, and install-lockss will fail.
Error conditions and what to do about them
2.3.10. Final Steps of install-lockss
If all phases completed successfully, you will see the message:
[success] Successful completion of the LOCKSS installation process
and install-lockss will terminate.
2.3.11. Checking the K3s Configuration
Tip
This section is optional.
K3s comes with k3s check-config, a configuration checker tool. The K3s configuration checker is capable of detecting complex underlying system situations that definitely require fixing (or applications running in the K3s cluster will not be able to function properly). On the other hand, the versions of the K3s configuration checker available at the time LOCKSS 2.0-beta2 NOT YET RELEASED was released contained bugs that reported spurious issues that are either inaccurate or moot. As a result, we have decided against running k3s check-config as part of install-lockss at this time, to avoid unnecessary interruptions in the installation of the LOCKSS system in many cases where there is no particular cause for concern.
That being said, we still recommend running k3s check-config and interpreting the results using the Troubleshooting the K3s Configuration Checker section of the manual:
Run this command:
k3s check-config
The following error messages in the output are indicative of system situations that require attention:
/usr/sbin iptables v1.8.2 (nf_tables): should be older than v1.8.0, newer than v1.8.3, or in legacy mode (fail)
RHEL7/CentOS7: User namespaces disabled; add 'user_namespace.enable=1' to boot command line (fail)
apparmor: enabled, but apparmor_parser missing (fail)
Troubleshooting
See Troubleshooting the K3s Configuration Checker for details.
The following error messages in the output can be ignored:
modprobe: FATAL: Module configs not found in directory /lib/modules/6.8.0-88-generic
cgroup hierarchy: nonexistent?? (fail) (see https://github.com/tianon/cgroupfs-mount)
links: aux/ip6tables should link to iptables-detect.sh (fail) links: aux/ip6tables-restore should link to iptables-detect.sh (fail) links: aux/ip6tables-save should link to iptables-detect.sh (fail) links: aux/iptables should link to iptables-detect.sh (fail) links: aux/iptables-restore should link to iptables-detect.sh (fail) links: aux/iptables-save should link to iptables-detect.sh (fail)
swap: should be disabled
CONFIG_RT_GROUP_SCHED: missing
CONFIG_INET_XFRM_MODE_TRANSPORT: missing
Troubleshooting
See Troubleshooting the K3s Configuration Checker for details.
For other error messages, check the official K3s documentation, search for K3s issues database on GitHub or the Web for resources matching your error message or operating system, and/or contact us so we can help investigate and document for future reference.
Footnotes