Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding HtxBootme test on OpTest #814

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

TasmiyaNalatwad
Copy link
Contributor

The test is performed in below manner

  1. Starts Htx workload on mdt.all
  2. Starts bootme which reboots the lpar every 30 minutes
  3. wait for reboot and check htxerror logs after reboot, Htx must continue without any errors
  4. Stop bootme
  5. Stop Htx workload

Param : "boot_count" must be given from machine.conf file. The param is for the number of counts the reboot cycle must happen. Default is 6

machine.conf
[op-test]
bmc_type=
bmc_ip=
bmc_username=
bmc_password=
host_ip=
host_user=
host_password=
hmc_ip=
hmc_username=
hmc_password=
system_name=
lpar_name=
time_limit=
time_unit=
boot_count=
mdt_file=
htx_rpm_link=

@TasmiyaNalatwad TasmiyaNalatwad force-pushed the htxbootme branch 3 times, most recently from 60361af to 1d7c992 Compare March 22, 2024 14:28
@TasmiyaNalatwad
Copy link
Contributor Author

TasmiyaNalatwad commented Mar 22, 2024

Please find the Logs attached here
[20240322112000900167.debug.log]

testcases/OpTestHtxBootme.py Show resolved Hide resolved
testcases/OpTestHtxBootme.py Outdated Show resolved Hide resolved
testcases/OpTestHtxBootme.py Show resolved Hide resolved
@TasmiyaNalatwad TasmiyaNalatwad force-pushed the htxbootme branch 3 times, most recently from deac9c9 to 8e4f4f0 Compare April 8, 2024 15:25
@TasmiyaNalatwad
Copy link
Contributor Author

TasmiyaNalatwad commented Apr 8, 2024

@abdhaleegit @PraveenPenguin

  1. I have added bootme test for generic-mdt.all , Block devices and Nic devices in only one file.
  2. As we had discussed i am maintaining different classes for each test case, that can be called in the op-test command
    ./op-test --run testcases.OpTestHtxBootmeIO.HtxBootme_AllMdt -c machine.conf
  3. There are few more paramters to be added in the machine.conf file.
`[op-test]
bmc_type=
bmc_ip=
bmc_username==
bmc_password=
host_ip=
host_user=
host_password=
hmc_ip=
hmc_username=
hmc_password=
system_name=
lpar_name=
lpar_prof=default_profile
host_cmd_timeout=7200
git_home=/home/linux_src
machine_state=OS
time_limit=1
time_unit=m
boot_count=6
mdt_file=
htx_disks=
all=True
peer_public_ip=
peer_password=
peer_user=
htx_host_interfaces=
peer_interfaces=
htx_rpm_link=
`
  1. Attaching debug.log file for Htxbootme test on Block device to jira
  2. As we know ETA enabling Htxbootme on Nic devices is on April-25 currently i have added Htx test on the same file. Attaching debug.log file for Htx test on op-test. As the bootme code remains same and if there is no new command added in the Htxbootme for Nic device the code must work for testing Htxbootme on Nic devices after enabling bootme on it. If at all any new command is added, then that has to be included in the code.
  3. The Htx for Nic devices is running on latest changes made on HTX code what we have added on avocado as well.
  4. Attaching debug.log for Basic Htx test on Nic devices to jira

@abdhaleegit I am making use of Paramiko as i noticed pexpect is giving some time delay and sometimes getting stuck at the console prompt for infinite time. Paramiko looks much better method in that way. Also Paramiko gives various methods to check file existence, removing of file/directory and so many.

@TasmiyaNalatwad TasmiyaNalatwad force-pushed the htxbootme branch 2 times, most recently from 1b8f6f9 to 118484b Compare April 15, 2024 12:21
@abdhaleegit abdhaleegit self-requested a review April 16, 2024 14:35
log.debug(f"BLOCK DEVICES {self.block_device} ARE ACTIVE")
return True

def get_mpath_from_dm(self, dm_id):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@abdhaleegit 3 functions "get_mpath_from_dm" , "get_all_disk_paths" and "get_absolute_disk_path" These 3 functions can be moved to common libraries as these are common utilities used for Block devices. These functions will be required in future for different testcases by Block devices and multipath cases on op-test.

Copy link
Collaborator

Choose a reason for hiding this comment

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

can be moved to OpTestUtil.py

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can be moved to OpTestUtil.py

@abdhaleegit Tried moving the functions to common utils, but found some dependencies and code modifications, which would expand the functions a lot. Felt keeping here would be a better way to achieve this.

testcases/OpTestHtxBootme.py Show resolved Hide resolved
log.debug(f"BLOCK DEVICES {self.block_device} ARE ACTIVE")
return True

def get_mpath_from_dm(self, dm_id):
Copy link
Collaborator

Choose a reason for hiding this comment

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

can be moved to OpTestUtil.py

@abdhaleegit
Copy link
Collaborator

Separate out commits per each logical change

The test is performed in below manner
1. Starts Htx workload on mdt.all/Block devices/Nic devices
2. Starts bootme which reboots the lpar every 30 minutes
3. wait for reboot and check htxerror logs after reboot, Htx must continue without any errors
4. Stop bootme
5. Stop Htx workload

Param : "boot_count" must be given from machine.conf file. The param is for the number of counts the reboot cycle must happen.
Default is 6

Signed-off-by: Tasmiya Nalatwad <[email protected]>
The test is performed in below manner
1. Starts Htx workload on mdt.hd
2. Starts bootme which reboots the lpar every 30 minutes
3. wait for reboot and check htxerror logs after reboot, Htx must continue without any errors
4. Stop bootme
5. Stop Htx workload

Param : "boot_count" must be given from machine.conf file. The param is for the number of counts the reboot cycle must happen.
Default is 6
Param : "htx_disks" disks must be provided as input '/dev/mapper/mpathg /dev/mapper/mpathe' or  '/dev/sdg /dev/sde'
Param : "all" mention True or False based on the test you want to run on all devices or just input provided devices

Signed-off-by: Tasmiya Nalatwad <[email protected]>
@TasmiyaNalatwad
Copy link
Contributor Author

Separate out commits per each logical change

Done

Copy link
Collaborator

@abdhaleegit abdhaleegit left a comment

Choose a reason for hiding this comment

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

@TasmiyaNalatwad so we do not have logs for NIC bootme.. than you can split out the PR for NICbootme separately so I can merge this generic and block as this PR.. and keep open the other PR until ETA and we have tested once

testcases/OpTestHtxBootme.py Outdated Show resolved Hide resolved
@TasmiyaNalatwad
Copy link
Contributor Author

@TasmiyaNalatwad so we do not have logs for NIC bootme.. than you can split out the PR for NICbootme separately so I can merge this generic and block as this PR.. and keep open the other PR until ETA and we have tested once

@abdhaleegit Removed Nic devices from this PR as of now. After this is merged will share the separate PR for Nic devices

@abdhaleegit abdhaleegit self-requested a review April 19, 2024 16:30
Copy link
Collaborator

@abdhaleegit abdhaleegit left a comment

Choose a reason for hiding this comment

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

LGTM

@abdhaleegit abdhaleegit merged commit 90479de into open-power:master Apr 19, 2024
1 check 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.

2 participants