Skip to content
Snippets Groups Projects
Commit f32366cb authored by Alex de Cock Buning's avatar Alex de Cock Buning
Browse files

debugging pod not bein ghandled by multus

parent 5da6b5e2
No related branches found
No related tags found
1 merge request!2repo: added new directory where utils scripts will be
File added
...@@ -307,6 +307,7 @@ def get_free_interfaces(node_name): ...@@ -307,6 +307,7 @@ def get_free_interfaces(node_name):
""" """
cursor.execute(sql, (node_name.strip(),)) cursor.execute(sql, (node_name.strip(),))
free_interfaces = cursor.fetchall() free_interfaces = cursor.fetchall()
print(free_interfaces)
finally: finally:
connection.close() connection.close()
return free_interfaces return free_interfaces
...@@ -326,6 +327,8 @@ def update_pod_annotation(pod_name, namespace, networks_info): ...@@ -326,6 +327,8 @@ def update_pod_annotation(pod_name, namespace, networks_info):
pod_annotations['k8s.v1.cni.cncf.io/networks'] = '[' + ', '.join(formatted_networks) + ']' pod_annotations['k8s.v1.cni.cncf.io/networks'] = '[' + ', '.join(formatted_networks) + ']'
print(pod_annotations) print(pod_annotations)
v1.patch_namespaced_pod(pod_name, namespace, {'metadata': {'annotations': pod_annotations}}) v1.patch_namespaced_pod(pod_name, namespace, {'metadata': {'annotations': pod_annotations}})
v1.delete_namespaced_pod(pod_name, namespace)
def update_network_assignments(pod_name, namespace, node_name, free_interfaces, target_networks, logger, openflow_id): def update_network_assignments(pod_name, namespace, node_name, free_interfaces, target_networks, logger, openflow_id):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment