forked from openshift/installer
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AGENT-615: Split create-cluster-and-infraenv.service
The service has been removed and split into agent-register-cluster.service agent-register-infraenv.service Both services continuously retries until their respective resource has been registered with the assisted-service REST-API or if the client sees that a resource as already been registered. Requires: openshift/assisted-service#5376 Signed-off-by: Richard Su <rwsu@redhat.com>
- Loading branch information
Showing
7 changed files
with
38 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
data/data/agent/systemd/units/agent-register-infraenv.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[Unit] | ||
Description=Service that registers the infraenv | ||
Wants=network-online.target assisted-service.service | ||
PartOf=assisted-service-pod.service | ||
After=network-online.target assisted-service.service agent-register-cluster.service | ||
ConditionPathExists=/etc/assisted/node0 | ||
|
||
[Service] | ||
Environment=PODMAN_SYSTEMD_UNIT=%n | ||
EnvironmentFile=/etc/assisted/rendezvous-host.env | ||
EnvironmentFile=/usr/local/share/assisted-service/agent-images.env | ||
EnvironmentFile=/usr/local/share/assisted-service/assisted-service.env | ||
ExecStartPre=/bin/rm -f %t/%n.ctr-id | ||
ExecStart=podman run --net host --cidfile=%t/%n.ctr-id --cgroups=no-conmon --log-driver=journald --rm --pod-id-file=%t/assisted-service-pod.pod-id --replace --name=agent-register-infraenv -v /etc/assisted/manifests:/manifests --env SERVICE_BASE_URL $SERVICE_IMAGE /usr/local/bin/agent-installer-client registerInfraEnv | ||
ExecStop=/usr/bin/podman stop --ignore --cidfile=%t/%n.ctr-id | ||
ExecStopPost=/usr/bin/podman rm -f --ignore --cidfile=%t/%n.ctr-id | ||
|
||
KillMode=none | ||
Type=oneshot | ||
Restart=on-failure | ||
RestartSec=30 | ||
RemainAfterExit=true | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters