You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "Hanarion (via GitHub)" <gi...@apache.org> on 2025/11/22 07:42:09 UTC

[I] Availability of Network Offering not taken into account in Web Interface [cloudstack]

Hanarion opened a new issue, #12116:
URL: https://github.com/apache/cloudstack/issues/12116

   ### problem
   
   When loading the CreateIsolatedNetworkForm form, the availability is not taken into account in selecting the default network offering.
   It seems the issue is also present in CreateSharedNetworkForm and CreateL2NetworkForm
   
   ### versions
   
   Running 4.22.0 but issue still present in main branch
   
   ### The steps to reproduce the bug
   
   1. Add network
   2. Check if the pre-selected network is the one with Required availability
   
   
   ### What to do about it?
   
   https://github.com/apache/cloudstack/blob/6dc259c7dab7bee0c4ff731271c61e2f2ee97532/ui/src/views/network/CreateIsolatedNetworkForm.vue#L565C1-L565C69
   Change this line to select the first element with the availability "Required" instead of the first of the list (That is sorted by ID by default)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Availability of Network Offering not taken into account in Web Interface [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #12116:
URL: https://github.com/apache/cloudstack/issues/12116#issuecomment-3570206687

   @Hanarion , it seems to me this might be a bug but in a very specific environment configuration. When you say "pre-selected network”, you mean the physical network, right? Can you share your zone layout?
   
   You point to a line to fix, do you have a proposal on how to fix it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Availability of Network Offering not taken into account in Web Interface [cloudstack]

Posted by "Hanarion (via GitHub)" <gi...@apache.org>.
Hanarion commented on issue #12116:
URL: https://github.com/apache/cloudstack/issues/12116#issuecomment-3585520039

   @DaanHoogland 
   Yeah i think it would be a good idea, the actual hint was what made me think that this option was meant for the user as well.
   I think it should even be in a "Advanced" tab, as it doesn't seem to be something that is needed to be changed frequently 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Availability of Network Offering not taken into account in Web Interface [cloudstack]

Posted by "Hanarion (via GitHub)" <gi...@apache.org>.
Hanarion commented on issue #12116:
URL: https://github.com/apache/cloudstack/issues/12116#issuecomment-3570339750

   @DaanHoogland , i mean the Network Offering that is selected by default when creating a network 
   
   <img width="987" height="1707" alt="Image" src="https://github.com/user-attachments/assets/cd982111-907a-440f-9557-5e243c243cfe" />
   
   <img width="901" height="218" alt="Image" src="https://github.com/user-attachments/assets/c5aea8ec-835b-4ea7-a9d9-54364c60ae47" />
   
   ```json
   (cloud) 🐱 > list networkofferings filter=name,availability name=DefaultNetworkOfferingforKubernetesService
   {
     "count": 1,
     "networkoffering": [
       {
         "availability": "Optional",
         "name": "DefaultNetworkOfferingforKubernetesService"
       }
     ]
   }
   (cloud) 🐱 > list networkofferings filter=name,availability name=DefaultIsolatedNetworkOfferingWithSourceNatServiceV2
   {
     "count": 1,
     "networkoffering": [
       {
         "availability": "Required",
         "name": "DefaultIsolatedNetworkOfferingWithSourceNatServiceV2"
       }
     ]
   }
   
   ```
   
   I don't have a dev environement setup for cloudstack yet, but i can try to work on a fix yes, but it should go like that :
   ```ts
   if (this.arrayHasItems(this.networkOfferings)) {
       this.form.networkofferingid = 0;
   
       const requiredOffering = this.networkOfferings.find(offering => offering.availability === 'Required');
       
       if (requiredOffering) {
           this.handleNetworkOfferingChange(requiredOffering);
       } else {
           // Fallback to the first one if no 'Required' offering exists
           this.handleNetworkOfferingChange(this.networkOfferings[0]);
       }
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Availability of Network Offering not taken into account in Web Interface [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #12116:
URL: https://github.com/apache/cloudstack/issues/12116#issuecomment-3581753789

   @Hanarion , are you proposing to only change the hint?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Availability of Network Offering not taken into account in Web Interface [cloudstack]

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #12116:
URL: https://github.com/apache/cloudstack/issues/12116#issuecomment-3565956992

   Thanks for opening your first issue here! Be sure to follow the issue template!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Availability of Network Offering not taken into account in Web Interface [cloudstack]

Posted by "Hanarion (via GitHub)" <gi...@apache.org>.
Hanarion commented on issue #12116:
URL: https://github.com/apache/cloudstack/issues/12116#issuecomment-3576829083

   After checking a bit further while implementing a PR for this, I stumbled upon #7510 that is talking of the availability.
   It seems that i misunderstood the role of the availability. From the help text i figured out that it was a way to have a default network selected when it is not specified and pre-selected in the UI.
   But when looking at all the default offerings, there is more than 1 offering with availability `Required` by default, and as the "default" behavior is not implemented in the UI i am asking myself it is not something that is only meant for "System use"
   
   After checking a bit more, I figured out that the sort_key is already doing the same function as the "default" choice (The first of the list will be the default one, and we just have to put the one we want by default on top)
   
   With all of that in mind, shouldn't the `Availability` be in an "Advanced tab" in the UI instead ? With a different help message that explains that this parameter is for setting the system generated network default, if we want to set the default network shown to the user, we need to order the offerings instead of changing the `Availability`
   Something like : 
   `the availability of network offering. The value Required makes this network offering default for system generated Guest Virtual Networks. This will NOT change the default selected offering on the GUI or API, this is a setting for the system.`
   
   Currently :
   
   <img width="429" height="293" alt="Image" src="https://github.com/user-attachments/assets/8e4e0431-1796-4b0f-8d89-c6c3688c00fd" />
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org