Skip to content
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

fix: conditional error when no seed exists #1038

Open
wants to merge 1 commit into
base: stackhpc/2023.1
Choose a base branch
from
Open
Changes from all commits
Commits
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
12 changes: 12 additions & 0 deletions etc/kayobe/inventory/group_vars/seed-hypervisor/proxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
###############################################################################
# Configuration of HTTP(S) proxies.

# The default value whilst only applied if `http_proxy` and `https_proxy` are set
# will not work as the conditional fails to evaluate if the seed node does not exist.
# This makes the `seed-hypervisor` reliant on the seed node.
no_proxy: []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how this would help. The walled garden docs only mention setting no_proxy for hosts in the overcloud group.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is no_proxy still needs to evaluated for the conditional which means attempting to expand the default value for which it cannot due to the lack of the seed-vm at the time of creating a seed-hypervisor.

https://github.com/openstack/kayobe/blob/ece51deb3bff2b639ceb6378204a2b9d32b2de36/ansible/proxy.yml#L40

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok. Kayobe default for no_proxy is:

no_proxy:
  - "127.0.0.1"
  - "localhost"
  - "{{ ('http://' ~ docker_registry) | urlsplit('hostname') if docker_registry else '' }}"

So this comes from docker_registry -> stackhpc_docker_registry -> pulp_url -> groups.seed.0.

So I think we should either make pulp_url conditional on groups.seed | length > 0, or document the change you've made in this PR in the walled garden guide. We don't have any other walled garden config in by default, so I don't think it makes sense to add this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will look at making pulp_url conditional. Thanks.


###############################################################################
# Dummy variable to allow Ansible to accept this file.
workaround_ansible_issue_8743: yes
Loading