vexxhost / magnum-cluster-api

Cluster API driver for OpenStack Magnum
Apache License 2.0
47 stars 22 forks source link

router's external network is different from cluster template's external network #392

Open gtirloni opened 5 months ago

gtirloni commented 5 months ago

Logs indicate the router is trying to link to incorrect network.

# openstack router show a96cf125-1e80-4ff0-92d5-fd4fd4f9e1cb
| admin_state_up          | UP                                                                                                                                                                                                                                                                                      
| availability_zone_hints | nova                                                                                                                                                                                                                                                                                    
| availability_zones      | nova                                                                                                                                                                                                                                                                                    
| created_at              | 2024-06-05T13:07:32Z                                                                                                                                                                                                                                                                    
| description             | Created by cluster-api-provider-openstack cluster magnum-system-kube-ezre7                                                                                                                                                                                                              
| external_gateway_info   | {"network_id": "cbf26a56-7110-431c-8467-bcca8ab41d23", "external_fixed_ips": [{"subnet_id": "c5b90de0-03f0-48b0-ba6a-002b04d740e2", "ip_address": "10.10.207.245"}, {"subnet_id": "ee946015-0581-4f85-a9ff-c052341109cb", "ip_address": "xxx:803:0:2711::758f"}], "enable_snat": true} |
| flavor_id               | None                                                                                                                                                                                                                                                                                    
| id                      | a96cf125-1e80-4ff0-92d5-fd4fd4f9e1cb                                                                                                                                                                                                                                                    
| interfaces_info         | [{"port_id": "c40172e9-a5e9-434e-8bf2-a256c5b7e416", "ip_address": "10.0.0.1", "subnet_id": "a91af9e3-49e1-4934-aa35-b1198916d0df"}]                                                                                                                                                    
| name                    | k8s-clusterapi-cluster-magnum-system-kube-ezre7                                                                                                                                                                                                                                         
| project_id              | 955639dbaf9f4835bf2acec03015e96e                                                                                                                                                                                                                                                        
| revision_number         | 4                                                                                                                                                                                                                                                                                       
| routes                  |                                                                                                                                                                                                                                                                                         
| status                  | ACTIVE                                                                                                                                                                                                                                                                                  
| tags                    |                                                                                                                                                                                                                                                                                         
| updated_at              | 2024-06-05T13:07:34Z                                                                                                                                                                                                                                                                    

template:

# openstack coe cluster template show dd8259cb-ccd3-4ccf-a61c-cc3cd28cf9d7
| insecure_registry     | -
| labels                | {'kube_tag': 'v1.27.3'}
| updated_at            | 2024-06-03T20:21:19+00:00
| floating_ip_enabled   | True
| fixed_subnet          | -
| master_flavor_id      | m1.medium
| uuid                  | dd8259cb-ccd3-4ccf-a61c-cc3cd28cf9d7
| no_proxy              | -
| https_proxy           | -
| tls_disabled          | False
| keypair_id            | -
| public                | True
| http_proxy            | -
| docker_volume_size    | -
| server_type           | vm
| external_network_id   | cbf26a56-7110-431c-8467-bcca8ab41d23
| cluster_distro        | ubuntu
| image_id              | ubuntu-2204-kube-v1.27.3
| volume_driver         | -
| registry_enabled      | False
| docker_storage_driver | overlay2
| apiserver_port        | -
| name                  | k8s-v1.27.3
| created_at            | 2024-05-13T19:21:20+00:00
| network_driver        | calico
| fixed_network         | -
| coe                   | kubernetes
| flavor_id             | m1.medium
| master_lb_enabled     | True
| dns_nameserver        | 10.10.6.101
| hidden                | False
| tags                  | -

Workaround is to add service annotation with the correct network:

loadbalancer.openstack.org/floating-network-id: cbf26a56-7110-431c-8467-bcca8ab41d23
gtirloni commented 5 months ago

This could be a duplicate of #387