cloud: rename ShepherdInstall to ShepherdAccess and clean up other 'installation' references

ShepherdInstall should've been called ShepherdAgentStart from the
beginning, but got named incorrectly because of a momentary lapse of
reason.

Instead of doing a rename, we widen that Process to anything that
involved the Shepherds directly accessing the underlying provider
machines, be it starting the agent, trying to fix the machine, or
rebooting a machine. This wide meaning makes sure no two shepherds work
on the same machine ever, regardless of the actual workflow each one is
performing.

Change-Id: Ic247919d1bcf1c5ec9fcf7125f17b90413068ed5
Reviewed-on: https://review.monogon.dev/c/monogon/+/1138
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/cloud/bmaas/bmdb/model/queries_workflows.sql b/cloud/bmaas/bmdb/model/queries_workflows.sql
index b0132a3..8f22f41 100644
--- a/cloud/bmaas/bmdb/model/queries_workflows.sql
+++ b/cloud/bmaas/bmdb/model/queries_workflows.sql
@@ -6,14 +6,14 @@
 WHERE machine_provided.provider = $1;
 
 -- name: GetMachinesForAgentStart :many
--- Get machines that need agent installed for the first time. Machine can be
+-- Get machines that need agent started for the first time. Machine can be
 -- assumed to be 'new', with no previous attempts or failures.
 SELECT
     machine_provided.*
 FROM machines
 INNER JOIN machine_provided ON machines.machine_id = machine_provided.machine_id
-LEFT JOIN work ON machines.machine_id = work.machine_id AND work.process = 'ShepherdInstall'
-LEFT JOIN work_backoff ON machines.machine_id = work_backoff.machine_id AND work_backoff.until > now() AND work_backoff.process = 'ShepherdInstall'
+LEFT JOIN work ON machines.machine_id = work.machine_id AND work.process = 'ShepherdAccess'
+LEFT JOIN work_backoff ON machines.machine_id = work_backoff.machine_id AND work_backoff.until > now() AND work_backoff.process = 'ShepherdAccess'
 LEFT JOIN machine_agent_started ON machines.machine_id = machine_agent_started.machine_id
 WHERE
   machine_agent_started.machine_id IS NULL
@@ -24,17 +24,17 @@
 LIMIT $1;
 
 -- name: GetMachineForAgentRecovery :many
--- Get machines that need agent installed after something went wrong. Either
+-- Get machines that need agent restarted after something went wrong. Either
 -- the agent started but never responded, or the agent stopped responding at
--- some point, or the machine is being reinstalled after failure. Assume some
--- work needs to be performed on the shepherd side to diagnose and recover
+-- some point, or the machine got rebooted or somehow else lost the agent. Assume
+-- some work needs to be performed on the shepherd side to diagnose and recover
 -- whatever state the machine truly is in.
 SELECT
     machine_provided.*
 FROM machines
 INNER JOIN machine_provided ON machines.machine_id = machine_provided.machine_id
-LEFT JOIN work ON machines.machine_id = work.machine_id AND work.process = 'ShepherdInstall'
-LEFT JOIN work_backoff ON machines.machine_id = work_backoff.machine_id AND work_backoff.until > now() AND work_backoff.process = 'ShepherdInstall'
+LEFT JOIN work ON machines.machine_id = work.machine_id AND work.process = 'ShepherdAccess'
+LEFT JOIN work_backoff ON machines.machine_id = work_backoff.machine_id AND work_backoff.until > now() AND work_backoff.process = 'ShepherdAccess'
 LEFT JOIN machine_agent_started ON machines.machine_id = machine_agent_started.machine_id
 LEFT JOIN machine_agent_heartbeat ON machines.machine_id = machine_agent_heartbeat.machine_id
 WHERE