-
Notifications
You must be signed in to change notification settings - Fork 1.5k
AGENT-453: Create interactive console service for agent installer #6756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pkg/asset/agent/image/ignition.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for naming it agent-<...>, in the long term I think it'd be easier to rename all of our services with a known fixed prefix (for the sake of troubleshooting)
data/data/agent/systemd/units/agent-interactive-console.service
Outdated
Show resolved
Hide resolved
Users would like the ability to change their network configuration at the console if network connectivity problems are detected. To achieve this goal, this patch adds a new service called agent-interactive-console.service to block the login prompt and the agent services that pulls an image from the registry. The service will execute the agent TUI to allow users to update their network configuration. The TUI will check there is connectivity to the registry and to the rendezvous host. If the connectivity checks pass, the TUI exits, which also lead the interactive console service to exit, and this unblocks the login prompt and agent services waiting for pull from the registry, allowing the agent-based installer to proceed. The agent TUI will be added in a future patch. For now, the service executes a script that logs its presence, sleeps for 60 seconds, and exits. This should not block the automated flow. Added ConditionPathExists=/usr/local/bin/agent-tui, which means the service does not start nor is it active until the agent-tui binary is present at that path. Most of the service definition was lifted from celebdor's POC: openshift#6560 Signed-off-by: Richard Su <[email protected]>
The interactive console service will not start or be active until the path exists.
|
/lgtm |
Create a .path to track existence of the agent-tui. If the agent-tui binary exists at the specified path, PathExists, then the unit agent-interactive-console.service will be enabled. If the agent-tui binary does not exist, then agent-interactive-console.service is not enabled.
Update the interactive console service to have it check the current host can access the release image and rendezvous host. Display this connectivity information to the user before prompting to run the network configuration tui. If there is connectivity, then the prompt times out after 60s and the automation flow is allowed to continue. If there is a connectivity issue, then the network configuration tui will be executed to allow users to update. The tui, however, has not been integrated with the interactive console service, so in the meantime, there is a 60s sleep in place of executing the tui. This will be changed in a future patch. Depends on: openshift#6756 Signed-off-by: Richard Su <[email protected]>
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andfasano The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
|
@rwsu: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Users would like the ability to change their network configuration at the console if network connectivity problems are detected.
To achieve this goal, this patch adds a new service called agent-interactive-console.service to block the login prompt and the agent services that pulls an image from the registry.
The service will execute the agent TUI to allow users to update their network configuration. The TUI will check there is connectivity to the registry and to the rendezvous host. If the connectivity checks pass, the TUI exits, which also lead the interactive console service to exit, and this unblocks the login prompt and agent services waiting for pull from the registry, allowing the agent-based installer to proceed.
The agent TUI will be added in a future patch.
For now, the service executes a script that logs its presence, sleeps for 60 seconds, and exits. This should not block the automated flow.
Most of the service definition was lifted from @celebdor's POC: #6560
Signed-off-by: Richard Su [email protected]