Skip to content

Commit

Permalink
Merge pull request openshift#704 from runcom/fix-mcd-logs
Browse files Browse the repository at this point in the history
Small fixes + remove not needed mounts
  • Loading branch information
openshift-merge-robot authored May 6, 2019
2 parents 1687ce7 + 2510cff commit a2c37de
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 56 deletions.
26 changes: 0 additions & 26 deletions manifests/machineconfigdaemon/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,6 @@ spec:
volumeMounts:
- mountPath: /rootfs
name: rootfs
# For now, we chroot into /rootfs, so we're not really making use of
# these mount points below (it works transparently right now because
# the mounted path is the same as the host path). They're mostly kept
# for documentation purposes, and in case we stop chroot'ing.
- mountPath: /var/run/dbus
name: var-run-dbus
- mountPath: /run/systemd
name: run-systemd
- mountPath: /etc/ssl/certs
name: etc-ssl-certs
readOnly: true
- mountPath: /etc/machine-config-daemon
name: etc-mcd
readOnly: true
env:
- name: NODE_NAME
valueFrom:
Expand All @@ -64,15 +50,3 @@ spec:
- name: rootfs
hostPath:
path: /
- name: var-run-dbus
hostPath:
path: /var/run/dbus
- name: run-systemd
hostPath:
path: /run/systemd
- name: etc-ssl-certs
hostPath:
path: /etc/ssl/certs
- name: etc-mcd
hostPath:
path: /etc/machine-config-daemon
6 changes: 3 additions & 3 deletions pkg/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,6 @@ func NewClusterDrivenDaemon(
eventBroadcaster.StartRecordingToSink(&clientsetcorev1.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")})
dn.recorder = eventBroadcaster.NewRecorder(scheme.Scheme, corev1.EventSource{Component: "machineconfigdaemon", Host: nodeName})

dn.logSystem("Starting to manage node: %s", nodeName)

go dn.runLoginMonitor(dn.stopCh, dn.exitCh)

nodeInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
Expand Down Expand Up @@ -497,6 +495,8 @@ func (dn *Daemon) InstallSignalHandler(signaled chan struct{}) {
// responsible for triggering callbacks to handle updates. Successful
// updates shouldn't return, and should just reboot the node.
func (dn *Daemon) Run(stopCh, signaled <-chan struct{}, exitCh <-chan error) error {
dn.logSystem("Starting to manage node: %s", dn.name)

if dn.kubeletHealthzEnabled {
glog.Info("Enabling Kubelet Healthz Monitor")
go dn.runKubeletHealthzMonitor(stopCh, dn.exitCh)
Expand Down Expand Up @@ -856,7 +856,7 @@ func (dn *Daemon) CheckStateOnBoot() error {
return err
}
// write a file with current fingerprint overriding the previous
if err := writeFileAtomicallyWithDefaults(currentConfigPath, mcJSON); err != nil {
if err := writeFileAtomicallyWithDefaults(dn.currentConfigPath, mcJSON); err != nil {
return err
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/daemon/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ func (dn *Daemon) logSystem(format string, a ...interface{}) {

go func() {
defer stdin.Close()
io.WriteString(stdin, "machine-config-daemon: ")
io.WriteString(stdin, fmt.Sprintf("machine-config-daemon[%d]: ", os.Getpid()))
io.WriteString(stdin, message)
}()
err = logger.Run()
Expand Down
26 changes: 0 additions & 26 deletions pkg/operator/assets/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a2c37de

Please sign in to comment.