manager: define internal_interface for seed path#2922
Merged
Conversation
The osism_api_host override in the manager environment dereferences internal_interface, but that variable is only defined in inventory/group_vars/testbed-managers.yml. The seed container path (osism update manager) runs the manager play with the reduced environments/manager inventory and extra-var set, which does not load that group_vars file. As a result internal_interface is undefined, osism_api_host collapses to AnsibleUndefined, and the first ipwrap site in docker-compose.yml.j2 raises: AnsibleFilterError: Unrecognized type <class ...AnsibleUndefined> for ipwrap filter <value> failing "Copy docker-compose.yml file" during manager upgrades via the seed path, while the orchestrator deploy path (full inventory) works. Define internal_interface in environments/manager/configuration.yml, mirroring the group_vars definition, so osism_api_host resolves in the seed-path variable context. The referenced local fact (ansible_local.testbed_network_devices.management) is installed on the manager during bootstrap and is available whenever facts are gathered, so no additional inventory or fact wiring is required. This does not affect the orchestrator path, which does not load this file and keeps using the group_vars definition. Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Roger Luethi <luethi@osism.tech>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
osism_api_hostoverride in the manager environment(
environments/manager/configuration.yml) dereferencesinternal_interface, which is only defined ininventory/group_vars/testbed-managers.yml. The seed-container path(
osism update manager) runs the manager play with the reducedenvironments/managerinventory and extra-var set, which does notload that group_vars file.
As a result
internal_interfaceis undefined,osism_api_hostcollapses to
AnsibleUndefined, and the firstipwrapsite indocker-compose.yml.j2raises:failing
TASK [osism.services.manager : Copy docker-compose.yml file]during manager upgrades via the seed path, while the orchestrator
deploy path (full inventory) works.
This is the next layer of the seed-path onion after the host-key
(#2916) and operator-key (#2917) fixes, which advanced the play far
enough to reach this template task.
Fix
Define
internal_interfaceinenvironments/manager/configuration.yml, mirroring the group_varsdefinition, so
osism_api_hostresolves in the seed-path variablecontext. The referenced local fact
(
ansible_local.testbed_network_devices.management) is installed onthe manager during bootstrap and is available whenever facts are
gathered, so no additional inventory or fact wiring is required.
This does not affect the orchestrator path, which does not load this
file and keeps using the group_vars definition.