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

Conversation

jackhodgkiss
Copy link
Contributor

In situations where there is no seed the seed-hypervisor will fail a host configure against no_proxy settings due to the conditional attempting to access attributes that do not exist.

@jackhodgkiss jackhodgkiss requested a review from a team as a code owner April 18, 2024 11:29
In situations where there is no `seed` the `seed-hypervisor` will fail a
host configure against `no_proxy` settings due to the conditional
attempting to access attributes that do not exist.
# 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
Member

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
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants