Skip to content

CP-53477 Update host/pool datamodel to support Dom0 SSH Control #6382

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

LunfanZhang
Copy link
Contributor

This PR introduces support for Dom0 SSH control, providing the following capabilities:

Query the SSH status.
Configure a temporary SSH enable timeout.
Configure the console idle timeout for a specific host or all hosts in the pool.
Changes
New Host Object Fields:

  • ssh_enabled: Indicates whether SSH is enabled.
  • ssh_enabled_timeout: Specifies the timeout for temporary SSH enablement.
  • ssh_expiry: Tracks the expiration time for temporary SSH enablement.

console_idle_timeout: Configures the idle timeout for the console.
New Host/Pool APIs:

  • set_ssh_enable_timeout: Allows setting a temporary timeout for enabling the SSH service.
  • set_console_timeout: Allows configuring the console idle timeout.

…onfigure

Add new host object fields:
  - ssh_enabled
  - ssh_enabled_timeout
  - ssh_expiry
  - console_idle_timeout
Add new host/pool API to enable to set a temporary enabled SSH service timeout
  - set_ssh_enable_timeout
Add new host/pool API to enable to set console timeout
  - set_console_timeout

Signed-off-by: Lunfan Zhang <Lunfan.Zhang@cloud.com>
@gangj
Copy link
Contributor

gangj commented Mar 24, 2025

@LunfanZhang Pls fix the build failures.

@@ -3112,22 +3114,171 @@ let emergency_clear_mandatory_guidance ~__context =
) ;
Db.Host.set_pending_guidances ~__context ~self ~value:[]

let validate_timeout timeout =
if timeout < -1L || timeout > 2880L then
Copy link
Contributor

@gangj gangj Mar 24, 2025

Choose a reason for hiding this comment

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

Is -1 a valid value?

@gangj
Copy link
Contributor

gangj commented Mar 24, 2025

I think we need a feature branch for ssh management phase2 work?

@LunfanZhang
Copy link
Contributor Author

I think we need a feature branch for ssh management phase2 work?

there already have one, I will close this PR to submit another for the correct feature branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants