CP-53802: Restore SSH service to default state in pool eject#6399
Conversation
| ) ; | ||
| (* Restore SSH service to its default state: enabled with no timeout *) | ||
| Xapi_host.set_ssh_enabled_timeout ~__context ~self:host ~value:0L ; | ||
| Xapi_host.enable_ssh ~__context ~self:host ; |
There was a problem hiding this comment.
What's your consideration here about the exceptions that host ssh operations may raise?
|
This implicitly encodes the default value inside the implementation of Also, we must wrap this with an exception handler to ensure we don't fail the eject if this goes wrong. |
c062060 to
741b7a0
Compare
| ; field ~qualifier:DynamicRO ~lifecycle:[] ~ty:Int | ||
| ~default_value:(Some (VInt 0L)) "console_idle_timeout" | ||
| ~default_value:(Some (VInt Constants.default_console_idle_timeout)) | ||
| "console_idle_timeout" |
There was a problem hiding this comment.
Do you replace them all? I remembered there are some default values to be set in last merged PR.
There was a problem hiding this comment.
In #6395, xapi_host.ml, dbsync_slave.ml ...
Also suggest splitting to a single commit for the default value
741b7a0 to
9adf643
Compare
After being ejected from a pool, a new host obj will be created with default settings in DB. This commit configures SSH service in the ejected host to default state during pool eject. Signed-off-by: Gang Ji <gang.ji@cloud.com>
Signed-off-by: Gang Ji <gang.ji@cloud.com>
9adf643 to
0bc2246
Compare
changlei-li
left a comment
There was a problem hiding this comment.
Still not sure if Constants is the best place to define the default values, but no better suggestion now.
I think |
25ed999
into
xapi-project:feature/configure-ssh-phase2
After being ejected from a pool, a new host obj will be created with default settings in DB.
This commit configures SSH service in the ejected host to default state during pool eject.