You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/09/18 10:57:43 UTC

[GitHub] [cloudstack] samapraku opened a new issue, #6747: listNetworkOfferings api does not handle phyiscal network tags correctly

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

   <!--
   Verify first that your issue/request is not already reported on GitHub.
   Also test if the latest release and main branch are affected too.
   Always add information AFTER of these HTML comments, but no need to delete the comments.
   -->
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
   
   ##### COMPONENT NAME
   <!--
   Categorize the issue, e.g. API, VR, VPN, UI, etc.
   -->
   ~~~
   API, UI
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on main branch.
   -->
   
   ~~~
   4.17.0.1
   ~~~
   
   ##### CONFIGURATION
   <!--
   Information about the configuration if relevant, e.g. basic network, advanced networking, etc.  N/A otherwise
   -->
   Advanced Network
   
   ##### OS / ENVIRONMENT
   <!--
   Information about the environment if relevant, N/A otherwise
   -->
   Ubuntu 20.04
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   listNetworkOfferings api endpoint does not handle physical network tags correctly.
   
   When creating a new Shared Guest network and a Physical network is selected, which has tags, the network offerings list in the dropdown is always empty
   
   However, if the selected physical network does not have tags, the network offerings are populated
   
   ##### STEPS TO REPRODUCE
   <!--
   For bugs, show exactly how to reproduce the problem, using a minimal test-case. Use Screenshots if accurate.
   
   For new features, show how the feature would be used.
   -->
   Create a Physical network with and without tags
   
   In Networks -> Guest Network -> Add Network -> Shared
   
   If the physical network has tags, the network offering dropdown is always empty.
   
   Or make a listNetworkOfferings api request  and pass a zoneid that has physical network that has no tags. 
   
   Issue likely caused by this line:
   https://github.com/apache/cloudstack/blob/bbc126057674a6cda047c2ea941d09af5c0e14a6/server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java#L6600
   
   <!-- Paste example playbooks or commands between quotes below -->
   ~~~
   if (isTagged != null) {
               if (isTagged) {
                   sc.addAnd("tags", SearchCriteria.Op.NNULL);
               } else {
                   sc.addAnd("tags", SearchCriteria.Op.NULL);
               }
           }
   ~~~
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   ~~~
   When a physical network has tags, listNetworkOfferings should take the tags into account
   ~~~
   
   ##### ACTUAL RESULTS
   <!-- What actually happened? -->
   listNetworkOfferings always return empty when a physical network has tags
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   
   ~~~
   


-- 
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


[GitHub] [cloudstack] Pearl1594 commented on issue #6747: listNetworkOfferings api does not handle phyiscal network tags correctly

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on issue #6747:
URL: https://github.com/apache/cloudstack/issues/6747#issuecomment-1250607965

   @samapraku Can you please confirm if for the given physical network, (Zone -> Specific Zone -> Physical Network (sub Tab) -> Specific Physical Network -> Network Service Providers (sub Tab) ) are the necessary service providers enabled i.e, Virtual Router,etc? If not, can you enable the virtualrouterelement (via cmk, using ` configure virtualrouterelement` cmd and you can get the id of the virtual router element, using `list virtualrouterelements`), once You've enabled the virtualrouterelement, enable the network service provider via UI. 


-- 
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


[GitHub] [cloudstack] weizhouapache commented on issue #6747: listNetworkOfferings api does not handle phyiscal network tags correctly

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on issue #6747:
URL: https://github.com/apache/cloudstack/issues/6747#issuecomment-1372231206

   @samapraku 
   I tried to reproduce the issue with latest main branch but failed.
   
   both api/ui work for me.
   
   ```
   (localcloud) 🐱 > list networkofferings tags=test zoneid=7c9769a1-ba70-4f3a-a976-5a6ae7d946bb state=Enabled filter=id,name,tags
   {
     "count": 1,
     "networkoffering": [
       {
         "id": "3db2b279-db80-40c5-a013-c1b236194641",
         "name": "test-tag",
         "tags": "test"
       }
     ]
   }
   ```
   
   
   can you share the results of your cmk commands ?
   
   


-- 
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


[GitHub] [cloudstack] kiranchavala commented on issue #6747: listNetworkOfferings api does not handle phyiscal network tags correctly

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

   Unable to reproduce the issue, 
   
   @samapraku Please check if the network offering contains the same tag as the physical networks, 
   
   Please let us know if we can  close the issue 
   
   


-- 
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


[GitHub] [cloudstack] weizhouapache closed issue #6747: listNetworkOfferings api does not handle phyiscal network tags correctly

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache closed issue #6747: listNetworkOfferings api does not handle phyiscal network tags correctly
URL: https://github.com/apache/cloudstack/issues/6747


-- 
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


[GitHub] [cloudstack] weizhouapache commented on issue #6747: listNetworkOfferings api does not handle phyiscal network tags correctly

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on issue #6747:
URL: https://github.com/apache/cloudstack/issues/6747#issuecomment-1372232214

   > if (isTagged) {
   >                 sc.addAnd("tags", SearchCriteria.Op.NNULL);
   >             } else {
   >                 sc.addAnd("tags", SearchCriteria.Op.NULL);
   >             }
   >         }
   
   @samapraku 
   this is fine. You may not notice the difference between `NNULL` and `NULL`


-- 
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


[GitHub] [cloudstack] samapraku commented on issue #6747: listNetworkOfferings api does not handle phyiscal network tags correctly

Posted by GitBox <gi...@apache.org>.
samapraku commented on issue #6747:
URL: https://github.com/apache/cloudstack/issues/6747#issuecomment-1250627401

   @Pearl1594 These are already enabled under Network service providers
   
   BaremetalPxeProvider, InternalLbVm, VirtualRouter, and VpcVirtualRouter
   
   
   
   


-- 
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


[GitHub] [cloudstack] Pearl1594 commented on issue #6747: listNetworkOfferings api does not handle phyiscal network tags correctly

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on issue #6747:
URL: https://github.com/apache/cloudstack/issues/6747#issuecomment-1250630948

   Thanks for confirming. Do the network offerings have the same tags as set for the physical network?


-- 
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


[GitHub] [cloudstack] weizhouapache commented on issue #6747: listNetworkOfferings api does not handle phyiscal network tags correctly

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

   @samapraku 
   can you test with 4.18.0.0 ?
   I am closing this issue. If you still face same issue, please reopen the issue
   
   (could be related to #6781)
   


-- 
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


[GitHub] [cloudstack] boring-cyborg[bot] commented on issue #6747: listNetworkOfferings api does not handle phyiscal network tags correctly

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #6747:
URL: https://github.com/apache/cloudstack/issues/6747#issuecomment-1250244058

   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


[GitHub] [cloudstack] samapraku commented on issue #6747: listNetworkOfferings api does not handle phyiscal network tags correctly

Posted by GitBox <gi...@apache.org>.
samapraku commented on issue #6747:
URL: https://github.com/apache/cloudstack/issues/6747#issuecomment-1250632340

   Yes. Even when the same tags are set, the api still returns empty. If you look at the code snippet I added to the report, you will notice that that the if condition is redundant since both if and else blocks are doing the same thing


-- 
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


[GitHub] [cloudstack] samapraku commented on issue #6747: listNetworkOfferings api does not handle phyiscal network tags correctly

Posted by GitBox <gi...@apache.org>.
samapraku commented on issue #6747:
URL: https://github.com/apache/cloudstack/issues/6747#issuecomment-1250632827

   I tried both from the UI and also with cmk and got same results


-- 
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