Skip to content

Commit

Permalink
DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
adityagesh committed Nov 13, 2024
1 parent 139ab4f commit 36d4462
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions lisa/tools/reboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@ def reboot(self, time_out: int = 300) -> None:
# uptime has no -s parameter in some distros, so not use is as default.
try:
last_boot_time = who.last_boot()
self._log.info(f"last boot time in try: {last_boot_time}")
except Exception:
uptime = self.node.tools[Uptime]
last_boot_time = uptime.since_time()
self._log.info(f"last boot time in except: {last_boot_time}")

current_boot_time = last_boot_time

# who -b returns time without seconds.
Expand Down
11 changes: 7 additions & 4 deletions lisa/transformers/kernel_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,14 @@ def _internal_run(self) -> Dict[str, Any]:
message.old_kernel_version = uname.get_linux_information(
force_run=True
).kernel_version_raw

kernel_version = self._node.execute("uname -r").stdout
self._log.info(f"current kernel version1: {kernel_version}")
installed_kernel_version = installer.install()
build_sucess = True
self._information = installer.information
self._log.info(f"installed kernel version: {installed_kernel_version}")

kernel_version = self._node.execute("uname -r").stdout
self._log.info(f"current kernel version2: {kernel_version}")
# for ubuntu cvm kernel, there is no menuentry added into grub file when
# the installer's type is "source", it needs to add the menuentry into grub
# file. Otherwise, the node might not boot into the new kernel especially
Expand Down Expand Up @@ -195,9 +197,10 @@ def _internal_run(self) -> Dict[str, Any]:
sudo=True,
shell=True,
)

kernel_version = self._node.execute("uname -r").stdout
self._log.info(f"current kernel version3: {kernel_version}")
self._log.info("rebooting")
node.reboot(time_out=900)
node.reboot(time_out=1200)
boot_success = True
new_kernel_version = uname.get_linux_information(force_run=True)
message.new_kernel_version = new_kernel_version.kernel_version_raw
Expand Down

0 comments on commit 36d4462

Please sign in to comment.