Uploaded image for project: 'Machine Config Operator'
  1. Machine Config Operator
  2. MCO-117

MCD Goroutines should all shut down

XMLWordPrintable

    • 0
    • 0

      As the MCD is currently written, it spawns a few goroutines independent of the main syncNode code. These goroutines do things such as monitor for SSH logins, monitor the Kubelet healthz endpoint, nodewriter, metrics listener, etc. These all accept a stopCh parameter which appears to be used for shutting down that goroutine. It also appears that the intent is that if that channel is closed, all listening goroutines will shut down.

      However, this is not what is actually happening:

      At a minimum, we need to make sure that dn.stopCh is initialized with the stopCh from cmd/machine-config-daemon/start.go. However, I think the preferred solution would be to use contexts as they are a more idiomatic way of controlling multiple goroutines (https://go.dev/play/p/rl8BP7BHMGV (notice that all of the goroutines that are spawned eventually shut down).

              Unassigned Unassigned
              zzlotnik@redhat.com Zack Zlotnik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: