 
   (kill-instance [this {:keys [id service-id] :as instance}]
     (if (scheduler/service-exists? this service-id)
-      (let [completion-promise (promise)]
-        (send id->service-agent kill-instance service-id id
+      (let [completion-promise (promise)
+            message "Killed using scheduler API"]
+        (send id->service-agent kill-instance service-id id message
               port->reservation-atom port-grace-period-ms
               completion-promise)
         (let [result (deref completion-promise)

            (deliver completion-promise :deleted)
            (-> id->service
                (update-in [service-id :service :instances] dec)
                (assoc-in [service-id :id->instance instance-id :killed?] true)
                (assoc-in [service-id :id->instance instance-id :shell-scheduler/process] nil)))
          (do
            (log/info "instance" instance-id "does not exist")
            (deliver completion-promise :no-such-instance-exists)

    (let [exit-value (.exitValue process)]
      (log/info "instance exited with value" {:instance instance :exit-value exit-value})
      (release-port! port->reservation-atom port port-grace-period-ms)
      (assoc instance
        :exit-code exit-value
        :failed? (if (zero? exit-value) false true)
        :healthy? false
        :killed? true ; does not actually mean killed -- using this to mark inactive
        :message (str "Exited with code " exit-value)))
    instance))

(defn- enforce-grace-period
