Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
4411e12
Enhance AzureDataParser to support max_mbps and max_iops properties i…
devanshjainms Oct 23, 2025
7a05d0d
Refactor debug tasks in configuration checks to log results from comm…
devanshjainms Oct 23, 2025
4aa9b3e
Fix log variable names in debug tasks for HA and configuration checks
devanshjainms Oct 23, 2025
4eae16a
Remove test_group_invocation_id from report file name in configuratio…
devanshjainms Oct 23, 2025
adcb59b
Refactor AzureDataParser to simplify property retrieval from filesyst…
devanshjainms Oct 23, 2025
476446a
Enhance configuration checks by adding LVM and ANF volume checks for …
devanshjainms Oct 27, 2025
693fe2c
Add verbosity to debug logs in HA and configuration check tasks
devanshjainms Oct 27, 2025
8f024a3
Fix role reference for PAS in enums and add section to report
devanshjainms Oct 27, 2025
18671f5
Add table entry to report enums in ASCS configuration
devanshjainms Oct 27, 2025
51c8a20
Enhance configuration checks to include ASCS and APP roles; streamlin…
devanshjainms Oct 27, 2025
b24b0b3
Add filesystem and Azure disk checks for APP and ASCS roles; enhance …
devanshjainms Oct 27, 2025
3887743
Add ASCS role to checks for database and storage types in ASCS config…
devanshjainms Oct 27, 2025
176d55e
Remove verbosity from debug output for AFS storage data collection
devanshjainms Oct 27, 2025
9d2f053
Enhance error handling in Azure storage account retrieval; improve ou…
devanshjainms Oct 27, 2025
e6ec088
Update DNS for Azure storage account to use private link for NFS shares
devanshjainms Oct 27, 2025
5654f16
Enhance AFS storage data handling to include storage account name in …
devanshjainms Oct 27, 2025
ffe21e4
Update Azure package dependencies in configuration and functional tes…
devanshjainms Oct 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/module_utils/filesystem_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,11 @@ def _parse_filesystem_data(

if not matched:
for nfs_share in afs_storage_data:
storage_account_name = nfs_share.get("Pool", "")
share_address = nfs_share.get("NFSAddress", "")
if ":" in share_address and share_address.split(":")[0] == nfs_address:
if (
":" in share_address and share_address.split(":")[0] == nfs_address
) or storage_account_name in nfs_address:
filesystem_entry["max_mbps"] = nfs_share.get("ThroughputMibps", 0)
filesystem_entry["max_iops"] = nfs_share.get("IOPS", 0)
filesystem_entry["nfs_type"] = "AFS"
Expand Down
7 changes: 6 additions & 1 deletion src/modules/configuration_check_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,12 @@ def run(self):
context["hostname"] = custom_hostname

self.set_context(context)
if self.context.get("check_type", {}).get("file_name") in ["hana", "db2"]:
if self.context.get("check_type", {}).get("file_name") in [
"hana",
"db2",
"ascs",
"app",
]:
temp_context = FileSystemCollector(parent=self).collect(
check=None, context=self.context
)
Expand Down
5 changes: 1 addition & 4 deletions src/modules/get_azure_lb.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,7 @@ def get_private_ip_from_config(config):
Extract private IP from frontend config, handling different key variations.
Azure SDK might return different structures based on authentication context.
"""
private_ip = (
config.get("private_ip_address")
or config.get("privateIpAddress")
)
private_ip = config.get("private_ip_address") or config.get("privateIpAddress")
return private_ip

found_load_balancer = next(
Expand Down
11 changes: 8 additions & 3 deletions src/playbook_00_configuration_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@
become: true
ansible.builtin.pip:
name:
- ansible-runner
- azure-identity
- azure-kusto-data
- azure-kusto-ingest
- azure-mgmt-compute
- azure-mgmt-network
- azure-storage-blob
- azure-storage-queue


- name: "Generate test group ID and timestamp"
ansible.builtin.set_fact:
Expand Down Expand Up @@ -438,8 +443,8 @@
ansible.builtin.include_tasks: "./roles/misc/tasks/render-html-report.yml"
vars:
html_template_name: "./templates/config_checks_report.html"
report_file_name: "CONFIG_{{ sap_sid | upper }}_{{ platform | upper }}_{{ test_group_invocation_id }}"
report_file_name: "CONFIG_{{ sap_sid | upper }}_{{ platform | upper }}"

- name: "Debug the file name of the report generated"
ansible.builtin.debug:
msg: "Report file CONFIG_{{ sap_sid | upper }}_{{ platform | upper }}_{{ test_group_invocation_id }} generated."
msg: "Report file CONFIG_{{ sap_sid | upper }}_{{ platform | upper }} generated."
6 changes: 4 additions & 2 deletions src/playbook_00_ha_db_functional_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
become: true
ansible.builtin.pip:
name:
- ansible-runner
- azure-identity
- azure-kusto-data
- azure-kusto-ingest
- azure-identity
- azure-mgmt-compute
- azure-mgmt-network
- azure-storage-blob
- azure-storage-queue
- pandas

- hosts: "{{ sap_sid | upper }}_DB"
Expand Down
7 changes: 6 additions & 1 deletion src/playbook_00_ha_scs_functional_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@
become: true
ansible.builtin.pip:
name:
- ansible-runner
- azure-identity
- azure-kusto-data
- azure-kusto-ingest
- azure-mgmt-compute
- azure-mgmt-network
- azure-storage-blob
- azure-storage-queue
- pandas

- hosts: "{{ sap_sid | upper }}_SCS:
{{ sap_sid | upper }}_ERS"
Expand Down
6 changes: 4 additions & 2 deletions src/playbook_01_ha_offline_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
- name: "Install python azure pacakges required"
ansible.builtin.pip:
name:
- ansible-runner
- azure-identity
- azure-kusto-data
- azure-kusto-ingest
- azure-identity
- azure-mgmt-compute
- azure-mgmt-network
- azure-storage-blob
- azure-storage-queue
- pandas

- name: "Set the test group name based on the inputs"
Expand Down
44 changes: 26 additions & 18 deletions src/roles/configuration_checks/tasks/disks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,38 +195,46 @@
when:
- has_nfs_mounts | bool
- NFS_provider is defined
- "'AFS' in NFS_provider"
- NFS_provider == "AFS"
- afs_storage_accounts is defined
- afs_storage_accounts | length > 0
register: afs_storage_metadata_results
delegate_to: localhost
vars:
accounts_list: "{{ afs_storage_accounts | join(' ') }}"
ansible.builtin.shell:
executable: /bin/bash
cmd: |
#!/bin/bash
set -o pipefail
for acc in {{ afs_storage_accounts | join(' ') }}; do
sa_info=$(az storage account show --name "$acc" --query "{rg:resourceGroup,name:name,id:id}" -o tsv)
for acc in {{ accounts_list }}; do
sa_info=$(az storage account show --name "$acc" --query "{rg:resourceGroup,name:name,id:id}" -o tsv 2>&1)
if [ $? -ne 0 ] || [ -z "$sa_info" ]; then
echo "Error: Failed to retrieve storage account info for $acc: $sa_info" >&2
continue
fi
rg=$(echo "$sa_info" | awk '{print $1}')
sid=$(echo "$sa_info" | awk '{print $3}')
dns="$acc.file.core.windows.net"
for sh in $(az storage share-rm list --resource-group "$rg" --storage-account "$acc" \
--query "[?enabledProtocols=='NFS'].[name,accessTier,quotaGiB]" -o tsv); do
name=$(echo "$sh" | awk '{print $1}')
tier=$(echo "$sh" | awk '{print $2}')
quota=$(echo "$sh" | awk '{print $3}')
peip=$(az network private-endpoint list \
--query "[?privateLinkServiceConnections[?privateLinkServiceId=='$sid']].customDnsConfigs[].ipAddresses[]" -o tsv)
for ip in $peip; do
thr=$((100 + ( (quota*4+99)/100 ) + ( (quota*6+99)/100 ) ))
iops=$((quota+3000))
if [ $iops -gt 100000 ]; then iops=100000; fi
echo "{\"Type\":\"AFS\",\"Name\":\"$name\",\"Pool\":\"$acc\",\"ServiceLevel\":\"$tier\",\"ThroughputMibps\":$thr,\"ProtocolTypes\":\"NFS4.1\",\"NFSAddressDNS\":\"$dns:/$acc/$name\",\"NFSAddress\":\"$ip:/$acc/$name\",\"QoSType\":\"Manual\",\"IOPS\":$iops,\"Id\":\"$sid\"}"
done
dns="$acc.privatelink.file.core.windows.net"
share_list=$(az storage share-rm list --resource-group "$rg" --storage-account "$acc" \
--query "[?enabledProtocols=='NFS'].[name,accessTier,shareQuota]" -o tsv 2>&1)
if [ $? -ne 0 ]; then
echo "Error: Failed to list shares for storage account $acc: $share_list" >&2
continue
fi
echo "$share_list" | \
while IFS=$'\t' read -r name tier quota; do
if [ -z "$name" ]; then
continue
fi
thr=$((100 + ( (quota*4+99)/100 ) + ( (quota*6+99)/100 ) ))
iops=$((quota+3000))
if [ $iops -gt 100000 ]; then iops=100000; fi
echo "{\"Type\":\"AFS\",\"Name\":\"$name\",\"Pool\":\"$acc\",\"ServiceLevel\":\"$tier\",\"Quota\":\"$quota\",\"ThroughputMibps\":$thr,\"ProtocolTypes\":\"NFS4.1\",\"NFSAddressDNS\":\"$dns:/$acc/$name\",\"NFSAddress\":\"$dns:/$acc/$name\",\"QoSType\":\"Manual\",\"IOPS\":$iops,\"Id\":\"$sid\"}"
done
done
- name: Debug AFS storage data collected
when: afs_storage_metadata_results is defined
ansible.builtin.debug:
verbosity: 1
var: afs_storage_metadata_results
101 changes: 101 additions & 0 deletions src/roles/configuration_checks/tasks/files/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ enums:
report:
- check: &check "check"
- section: &section "section"
- table: &table "table"

# Checks for APP roles

Expand Down Expand Up @@ -262,3 +263,103 @@ checks:
references:
other: "https://www.suse.com/support/kb/doc/?id=000019722"

- id: "APP-0008"
name: "Filesystem Mount Points"
description: "Lists all mounted filesystems and their types to ensure APP directories are configured with supported filesystems."
category: *sap_check
severity: *info
workload: *sap
applicability:
os_type: [*suse, *redhat]
os_version: *all_versions
hardware_type: *vm
storage_type: *all_storage
role: [*app_role, *pas]
collector_type: *azure
collector_args:
resource_type: "filesystem"
report: *table
references:
sap: "2972496"
microsoft: "https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/sap/hana-vm-operations-storage"

- id: "APP-0009"
name: "Azure Disks"
description: "Lists all attached Azure disks to ensure APP directories are configured with supported disks."
category: *sap_check
severity: *info
workload: *sap
applicability:
os_type: [*suse, *redhat]
os_version: *all_versions
hardware_type: *vm
storage_type: *all_storage
role: [*app_role, *pas]
collector_type: *azure
collector_args:
resource_type: "azure_disks"
report: *table
references:
sap: "2972496"
microsoft: "https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/sap/hana-vm-operations-storage"


- id: "APP-0010"
name: "LVM Groups"
description: "Lists all LVM groups to ensure APP server directories are configured with supported LVM configurations."
category: *sap_check
severity: *info
workload: *sap
applicability:
os_type: [*suse, *redhat]
os_version: *all_versions
hardware_type: *vm
storage_type: *all_storage
role: [*app_role, *pas]
collector_type: *azure
collector_args:
resource_type: "lvm_groups"
report: *table
references:
sap: "2972496"
microsoft: "https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/sap/hana-vm-operations-storage"

- id: "APP-0011"
name: "LVM Volumes"
description: "Lists all LVM volumes to ensure APP server directories are configured with supported LVM configurations."
category: *sap_check
severity: *info
workload: *sap
applicability:
os_type: [*suse, *redhat]
os_version: *all_versions
hardware_type: *vm
storage_type: *all_storage
role: [*app_role, *pas]
collector_type: *azure
collector_args:
resource_type: "lvm_volumes"
report: *table
references:
sap: "2972496"
microsoft: "https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/sap/hana-vm-operations-storage"

- id: "APP-0012"
name: "ANF Volumes"
description: "Lists all ANF volumes to ensure APP server directories are configured with supported ANF configurations."
category: *sap_check
severity: *info
workload: *sap
applicability:
os_type: [*suse, *redhat]
os_version: *all_versions
hardware_type: *vm
storage_type: *all_storage
role: [*app_role, *pas]
collector_type: *azure
collector_args:
resource_type: "anf_volumes"
report: *table
references:
sap: "2972496"
microsoft: "https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/sap/hana-vm-operations-storage"
Loading