Skip to content

Commit

Permalink
Merge pull request #2846 from shirishaganta1/fix-htx-running-issue
Browse files Browse the repository at this point in the history
htx_test.py: Fixed the error where htxd is already running
  • Loading branch information
PraveenPenguin committed Jun 27, 2024
2 parents fdb9a0a + 109b538 commit 7398f5d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions io/net/htx_nic_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ def run_htx(self):

def start_htx_run(self):
self.log.info("Running the HTX for %s on Host", self.mdt_file)
# Kill existing HTXD process if running
htxd_pid = process.getoutput("pgrep -f htxd")
if htxd_pid:
self.log.info("HTXD is already running with PID: %s. Killing it.", htxd_pid)
process.run("pkill -f htxd", ignore_status=True)
time.sleep(10)
cmd = "htxcmdline -run -mdt %s" % self.mdt_file
process.run(cmd, shell=True, sudo=True)

Expand Down
6 changes: 6 additions & 0 deletions workload/htx_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ def setup_htx(self):
else:
self.cancel("RPM link is required for RPM run type")
self.log.info("Starting the HTX Deamon")
# Kill existing HTXD process if running
htxd_pid = process.getoutput("pgrep -f htxd")
if htxd_pid:
self.log.info("HTXD is already running with PID: %s. Killing it.", htxd_pid)
process.run("pkill -f htxd", ignore_status=True)
time.sleep(10)
process.run('/usr/lpp/htx/etc/scripts/htxd_run')

self.log.info("Creating the HTX mdt files")
Expand Down

0 comments on commit 7398f5d

Please sign in to comment.