Questo contenuto non è disponibile nella lingua selezionata.
Chapter 2. Log Files and Validation Scripts
2.1. Configuration and Log Files for Standard Linux Components Copia collegamentoCollegamento copiato negli appunti!
2.1.1. General Information Copia collegamentoCollegamento copiato negli appunti!
/var/log/messages
file. This serves as a good starting point to investigate issues that might not be logged anywhere else.
/var/log/httpd/access_log
file shows whether your web request was received by the host.
/var/log/httpd/error_log
file can be helpful in troubleshooting certain problems on broker and node hosts.
/var/log/audit/audit.log
file is useful for finding problems that might be caused by SELinux violations.
/var/log/secure
file logs user and SSH interactions. Because users can SSH into their gears, and all Git requests also authenticate using SSH, this file is useful for checking interaction with gears on node hosts.
2.1.2. Networking Copia collegamentoCollegamento copiato negli appunti!
The best place for Linux operators to begin troubleshooting DNS problems on broker, node, or client hosts is the /etc/resolv.conf
file. On client hosts running other operating systems, look in the appropriate network configuration file.
/etc/resolv.conf
file as the first nameserver.
/etc/resolv.conf
file should point to your OpenShift Enterprise installation, either receiving updates from it, or delegating the domain to the nameserver of your installation.
dig hostname
# dig hostnamedig hostname
If you are running a BIND server on the broker (or supporting) host, the configuration information is contained in the /var/named/dynamic
directory. The zone file syntax is domain.com.db.zone
; so if the domain of your OpenShift Enterprise installation is example.com, the zone file name would be example.com.db.zone
. However, not all changes will be in the zone file. Recent changes can be contained in a binary journal file.
dig domain axfr
# dig domain axfrdig domain axfrdig domain axfr
For broker and node hosts, DHCP is currently only supported if the host IPs are pinned, meaning they do not change during lease renewal. This also applies to nameservers, in that they should also not change if pinned.
/etc/dhcp/dhclient-network-interface.conf
file to verify the nameservers provided by the DHCP service are being overwritten when a new lease is obtained.
/etc/resolv.conf
file is overwritten with incorrect values, check your configuration in the dhclient-network-interface.conf
file.
2.1.3. SELinux Copia collegamentoCollegamento copiato negli appunti!
Procedure 2.1. To Troubleshoot SELinux Issues:
- As root, run the following command to set SELinux to permissive mode:
setenforce 0
# setenforce 0
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Retry the failing action. If the action succeeds then the issue is SELinux related.
- Run the following command to set SELinux back to enforcing mode:
setenforce 1
# setenforce 1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Check the
/var/log/audit/audit.log
file for any SELinux violations.
2.1.4. Control Groups on Node Hosts Copia collegamentoCollegamento copiato negli appunti!
cgconfig
service is running correctly on a node host, you see the following:
- The
/etc/cgconfig.conf
file exists with the SELinux label:system_u:object_r:cgconfig_etc_t:s0
. - The
/etc/cgconfig.conf
file joins CPU, cpuacct, memory, freezer, and net_cls in the/croup/all
directory. - The
/cgroup
directory exists, with the SELinux label:system_u:object_r:cgroup_t:s0
. - The cgconfig service is running.
- The
/etc/cgrules.conf
file exists with the SELinux label:system_u:object_r:cgrules_etc_t:s0
- The cgred service is running.
- A line for each gear in the
/etc/cgrules.conf
file. - A directory for each gear in the
/cgroup/all/openshift
directory. - All processes with the gear UUID are listed in the gear's
cgroup.procs
file. This file is located in the/cgroup/all/openshift/gear_UUID
directory.
Important
unconfined_u
and not system_u
. For example, the SELinux label in /etc/cgconfig.conf
would be unconfined_u:object_r:cgconfig_etc_t:s0
.
2.1.5. Pluggable Authentication Modules Copia collegamentoCollegamento copiato negli appunti!
nproc
value to control the number of processes a given account can create.
/etc/openshift/resource_limits.conf
file on the node host:
limits_nproc=2048
limits_nproc=2048
84-gear_UUID.conf
file is created on the node host, in the /etc/security/limits.d
directory. Replace gear_UUID with the UNIX account name for the gear. This contains a rule set that defines the limits for that UNIX account. The first field of each line in the file is the gear UUID.
nproc
limit for an individual gear is increased by changing the value in the 84-gear_UUID.conf
file:
nproc
limit.
2.1.6. Disk Quotas Copia collegamentoCollegamento copiato negli appunti!
/var/lib/openshift
directory has the usrquota
option enabled in the /etc/fstab
file, and has been mounted. Remount the directory if necessary using the command shown below, and check the output.
mount -o remount filesystem
# mount -o remount filesystemmount -o remount filesystem
repquota -a
# repquota -a
2.1.7. iptables Copia collegamentoCollegamento copiato negli appunti!
iptables -L
# iptables -L
iptables -L
command for both a broker host and a node host are shown below.