Repository navigation
fix(test): repo_sync is explicit-only, V022 needs an external source, V058 cannot hang on a down node - #5955
balajikumaran-c-s wants to merge 8 commits into
Conversation
… V058 cannot hang on a down node repo_manager: repo_sync needs an explicit run of repo_sync.yml, so the default verification leaves it out like the other explicit-only tags; the missing-file message names the command to run. image_build_manager: IMGBM_FVT_VALIDATE_V022 judges the live repo_status.yml as an external source only when external_repo_host is set (or REQUIRE_EXTERNAL_REPO=1) and skips with the reason otherwise. orchestrator: ORCH_FVT_PXEBOOT_V058 checks the Slurm state of its target nodes first and fails in seconds naming the node and Slurm's reason; the srun compile and job commands get timeout, --immediate and --time, the job has its own name and is cancelled at the end. The not-ready check of the PAM job tests moves to the shared helper and now treats a not responding (*) node as not ready. Signed-off-by: balajikumaran-c-s <balajikumaran.cs@dell.com>
Secure Code ReviewAdvisory only: this check never blocks the PR. It scans the lines added by this PR against secure-coding rules derived from recent security fixes in this repository. No reviewable source changes (tests, docs and workflows are excluded). Checklist
Findings are heuristic; reviewers should confirm each one. Suppress a justified finding with a |
Compliance GateResult: 3 passed, 0 not passed (3 domain scope(s) checked; unchanged domains are skipped) Checked commit: Not checked (no changes in that domain): pipeline/pipeline, src/build_stream, src/discovery, src/image_build_manager, src/main, src/orchestrator, src/repo_manager, src/telemetry, src/utils, svt/svt, test/build_stream, test/discovery, test/main, test/telemetry, test/utils test/image_build_manager: PASSED
test/orchestrator: PASSED
test/repo_manager: PASSED
|
…the OIM The live repo_status.yml decides whether the external-source check applies: it skips when every repository host is this OIM and no external source is pinned (external_repo_host) or required (REQUIRE_EXTERNAL_REPO=1), and runs when a host is another server. A host is this OIM when it is one of its names or addresses or resolves to one (short lookup with a time limit); a name that does not resolve is treated as external so a typo is checked. Signed-off-by: balajikumaran-c-s <balajikumaran.cs@dell.com>
|
The Compliance Gate passes, but it still reports several open findings across image_build_manager, orchestrator, and repo_manager. These findings are not fixed by this PR and appear to be pre-existing baseline debt. Could you please either:
The unrelated IPv6, container, catalog, cleanup, canonical-ID, and known-debt findings should not necessarily expand this PR's scope. Separately, the PR is currently blocked by |
… registry The repo_sync FVT had the test IDs only in docstrings, no TestLogger output and two inline host.run calls, which the compliance gate listed as open findings of a file this PR changes. The IDs are now registered (RM_FVT_REPO_SYNC_E001, V001-V007), every test builds its TestLogger from the registry, the Pulp query and the repomd fetch moved to library/functions/repo_sync_func.py, and the repo_manager baseline of the gate is raised to the new score (75.83 to 80.28). Signed-off-by: balajikumaran-c-s <balajikumaran.cs@dell.com>
|
Thanks for the review. Compliance findings of the changed file. Fixed in b1c0b53, not waived: Other findings (IPv6, container, catalog, cleanup, canonical-ID, known debt): they are in files this PR does not change, so I left them out of scope, as you suggested. Linked issue check: the issue references (#1783, #1784, #1785 on the EOS repository) will be added to the PR description by the author, then the check is rerun. |
…n-c-s/omnia into fix/fvt-repo-sync-v022-v058
The gate comment is updated in place on every push (directly for same-repository PRs, through the PR Comment workflow for fork PRs), but nothing in it showed which commit it described, so a stale comment and a current one looked the same. The comment now starts with 'Checked commit: <sha>', taken from the PR head passed by the workflow. Signed-off-by: balajikumaran-c-s <balajikumaran.cs@dell.com>
…ild_manager repo_manager: the NFT tests and the catalog_generate/add/delete deploy tests take their IDs from the TEST_CASES registry (RM_NFT_001-005 added) instead of hard-coded strings; the input-file checks use host.file and the selective cleanup runs Pulp through run_pulp, so no test calls host.run itself. image_build_manager: the registry image check moved to library/functions/registry_func.py, and the two NFT security IDs follow the approved IMGBM_NFT_<SEQ> format (IMGBM_NFT_SECURITY_001/002 to IMGBM_NFT_005/006). Baselines raised to the new scores (repo_manager 80.28 to 91.1, image_build_manager 92.5 to 100). Signed-off-by: balajikumaran-c-s <balajikumaran.cs@dell.com>
…it, unique IDs; score 100 setup_env.sh no longer accepts the OIM password as an argument (it was visible in ps) nor expands it in an unquoted heredoc: --password-env NAME and --password-stdin replace --password, which now fails with the way to do it. The password step itself was broken (it passed a dict to encrypt_test_credentials); it now writes the credential file with mode 0600 and encrypts it, checked with a password that has quotes and a dollar sign. The unused duplicate registry entry that repeated RM_FVT_CLEANUP_REPOS_E001 is removed, the three repo_manager known-debt waivers are removed, and the baseline is raised to 100. Signed-off-by: balajikumaran-c-s <balajikumaran.cs@dell.com>
PR Title
fix(test): repo_sync is explicit-only, V022 needs an external source, V058 cannot hang on a down node
Description of the Solution
Three FVT test defects, fixed together because they all make the default verification fail or hang on a healthy deployment:
repo_syncverification): the defaultverifyran therepo_syncsuite although its result file only exists after an explicit run of the maintenance playbookrepo_sync.yml; seven tests failed and the first failing tag stopped the verification, sostatusanduser_registrywere never verified.repo_syncis now explicit-only, like the other tags inEXCLUDE_TAGS.IMGBM_FVT_VALIDATE_V022): the test judged the liverepo_status.ymlas an external source on every deployment, so it failed whenever the local repo_manager served the repositories. The live file now decides whether an external source is in use.ORCH_FVT_PXEBOOT_V058): the MPI job was pinned with--nodelistto two nodes and nothing bounded the wait, so a down node left the jobPENDINGand the test hung until the pipeline job timed out, leaving the job in the queue.Related Issue
Changes
repo_manager (
library/vars/domain_vars.py,fvt/repo_sync/test_repo_sync.py,README.md,ut)repo_syncis added toEXCLUDE_TAGS;./run_validation.sh fvt_repo_manager repo_sync teststill runs the playbook and its seven checks.repo_sync.ymlwas not run and gives the command. I kept this a failure and did not turn it into a skip: an explicitrepo_sync verifythat checks nothing must not look green, and the default run no longer reaches it.RM_UT_339(registered in the UT registry and README).Compliance gate findings of the changed repo_sync file
TestLogger outputandRegistry lookup(and two inlinehost.runcalls) as open findings offvt/repo_sync/test_repo_sync.py. They are fixed, not waived: the eight tests are registered inTEST_CASES(RM_FVT_REPO_SYNC_E001,V001-V007), each test builds itsTestLoggerfrom the registry, the IDs are no longer hard-coded in docstrings, and the Pulp query and the repomd fetch moved tolibrary/functions/repo_sync_func.py..github/compliance/baseline.jsonis raised to 80.28 to keep the improvement from regressing. The other findings the gate lists for the three domains are older and in files this PR does not touch../run_validation.sh fvt_repo_manager repo_sync verify(read-only, without the playbook) now prints each test with its ID and a FAIL that names the missing file and the command to run.image_build_manager (
library/functions/contract_func.py,fvt/validate/contract,test_config.yml,ut)external_repo_hostis set intest_config.yml(pin) or whenREQUIRE_EXTERNAL_REPO=1. A file without repository hosts is not skipped. No setting is needed for an external source.SYSTEM_HOSTNAME, interface addresses) or resolves to one (newexternal_hosts()with a 5 s limited DNS lookup, standard library only). A name that does not resolve is treated as external, so a typo is checked, not hidden. The sharedverify_external_source(V023, V024) is unchanged.live_filesummary looks for, so it does not trigger the "live file was not found" warning.external_repo_host, which the code already read, is documented intest_config.yml.IMGBM_UT_165-173.orchestrator (
library/vars/pxeboot_vars.py,library/functions/_workload_helpers.py,slurm_jobs_pxeboot_func.py,slurm_auth_pxeboot_func.py,ut)slurm-node-2 (state=down, availability=up, reason: Not responding).compute_not_ready_reason, moved to the shared helper) and no longer strips the*flag, so a node that isidle*(slurmd stopped, not yet marked down) is not treated as idle.sruncommands gettimeout,--immediateand, for the job,--timeand a unique--job-name(constantsSLURM_JOB_TIMEOUT_SECONDS, newSLURM_JOB_START_SECONDS,SLURM_JOB_KILL_GRACE_SECONDS, in the style of the other boundedsruncommands); the job is cancelled by name at the end, whatever happened.ORCH_UT_385-389.Files Changed
test/repo_manager/library/vars/domain_vars.pyrepo_syncinEXCLUDE_TAGStest/repo_manager/fvt/repo_sync/test_repo_sync.pytest/repo_manager/README.md,ut/README.md,ut/test_framework_contract.py,library/vars/ut_test_case_vars.pytest/repo_manager/library/functions/repo_sync_func.py,library/functions/__init__.py,library/vars/test_case_vars.py.github/compliance/baseline.jsontest/image_build_manager/library/functions/contract_func.pyexternal_hosts()with a limited DNS lookuptest/image_build_manager/fvt/validate/contract/test_repo_contract.py,__init__.pytest/image_build_manager/test_config.ymlexternal_repo_hostdocumentedtest/image_build_manager/ut/test_external_contract_live_source.py,ut/test_external_hosts.py,ut/README.md,library/vars/ut_test_case_vars.pytest/orchestrator/library/vars/pxeboot_vars.pysruncommands, new constants and queriestest/orchestrator/library/functions/_workload_helpers.pytest/orchestrator/library/functions/slurm_jobs_pxeboot_func.pytest/orchestrator/library/functions/slurm_auth_pxeboot_func.pytest/orchestrator/ut/test_slurm_openmpi_job_bounds.pyTesting
Run on the lab OIM (the one where the failures were seen), with a copy of the pipeline checkout so the pipeline's own files were not touched:
slurmdstopped onslurm-node-2and the node DOWN, the test hung. The job stayedPENDING (ReqNodeNotAvail, UnavailableNodes:slurm-node-2)and was still in the queue after the runner was killed.srunoptions on both nodes (real OpenMPI job, ranks 0 and 1 on both nodes).verify: completes, exit 0, withprecheck,prepare,execute,statusanduser_registryverified and norepo_sync.validate verify --suite contract: V022 is skipped with the reason (every repository host is the OIM), 19 passed, 0 failed. On the OIM, its own admin IP and its FQDN are local and an unknown name is external.slurmdstarted, both nodes idle, queue empty) and my temporary copies were removed.mainalready has intest_driver_group_skip.py(bundled catalog resolution) unchanged.--immediate/ timeout expiry path (the node pre-check stops a down node first), covered only by the command-shape unit test.Backward Compatibility
src/. The defaultrepo_managerverification no longer includesrepo_sync. V022 now skips only when every repository host is this OIM; an external repo_manager is detected from the file. A user who expects an external source but whose file points at the OIM sees a skip unlessexternal_repo_hostorREQUIRE_EXTERNAL_REPO=1is set.idle*node now counts as not ready in the readiness helper that the PAM job tests share; that is the behaviour they already intended.Security Review
%svalues from the mapping (host names) and the generated job name.Security Notes: None.
Suggested Reviewers
srun, shared readiness helperrepo_syncexclusion, V022 condition