code: func (c *Cluster) errNoManager(st nodeState) error {
  	if st.swarmNode == nil {
  		if errors.Cause(st.err) == errSwarmLocked {
  			return errSwarmLocked
  		}
  		if st.err == errSwarmCertificatesExpired {
  			return errSwarmCertificatesExpired
  		}
  		return errors.WithStack(notAvailableError("This node is not a swarm manager. Use \"docker swarm init\" or \"docker swarm join\" to connect this node to swarm and try again."))
  	}
  	if st.swarmNode.Manager() != nil {
  		return errors.WithStack(notAvailableError("This node is not a swarm manager. Manager is being prepared or has trouble connecting to the cluster."))
  	}
  	return errors.WithStack(notAvailableError("This node is not a swarm manager. Worker nodes can't be used to view or modify cluster state. Please run this command on a manager node or promote the current node to a manager."))
  }
docs: // errNoManager returns error describing why manager commands can't be used.
  // Call with read lock.