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 2020/09/14 16:11:24 UTC

[GitHub] [cloudstack] olivierlemasle opened a new pull request #4327: Re-enable IP address usage hiding

olivierlemasle opened a new pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327


   ## Description
   With this commit, listUsageRecords filters out usages made on IP addresses on networks with "Hide IP Address Usage". This was previously introduced in #3235.
   
   This requires a DB schema change, to introduce a flag `is_hidden` in table `cloud_usage.cloud_usage`.
   
   Cf. #4193
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [x] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ## How Has This Been Tested?
   Multiple IP addresses have been created.
   - Those on shared networks without "Hide IP Address Usage" generate usages normally;
   - Those on shared networks with "Hide IP Address Usage" generate usages with flag `is_hidden`, and are not returned by the API.
   


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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-698779638


   @blueorangutan package


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

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



[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#discussion_r518641480



##########
File path: server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
##########
@@ -2238,4 +2245,18 @@ public boolean isIpEqualsGatewayOrNetworkOfferingsEmpty(Network network, String
         }
         return false;
     }
+
+    @Override
+    public boolean isUsageHidden(IPAddressVO ip) {
+        Long networkId = ip.getAssociatedWithNetworkId();
+        if (networkId == null) {
+            networkId = ip.getSourceNetworkId();
+        }
+        if (networkId == null) {
+            // Should not happen

Review comment:
       if it shouldn't happen, isn't it really an exception?




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

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



[GitHub] [cloudstack] Pearl1594 commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-723019788


   Verified fix:
   
   Created a VM in a shared n/w with hiding IP Usage enabled, and one in a shared network without hiding IP usage -  3 records were created for both networks, While in all there are 33 records, listusagerecords filters out listing ip usage for the n/w with hide ip usage enabled.
   
   ```
   select count(*) from cloud_usage\G
   *************************** 1. row ***************************
   count(*): 33
   1 row in set (0.00 sec)
   ``` 
   
   ```
   list usagerecords startdate="2020-10-26 00:00:00" enddate="2020-11-02 00:00:00" 
   {
     "count": 30,
     "usagerecord": [
       {....
       }
     ]
   }
   ```


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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-723019010


   @DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-700149536


   look in the test/integration/ subdirectory. I imagine there are marvin tests for related functionality, if you want to go that way. there is https://github.com/apache/cloudstack/blob/master/test/integration/smoke/test_usage.py and I hav e to admit I don't know how relevant it is for your case.


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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-692475515


   Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2004


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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-723367016


   <b>Trillian test result (tid-3133)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 33882 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4327-t3133-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_diagnostics.py
   Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_supported_versions.py
   Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py
   Smoke tests completed. 86 look OK, 0 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-698779909






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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-698779909


   @DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-723133276


   @blueorangutan test


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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-712730084


   @svenvogel as it is marked a bug I wouldimagine 4.15 or before to be appropriate. unless we decide it is too risky and not major..?


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

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



[GitHub] [cloudstack] Pearl1594 commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-692462238


   @blueorangutan package


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

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



[GitHub] [cloudstack] olivierlemasle commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
olivierlemasle commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-698437757


   Kindly ping @rhtyd 


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

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



[GitHub] [cloudstack] olivierlemasle commented on a change in pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
olivierlemasle commented on a change in pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#discussion_r518663324



##########
File path: server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
##########
@@ -2238,4 +2245,18 @@ public boolean isIpEqualsGatewayOrNetworkOfferingsEmpty(Network network, String
         }
         return false;
     }
+
+    @Override
+    public boolean isUsageHidden(IPAddressVO ip) {
+        Long networkId = ip.getAssociatedWithNetworkId();
+        if (networkId == null) {
+            networkId = ip.getSourceNetworkId();
+        }
+        if (networkId == null) {
+            // Should not happen

Review comment:
       @DaanHoogland You're right, I could certainly return a `CloudRuntimeException`.




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

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



[GitHub] [cloudstack] svenvogel commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
svenvogel commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-712723263


   @olivierlemasle which milestone version should it merged? we can set it to 4.16?


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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-714366789


   @blueorangutan test


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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-713725675


   @blueorangutan package


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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-698802044


   @olivierlemasle Do you have a smoke or integration test for this? it would help guard the feature in the future.
   @blueorangutan test


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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-698794098


   Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2087


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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-723043069


   Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2340


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

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



[GitHub] [cloudstack] DaanHoogland merged pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
DaanHoogland merged pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327


   


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

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



[GitHub] [cloudstack] olivierlemasle commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
olivierlemasle commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-723013415


   @DaanHoogland I've just updated the PR after your comment.


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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-695949279


   @blueorangutan test


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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-695949595


   @DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-713752909


   Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2255


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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-695949279


   @blueorangutan test


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

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



[GitHub] [cloudstack] olivierlemasle commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
olivierlemasle commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-700130909


    @DaanHoogland I must say I do not know CloudStack smoke tests well; are there any smoke tests on usages data in CloudStack currently, that I could use as a basis?


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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-723133669


   @DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


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

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



[GitHub] [cloudstack] olivierlemasle commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
olivierlemasle commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-713634956


   :+1: for 4.15! Without it, IP addresses will generate usages on networks flagged "Hide IP address usages"...


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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-698779638






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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-692462454


   @Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


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

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



[GitHub] [cloudstack] olivierlemasle commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
olivierlemasle commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-698437757


   Kindly ping @rhtyd 


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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-698802622


   @DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-723018628


   @blueorangutan package


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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-695949595


   @DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4327: Re-enable IP address usage hiding

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #4327:
URL: https://github.com/apache/cloudstack/pull/4327#issuecomment-713726356


   @DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


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

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