Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/data/agent/files/usr/local/bin/install-status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inactive_services() {

if [ -f "/etc/assisted/interactive-ui" ]; then
# interactive workflow
services+=" agent-ui.service"
services+=" agent-register-infraenv.service agent-ui.service"
elif [ -f "/etc/assisted/add-nodes.env" ]; then
# add nodes workflow
services+=" agent-import-cluster.service agent-register-infraenv.service apply-host-config.service agent-add-node.service"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Wants=network-online.target assisted-service.service
PartOf=assisted-service-pod.service
After=network-online.target assisted-service.service agent-register-cluster.service agent-import-cluster.service
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not like that the agent-register-infraenv.service should be the one that starts as soon as assisted service is up?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And, agent-register-cluster.service agent-import-cluster.service should be after agent-register-infraenv.service

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the regular ABI flow we bind the InfraEnv to the Cluster at the time the InfraEnv is created, which means the Cluster must be created first.

For the late-binding flow we can create the InfraEnv without creating a Cluster. (That's what this change enables.)

Perhaps in the future we will use late-binding everywhere, but that would require other changes to bind the hosts to the Cluster at a later stage that I am not proposing right now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this config will work fine, as agent-start-ui will pull-in the agent-register-infraenv svc when executed (so when the sentinel file /etc/assisted/interactive-ui will be present).
The agent-register-cluster will keep being skipped in such case

ConditionPathExists=/etc/assisted/node0
ConditionPathExists=!/etc/assisted/interactive-ui

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
Expand All @@ -24,4 +23,4 @@ RestartSec=30
RemainAfterExit=true

[Install]
WantedBy=start-cluster-installation.service agent-add-node.service
WantedBy=start-cluster-installation.service agent-add-node.service agent-start-ui.service
2 changes: 1 addition & 1 deletion data/data/agent/systemd/units/agent-ui.service.template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Unit]
Description=Agent Installer Web UI
Wants=network-online.target assisted-service.service
After=network-online.target assisted-service.service
After=network-online.target assisted-service.service agent-register-infraenv.service
PartOf=assisted-service-pod.service
ConditionPathExists=/etc/assisted/node0
ConditionPathExists=/etc/assisted/interactive-ui
Expand Down
Loading