-
Notifications
You must be signed in to change notification settings - Fork 93
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
roles: hosted_engine_setup: replace virt_net and xml with commands #359
Conversation
70b57ca
to
aea02b0
Compare
lgtm (if it works) |
AFAICT looks good |
ci test please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ci test please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried to verify, on a none-clean host (host that runs a failed/successful deployment) after using ovirt-hosted-engine-cleanup
the deployment failed with the following error:
[ INFO ] changed: [localhost]
[ INFO ] TASK [ovirt.ovirt.hosted_engine_setup : Update libvirt default network configuration, destroy]
[ ERROR ] fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["virsh", "net-destroy", "default"], "delta": "0:00:00.026791", "end": "2021-12-08 15:10:11.206631", "msg": "non-zero return code", "rc": 1, "start": "2021-12-08 15:10:11.179840", "stderr": "error: Failed to destroy network default\nerror: Requested operation is not valid: network 'default' is not active", "stderr_lines": ["error: Failed to destroy network default", "error: Requested operation is not valid: network 'default' is not active"], "stdout": "", "stdout_lines": []}
[ ERROR ] Failed to execute stage 'Closing up': Failed getting local_vm_dir
Networks list before the deployment:
# virsh -r net-list --all
Name State Autostart Persistent
------------------------------------------------
;vdsmdummy; active no no
Added the ignore_errors to the net-destroy think it should resolve the issue. |
We need to replace all community modules because ansible-core 2.11 does not include any community modules.
New filter:
This patch adds
get_bridge_xml_to_dict
which converts stdout fromvirsh net-dumpxml default
to the dictionary which has all bridge information. Later it is passed to the new template and used to configure the network bridge.New template:
network-config.j2
contains the jinja template from which the XML network configuration will be created.Now users can specify both
he_ipv6_subnet_prefix
andhe_ipv4_subnet_prefix
and will support both modes before users could specify only one mode.