# Run ATVM Automation Guide This file is guide-only documentation for operating ATVM CMC automation. Do not put specific run examples here. For reusable command examples and common option combinations, use `examples.md`. Treat `examples.md` as reference-only. Do not assume the operator wants the extra options shown in examples unless they explicitly request them. ## Purpose Run ATVM CMC automation tests on the designated automation VM without unintended system or file changes. ## ATVM Cypress Automation Controller Client - Hostname: `atvm-cypres-vm-1` - IP: `192.168.3.190` - Credentials: `root / atvmcdsi2012` ## ATVM Target Host Default - Treat `192.168.3.191` as the default ATVM target host reference. - For SSH to `192.168.3.191`, ignore host key mismatch by default with `-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null`. - For SSH to `192.168.3.191`, use default credentials `root / cdsi2012` unless the operator explicitly overrides them. ## Operating Constraints - Run only scripts/commands explicitly requested. - Do not make manual system configuration changes on the client. - Do not edit client files unless explicitly requested. ## Operator Preferences - Do not include Gold Disk identifiers in `--build_name`. - `--build_name` must not contain spaces; use `-` between words. - For multiple VMs in same distro, use distro-scoped filtering (`--containsVm`) instead of long explicit VM lists. - Always include `--ignore_force_shutdown` on `cmc-templates.py` commands unless the operator explicitly asks not to. - Default to `--use_specified_plugin iscsi` unless the operator explicitly requests a different plugin. - Before preparing a new run, always check whether automation is already running. - Always report whether automation is currently running. - If running, ask whether to terminate; terminate only with explicit approval. - After termination approval, terminate first, then present planned command(s), then wait for separate execution approval. - Before any run, always show exact planned command(s) exactly as they will be executed and wait for explicit approval. - Never execute `cmc-templates.py`, `run-sorry-cypress.py`, or any other ATVM run command until the operator explicitly approves the displayed command(s). - Approval is required even for preparation-only steps such as template generation. - If the operator changes any part of the request after commands are displayed, rebuild the commands, show the updated commands, and wait for fresh approval before executing anything. - Execute only after explicit approval (for example `approve`). - After execution, report immediate success/failure only. - Do not actively monitor completion unless explicitly requested. - If monitoring is requested, allow long runtime windows (15-30+ minutes) and continue until completion unless operator instructs otherwise. - Report command errors immediately. - `sshpass` may be used where password-based SSH automation is required. ## Core Scripts - Template prep: `/root/cdc-e2e-cyp-12.17.4/cmc-templates.py` - Test execution: `./run-sorry-cypress.py` - Detailed host-level test artifacts: `/root/cdc-e2e-cyp-12.17.4/cypress/cmcReporter` ## Detailed Test Artifacts - Use `/root/cdc-e2e-cyp-12.17.4/cypress/cmcReporter` on the automation controller for detailed per-host test evidence. - Reporter subdirectories of interest: - `logs/` - per-host text and JSON logs for the executed tests - `xml/` - machine result XML files and the final `check-xml-files.ts` bookkeeping output - `mochawesome/` - per-run HTML reports - When a machine fails, use the matching `logs/` entry first to capture the detailed failure context for that host. - When reconstructing historical status, prefer `cmcReporter` artifacts over less-specific runner output because they preserve per-host results after the live run has ended. Typical sequence: 1. Build the exact `cmc-templates.py` and `run-sorry-cypress.py` commands for the request. 2. Show those exact commands to the operator. 3. Wait for explicit approval. 4. Run `cmc-templates.py` with the approved options. 5. Wait for `cmc-templates.py` to fully finish and confirm success. 6. Run `run-sorry-cypress.py` with the matching approved config and build name. ## Config File / Gold Disk Mapping - `cypress.atvm-config-gold.ts` -> Gold Disk 1 - `cypress.atvm-config-gold-2.ts` -> Gold Disk 2 - Additional numbered config variants map to corresponding Gold Disks. - Do not default to `cypress.atvm-config.ts`. - Unless the operator explicitly requests another config, use a config file with `gold` in the filename. - If the operator-specified config file is missing, stop immediately and report the missing file. - Do not search for substitute ATVM config files and do not switch to another config unless the operator explicitly instructs it. ## Available Templates - `cmc-e2e` - `cmc-group-consistency` - `cmc-h2h-diff-platf` - `cmc-h2h-same-platf` - `cmc-migrateops` - `cmc-migrateops-compute-migration` - `cmc-reboot` - `cmc-systemOS` ## Command Pattern ```bash python3 cmc-templates.py --template