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

sap_hypervisor_node_preconfigure: Minor fixes #553

Merged
merged 8 commits into from
Jan 8, 2024
Merged
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ The logic has been separated to support a flexible execution of the different st
| [sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_install) | [![Ansible Lint for sap_hana_install](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_install.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_install.yml) |
| [sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hana_preconfigure) | [![Ansible Lint for sap_hana_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hana_preconfigure.yml) |
| [sap_hostagent](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hostagent) | N/A |
| [sap_hypervisor_node_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hypervisor_node_preconfigure) | N/A |
| [sap_hypervisor_node_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_hypervisor_node_preconfigure) | [![Ansible Lint for sap_hypervisor_node_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_hypervisor_node_preconfigure.yml) |
| [sap_install_media_detect](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_install_media_detect) | N/A |
| [sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_netweaver_preconfigure) | [![Ansible Lint for sap_netweaver_preconfigure](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_netweaver_preconfigure.yml/badge.svg)](https://github.com/sap-linuxlab/community.sap_install/actions/workflows/ansible-lint-sap_netweaver_preconfigure.yml) |
| [sap_storage_setup](https://github.com/sap-linuxlab/community.sap_install/tree/main/roles/sap_storage_setup) | N/A |
Expand Down
3 changes: 3 additions & 0 deletions roles/sap_hypervisor_node_preconfigure/.ansible-lint
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
---
exclude_paths:
- tests/
enable_list:
- yaml
skip_list:
- meta-runtime[unsupported-version] # We don't want to enforce new Ansible versions for Galaxy
- ignore-errors # We use ignore_errors for all the assert tasks, which should be acceptable
- schema # We want to allow single digit version numbers in a role's meta/main.yml file. This is allowed as per https://galaxy.ansible.com/docs/contributing/creating_role.html and https://galaxy.ansible.com/api/v1/platforms/?page=6.
- name[template] # Allow templating inside name. During dev and qa, it should be possible to identify cases where it doesn't work
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,6 @@
register: __sap_hypervisor_node_preconfigure_label_node_result
changed_when: __sap_hypervisor_node_preconfigure_label_node_result.rc != 0

#- name: Label the node with cpumanager=true
# ansible.builtin.k8s:
# definition:
# apiVersion: v1
# kind: Node
# metadata:
# name: "{{ __sap_hypervisor_node_preconfigure_register_worker.name }}"
# labels:
# cpumanager: true
# state: present
#
#- name: Label the node with invtsc=true
# ansible.builtin.k8s:
# definition:
# apiVersion: v1
# kind: Node
# metadata:
# name: "{{ __sap_hypervisor_node_preconfigure_register_worker.name }}"
# labels:
# invtsc: true
# state: present

- name: Label worker with invtsc flag
kubernetes.core.k8s:
state: present
definition:
apiVersion: v1
kind: Namespace
metadata:
name: default
labels:
'feature.node.kubernetes.io/cpu-feature-invtsc': enabled

- name: Include node network
ansible.builtin.include_tasks: node-network.yml
with_items: "{{ __sap_hypervisor_node_preconfigure_register_worker.networks }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
---
- name: Delete the nmstate operator namespace
kubernetes.core.k8s:
state: absent
definition:
apiVersion: v1
kind: Namespace
metadata:
labels:
kubernetes.io/metadata.name: openshift-nmstate
name: openshift-nmstate
name: openshift-nmstate
spec:
finalizers:
- kubernetes

- name: Pause to give operator a chance to uninstall
ansible.builtin.pause:
minutes: 2

- name: Create the nmstate operator namespace
kubernetes.core.k8s:
state: present
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Create the CNV Operator namespace
- name: Create the SRIOV Operator namespace
kubernetes.core.k8s:
state: present
definition:
Expand All @@ -8,7 +8,7 @@
metadata:
name: openshift-sriov-network-operator

- name: Create the CNV Operator namespace
- name: Create the SRIOV Operator namespace
kubernetes.core.k8s:
state: present
definition:
Expand All @@ -21,7 +21,7 @@
targetNamespaces:
- openshift-sriov-network-operator

- name: Create the CNV Operator namespace
- name: Create the SRIOV Operator namespace
kubernetes.core.k8s:
state: present
definition:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
metadata:
name: nas
annotations:
storageclass.kubernetes.io/is-default-class: true
storageclass.kubernetes.io/is-default-class: "true"
provisioner: csi.trident.netapp.io
parameters:
backendType: "{{ sap_hypervisor_node_preconfigure_cluster_config.trident.storage_driver }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
metadata:
name: "{{ __sap_hypervisor_node_preconfigure_register_worker.name }}"
labels:
feature.node.kubernetes.io/network-sriov.capable: true
feature.node.kubernetes.io/network-sriov.capable: "true"
state: present
when: __sap_hypervisor_node_preconfigure_register_worker_network.type == 'sriov'

Expand Down