Skip to content

Soft restart#920

Merged
mfriesenegger merged 2 commits intoopenmainframeproject:masterfrom
P-V-SAI-SURAKSHA:feat/phase3_soft_restart
Sep 11, 2025
Merged

Soft restart#920
mfriesenegger merged 2 commits intoopenmainframeproject:masterfrom
P-V-SAI-SURAKSHA:feat/phase3_soft_restart

Conversation

@P-V-SAI-SURAKSHA
Copy link

@P-V-SAI-SURAKSHA P-V-SAI-SURAKSHA commented Aug 4, 2025

Purpose of the PR: To gracefully handle scenarios when the OS release file is missing from the VM.

@P-V-SAI-SURAKSHA P-V-SAI-SURAKSHA force-pushed the feat/phase3_soft_restart branch 2 times, most recently from 1df8632 to b304638 Compare August 6, 2025 18:59
Comment on lines 1412 to 1415
try:
self.execute_cmd(userid, 'date')
except Exception as err:
return os_version
Copy link
Contributor

Choose a reason for hiding this comment

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

We can utilize the below try except block to return the os_version

@@ -1407,56 +1407,73 @@ def guest_capture(self, userid, image_name, capture_type='rootonly',

def guest_get_os_version(self, userid):
os_version = ''
Copy link
Contributor

Choose a reason for hiding this comment

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

this can be changed to : os_version = ‘-‘ as we are returning - as os_version whenever we are unable to find one in the release file

os_version = ''.join((distro, distro_version))

else:
os_version = "-"
Copy link
Contributor

Choose a reason for hiding this comment

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

Else block is not required as we are anyways defined the os_version at top

os_version = "-"

except Exception as err:
os_version = "-"
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of re initializing os_version, Is is possible to add a logging here

@P-V-SAI-SURAKSHA P-V-SAI-SURAKSHA force-pushed the feat/phase3_soft_restart branch from b304638 to 696b652 Compare August 7, 2025 18:06
distro_version = release_info[0].split()[6]
os_version = ''.join((distro, distro_version))
"""
Retrieves the operating system details of the VM.
Copy link
Contributor

Choose a reason for hiding this comment

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

Retrieves the operating system name and version of the VM from release file

"""
Retrieves the operating system details of the VM.
:param userid: User ID of the VM.
:return: A string containing the OS details.
Copy link
Contributor

Choose a reason for hiding this comment

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

A string containing the OS name and version information

Signed-off-by: suraksha <p.v.sai.suraksha@ibm.com>
@P-V-SAI-SURAKSHA P-V-SAI-SURAKSHA force-pushed the feat/phase3_soft_restart branch from 696b652 to 77a0e61 Compare August 8, 2025 06:26
Copy link
Contributor

@Bischoff Bischoff left a comment

Choose a reason for hiding this comment

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

Please notice that this PR will also touch the management of release files:

#860

@Bischoff Bischoff requested a review from in-manishkr September 2, 2025 15:58
Copy link
Contributor

@in-manishkr in-manishkr left a comment

Choose a reason for hiding this comment

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

LGTM

@in-manishkr
Copy link
Contributor

As stated by @Bischoff and verified by me This might conflict with MR 860

Please review your changes @P-V-SAI-SURAKSHA and the changes in MR 860 to find a common ground

@Bischoff
Copy link
Contributor

Bischoff commented Sep 4, 2025

As stated by @Bischoff and verified by me This might conflict with MR 860

Please review your changes @P-V-SAI-SURAKSHA and the changes in MR 860 to find a common ground

Don't worry, I will rebase on top of your work. I am slower, and I don't want to block you.

It was more of a heads up message, so you know I am working on this part as well.

Approving.

@Bischoff Bischoff self-requested a review September 4, 2025 14:03
Copy link
Contributor

@Bischoff Bischoff left a comment

Choose a reason for hiding this comment

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

LGTM

@mfriesenegger mfriesenegger merged commit 4751787 into openmainframeproject:master Sep 11, 2025
2 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.

5 participants