Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit fail-on-swap override to cluster-up #17385

Merged
merged 2 commits into from
Nov 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions pkg/cmd/server/kubernetes/node/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ func Build(options configapi.NodeConfig) (*kubeletoptions.KubeletServer, error)
server.RemoteImageEndpoint = options.DockerConfig.DockerShimSocket
server.DockershimRootDirectory = options.DockerConfig.DockershimRootDirectory

// TODO: check/warn/fail in setup instead?
// allows kubelet to continue to start in swap environments
server.FailSwapOn = false

// prevents kube from generating certs
server.TLSCertFile = options.ServingInfo.ServerCert.CertFile
server.TLSPrivateKeyFile = options.ServingInfo.ServerCert.KeyFile
Expand Down
7 changes: 4 additions & 3 deletions pkg/oc/bootstrap/docker/openshift/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,9 @@ func (h *Helper) updateConfig(configDir string, opt *StartOptions) error {
nodeCfg.DNSIP = ""
}
nodeCfg.DNSBindAddress = ""
if nodeCfg.KubeletArguments == nil {
nodeCfg.KubeletArguments = configapi.ExtendedArguments{}
}

if h.supportsCgroupDriver() {
// Set the cgroup driver from the current docker
Expand All @@ -895,11 +898,9 @@ func (h *Helper) updateConfig(configDir string, opt *StartOptions) error {
return err
}
glog.V(5).Infof("cgroup driver from Docker: %s", cgroupDriver)
if nodeCfg.KubeletArguments == nil {
nodeCfg.KubeletArguments = configapi.ExtendedArguments{}
}
nodeCfg.KubeletArguments["cgroup-driver"] = []string{cgroupDriver}
}
nodeCfg.KubeletArguments["fail-swap-on"] = []string{"false"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this appears to have broken backwards compatibility for cluster up.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 error: Invalid NodeConfig /var/lib/origin/openshift.local.config/node-localhost/node-config.yaml
       flag: Invalid value: "fail-swap-on": is not a valid flag

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will update with a version gated check

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sadly it's going to have to be something like "greater than 3.8.0-alpha.0".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, I know. and I'm sad

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


cfgBytes, err = configapilatest.WriteYAML(nodeCfg)
if err != nil {
Expand Down