-
Notifications
You must be signed in to change notification settings - Fork 172
Fix variable collisions in orchestrator provisioning #5143
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
Changes from all commits
9f3b679
f5f5644
c7e1d27
1dd08d8
602bec1
1cc7a43
f17843e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -281,10 +281,10 @@ | |
| kubeadm init --kubernetes-version={{ service_k8s_version }} \ | ||
| --pod-network-cidr={{ k8s_pod_network_cidr }} \ | ||
| --service-cidr={{ k8s_service_addresses }} \ | ||
| --apiserver-advertise-address={% raw %}{{ ds.meta_data.instance_data.local_ipv4 }}{% endraw %} \ | ||
| --node-name {% raw %}{{ ds.meta_data.instance_data.local_ipv4 }}{% endraw %} \ | ||
| --apiserver-advertise-address={{ "{{" }} ds.meta_data.instance_data.v1.local_ipv4 {{ "}}" }} \ | ||
| --node-name {{ "{{" }} ds.meta_data.instance_data.v1.local_ipv4 {{ "}}" }} \ | ||
| --cri-socket=unix:///var/run/crio/crio.sock \ | ||
| --control-plane-endpoint={% raw %}{{ ds.meta_data.instance_data.local_ipv4 }}{% endraw %}:6443 \ | ||
| --control-plane-endpoint={{ "{{" }} ds.meta_data.instance_data.v1.local_ipv4 {{ "}}" }}:6443 \ | ||
| --apiserver-cert-extra-sans {{ kube_vip }} | ||
|
|
||
| - path: /tmp/generate-control-plane-join.sh | ||
|
|
@@ -368,23 +368,8 @@ | |
| - {{ cmd }} | ||
| {% endfor %} | ||
| {% endif %} | ||
| {% raw %} | ||
| {% if ds.meta_data.instance_data.v1.vendor_data.groups.ssh.host_mount_map is mapping and ds.meta_data.instance_data.v1.vendor_data.groups.ssh.host_mount_map %} | ||
| {% set mymounts = ds.meta_data.instance_data.v1.vendor_data.groups.ssh.host_mount_map.get(local_hostname, {}) %} | ||
| {% if mymounts %} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please re-visit this block it should not break the existing functionality
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a comment explaining this below |
||
| {% for mount in mymounts.get("mounts", []) %} | ||
| - mkdir -pv {{ mount[1] }} | ||
| - echo "{{ mount | join(' ') }}" >> /etc/fstab | ||
| {% endfor %} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @snarthan cab you check if this block requires or not |
||
| - mount -av | ||
| {% for decoded_cmd in mymounts.get("runcmd", []) %} | ||
| - {{ decoded_cmd }} | ||
| {% endfor %} | ||
| {% else %} | ||
| - echo "No mount entries found for this host" | ||
| {% endif %} | ||
| {% endif %} | ||
| {% endraw %} | ||
| {# mount_config host_mount_map block removed - incompatible with Pongo2 validation #} | ||
| {# When mount_config bolt-on is needed, implement as a shell script in write_files #} | ||
| {% for pv_entry in metadata_svc_groups_dict[functional_group_name].powervault_scripts | default([], true) %} | ||
| - bash /usr/local/bin/setup_iscsi_storage_{{ pv_entry.name }}.sh | ||
| {% endfor %} | ||
|
|
@@ -393,11 +378,11 @@ | |
| {% if etcd_on_local_disk | default(false) %} | ||
| - /usr/local/bin/etcd-fstab-update.sh | ||
| {% else %} | ||
| - echo "{{ k8s_nfs_server_path }}/{% raw %}{{ ds.meta_data.instance_data.local_ipv4 }}{% endraw %}/etcd /var/lib/etcd nfs noatime,nolock 0 0" >> /etc/fstab | ||
| - echo "{{ k8s_nfs_server_path }}/{{ "{{" }} ds.meta_data.instance_data.v1.local_ipv4 {{ "}}" }}/etcd /var/lib/etcd nfs noatime,nolock 0 0" >> /etc/fstab | ||
| {% endif %} | ||
| - echo "{{ k8s_nfs_server_path }}/{% raw %}{{ ds.meta_data.instance_data.local_ipv4 }}{% endraw %}/kubelet /var/lib/kubelet nfs noatime,nolock 0 0" >> /etc/fstab | ||
| - echo "{{ k8s_nfs_server_path }}/{% raw %}{{ ds.meta_data.instance_data.local_ipv4 }}{% endraw %}/kubernetes /etc/kubernetes nfs noatime,nolock 0 0" >> /etc/fstab | ||
| - echo "{{ k8s_nfs_server_path }}/{% raw %}{{ ds.meta_data.instance_data.local_ipv4 }}{% endraw %}/pod-logs /var/log/pods nfs noatime,nolock 0 0" >> /etc/fstab | ||
| - echo "{{ k8s_nfs_server_path }}/{{ "{{" }} ds.meta_data.instance_data.v1.local_ipv4 {{ "}}" }}/kubelet /var/lib/kubelet nfs noatime,nolock 0 0" >> /etc/fstab | ||
| - echo "{{ k8s_nfs_server_path }}/{{ "{{" }} ds.meta_data.instance_data.v1.local_ipv4 {{ "}}" }}/kubernetes /etc/kubernetes nfs noatime,nolock 0 0" >> /etc/fstab | ||
| - echo "{{ k8s_nfs_server_path }}/{{ "{{" }} ds.meta_data.instance_data.v1.local_ipv4 {{ "}}" }}/pod-logs /var/log/pods nfs noatime,nolock 0 0" >> /etc/fstab | ||
| - echo "{{ k8s_nfs_server_path }}/packages /var/lib/packages nfs noatime,nolock 0 0" >> /etc/fstab | ||
| - echo "tmpfs /tmp/crio-storage tmpfs size={{ k8s_crio_storage_size }},noatime,nodev,nosuid 0 0" >> /etc/fstab | ||
| - sudo swapoff -a | ||
|
|
@@ -519,7 +504,7 @@ | |
| rm -rf /var/lib/etcd/* /var/lib/kubelet/* /etc/kubernetes/* | ||
| rm -rf /var/lib/etcd/.* /var/lib/kubelet/.* /etc/kubernetes/.* | ||
| #!/bin/bash | ||
| NODE_IP="{% raw %}{{ ds.meta_data.instance_data.local_ipv4 }}{% endraw %}" | ||
| NODE_IP="{{ "{{" }} ds.meta_data.instance_data.v1.local_ipv4 {{ "}}" }}" | ||
| # Find the interface with this IP | ||
| VIP_IFACE=$(ip -o addr show | awk -v ip="$NODE_IP" '$4 ~ ip {print $2}') | ||
| # Replace the vip_interface placeholder in the yaml | ||
|
|
||
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.
Need fo recheck, aarch64 was working code. Have we removed same task in x86_64 also?
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.
Yes, we removed the same mount logic block from ALL 10 FG templates, including both aarch64 and x86_64 variants.
The mount logic block was breaking cloud-init YAML parsing due to the Pongo2/cloud-init Jinja2 incompatibility.
The template fails because Ansible leaves literal {% tokens in the rendered output, which cloud-init Jinja2 interprets and causes a YAML parsing error (found character '%' that cannot start any token).
As a result, cloud-init rejects the configuration as an empty cloud config, and the users section (including ssh_authorized_keys) is never applied, breaking passwordless SSH.
However, the actual NFS mounts are still happening - just in a different place.