Update Azure VM OS health checks and scripts#539
Update Azure VM OS health checks and scripts#539stewartshea merged 2 commits intorunwhen-contrib:mainfrom
Conversation
- Add new VM filtering options to include/exclude specific VMs based on naming patterns. - Implement robust error handling for VM connection issues, ensuring graceful failures and detailed logging. - Enhance disk, memory, and uptime check scripts to skip Windows VMs and provide clearer output for Linux VMs. - Update README.md to reflect new features and usage instructions, including environment variable configurations. - Remove deprecated files and update permissions for various scripts to ensure proper execution. This update improves the overall functionality and usability of the Azure VM health check suite, enhancing monitoring capabilities and error reporting.
… streamlining the project structure and eliminating deprecated components.
| Set Suite Variable | ||
| ... ${env} | ||
| ... {"VM_NAME":"${VM_NAME}", "AZ_RESOURCE_GROUP":"${AZ_RESOURCE_GROUP}", "DISK_THRESHOLD": "${DISK_THRESHOLD}", "UPTIME_THRESHOLD": "${UPTIME_THRESHOLD}", "MEMORY_THRESHOLD": "${MEMORY_THRESHOLD}", "MAX_PARALLEL_JOBS": "${MAX_PARALLEL_JOBS}", "TIMEOUT_SECONDS": "${TIMEOUT_SECONDS}", "AZURE_SUBSCRIPTION_ID":"${AZURE_RESOURCE_SUBSCRIPTION_ID}", "AZURE_SUBSCRIPTION_NAME":"${AZURE_SUBSCRIPTION_NAME}"} | ||
| ... {"AZ_RESOURCE_GROUP":"${AZ_RESOURCE_GROUP}", "DISK_THRESHOLD": "${DISK_THRESHOLD}", "UPTIME_THRESHOLD": "${UPTIME_THRESHOLD}", "MEMORY_THRESHOLD": "${MEMORY_THRESHOLD}", "MAX_PARALLEL_JOBS": "${MAX_PARALLEL_JOBS}", "TIMEOUT_SECONDS": "${TIMEOUT_SECONDS}", "AZURE_SUBSCRIPTION_ID":"${AZURE_RESOURCE_SUBSCRIPTION_ID}", "AZURE_SUBSCRIPTION_NAME":"${AZURE_SUBSCRIPTION_NAME}"} |
There was a problem hiding this comment.
Bug: Runbook Fails to Pass VM Filtering Variables
The runbook.robot file fails to pass VM_INCLUDE_LIST and VM_OMIT_LIST environment variables to its shell scripts. Despite being imported and set as suite variables, they are omitted from the hardcoded env JSON string, preventing VM filtering from working in runbook tasks. This is inconsistent with sli.robot, which correctly includes these variables.
| Set To Dictionary ${base_env} VM_OMIT_LIST=${VM_OMIT_LIST} | ||
| END | ||
|
|
||
| Set Suite Variable ${env} ${base_env} |
There was a problem hiding this comment.
Bug: Environment Variable Type Mismatch Causes Failures
The env suite variable in sli.robot is now set as a Robot Framework dictionary instead of a JSON string. This change, resulting from using Create Dictionary and Set To Dictionary, creates an inconsistency with runbook.robot and RW.CLI.Run Cli, which expect env to be a JSON string for passing environment variables to shell commands. This type mismatch will cause runtime failures.
This update improves the overall functionality and usability of the Azure VM health check suite, enhancing monitoring capabilities and error reporting.