-
Notifications
You must be signed in to change notification settings - Fork 112
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
validate-architecture: empty ANSIBLE_OPTS by default #1743
validate-architecture: empty ANSIBLE_OPTS by default #1743
Conversation
Merge Failed. This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. |
Thanks for the PR! ❤️ |
ANSIBLE_OPTS extra parameter is passed as extra quoted from `run_ctx_architecture_test` into nested `architecture_test_nodeps` target, before it gets passed to ansible-playbook invocation. But its current default value set to `''` gets rendered when nesting into contaier as `"''"` resulting in failure: make -e SCENARIO_NAME="hci" \ -e ARCH_REPO=/var/home/psedlak/all/src/architecture \ -e INSTALL_YAMLS_REPO=/var/home/psedlak/all/src/install_yamls \ -e NET_ENV_FILE=$(readlink -f .)/ci/playbooks/files/networking-env-definition.yml \ run_ctx_architecture_test ... podman unshare chown 1000:1000 "/var/home/psedlak/ci-framework-data/validate-hci"; podman run --rm --security-opt label=disable -v .:/opt/sources \ -e HOME=/tmp \ -e ANSIBLE_LOCAL_TMP=/tmp \ -e ANSIBLE_REMOTE_TMP=/tmp \ -e SCENARIO_NAME=hci \ -e ARCH_REPO=/architecture \ -e NET_ENV_FILE=/net-env-file.yml \ -v /var/home/psedlak/all/src/architecture:/architecture:ro \ -v /var/home/psedlak/all/src/ci-framework/ci/playbooks/files/networking-env-definition.yml:/net-env-file.yml:ro \ -v "/var/home/psedlak/ci-framework-data/validate-hci":/tmp/ci-framework-data:rw \ localhost/cifmw:latest bash -c \ "make architecture_test_nodeps ANSIBLE_OPTS=\"''\""; \ ... ansible-playbook -i localhost, -c local \ ci/playbooks/validate-architecture.yml \ -e cifmw_zuul_target_host=localhost \ -e ansible_user_dir=/tmp \ -e cifmw_architecture_repo=/tmp/local-arch-repo \ -e cifmw_architecture_scenario=hci \ -e cifmw_networking_mapper_networking_env_def_path=/net-env-file.yml \ '' usage: ansible-playbook [-h] [--version] [-v] [--private-key PRIVATE_KEY_FILE] ... ansible-playbook: error: unrecognized arguments: To get the passing execution, one needs to explicitely set the variable to empty like: `make -e ANSIBLE_OPTS= -e ...`. Setting the variable to just empty/nothing as default fixes the issue.
cc93174
to
5e8c822
Compare
/approve fun I didn't hit that one - but maybe I didn't test without any ANSIBLE_OPTS, can't say, doing too many things in parallel :/ |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cjeanner The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
23dffe6
into
openstack-k8s-operators:main
ANSIBLE_OPTS extra parameter is passed as extra quoted from
run_ctx_architecture_test
into nestedarchitecture_test_nodeps
target,before it gets passed to ansible-playbook invocation.
But its current default value set to
''
gets rendered when nestinginto contaier as
"''"
resulting in failure:To get the passing execution, one needs to explicitely set the variable
to empty like:
make -e ANSIBLE_OPTS= -e ...
.Setting the variable to just empty/nothing as default fixes the issue.
As a pull request owner and reviewers, I checked that: