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

roles: hosted_engine_setup: replace virt_net and xml with commands #359

Merged
merged 16 commits into from
Jan 26, 2022

Conversation

mnecas
Copy link
Member

@mnecas mnecas commented Oct 11, 2021

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 from virsh 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 and he_ipv4_subnet_prefix and will support both modes before users could specify only one mode.

@michalskrivanek
Copy link
Member

lgtm (if it works)

@mwperina
Copy link
Member

@almusil

@almusil
Copy link
Member

almusil commented Oct 14, 2021

AFAICT looks good

@mnecas
Copy link
Member Author

mnecas commented Nov 22, 2021

ci test please

Copy link
Member

@mwperina mwperina left a comment

Choose a reason for hiding this comment

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

LGTM

@mnecas
Copy link
Member Author

mnecas commented Nov 29, 2021

ci test please

Copy link
Member

@arachmani arachmani left a 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

@mnecas
Copy link
Member Author

mnecas commented Jan 19, 2022

Added the ignore_errors to the net-destroy think it should resolve the issue.
@arachmani could you retry the env?

@arachmani arachmani changed the title HE: replace virt_net and xml with commands roles: hosted_engine_setup: replace virt_net and xml with commands Jan 26, 2022
@arachmani arachmani merged commit 19bb185 into oVirt:master Jan 26, 2022
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.

5 participants