openbaton / openstack4j-plugin

Apache License 2.0
3 stars 12 forks source link

Preferred image not chosen when loaded into openstack after VNF Package is uploaded #45

Open RuthDevlaeminck opened 6 years ago

RuthDevlaeminck commented 6 years ago

Example Situation:

  1. Image 2 available in OpenStack, Image 1 not available in OpenStack
  2. Load VNF Package X requesting Image 1 then Image 2 if Image 1 not available
  3. Load Image 1 into OpenStack
  4. Launch NSD containing VNF Package X

I would expect it to use Image 1 since Image 1 is now available but instead it uses Image 2. If I delete the NSD and VNF Package and then reload it I get the expected behavior. I believe the image id is being cached when the VNF package is uploaded and it is not being updated when the NSD is launched.

lorenzotomasini commented 6 years ago

Hi,

when you

Load VNF Package X requesting Image 1 then Image 2 if Image 1 not available

are you specifying the vimInstanceName?

If I delete the NSD and VNF Package and then reload it I get the expected behavior.

I think this is only a random behaviour... this needs deeper debug.

I will work on this in order to achieve this behaviour:

  1. VNF Package onboard
    • the VNFP contains in the Metadata.yaml multiple image name
    • it will not matter which VimInstance is chosen in the vnfd.json
    • i will remove all the check agains any vim at VNFP onboarding time. It is useless since it is possible that the Vim where the package will be deployed is not yet onboarded.
    • i will copy the vim_types in the VNFD. Thus to start to define which type of Vim will be supported by that VNF
  2. NSD onbarding
    • still no checks for the same reason
  3. NSD deployment
    • here checks will be performed against the chosen vim

It is impossible to know at descriptor onboarding time if it will be deployed correctly or not. We must maintain the possibility to choose the vim at deployment time, thus the real check will be executed at deployment time

RuthDevlaeminck commented 6 years ago

I was specifying the vim instance. And your solution sounds great!