crossplane-contrib / provider-openstack

Crossplane provider for Openstack generated with Upjet from terraform-provider-openstack
Apache License 2.0
41 stars 10 forks source link

Bug: Changing flavor causes "resize loop" on Openstack #101

Open pasettifabio opened 5 months ago

pasettifabio commented 5 months ago

Hi, I'm using Crossplane's OpenStack provider to deploy instances and manage them.

Everything works very well but when I change the flavor (flavorName or flavorId) for instance, it loops through infinite resizing between the original flavor and the new one and again to the original (of course, reducing the size if the original flavor is smaller then the newest...).

This is the instanceV2 manifest:

apiVersion: compute.openstack.crossplane.io/v1alpha1
kind: InstanceV2
metadata:
  annotations:
    meta.upbound.io/crossplane01-id: compute/v1alpha1/instancev2
  labels:
    testing.upbound.io/crossplane01-name: node01-test
  name: node01-test
spec:
  providerConfigRef:
    name: openstack-cloudfire-devops
  deletionPolicy: Delete
  forProvider:
    blockDevice:
    - bootIndex: 0
      deleteOnTermination: true
      destinationType: volume
      deviceType:  
      diskBus: ""
      guestFormat: ext4 
      multiattach: false
      sourceType: image 
      uuid: "6f971b3f-7b26-4161-a4a6-9081bbad9667" 
      volumeSize: 15 
      volumeType: Standard
    configDrive: true 
    flavorId: "6c1f1ce7-f356-4dac-b02c-a9b78e9d6d07"
    imageName: "OPERATING_SYSTEM: Ubuntu 22.04 x86_64 Jammy Jellyfish" 
    metadata:
      bootstrapped: "false"
    network:
    - accessNetwork: true
      fixedIpV4: "" 
      fixedIpV6: ""
      floatingIp: ""
      name: private
      port: "" 
      uuid: "" 
    powerState: "active" # active, shutoff, shelved_offloaded
    securityGroups:
    - default
    tags:
    - "instance"
    vendorOptions:
      - detachPortsBeforeDestroy: true
        ignoreResizeConfirmation: true

Here you can find the resize loop into Openstack:

Request ID Action Start Time User ID Message
req-9ee2af32-d0cd-49d7-bc3f-44a82c1a4d39 Resize May 2, 2024, 9:29 a.m. ad7d84b9c5934862aca99e3d46806abe -
req-72dcecfe-9b07-401c-b644-c9e5d688fe2e Confirm Resize May 2, 2024, 9:29 a.m. ad7d84b9c5934862aca99e3d46806abe -
req-f47d76f6-7bac-49f6-a94b-f1af60f353cc Resize May 2, 2024, 9:27 a.m. ad7d84b9c5934862aca99e3d46806abe -
req-70d9dba1-528e-49b8-b897-071343f78a61 Confirm Resize May 2, 2024, 9:26 a.m. ad7d84b9c5934862aca99e3d46806abe -

Does anybody experience the same issue?

Thank you, Fabio

FCosta999 commented 3 months ago

I am also experiencing the same behaviour/bug.

sirpalmeirao commented 3 months ago

Same here.

pasettifabio commented 3 months ago

Hello guys, I'm glad to read that I'm not the only one who experienced the issue :)

I'm not able to understand which part of the codebase is involved in this behavior, I suppose something related to the duplication of the desired state into ETCD.. do you agree or do you have any hypothesis?

Thanks

Fabio

FCosta999 commented 3 months ago

Hi @pasettifabio try it with ignoreResizeConfirmation

pasettifabio commented 3 months ago

Yes, I tried with ignoreResizeConfirmation and without..