Skip to content

Conversation

@LunfanZhang
Copy link
Collaborator

@LunfanZhang LunfanZhang commented Jul 8, 2025

For the following scenarios, console timeout may not work and not reflect the real status of the database:

  • XenServer upgrade to a new version(e.g., XS9)
  • User accidentally deletes the configuration file

Add checks to ensure database and real status are matched, when the check detect the config file is lost and the config in db is not non-zero number, then it will re-create the configure file again.

For the following scenarios, console timeout may not reflect the real status
of the database:
 - XenServer upgrade to a new version
 - User accidentally deletes the configuration file

Add checks to ensure database and real status are matched.

Signed-off-by: Lunfan Zhang[Lunfan.Zhang] <[email protected]>
@lindig
Copy link
Contributor

lindig commented Jul 8, 2025

My understanding of the code is that the config file is re-created with the value from the database. This is not obvious from how this is presented in the commit message and discussion here. The code looks like it takes a value from the database and then again writes it to the database. But in addition if creates a file.

@LunfanZhang
Copy link
Collaborator Author

My understanding of the code is that the config file is re-created with the value from the database. This is not obvious from how this is presented in the commit message and discussion here. The code looks like it takes a value from the database and then again writes it to the database. But in addition if creates a file.

Yes, your understanding is absolutely correct. If the config file is lost, the system will detect a mismatch between the configuration in the database and the running system, especially after an upgrade that removes the config file or if a user accidentally deletes it. Therefore, a protection check is being added here.
I updated the PR message a bit to clarify this.

@lindig lindig merged commit d34d581 into xapi-project:feature/configure-ssh-phase3 Jul 8, 2025
16 checks passed
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.

3 participants