mirror of
https://github.com/rancher/rke.git
synced 2025-07-15 08:02:56 +00:00
Update SecurityOptions format for Docker API
This commit is contained in:
parent
eccc55a1ab
commit
67c17cd9a2
@ -473,7 +473,9 @@ func GetInternalAddressForHosts(hostList []*Host) []string {
|
|||||||
|
|
||||||
func IsDockerSELinuxEnabled(host *Host) bool {
|
func IsDockerSELinuxEnabled(host *Host) bool {
|
||||||
for _, securityOpt := range host.DockerInfo.SecurityOptions {
|
for _, securityOpt := range host.DockerInfo.SecurityOptions {
|
||||||
if securityOpt == "selinux" {
|
logrus.Tracef("IsDockerSELinuxEnabled: securityOpt found: [%s]", securityOpt)
|
||||||
|
// name=selinux was the value returned after removing statically set Docker API version 1.24
|
||||||
|
if securityOpt == "selinux" || securityOpt == "name=selinux" {
|
||||||
logrus.Debugf("Host [%s] has SELinux enabled in Docker", host.Address)
|
logrus.Debugf("Host [%s] has SELinux enabled in Docker", host.Address)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user