cluster-api-provider-openstack icon indicating copy to clipboard operation
cluster-api-provider-openstack copied to clipboard

provision VM on NON external network/subnet

Open amapi opened this issue 3 years ago • 4 comments

/kind bug

What steps did you take and what happened: Unable to provision VM on INTERNAL network.

On our openstack network are like this

(openstack) subnet list
+--------------------------------------+-----------------------+--------------------------------------+------------------+
| ID                                   | Name                  | Network                              | Subnet           |
+--------------------------------------+-----------------------+--------------------------------------+------------------+
| 07818ccc-6459-47dd-a640-27dba9a6666a | subnet-0c             | a41b0951-bea5-4277-a332-9297c8541dfc | 10.235.81.192/26 |
| 0789d311-00df-4dc7-8b37-ef2dc68b6f52 | subnet-0a             | 171a8b64-5ccf-44c8-8f0f-c6774616f4d8 | 10.235.81.64/26  |
| 8a338003-8476-4deb-bb43-98c9e4e4d1e5 | subnet-private-test-b | f16f81b5-658e-4544-a571-41a580d090a8 | 192.168.11.0/24  |
| dcc73a3b-f40b-4b2b-a7c3-1eb9d257b3a4 | subnet-private-test-a | 0584ee84-d055-4c40-a4f4-3dcb90b2f21a | 192.168.10.0/24  |
| f2543de0-4b0a-44cb-aa20-7a9ff3f47eef | subnet-0b             | 50d46a13-f77c-452a-bb80-5f65a3fc724b | 10.235.81.128/26 |
| f9e03684-9c9c-4cc1-9106-e10b29da91de | subnet-private-test-c | 8cdbec19-c6a2-47d7-bf23-d518cdbd2ce1 | 192.168.12.0/24  |
+--------------------------------------+-----------------------+--------------------------------------+------------------+
(openstack) server list
+--------------------------------------+---------------+--------+----------------------------------------------------+------------------+--------------+
| ID                                   | Name          | Status | Networks                                           | Image            | Flavor       |
+--------------------------------------+---------------+--------+----------------------------------------------------+------------------+--------------+
| ba2fddc8-3d6e-42f7-84ec-3994a7817286 | zzzzzzzz1     | ACTIVE | 79265db9-7588-4622-a0c7-647a3fecbd81=10.235.81.82  | OBS Ubuntu 20.04 | s6.2xlarge.4 |
| baf9850b-d3ca-47af-8ead-c75a2c9b640f | ecs-d512      | ACTIVE | 79265db9-7588-4622-a0c7-647a3fecbd81=10.235.81.76  | OBS Ubuntu 20.04 | s3.2xlarge.4 |
| 0dcb3594-aab5-4ce3-97d9-8942961f7a8d | cloudapi-0002 | ACTIVE | 79265db9-7588-4622-a0c7-647a3fecbd81=10.235.81.79  | OBS Ubuntu 20.04 | s6.xlarge.2  |
| 9eaf002d-ffc6-4c35-b749-359556210bb1 | cloudapi-0001 | ACTIVE | 79265db9-7588-4622-a0c7-647a3fecbd81=10.235.81.119 | OBS Ubuntu 20.04 | s6.xlarge.2  |
| 05f1cb34-9560-4819-8d2f-1390f4d011b1 | cloudapi-0003 | ACTIVE | 79265db9-7588-4622-a0c7-647a3fecbd81=10.235.81.80  | OBS Ubuntu 20.04 | s6.xlarge.2  |
+--------------------------------------+---------------+--------+----------------------------------------------------+------------------+--------------+

We do not use EXTERNAL network.

We only want to VM to be linked to subnet-0a,subnet-0b,subnet-0c.

bu cluster API absolutely want to create a NEW network. even with filter

apiVersion: infrastructure.cluster.x-k8s.io/v1alpha5
kind: OpenStackMachineTemplate
metadata:
  name: test-md-0
  namespace: default
spec:
  template:
    spec:
      networks:
      - filter:
         id : 171a8b64-5ccf-44c8-8f0f-c6774616f4d8
        subnets:
        - filter:
           id: 0789d311-00df-4dc7-8b37-ef2dc68b6f52
      cloudName: test
      flavor: m6.4xlarge.8
      identityRef:
        kind: Secret
        name: test-cloud-config
      image: OBS Ubuntu 20.04
      sshKeyName: amapi

it seams filter does not work

What did you expect to happen:

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment:

  • Cluster API Provider OpenStack version : Lastest (clusterctl init):
  • Cluster-API version: clusterctl version: &version.Info{Major:"1", Minor:"1", GitVersion:"v1.1.4", GitCommit:"1c3a1526f101d4b07d2eec757fe75e8701cf6212", GitTreeState:"clean", BuildDate:"2022-06-03T17:11:09Z", GoVersion:"go1.17.3", Compiler:"gc", Platform:"linux/amd64"}
  • OpenStack version:
  • Minikube/KIND version: N/A (RKE cluster)
  • Kubernetes version: 1.24.0
  • OS : Ubuntu 20.04

amapi avatar Jun 30 '22 15:06 amapi

Do you get the same behaviour if you define ports instead of networks, btw? Either way, please could you share the OpenStack json of the resulting server?

mdbooth avatar Jun 30 '22 16:06 mdbooth

sorry i cant send you the json, because the server is never spawn :(

and yes, i have same behavior with port, it is like i can only use external network :( but, its not an option on our infrastructure. We cant

and i dont understand why cluster-api absolutely want to create a subnet, the subnet is already there

amapi avatar Jun 30 '22 16:06 amapi

I remember we added provider network instead of tenant network before

https://github.com/kubernetes-sigs/cluster-api-provider-openstack/blob/main/controllers/openstackcluster_controller.go#L410

is the line that we will query network instead of create them, did you have chance to check CIDR setting and the logs in the pod that fit for those code?

jichenjc avatar Jul 01 '22 03:07 jichenjc

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Sep 29 '22 03:09 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Oct 29 '22 04:10 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Nov 28 '22 04:11 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Nov 28 '22 04:11 k8s-ci-robot