Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1484523 Details for
Bug 1629018
Networks beyond the original ovirtmgmt deleted by VDSM at first reboot on single-host HC HE setup
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Network-related Ansible playbook used to configure the further (beyond ovirtmgmt) networks
ovirtnetworks.yaml (text/x-vhdl), 10.10 KB, created by
Giuseppe Ragusa
on 2018-09-18 23:44:10 UTC
(
hide
)
Description:
Network-related Ansible playbook used to configure the further (beyond ovirtmgmt) networks
Filename:
MIME Type:
Creator:
Giuseppe Ragusa
Created:
2018-09-18 23:44:10 UTC
Size:
10.10 KB
patch
obsolete
>--- ># Ansible playbook to perform network configuration on oVirt Cluster (both OVN and legacy networks) >- name: Generate SSH key if not present > hosts: localhost > tasks: > - include_tasks: ../common/tasks/createkeys.yaml >- name: Perform OVN configuration on Engine > hosts: ovirtengine > remote_user: root > tasks: > - include_tasks: ../common/tasks/setupkeys.yaml > - name: Get common vars > include_vars: > file: ../common/vars/hvp.yaml > - name: Install OVN-related packages on Engine > vars: > hvp_ovn_engine_packages: > - openvswitch > - openvswitch-ovn-common > - openvswitch-ovn-central > - python-openvswitch > - ovirt-provider-ovn > # TODO: lower log level in /etc/ovirt-provider-ovn/logger.conf > yum: > name: "{{ hvp_ovn_engine_packages }}" > state: latest > - name: Enable and start OVN-related services on Engine > systemd: > name: "{{ item }}" > enabled: true > state: started > no_block: no > with_items: > - ovirt-provider-ovn > - name: Reload firewalld to detect OVN-provider service > # Note: using restarted instead of reloaded state to make sure that the service is running > systemd: > name: firewalld > state: restarted > no_block: no > - name: Allow OVN-provider communications > firewalld: > service: ovirt-provider-ovn > permanent: true > immediate: true > state: enabled > - name: Allow OVN-components communications - South > firewalld: > rich_rule: 'rule family="ipv4" port protocol="tcp" port="6641" accept' > permanent: true > immediate: true > state: enabled > - name: Allow OVN-components communications - North > firewalld: > rich_rule: 'rule family="ipv4" port protocol="tcp" port="6642" accept' > permanent: true > immediate: true > state: enabled > - name: Configure OVN central to listen on ports - South > command: ovn-sbctl set-connection ptcp:6642 > register: centralconf1_result > - name: Configure OVN central to listen on ports - North > command: ovn-nbctl set-connection ptcp:6641 > register: centralconf2_result >- name: Perform OVN configuration on nodes > hosts: ovirtnodes > remote_user: root > tasks: > - include_tasks: ../common/tasks/setupkeys.yaml > - name: Get common vars > include_vars: > file: ../common/vars/hvp.yaml > - name: Configure OVN VIF driver on nodes > command: "vdsm-tool ovn-config {{ hostvars[groups['ovirtengine'] | first]['ansible_default_ipv4']['address'] }} {{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}" > register: vifconf_result >- name: Perform OVN networks creation on Engine > hosts: ovirtengine > remote_user: root > tasks: > - name: Create OVN private networks > command: "ovn-nbctl --may-exist ls-add {{ item }}" > register: createovnnetwork_result > with_items: "{{ hvp_ovn_private_network_names }}" >- name: Perform network discovery on nodes > hosts: ovirtnodes > remote_user: root > tasks: > - name: Get common vars > include_vars: > file: ../common/vars/hvp.yaml > - name: Define Gluster network interface > set_fact: > gluster_eth: "{% for eth in hostvars[inventory_hostname]['ansible_interfaces'] %}{% if (hostvars[inventory_hostname]['ansible_' + eth] is defined) and ('ipv4' in hostvars[inventory_hostname]['ansible_' + eth]) %}{% if hostvars[inventory_hostname]['ansible_' + eth]['ipv4']['address'] | ipaddr(gluster_network) | ipaddr('bool') %}{{ eth }}{% endif %}{% endif %}{% endfor %}" > when: got_gluster_network > - name: Define LAN network interface > set_fact: > lan_eth: "{% for eth in hostvars[inventory_hostname]['ansible_interfaces'] %}{% if (hostvars[inventory_hostname]['ansible_' + eth] is defined) and ('ipv4' in hostvars[inventory_hostname]['ansible_' + eth]) %}{% if hostvars[inventory_hostname]['ansible_' + eth]['ipv4']['address'] | ipaddr(lan_network) | ipaddr('bool') %}{{ eth }}{% endif %}{% endif %}{% endfor %}" > when: got_lan_network > - name: Define Internal network interface > set_fact: > internal_eth: "{% for eth in hostvars[inventory_hostname]['ansible_interfaces'] %}{% if (hostvars[inventory_hostname]['ansible_' + eth] is defined) and ('ipv4' in hostvars[inventory_hostname]['ansible_' + eth]) %}{% if hostvars[inventory_hostname]['ansible_' + eth]['ipv4']['address'] | ipaddr(internal_network) | ipaddr('bool') %}{{ eth }}{% endif %}{% endif %}{% endfor %}" > when: got_internal_network >- name: Perform global oVirt networks configuration through the Engine > hosts: ovirtengine > remote_user: root > # TODO: there is a visibility/syntax error on using the network interface facts established above - trying to work around here > pre_tasks: > - name: Gather facts from all hosts (regardless of limit or tags) > setup: > delegate_to: "{{ item }}" > delegate_facts: true > when: got_gluster_network or got_lan_network or got_internal_network > with_items: "{{ groups['ovirtnodes'] }}" > tasks: > - include_tasks: ../common/tasks/setupkeys.yaml > - name: Get common vars > include_vars: > file: ../common/vars/hvp.yaml > - name: Obtain oVirt Engine SSO token > no_log: true > ovirt_auth: > url: "{{ url }}" > username: "{{ username }}" > password: "{{ password }}" > ca_file: "{{ ca_file }}" > - name: Add external network provider for OVN > # TODO: properly setup certificates for OVN communications and switch to HTTPS > ovirt_external_provider: > auth: "{{ ovirt_auth }}" > name: "ovn_provider" > description: OVN external network provider > type: network > network_type: external > state: present > read_only: false > url: "http://{{ hostvars[groups['ovirtengine'] | first]['ansible_default_ipv4']['address'] }}:9696" > wait: true > - name: Qualify Management network when it is the only one > ovirt_networks: > auth: "{{ ovirt_auth }}" > name: "ovirtmgmt" > data_center: "{{ dc_name }}" > clusters: > - { name: "{{ cluster_name }}", required: true, gluster: true, migration: true } > state: present > vm_network: true > wait: true > when: not got_gluster_network > - name: Add Gluster network > ovirt_networks: > auth: "{{ ovirt_auth }}" > name: "gluster" > description: Gluster network > data_center: "{{ dc_name }}" > clusters: > - { name: "{{ cluster_name }}", required: true, gluster: true, migration: true } > state: present > vm_network: false > wait: true > when: got_gluster_network > - name: Add node interfaces to Gluster network > ovirt_host_networks: > auth: "{{ ovirt_auth }}" > name: "{{ item }}" > interface: "{{ hostvars[item]['gluster_eth'] }}" > state: present > networks: > - name: "gluster" > boot_protocol: static > address: "{{ hostvars[item]['ansible_' + hostvars[item]['gluster_eth']]['ipv4']['address'] }}" > netmask: "{{ hostvars[item]['ansible_' + hostvars[item]['gluster_eth']]['ipv4']['netmask'] }}" > version: "v4" > check: true > wait: true > when: got_gluster_network > with_items: "{{ groups['ovirtnodes'] }}" > - name: Qualify Management network when LAN network is absent > ovirt_networks: > auth: "{{ ovirt_auth }}" > name: "ovirtmgmt" > data_center: "{{ dc_name }}" > clusters: > - { name: "{{ cluster_name }}", required: true, display: true } > state: present > vm_network: true > wait: true > when: not got_lan_network > - name: Add LAN network > ovirt_networks: > auth: "{{ ovirt_auth }}" > name: "lan" > description: LAN network > data_center: "{{ dc_name }}" > clusters: > - { name: "{{ cluster_name }}", required: true, display: true } > state: present > vm_network: true > wait: true > when: got_lan_network > - name: Add node interfaces to LAN network > ovirt_host_networks: > auth: "{{ ovirt_auth }}" > name: "{{ item }}" > interface: "{{ hostvars[item]['lan_eth'] }}" > state: present > networks: > - name: "lan" > boot_protocol: static > address: "{{ hostvars[item]['ansible_' + hostvars[item]['lan_eth']]['ipv4']['address'] }}" > netmask: "{{ hostvars[item]['ansible_' + hostvars[item]['lan_eth']]['ipv4']['netmask'] }}" > version: "v4" > check: true > wait: true > when: got_lan_network > with_items: "{{ groups['ovirtnodes'] }}" > - name: Add Internal network > ovirt_networks: > auth: "{{ ovirt_auth }}" > name: "internal" > description: Internal network > data_center: "{{ dc_name }}" > clusters: > - { name: "{{ cluster_name }}", required: true } > state: present > vm_network: true > wait: true > when: got_internal_network > - name: Add node interfaces to Internal network > ovirt_host_networks: > auth: "{{ ovirt_auth }}" > name: "{{ item }}" > interface: "{{ hostvars[item]['internal_eth'] }}" > state: present > networks: > - name: "internal" > boot_protocol: static > address: "{{ hostvars[item]['ansible_' + hostvars[item]['internal_eth']]['ipv4']['address'] }}" > netmask: "{{ hostvars[item]['ansible_' + hostvars[item]['internal_eth']]['ipv4']['netmask'] }}" > version: "v4" > check: true > wait: true > when: got_internal_network > with_items: "{{ groups['ovirtnodes'] }}" > - name: Revoke the SSO token > no_log: true > ovirt_auth: > state: absent > ovirt_auth: "{{ ovirt_auth }}" >- name: Force further networks persistence on nodes > # TODO: remove when fixed upstream - see https://bugzilla.redhat.com/show_bug.cgi?id=1629018 > hosts: ovirtnodes > remote_user: root > tasks: > - name: Get common vars > include_vars: > file: ../common/vars/hvp.yaml > - name: Force VDSM to save current network status > command: vdsm-client Host setSafeNetworkConfig >...
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1629018
:
1483372
| 1484523 |
1484525
|
1484955