mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #14034 from hqhq/hq_checkconfig_xattr
Some check_config enhancement
This commit is contained in:
commit
f28877257b
1 changed files with 19 additions and 10 deletions
|
@ -113,7 +113,7 @@ check_device() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ ! -e "$CONFIG" ]; then
|
if [ ! -e "$CONFIG" ]; then
|
||||||
wrap_warning "warning: $CONFIG does not exist, searching other paths for kernel config..."
|
wrap_warning "warning: $CONFIG does not exist, searching other paths for kernel config ..."
|
||||||
for tryConfig in "${possibleConfigs[@]}"; do
|
for tryConfig in "${possibleConfigs[@]}"; do
|
||||||
if [ -e "$tryConfig" ]; then
|
if [ -e "$tryConfig" ]; then
|
||||||
CONFIG="$tryConfig"
|
CONFIG="$tryConfig"
|
||||||
|
@ -167,7 +167,7 @@ fi
|
||||||
flags=(
|
flags=(
|
||||||
NAMESPACES {NET,PID,IPC,UTS}_NS
|
NAMESPACES {NET,PID,IPC,UTS}_NS
|
||||||
DEVPTS_MULTIPLE_INSTANCES
|
DEVPTS_MULTIPLE_INSTANCES
|
||||||
CGROUPS CGROUP_CPUACCT CGROUP_DEVICE CGROUP_FREEZER CGROUP_SCHED CPUSETS
|
CGROUPS CGROUP_CPUACCT CGROUP_DEVICE CGROUP_FREEZER CGROUP_SCHED CPUSETS MEMCG
|
||||||
MACVLAN VETH BRIDGE BRIDGE_NETFILTER
|
MACVLAN VETH BRIDGE BRIDGE_NETFILTER
|
||||||
NF_NAT_IPV4 IP_NF_FILTER IP_NF_TARGET_MASQUERADE
|
NF_NAT_IPV4 IP_NF_FILTER IP_NF_TARGET_MASQUERADE
|
||||||
NETFILTER_XT_MATCH_{ADDRTYPE,CONNTRACK}
|
NETFILTER_XT_MATCH_{ADDRTYPE,CONNTRACK}
|
||||||
|
@ -181,8 +181,7 @@ echo
|
||||||
|
|
||||||
echo 'Optional Features:'
|
echo 'Optional Features:'
|
||||||
{
|
{
|
||||||
check_flags MEMCG_SWAP
|
check_flags MEMCG_KMEM MEMCG_SWAP MEMCG_SWAP_ENABLED
|
||||||
check_flags MEMCG_SWAP_ENABLED
|
|
||||||
if is_set MEMCG_SWAP && ! is_set MEMCG_SWAP_ENABLED; then
|
if is_set MEMCG_SWAP && ! is_set MEMCG_SWAP_ENABLED; then
|
||||||
echo " $(wrap_color '(note that cgroup swap accounting is not enabled in your kernel config, you can enable it by setting boot option "swapaccount=1")' bold black)"
|
echo " $(wrap_color '(note that cgroup swap accounting is not enabled in your kernel config, you can enable it by setting boot option "swapaccount=1")' bold black)"
|
||||||
fi
|
fi
|
||||||
|
@ -193,13 +192,24 @@ if [ "$kernelMajor" -lt 3 ] || [ "$kernelMajor" -eq 3 -a "$kernelMinor" -le 18 ]
|
||||||
fi
|
fi
|
||||||
|
|
||||||
flags=(
|
flags=(
|
||||||
BLK_CGROUP
|
BLK_CGROUP IOSCHED_CFQ
|
||||||
IOSCHED_CFQ
|
|
||||||
CGROUP_PERF
|
CGROUP_PERF
|
||||||
CFS_BANDWIDTH
|
CGROUP_HUGETLB
|
||||||
|
NET_CLS_CGROUP NETPRIO_CGROUP
|
||||||
|
CFS_BANDWIDTH FAIR_GROUP_SCHED RT_GROUP_SCHED
|
||||||
)
|
)
|
||||||
check_flags "${flags[@]}"
|
check_flags "${flags[@]}"
|
||||||
|
|
||||||
|
check_flags EXT3_FS EXT3_FS_XATTR EXT3_FS_POSIX_ACL EXT3_FS_SECURITY
|
||||||
|
if ! is_set EXT3_FS || ! is_set EXT3_FS_XATTR || ! is_set EXT3_FS_POSIX_ACL || ! is_set EXT3_FS_SECURITY; then
|
||||||
|
echo " $(wrap_color '(enable these ext3 configs if you are using ext3 as backing filesystem)' bold black)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
check_flags EXT4_FS EXT4_FS_POSIX_ACL EXT4_FS_SECURITY
|
||||||
|
if ! is_set EXT4_FS || ! is_set EXT4_FS_POSIX_ACL || ! is_set EXT4_FS_SECURITY; then
|
||||||
|
echo " $(wrap_color 'enable these ext4 configs if you are using ext4 as backing filesystem' bold black)"
|
||||||
|
fi
|
||||||
|
|
||||||
echo '- Storage Drivers:'
|
echo '- Storage Drivers:'
|
||||||
{
|
{
|
||||||
echo '- "'$(wrap_color 'aufs' blue)'":'
|
echo '- "'$(wrap_color 'aufs' blue)'":'
|
||||||
|
@ -207,16 +217,15 @@ echo '- Storage Drivers:'
|
||||||
if ! is_set AUFS_FS && grep -q aufs /proc/filesystems; then
|
if ! is_set AUFS_FS && grep -q aufs /proc/filesystems; then
|
||||||
echo " $(wrap_color '(note that some kernels include AUFS patches but not the AUFS_FS flag)' bold black)"
|
echo " $(wrap_color '(note that some kernels include AUFS patches but not the AUFS_FS flag)' bold black)"
|
||||||
fi
|
fi
|
||||||
check_flags EXT4_FS_POSIX_ACL EXT4_FS_SECURITY | sed 's/^/ /'
|
|
||||||
|
|
||||||
echo '- "'$(wrap_color 'btrfs' blue)'":'
|
echo '- "'$(wrap_color 'btrfs' blue)'":'
|
||||||
check_flags BTRFS_FS | sed 's/^/ /'
|
check_flags BTRFS_FS | sed 's/^/ /'
|
||||||
|
|
||||||
echo '- "'$(wrap_color 'devicemapper' blue)'":'
|
echo '- "'$(wrap_color 'devicemapper' blue)'":'
|
||||||
check_flags BLK_DEV_DM DM_THIN_PROVISIONING EXT4_FS EXT4_FS_POSIX_ACL EXT4_FS_SECURITY | sed 's/^/ /'
|
check_flags BLK_DEV_DM DM_THIN_PROVISIONING | sed 's/^/ /'
|
||||||
|
|
||||||
echo '- "'$(wrap_color 'overlay' blue)'":'
|
echo '- "'$(wrap_color 'overlay' blue)'":'
|
||||||
check_flags OVERLAY_FS EXT4_FS_SECURITY EXT4_FS_POSIX_ACL | sed 's/^/ /'
|
check_flags OVERLAY_FS | sed 's/^/ /'
|
||||||
|
|
||||||
echo '- "'$(wrap_color 'zfs' blue)'":'
|
echo '- "'$(wrap_color 'zfs' blue)'":'
|
||||||
echo " - $(check_device /dev/zfs)"
|
echo " - $(check_device /dev/zfs)"
|
||||||
|
|
Loading…
Add table
Reference in a new issue