   overallState = stateF doc, allServices
   overallState = 'failing' unless overallState
   Instances.update doc._id, $set: state: overallState
-  console.log 'determineState::update'
 
 f = false
 

        service = labels['bigboat.service.name']
        updateDoc["services.#{service}.aux.#{type}"] = auxUpdateDoc
        Instances.update {name: name}, $set: updateDoc
        console.log 'updateServiceState::update'

  #
  # Updates the internal state based on image pulls

        updateDoc["services.#{service}.properties"] = properties
        updateDoc.status = "Starting #{service}" if mappedState is 'starting'
        updateDoc.status = "Stopping #{service}" if mappedState is 'stopping'
        Instances.upsert {name: name}, $set: updateDoc
      else
        updateDoc = name: name
