[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15266451#comment-15266451 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/987#issuecomment-216213369 I'd rather redo it then try to port forward. Testing means validating each command in an integration test. If unit testing is required; for each command and response that can go to an agent serialising and deserialising needs to be tested. > Call-home functionality for CloudStack > -- > > Key: CLOUDSTACK-8677 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server >Affects Versions: 4.6.0, Future >Reporter: Wido den Hollander >Assignee: Wido den Hollander > Fix For: Future > > > A call-home feature for the CloudStack management server would send > anonimized reports back to the CloudStack project. > These statistics will contain numbers and details on how CloudStack will be > used. It will NOT contain: > * Hostnames > * IP-Addresses > * Instance names > It will report back: > * Hosts (Number, version, type, hypervisor) > * Clusters (Hypervisor en Management type) > * Primary storage (Type and provider) > * Zones (Network type and providers) > * Instances (Number and types) > This gives the CloudStack project a better insight on how CloudStack is being > used and allows us to develop accordingly. > It will be OPT-OUT, using the "usage.report.interval" users can disable usage > reporting. By default it will run every 7 days and send a JSON document to > https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15266452#comment-15266452 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user DaanHoogland closed the pull request at: https://github.com/apache/cloudstack/pull/987 > Call-home functionality for CloudStack > -- > > Key: CLOUDSTACK-8677 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server >Affects Versions: 4.6.0, Future >Reporter: Wido den Hollander >Assignee: Wido den Hollander > Fix For: Future > > > A call-home feature for the CloudStack management server would send > anonimized reports back to the CloudStack project. > These statistics will contain numbers and details on how CloudStack will be > used. It will NOT contain: > * Hostnames > * IP-Addresses > * Instance names > It will report back: > * Hosts (Number, version, type, hypervisor) > * Clusters (Hypervisor en Management type) > * Primary storage (Type and provider) > * Zones (Network type and providers) > * Instances (Number and types) > This gives the CloudStack project a better insight on how CloudStack is being > used and allows us to develop accordingly. > It will be OPT-OUT, using the "usage.report.interval" users can disable usage > reporting. By default it will run every 7 days and send a JSON document to > https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15266403#comment-15266403 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user rhtyd commented on the pull request: https://github.com/apache/cloudstack/pull/987#issuecomment-216201554 @DaanHoogland can you rebase against latest master; it's huge change, advise how to test and review it > Call-home functionality for CloudStack > -- > > Key: CLOUDSTACK-8677 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server >Affects Versions: 4.6.0, Future >Reporter: Wido den Hollander >Assignee: Wido den Hollander > Fix For: Future > > > A call-home feature for the CloudStack management server would send > anonimized reports back to the CloudStack project. > These statistics will contain numbers and details on how CloudStack will be > used. It will NOT contain: > * Hostnames > * IP-Addresses > * Instance names > It will report back: > * Hosts (Number, version, type, hypervisor) > * Clusters (Hypervisor en Management type) > * Primary storage (Type and provider) > * Zones (Network type and providers) > * Instances (Number and types) > This gives the CloudStack project a better insight on how CloudStack is being > used and allows us to develop accordingly. > It will be OPT-OUT, using the "usage.report.interval" users can disable usage > reporting. By default it will run every 7 days and send a JSON document to > https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15251494#comment-15251494 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido closed the pull request at: https://github.com/apache/cloudstack/pull/625 > Call-home functionality for CloudStack > -- > > Key: CLOUDSTACK-8677 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server >Affects Versions: 4.6.0, Future >Reporter: Wido den Hollander >Assignee: Wido den Hollander > Fix For: Future > > > A call-home feature for the CloudStack management server would send > anonimized reports back to the CloudStack project. > These statistics will contain numbers and details on how CloudStack will be > used. It will NOT contain: > * Hostnames > * IP-Addresses > * Instance names > It will report back: > * Hosts (Number, version, type, hypervisor) > * Clusters (Hypervisor en Management type) > * Primary storage (Type and provider) > * Zones (Network type and providers) > * Instances (Number and types) > This gives the CloudStack project a better insight on how CloudStack is being > used and allows us to develop accordingly. > It will be OPT-OUT, using the "usage.report.interval" users can disable usage > reporting. By default it will run every 7 days and send a JSON document to > https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15251493#comment-15251493 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-212789349 This will probably never merge. Closing for now. > Call-home functionality for CloudStack > -- > > Key: CLOUDSTACK-8677 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server >Affects Versions: 4.6.0, Future >Reporter: Wido den Hollander >Assignee: Wido den Hollander > Fix For: Future > > > A call-home feature for the CloudStack management server would send > anonimized reports back to the CloudStack project. > These statistics will contain numbers and details on how CloudStack will be > used. It will NOT contain: > * Hostnames > * IP-Addresses > * Instance names > It will report back: > * Hosts (Number, version, type, hypervisor) > * Clusters (Hypervisor en Management type) > * Primary storage (Type and provider) > * Zones (Network type and providers) > * Instances (Number and types) > This gives the CloudStack project a better insight on how CloudStack is being > used and allows us to develop accordingly. > It will be OPT-OUT, using the "usage.report.interval" users can disable usage > reporting. By default it will run every 7 days and send a JSON document to > https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15148895#comment-15148895 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user rodrigo93 commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r53039381 --- Diff: server/src/org/apache/cloudstack/report/AtomicGsonAdapter.java --- @@ -0,0 +1,48 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.report; + +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.common.util.concurrent.AtomicLongMap; +import java.util.Map; +import java.io.IOException; + +public class AtomicGsonAdapter extends TypeAdapter { + +public AtomicLongMap read(JsonReader reader) throws IOException { --- End diff -- Hi @wido, Why don't you turn this method "void", so you could remove the "return null;" line. > Call-home functionality for CloudStack > -- > > Key: CLOUDSTACK-8677 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server >Affects Versions: Future, 4.6.0 >Reporter: Wido den Hollander >Assignee: Wido den Hollander > Fix For: 4.6.1 > > > A call-home feature for the CloudStack management server would send > anonimized reports back to the CloudStack project. > These statistics will contain numbers and details on how CloudStack will be > used. It will NOT contain: > * Hostnames > * IP-Addresses > * Instance names > It will report back: > * Hosts (Number, version, type, hypervisor) > * Clusters (Hypervisor en Management type) > * Primary storage (Type and provider) > * Zones (Network type and providers) > * Instances (Number and types) > This gives the CloudStack project a better insight on how CloudStack is being > used and allows us to develop accordingly. > It will be OPT-OUT, using the "usage.report.interval" users can disable usage > reporting. By default it will run every 7 days and send a JSON document to > https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14982450#comment-14982450 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/987#issuecomment-152505938 @borisroman Can we run the tests on this one? > Call-home functionality for CloudStack > -- > > Key: CLOUDSTACK-8677 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server >Affects Versions: Future, 4.6.0 >Reporter: Wido den Hollander >Assignee: Wido den Hollander > Fix For: 4.6.0 > > > A call-home feature for the CloudStack management server would send > anonimized reports back to the CloudStack project. > These statistics will contain numbers and details on how CloudStack will be > used. It will NOT contain: > * Hostnames > * IP-Addresses > * Instance names > It will report back: > * Hosts (Number, version, type, hypervisor) > * Clusters (Hypervisor en Management type) > * Primary storage (Type and provider) > * Zones (Network type and providers) > * Instances (Number and types) > This gives the CloudStack project a better insight on how CloudStack is being > used and allows us to develop accordingly. > It will be OPT-OUT, using the "usage.report.interval" users can disable usage > reporting. By default it will run every 7 days and send a JSON document to > https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14982710#comment-14982710 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user borisroman commented on the pull request: https://github.com/apache/cloudstack/pull/987#issuecomment-152559399 @widi already building > Call-home functionality for CloudStack > -- > > Key: CLOUDSTACK-8677 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server >Affects Versions: Future, 4.6.0 >Reporter: Wido den Hollander >Assignee: Wido den Hollander > Fix For: 4.6.0 > > > A call-home feature for the CloudStack management server would send > anonimized reports back to the CloudStack project. > These statistics will contain numbers and details on how CloudStack will be > used. It will NOT contain: > * Hostnames > * IP-Addresses > * Instance names > It will report back: > * Hosts (Number, version, type, hypervisor) > * Clusters (Hypervisor en Management type) > * Primary storage (Type and provider) > * Zones (Network type and providers) > * Instances (Number and types) > This gives the CloudStack project a better insight on how CloudStack is being > used and allows us to develop accordingly. > It will be OPT-OUT, using the "usage.report.interval" users can disable usage > reporting. By default it will run every 7 days and send a JSON document to > https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14976468#comment-14976468 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/987#issuecomment-151513310 @wido absolutly right. i'm not burning all these hours (both personal and sponsorred) just for the sake of this great marketing tool ;) > Call-home functionality for CloudStack > -- > > Key: CLOUDSTACK-8677 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server >Affects Versions: Future, 4.6.0 >Reporter: Wido den Hollander >Assignee: Wido den Hollander > Fix For: 4.6.0 > > > A call-home feature for the CloudStack management server would send > anonimized reports back to the CloudStack project. > These statistics will contain numbers and details on how CloudStack will be > used. It will NOT contain: > * Hostnames > * IP-Addresses > * Instance names > It will report back: > * Hosts (Number, version, type, hypervisor) > * Clusters (Hypervisor en Management type) > * Primary storage (Type and provider) > * Zones (Network type and providers) > * Instances (Number and types) > This gives the CloudStack project a better insight on how CloudStack is being > used and allows us to develop accordingly. > It will be OPT-OUT, using the "usage.report.interval" users can disable usage > reporting. By default it will run every 7 days and send a JSON document to > https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14976445#comment-14976445 ] ASF GitHub Bot commented on CLOUDSTACK-8677: GitHub user DaanHoogland opened a pull request: https://github.com/apache/cloudstack/pull/987 CLOUDSTACK-8677: use wrapper classes for gson serialisation non functional change with great risk: replace all basic type fields of json serializable objects to wrapper class type fields. It is needed for gson upgrade which is needed for phone home functionality. You can merge this pull request into a Git repository by running: $ git pull https://github.com/DaanHoogland/cloudstack wrapper-classes Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/987.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #987 commit b708df71e7bf5784684804319958e46e99397edd Author: Daan HooglandDate: 2015-10-12T06:33:12Z CLOUDSTACK-8677: use wrapper classes for gson serialisation > Call-home functionality for CloudStack > -- > > Key: CLOUDSTACK-8677 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server >Affects Versions: Future, 4.6.0 >Reporter: Wido den Hollander >Assignee: Wido den Hollander > Fix For: 4.6.0 > > > A call-home feature for the CloudStack management server would send > anonimized reports back to the CloudStack project. > These statistics will contain numbers and details on how CloudStack will be > used. It will NOT contain: > * Hostnames > * IP-Addresses > * Instance names > It will report back: > * Hosts (Number, version, type, hypervisor) > * Clusters (Hypervisor en Management type) > * Primary storage (Type and provider) > * Zones (Network type and providers) > * Instances (Number and types) > This gives the CloudStack project a better insight on how CloudStack is being > used and allows us to develop accordingly. > It will be OPT-OUT, using the "usage.report.interval" users can disable usage > reporting. By default it will run every 7 days and send a JSON document to > https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14976450#comment-14976450 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/987#issuecomment-151508583 To add to the PR, it's not only needed for the Call-Home functionality, but we are using a very, very old version of Gson. > Call-home functionality for CloudStack > -- > > Key: CLOUDSTACK-8677 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 > Project: CloudStack > Issue Type: New Feature > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server >Affects Versions: Future, 4.6.0 >Reporter: Wido den Hollander >Assignee: Wido den Hollander > Fix For: 4.6.0 > > > A call-home feature for the CloudStack management server would send > anonimized reports back to the CloudStack project. > These statistics will contain numbers and details on how CloudStack will be > used. It will NOT contain: > * Hostnames > * IP-Addresses > * Instance names > It will report back: > * Hosts (Number, version, type, hypervisor) > * Clusters (Hypervisor en Management type) > * Primary storage (Type and provider) > * Zones (Network type and providers) > * Instances (Number and types) > This gives the CloudStack project a better insight on how CloudStack is being > used and allows us to develop accordingly. > It will be OPT-OUT, using the "usage.report.interval" users can disable usage > reporting. By default it will run every 7 days and send a JSON document to > https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14716409#comment-14716409 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-135369995 @bhaisaab Isn't it already a plug-in? Don't know if the PR is the right way to discuss it, but I also want to know how many Instances and cloud is running. So not only on upgrades. So it can send diagnostics every 7 days (default) and that way we can see how clouds grow and such. We know the install data and after that we see the growth. Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14712822#comment-14712822 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user bhaisaab commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-134922676 @wido can you implement this as a plugin instead of core feature? Also do we want cloudstack to report statistics on each run; I suggest to have it as a plugin with a small db entry (global setting or a separate db) to track the last time+version we sent the payload/report and we can report that on each upgrade and perform checks every time cloudstack runs. This also needs to have a global lock in case of multiple mgmt servers. Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14702627#comment-14702627 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-132472682 @runseb Yes, indeed. But the PR is not ready to merge yet, it's blocked by a GSON issue which I don't know how to resolve. This is what @DaanHoogland found out: the gson issue is with primitive types. support was explicitely dropped and these are used in the tests. We should make sure they are not used in the real code and adjust the test. (ref PR625 and CLOUDSTACK-8708) But yes, this should go on the ML and very, very clearly in the Release Notes. Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14701452#comment-14701452 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user runseb commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-132254920 This will be turned ON by default ? I think you should bring this up on the list, at least to give a heads up and an official public record. Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14696723#comment-14696723 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-131030515 I have create a issue regarding the new Gson version: https://issues.apache.org/jira/browse/CLOUDSTACK-8708 Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14655055#comment-14655055 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-127927660 @DaanHoogland You are right. There has been a change between GSON 1.7 and 2.0 which causes a failure of the tests. Looking into this, but my Java Reflecting knowledge is low and that makes it hard to figure this out. Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14658216#comment-14658216 ] Wido den Hollander commented on CLOUDSTACK-8677: This feature only works with Google Gson 2.3.1 Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14652316#comment-14652316 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-127377070 I just don't know why the tests keep failing on this one. They seem to fail on code not touched by this PR at all. Really want to get this in to 4.6. Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14652356#comment-14652356 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-127384025 @wido I am pretty sure acs code has a problem with the new gson version (see https://builds.apache.org/job/cloudstack-pull-requests/872/org.apache.cloudstack$cloud-core/testReport/) Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14649206#comment-14649206 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-126691096 I confirmed the problem in the failing test is in the newer gson version. Hope this works with the older gson. testing ... 1-2 Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14649212#comment-14649212 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-126695290 @DaanHoogland I need 2.3.1 for this patch to work. It builds with 2.3.1, but not with 1.7.2 Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14649191#comment-14649191 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-126685792 let's find out. it might reveal some totally unrelated problem due to I never saw the serialization tests before AFAIR but will look at them now ;) Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14649190#comment-14649190 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-126684715 @DaanHoogland I see, but I'm not even getting near that code. So it's unclear to me why this PR seems unstable. Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14649201#comment-14649201 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35971855 --- Diff: pom.xml --- @@ -64,6 +64,7 @@ cs.ehcache.version2.6.9/cs.ehcache.version cs.gson.version1.7.2/cs.gson.version cs.guava-testlib.version18.0/cs.guava-testlib.version +cs.gson.version2.3.1/cs.gson.version --- End diff -- cs.gson.version is defined a second time here. Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14649151#comment-14649151 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-126674015 I still don't know why travis fails. It fails on a storage part, but this commit doesn't touch anything from the storage. So I can't see why. Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14649178#comment-14649178 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-126677074 @wido not sure if these are related but please have a look at https://builds.apache.org/job/cloudstack-pull-analysis/83/org.apache.cloudstack$cloud-core/testReport/ it contains some unit test failure reports. I don't think you touched this directly either. Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14648803#comment-14648803 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user kishankavala commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35948897 --- Diff: setup/db/db/schema-452to460.sql --- @@ -398,3 +398,5 @@ CREATE TABLE `cloud`.`external_bigswitch_bcf_devices` ( CONSTRAINT `fk_external_bigswitch_bcf_devices__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE, CONSTRAINT `fk_external_bigswitch_bcf_devices__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT IGNORE INTO `cloud`.`configuration` VALUES (Advanced, 'DEFAULT', 'management-server', usage.report.interval, 7, Interval (days) between sending anonymous Usage Reports back to the CloudStack project, , NULL, NULL, 0); --- End diff -- @wido @DaanHoogland is correct. DB query to insert new config items is not required now. Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14648903#comment-14648903 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35954149 --- Diff: setup/db/db/schema-452to460.sql --- @@ -398,3 +398,5 @@ CREATE TABLE `cloud`.`external_bigswitch_bcf_devices` ( CONSTRAINT `fk_external_bigswitch_bcf_devices__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE, CONSTRAINT `fk_external_bigswitch_bcf_devices__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT IGNORE INTO `cloud`.`configuration` VALUES (Advanced, 'DEFAULT', 'management-server', usage.report.interval, 7, Interval (days) between sending anonymous Usage Reports back to the CloudStack project, , NULL, NULL, 0); --- End diff -- But only if you use new style ConfigKey! Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14644071#comment-14644071 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-125505835 @DaanHoogland I will. Although I don't understand why these are happening Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14644078#comment-14644078 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35625883 --- Diff: reporter/usage-report-collector.py --- @@ -0,0 +1,64 @@ +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# License); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from flask import abort, Flask, request, Response --- End diff -- This service will not run in the mgmt server. It is where the data is being send. Users will not deploy this, it will be running on call-home.cloudstack.org Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14644089#comment-14644089 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user sedukull commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35627322 --- Diff: server/src/org/apache/cloudstack/report/UsageReporter.java --- @@ -0,0 +1,487 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// License); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.report; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.HashMap; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.net.URL; +import java.net.SocketTimeoutException; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.UnknownHostException; +import java.io.OutputStreamWriter; +import java.io.IOException; + +import javax.inject.Inject; +import javax.net.ssl.HttpsURLConnection; + +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.managed.context.ManagedContextRunnable; + +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; + +import org.apache.commons.codec.digest.DigestUtils; + +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.dao.VMInstanceDao; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.component.ManagerBase; +import com.cloud.utils.component.ComponentMethodInterceptable; +import com.cloud.utils.concurrency.NamedThreadFactory; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.TransactionLegacy; +import com.cloud.upgrade.dao.VersionDao; +import com.cloud.upgrade.dao.VersionVO; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.DiskOfferingVO; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.common.util.concurrent.AtomicLongMap; + +@Component +public class UsageReporter extends ManagerBase implements ComponentMethodInterceptable { +public static final Logger s_logger = Logger.getLogger(UsageReporter.class.getName()); + +/* !FIX ME! This should point to a Apache Infra host with SSL! */ +private String reportHost = https://call-home.cloudstack.org/report;; + +private String uniqueID = null; + +private static UsageReporter s_instance = null; + +private ScheduledExecutorService _executor = null; + +@Inject +private ConfigurationDao _configDao; +@Inject +private HostDao _hostDao; +@Inject +private ClusterDao _clusterDao; +@Inject +private PrimaryDataStoreDao _storagePoolDao; +@Inject +private DataCenterDao _dataCenterDao; +@Inject +private UserVmDao _userVmDao; +@Inject +private VMInstanceDao _vmInstance; +@Inject +private VersionDao _versionDao; +@Inject +private DiskOfferingDao _diskOfferingDao; + +int usageReportInterval = -1; + +public static
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14644073#comment-14644073 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35625751 --- Diff: server/src/org/apache/cloudstack/report/UsageReporter.java --- @@ -0,0 +1,487 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// License); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.report; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.HashMap; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.net.URL; +import java.net.SocketTimeoutException; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.UnknownHostException; +import java.io.OutputStreamWriter; +import java.io.IOException; + +import javax.inject.Inject; +import javax.net.ssl.HttpsURLConnection; + +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.managed.context.ManagedContextRunnable; + +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; + +import org.apache.commons.codec.digest.DigestUtils; + +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.dao.VMInstanceDao; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.component.ManagerBase; +import com.cloud.utils.component.ComponentMethodInterceptable; +import com.cloud.utils.concurrency.NamedThreadFactory; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.TransactionLegacy; +import com.cloud.upgrade.dao.VersionDao; +import com.cloud.upgrade.dao.VersionVO; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.DiskOfferingVO; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.common.util.concurrent.AtomicLongMap; + +@Component +public class UsageReporter extends ManagerBase implements ComponentMethodInterceptable { +public static final Logger s_logger = Logger.getLogger(UsageReporter.class.getName()); + +/* !FIX ME! This should point to a Apache Infra host with SSL! */ +private String reportHost = https://call-home.cloudstack.org/report;; + +private String uniqueID = null; + +private static UsageReporter s_instance = null; + +private ScheduledExecutorService _executor = null; + +@Inject +private ConfigurationDao _configDao; +@Inject +private HostDao _hostDao; +@Inject +private ClusterDao _clusterDao; +@Inject +private PrimaryDataStoreDao _storagePoolDao; +@Inject +private DataCenterDao _dataCenterDao; +@Inject +private UserVmDao _userVmDao; +@Inject +private VMInstanceDao _vmInstance; +@Inject +private VersionDao _versionDao; +@Inject +private DiskOfferingDao _diskOfferingDao; + +int usageReportInterval = -1; + +public static UsageReporter
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14644076#comment-14644076 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35625795 --- Diff: reporter/usage-report-collector.py --- @@ -0,0 +1,64 @@ +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# License); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from flask import abort, Flask, request, Response +from elasticsearch import Elasticsearch +import json +import time + +def json_response(response): +return json.dumps(response, indent=2) + \n, 200, {'Content-Type': 'application/json; charset=utf-8'} + +def generate_app(config=None): +app = Flask(__name__) + +@app.route('/report/unique_id', methods=['POST']) +def report(unique_id): +# We expect JSON data, so if the Content-Type doesn't match JSON data we throw an error +if 'Content-Type' in request.headers: +if request.headers['Content-Type'] != 'application/json': +abort(417, No or incorrect Content-Type header was supplied) + +index = cloudstack-%s % time.strftime(%Y.%m.%d, time.gmtime()) +timestamp = time.strftime(%Y-%m-%dT%H:%M:%SZ, time.gmtime()) + +es = Elasticsearch() +es.indices.create(index=index, ignore=400) + +report = json.loads(request.data) --- End diff -- Good point, although Flask will catch exceptions and generate HTTP errors based on those Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14644077#comment-14644077 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35625832 --- Diff: reporter/usage-report-collector.py --- @@ -0,0 +1,64 @@ +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# License); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from flask import abort, Flask, request, Response +from elasticsearch import Elasticsearch +import json +import time + +def json_response(response): +return json.dumps(response, indent=2) + \n, 200, {'Content-Type': 'application/json; charset=utf-8'} + +def generate_app(config=None): +app = Flask(__name__) + +@app.route('/report/unique_id', methods=['POST']) +def report(unique_id): +# We expect JSON data, so if the Content-Type doesn't match JSON data we throw an error +if 'Content-Type' in request.headers: +if request.headers['Content-Type'] != 'application/json': +abort(417, No or incorrect Content-Type header was supplied) + +index = cloudstack-%s % time.strftime(%Y.%m.%d, time.gmtime()) +timestamp = time.strftime(%Y-%m-%dT%H:%M:%SZ, time.gmtime()) + +es = Elasticsearch() +es.indices.create(index=index, ignore=400) + +report = json.loads(request.data) +report[unique_id] = unique_id +report[timestamp] = timestamp + +es.index(index=index, doc_type=usage-report, body=json.dumps(report), timestamp=timestamp, refresh=True) + +response = {} +return json_response(response) + +return app + + +app = generate_app() + +# Only run the App if this script is invoked from a Shell +if __name__ == '__main__': +app.debug = True +app.run(host='0.0.0.0', port=8088) + +# Otherwise provide a variable called 'application' for mod_wsgi +else: --- End diff -- It is for mod_wsgi. It will read app and run the application from there Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14644087#comment-14644087 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35626976 --- Diff: server/src/org/apache/cloudstack/report/UsageReporter.java --- @@ -0,0 +1,487 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// License); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.report; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.HashMap; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.net.URL; +import java.net.SocketTimeoutException; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.UnknownHostException; +import java.io.OutputStreamWriter; +import java.io.IOException; + +import javax.inject.Inject; +import javax.net.ssl.HttpsURLConnection; + +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.managed.context.ManagedContextRunnable; + +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; + +import org.apache.commons.codec.digest.DigestUtils; + +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.dao.VMInstanceDao; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.component.ManagerBase; +import com.cloud.utils.component.ComponentMethodInterceptable; +import com.cloud.utils.concurrency.NamedThreadFactory; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.TransactionLegacy; +import com.cloud.upgrade.dao.VersionDao; +import com.cloud.upgrade.dao.VersionVO; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.DiskOfferingVO; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.common.util.concurrent.AtomicLongMap; + +@Component +public class UsageReporter extends ManagerBase implements ComponentMethodInterceptable { +public static final Logger s_logger = Logger.getLogger(UsageReporter.class.getName()); + +/* !FIX ME! This should point to a Apache Infra host with SSL! */ +private String reportHost = https://call-home.cloudstack.org/report;; + +private String uniqueID = null; + +private static UsageReporter s_instance = null; + +private ScheduledExecutorService _executor = null; + +@Inject +private ConfigurationDao _configDao; +@Inject +private HostDao _hostDao; +@Inject +private ClusterDao _clusterDao; +@Inject +private PrimaryDataStoreDao _storagePoolDao; +@Inject +private DataCenterDao _dataCenterDao; +@Inject +private UserVmDao _userVmDao; +@Inject +private VMInstanceDao _vmInstance; +@Inject +private VersionDao _versionDao; +@Inject +private DiskOfferingDao _diskOfferingDao; + +int usageReportInterval = -1; + +public static
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14644067#comment-14644067 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-125505270 @wido you are introducing two findbugs findings, can you look at those? Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14644081#comment-14644081 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35626289 --- Diff: server/src/org/apache/cloudstack/report/UsageReporter.java --- @@ -0,0 +1,487 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// License); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.report; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.HashMap; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.net.URL; +import java.net.SocketTimeoutException; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.UnknownHostException; +import java.io.OutputStreamWriter; +import java.io.IOException; + +import javax.inject.Inject; +import javax.net.ssl.HttpsURLConnection; + +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.managed.context.ManagedContextRunnable; + +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; + +import org.apache.commons.codec.digest.DigestUtils; + +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.dao.VMInstanceDao; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.component.ManagerBase; +import com.cloud.utils.component.ComponentMethodInterceptable; +import com.cloud.utils.concurrency.NamedThreadFactory; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.TransactionLegacy; +import com.cloud.upgrade.dao.VersionDao; +import com.cloud.upgrade.dao.VersionVO; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.DiskOfferingVO; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.common.util.concurrent.AtomicLongMap; + +@Component +public class UsageReporter extends ManagerBase implements ComponentMethodInterceptable { +public static final Logger s_logger = Logger.getLogger(UsageReporter.class.getName()); + +/* !FIX ME! This should point to a Apache Infra host with SSL! */ +private String reportHost = https://call-home.cloudstack.org/report;; + +private String uniqueID = null; + +private static UsageReporter s_instance = null; + +private ScheduledExecutorService _executor = null; + +@Inject +private ConfigurationDao _configDao; +@Inject +private HostDao _hostDao; +@Inject +private ClusterDao _clusterDao; +@Inject +private PrimaryDataStoreDao _storagePoolDao; +@Inject +private DataCenterDao _dataCenterDao; +@Inject +private UserVmDao _userVmDao; +@Inject +private VMInstanceDao _vmInstance; +@Inject +private VersionDao _versionDao; +@Inject +private DiskOfferingDao _diskOfferingDao; + +int usageReportInterval = -1; + +public static
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14644088#comment-14644088 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35627154 --- Diff: server/src/org/apache/cloudstack/report/UsageReporter.java --- @@ -0,0 +1,487 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// License); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.report; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.HashMap; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.net.URL; +import java.net.SocketTimeoutException; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.UnknownHostException; +import java.io.OutputStreamWriter; +import java.io.IOException; + +import javax.inject.Inject; +import javax.net.ssl.HttpsURLConnection; + +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.managed.context.ManagedContextRunnable; + +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; + +import org.apache.commons.codec.digest.DigestUtils; + +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.dao.VMInstanceDao; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.component.ManagerBase; +import com.cloud.utils.component.ComponentMethodInterceptable; +import com.cloud.utils.concurrency.NamedThreadFactory; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.TransactionLegacy; +import com.cloud.upgrade.dao.VersionDao; +import com.cloud.upgrade.dao.VersionVO; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.DiskOfferingVO; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.common.util.concurrent.AtomicLongMap; + +@Component +public class UsageReporter extends ManagerBase implements ComponentMethodInterceptable { +public static final Logger s_logger = Logger.getLogger(UsageReporter.class.getName()); + +/* !FIX ME! This should point to a Apache Infra host with SSL! */ +private String reportHost = https://call-home.cloudstack.org/report;; + +private String uniqueID = null; + +private static UsageReporter s_instance = null; + +private ScheduledExecutorService _executor = null; + +@Inject +private ConfigurationDao _configDao; +@Inject +private HostDao _hostDao; +@Inject +private ClusterDao _clusterDao; +@Inject +private PrimaryDataStoreDao _storagePoolDao; +@Inject +private DataCenterDao _dataCenterDao; +@Inject +private UserVmDao _userVmDao; +@Inject +private VMInstanceDao _vmInstance; +@Inject +private VersionDao _versionDao; +@Inject +private DiskOfferingDao _diskOfferingDao; + +int usageReportInterval = -1; + +public static
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14644390#comment-14644390 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35649303 --- Diff: server/src/org/apache/cloudstack/report/UsageReporter.java --- @@ -0,0 +1,490 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// License); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.report; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.HashMap; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.net.URL; +import java.net.SocketTimeoutException; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.UnknownHostException; +import java.io.OutputStreamWriter; +import java.io.IOException; + +import javax.inject.Inject; +import javax.net.ssl.HttpsURLConnection; + +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.managed.context.ManagedContextRunnable; + +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; + +import org.apache.commons.codec.digest.DigestUtils; + +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.dao.VMInstanceDao; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.component.ManagerBase; +import com.cloud.utils.component.ComponentMethodInterceptable; +import com.cloud.utils.concurrency.NamedThreadFactory; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.TransactionLegacy; +import com.cloud.upgrade.dao.VersionDao; +import com.cloud.upgrade.dao.VersionVO; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.DiskOfferingVO; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.common.util.concurrent.AtomicLongMap; + +@Component +public class UsageReporter extends ManagerBase implements ComponentMethodInterceptable { +public static final Logger s_logger = Logger.getLogger(UsageReporter.class.getName()); + +/* !FIX ME! This should point to a Apache Infra host with SSL! */ +private String reportHost = https://call-home.cloudstack.org/report;; + +private String uniqueID = null; + +private static UsageReporter s_instance = null; + +private ScheduledExecutorService _executor = null; + +@Inject +private ConfigurationDao _configDao; +@Inject +private HostDao _hostDao; +@Inject +private ClusterDao _clusterDao; +@Inject +private PrimaryDataStoreDao _storagePoolDao; +@Inject +private DataCenterDao _dataCenterDao; +@Inject +private UserVmDao _userVmDao; +@Inject +private VMInstanceDao _vmInstance; +@Inject +private VersionDao _versionDao; +@Inject +private DiskOfferingDao _diskOfferingDao; + +int usageReportInterval = -1; + +public static
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14644470#comment-14644470 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user sateesh-chodapuneedi commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35655350 --- Diff: server/src/org/apache/cloudstack/report/UsageReporter.java --- @@ -0,0 +1,490 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// License); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.report; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.HashMap; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.net.URL; +import java.net.SocketTimeoutException; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.UnknownHostException; +import java.io.OutputStreamWriter; +import java.io.IOException; + +import javax.inject.Inject; +import javax.net.ssl.HttpsURLConnection; + +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.managed.context.ManagedContextRunnable; + +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; + +import org.apache.commons.codec.digest.DigestUtils; + +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.dao.VMInstanceDao; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.component.ManagerBase; +import com.cloud.utils.component.ComponentMethodInterceptable; +import com.cloud.utils.concurrency.NamedThreadFactory; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.TransactionLegacy; +import com.cloud.upgrade.dao.VersionDao; +import com.cloud.upgrade.dao.VersionVO; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.DiskOfferingVO; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.common.util.concurrent.AtomicLongMap; + +@Component +public class UsageReporter extends ManagerBase implements ComponentMethodInterceptable { +public static final Logger s_logger = Logger.getLogger(UsageReporter.class.getName()); + +/* !FIX ME! This should point to a Apache Infra host with SSL! */ +private String reportHost = https://call-home.cloudstack.org/report;; + +private String uniqueID = null; + +private static UsageReporter s_instance = null; + +private ScheduledExecutorService _executor = null; + +@Inject +private ConfigurationDao _configDao; +@Inject +private HostDao _hostDao; +@Inject +private ClusterDao _clusterDao; +@Inject +private PrimaryDataStoreDao _storagePoolDao; +@Inject +private DataCenterDao _dataCenterDao; +@Inject +private UserVmDao _userVmDao; +@Inject +private VMInstanceDao _vmInstance; +@Inject +private VersionDao _versionDao; +@Inject +private DiskOfferingDao _diskOfferingDao; + +int usageReportInterval = -1; + +public
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14644194#comment-14644194 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35633526 --- Diff: server/src/org/apache/cloudstack/report/UsageReporter.java --- @@ -0,0 +1,487 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// License); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.report; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.HashMap; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.net.URL; +import java.net.SocketTimeoutException; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.UnknownHostException; +import java.io.OutputStreamWriter; +import java.io.IOException; + +import javax.inject.Inject; +import javax.net.ssl.HttpsURLConnection; + +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.managed.context.ManagedContextRunnable; + +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; + +import org.apache.commons.codec.digest.DigestUtils; + +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.dao.VMInstanceDao; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.component.ManagerBase; +import com.cloud.utils.component.ComponentMethodInterceptable; +import com.cloud.utils.concurrency.NamedThreadFactory; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.TransactionLegacy; +import com.cloud.upgrade.dao.VersionDao; +import com.cloud.upgrade.dao.VersionVO; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.DiskOfferingVO; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.common.util.concurrent.AtomicLongMap; + +@Component +public class UsageReporter extends ManagerBase implements ComponentMethodInterceptable { +public static final Logger s_logger = Logger.getLogger(UsageReporter.class.getName()); + +/* !FIX ME! This should point to a Apache Infra host with SSL! */ +private String reportHost = https://call-home.cloudstack.org/report;; + +private String uniqueID = null; + +private static UsageReporter s_instance = null; + +private ScheduledExecutorService _executor = null; + +@Inject +private ConfigurationDao _configDao; +@Inject +private HostDao _hostDao; +@Inject +private ClusterDao _clusterDao; +@Inject +private PrimaryDataStoreDao _storagePoolDao; +@Inject +private DataCenterDao _dataCenterDao; +@Inject +private UserVmDao _userVmDao; +@Inject +private VMInstanceDao _vmInstance; +@Inject +private VersionDao _versionDao; +@Inject +private DiskOfferingDao _diskOfferingDao; + +int usageReportInterval = -1; + +public static
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14642700#comment-14642700 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/625#issuecomment-125199454 any way to verify this? Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14642681#comment-14642681 ] ASF GitHub Bot commented on CLOUDSTACK-8677: GitHub user wido opened a pull request: https://github.com/apache/cloudstack/pull/625 CLOUDSTACK-8677: Call-home functionality for CloudStack With this commit the Management Server will be default generate a anonymous Usage report every 7 (seven) days and submit this information back to the Apache CloudStack project. These anonymous reports do NOT contain any information about Instance names, subnets, etc. It only contains numbers about how CloudStack is being used. This information is vital for the project to gain more insight in how CloudStack is being used. Users can turn the reporting off by setting usage.report.interval to 0 (zero) You can merge this pull request into a Git repository by running: $ git pull https://github.com/wido/cloudstack CLOUDSTACK-8677 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/625.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #625 commit 1c61afb7b93313743e9df1d10242415f838e660b Author: Wido den Hollander w...@widodh.nl Date: 2015-07-08T19:17:30Z CLOUDSTACK-8677: Call-home functionality for CloudStack With this commit the Management Server will be default generate a anonymous Usage report every 7 (seven) days and submit this information back to the Apache CloudStack project. These anonymous reports do NOT contain any information about Instance names, subnets, etc. It only contains numbers about how CloudStack is being used. This information is vital for the project to gain more insight in how CloudStack is being used. Users can turn the reporting off by setting usage.report.interval to 0 (zero) Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14642722#comment-14642722 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35535873 --- Diff: server/src/org/apache/cloudstack/report/UsageReporter.java --- @@ -0,0 +1,473 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// License); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.report; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.HashMap; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.net.URL; +import java.net.SocketTimeoutException; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.UnknownHostException; +import java.io.OutputStreamWriter; +import java.io.IOException; + +import javax.inject.Inject; +import javax.net.ssl.HttpsURLConnection; + +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.managed.context.ManagedContextRunnable; + +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; + +import org.apache.commons.codec.digest.DigestUtils; + +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.dao.VMInstanceDao; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.component.ManagerBase; +import com.cloud.utils.component.ComponentMethodInterceptable; +import com.cloud.utils.concurrency.NamedThreadFactory; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.TransactionLegacy; +import com.cloud.upgrade.dao.VersionDao; +import com.cloud.upgrade.dao.VersionVO; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.DiskOfferingVO; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.common.util.concurrent.AtomicLongMap; + +@Component +public class UsageReporter extends ManagerBase implements ComponentMethodInterceptable { +public static final Logger s_logger = Logger.getLogger(UsageReporter.class.getName()); + +/* !FIX ME! This should point to a Apache Infra host with SSL! */ +private String reportHost = https://call-home.cloudstack.org/report;; + +private String uniqueID = null; + +private static UsageReporter s_instance = null; + +private ScheduledExecutorService _executor = null; + +@Inject +private ConfigurationDao _configDao; +@Inject +private HostDao _hostDao; +@Inject +private ClusterDao _clusterDao; +@Inject +private PrimaryDataStoreDao _storagePoolDao; +@Inject +private DataCenterDao _dataCenterDao; +@Inject +private UserVmDao _userVmDao; +@Inject +private VMInstanceDao _vmInstance; +@Inject +private VersionDao _versionDao; +@Inject +private DiskOfferingDao _diskOfferingDao; + +int usageReportInterval = -1; + +public static UsageReporter
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14642698#comment-14642698 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35532842 --- Diff: setup/db/db/schema-452to460.sql --- @@ -398,3 +398,5 @@ CREATE TABLE `cloud`.`external_bigswitch_bcf_devices` ( CONSTRAINT `fk_external_bigswitch_bcf_devices__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE, CONSTRAINT `fk_external_bigswitch_bcf_devices__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT IGNORE INTO `cloud`.`configuration` VALUES (Advanced, 'DEFAULT', 'management-server', usage.report.interval, 7, Interval (days) between sending anonymous Usage Reports back to the CloudStack project, , NULL, NULL, 0); --- End diff -- with the new style config (ConfigKeyT), this isn't needed is it? It should insert the default if it doesn't find the value. Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14642710#comment-14642710 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user wido commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35533953 --- Diff: setup/db/db/schema-452to460.sql --- @@ -398,3 +398,5 @@ CREATE TABLE `cloud`.`external_bigswitch_bcf_devices` ( CONSTRAINT `fk_external_bigswitch_bcf_devices__host_id` FOREIGN KEY (`host_id`) REFERENCES `host`(`id`) ON DELETE CASCADE, CONSTRAINT `fk_external_bigswitch_bcf_devices__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +INSERT IGNORE INTO `cloud`.`configuration` VALUES (Advanced, 'DEFAULT', 'management-server', usage.report.interval, 7, Interval (days) between sending anonymous Usage Reports back to the CloudStack project, , NULL, NULL, 0); --- End diff -- Hmm, I don't know. I wrote this code in 2014 and was that in there by now? I'm just doing this because I assumed it was still required. Maybe @bhaisaab knows? Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14642711#comment-14642711 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user sedukull commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35534192 --- Diff: server/src/org/apache/cloudstack/report/UsageReporter.java --- @@ -0,0 +1,473 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// License); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.report; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.HashMap; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.net.URL; +import java.net.SocketTimeoutException; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.UnknownHostException; +import java.io.OutputStreamWriter; +import java.io.IOException; + +import javax.inject.Inject; +import javax.net.ssl.HttpsURLConnection; + +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.managed.context.ManagedContextRunnable; + +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; + +import org.apache.commons.codec.digest.DigestUtils; + +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.dao.VMInstanceDao; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.component.ManagerBase; +import com.cloud.utils.component.ComponentMethodInterceptable; +import com.cloud.utils.concurrency.NamedThreadFactory; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.TransactionLegacy; +import com.cloud.upgrade.dao.VersionDao; +import com.cloud.upgrade.dao.VersionVO; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.DiskOfferingVO; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.common.util.concurrent.AtomicLongMap; + +@Component +public class UsageReporter extends ManagerBase implements ComponentMethodInterceptable { +public static final Logger s_logger = Logger.getLogger(UsageReporter.class.getName()); + +/* !FIX ME! This should point to a Apache Infra host with SSL! */ +private String reportHost = https://call-home.cloudstack.org/report;; + +private String uniqueID = null; + +private static UsageReporter s_instance = null; + +private ScheduledExecutorService _executor = null; + +@Inject +private ConfigurationDao _configDao; +@Inject +private HostDao _hostDao; +@Inject +private ClusterDao _clusterDao; +@Inject +private PrimaryDataStoreDao _storagePoolDao; +@Inject +private DataCenterDao _dataCenterDao; +@Inject +private UserVmDao _userVmDao; +@Inject +private VMInstanceDao _vmInstance; +@Inject +private VersionDao _versionDao; +@Inject +private DiskOfferingDao _diskOfferingDao; + +int usageReportInterval = -1; + +public static
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14642712#comment-14642712 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user sedukull commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35534267 --- Diff: server/src/org/apache/cloudstack/report/UsageReporter.java --- @@ -0,0 +1,473 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// License); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.report; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.HashMap; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.net.URL; +import java.net.SocketTimeoutException; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.UnknownHostException; +import java.io.OutputStreamWriter; +import java.io.IOException; + +import javax.inject.Inject; +import javax.net.ssl.HttpsURLConnection; + +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.managed.context.ManagedContextRunnable; + +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; + +import org.apache.commons.codec.digest.DigestUtils; + +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.dao.VMInstanceDao; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.component.ManagerBase; +import com.cloud.utils.component.ComponentMethodInterceptable; +import com.cloud.utils.concurrency.NamedThreadFactory; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.TransactionLegacy; +import com.cloud.upgrade.dao.VersionDao; +import com.cloud.upgrade.dao.VersionVO; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.DiskOfferingVO; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.common.util.concurrent.AtomicLongMap; + +@Component +public class UsageReporter extends ManagerBase implements ComponentMethodInterceptable { +public static final Logger s_logger = Logger.getLogger(UsageReporter.class.getName()); + +/* !FIX ME! This should point to a Apache Infra host with SSL! */ +private String reportHost = https://call-home.cloudstack.org/report;; + +private String uniqueID = null; + +private static UsageReporter s_instance = null; + +private ScheduledExecutorService _executor = null; + +@Inject +private ConfigurationDao _configDao; +@Inject +private HostDao _hostDao; +@Inject +private ClusterDao _clusterDao; +@Inject +private PrimaryDataStoreDao _storagePoolDao; +@Inject +private DataCenterDao _dataCenterDao; +@Inject +private UserVmDao _userVmDao; +@Inject +private VMInstanceDao _vmInstance; +@Inject +private VersionDao _versionDao; +@Inject +private DiskOfferingDao _diskOfferingDao; + +int usageReportInterval = -1; + +public static
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14643706#comment-14643706 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user sedukull commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35605766 --- Diff: reporter/usage-report-collector.py --- @@ -0,0 +1,64 @@ +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# License); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from flask import abort, Flask, request, Response +from elasticsearch import Elasticsearch +import json +import time + +def json_response(response): +return json.dumps(response, indent=2) + \n, 200, {'Content-Type': 'application/json; charset=utf-8'} + +def generate_app(config=None): +app = Flask(__name__) + +@app.route('/report/unique_id', methods=['POST']) +def report(unique_id): +# We expect JSON data, so if the Content-Type doesn't match JSON data we throw an error +if 'Content-Type' in request.headers: +if request.headers['Content-Type'] != 'application/json': +abort(417, No or incorrect Content-Type header was supplied) + +index = cloudstack-%s % time.strftime(%Y.%m.%d, time.gmtime()) +timestamp = time.strftime(%Y-%m-%dT%H:%M:%SZ, time.gmtime()) + +es = Elasticsearch() +es.indices.create(index=index, ignore=400) + +report = json.loads(request.data) --- End diff -- May be we wanted to add a small check to see report is None and proceed. Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14643705#comment-14643705 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user sedukull commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35605705 --- Diff: server/src/org/apache/cloudstack/report/UsageReporter.java --- @@ -0,0 +1,487 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// License); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.report; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.HashMap; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.net.URL; +import java.net.SocketTimeoutException; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.UnknownHostException; +import java.io.OutputStreamWriter; +import java.io.IOException; + +import javax.inject.Inject; +import javax.net.ssl.HttpsURLConnection; + +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.managed.context.ManagedContextRunnable; + +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; + +import org.apache.commons.codec.digest.DigestUtils; + +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.dao.VMInstanceDao; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.component.ManagerBase; +import com.cloud.utils.component.ComponentMethodInterceptable; +import com.cloud.utils.concurrency.NamedThreadFactory; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.TransactionLegacy; +import com.cloud.upgrade.dao.VersionDao; +import com.cloud.upgrade.dao.VersionVO; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.DiskOfferingVO; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.common.util.concurrent.AtomicLongMap; + +@Component +public class UsageReporter extends ManagerBase implements ComponentMethodInterceptable { +public static final Logger s_logger = Logger.getLogger(UsageReporter.class.getName()); + +/* !FIX ME! This should point to a Apache Infra host with SSL! */ +private String reportHost = https://call-home.cloudstack.org/report;; + +private String uniqueID = null; + +private static UsageReporter s_instance = null; + +private ScheduledExecutorService _executor = null; + +@Inject +private ConfigurationDao _configDao; +@Inject +private HostDao _hostDao; +@Inject +private ClusterDao _clusterDao; +@Inject +private PrimaryDataStoreDao _storagePoolDao; +@Inject +private DataCenterDao _dataCenterDao; +@Inject +private UserVmDao _userVmDao; +@Inject +private VMInstanceDao _vmInstance; +@Inject +private VersionDao _versionDao; +@Inject +private DiskOfferingDao _diskOfferingDao; + +int usageReportInterval = -1; + +public static
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14643717#comment-14643717 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user sedukull commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35606107 --- Diff: server/src/org/apache/cloudstack/report/UsageReporter.java --- @@ -0,0 +1,487 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// License); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package org.apache.cloudstack.report; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.HashMap; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.net.URL; +import java.net.SocketTimeoutException; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.UnknownHostException; +import java.io.OutputStreamWriter; +import java.io.IOException; + +import javax.inject.Inject; +import javax.net.ssl.HttpsURLConnection; + +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.managed.context.ManagedContextRunnable; + +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; + +import org.apache.commons.codec.digest.DigestUtils; + +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.dao.VMInstanceDao; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.component.ManagerBase; +import com.cloud.utils.component.ComponentMethodInterceptable; +import com.cloud.utils.concurrency.NamedThreadFactory; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.TransactionLegacy; +import com.cloud.upgrade.dao.VersionDao; +import com.cloud.upgrade.dao.VersionVO; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.DiskOfferingVO; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.common.util.concurrent.AtomicLongMap; + +@Component +public class UsageReporter extends ManagerBase implements ComponentMethodInterceptable { +public static final Logger s_logger = Logger.getLogger(UsageReporter.class.getName()); + +/* !FIX ME! This should point to a Apache Infra host with SSL! */ +private String reportHost = https://call-home.cloudstack.org/report;; + +private String uniqueID = null; + +private static UsageReporter s_instance = null; + +private ScheduledExecutorService _executor = null; + +@Inject +private ConfigurationDao _configDao; +@Inject +private HostDao _hostDao; +@Inject +private ClusterDao _clusterDao; +@Inject +private PrimaryDataStoreDao _storagePoolDao; +@Inject +private DataCenterDao _dataCenterDao; +@Inject +private UserVmDao _userVmDao; +@Inject +private VMInstanceDao _vmInstance; +@Inject +private VersionDao _versionDao; +@Inject +private DiskOfferingDao _diskOfferingDao; + +int usageReportInterval = -1; + +public static
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14643707#comment-14643707 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user sedukull commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35605790 --- Diff: reporter/usage-report-collector.py --- @@ -0,0 +1,64 @@ +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# License); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from flask import abort, Flask, request, Response +from elasticsearch import Elasticsearch +import json +import time + +def json_response(response): +return json.dumps(response, indent=2) + \n, 200, {'Content-Type': 'application/json; charset=utf-8'} + +def generate_app(config=None): +app = Flask(__name__) + +@app.route('/report/unique_id', methods=['POST']) +def report(unique_id): +# We expect JSON data, so if the Content-Type doesn't match JSON data we throw an error +if 'Content-Type' in request.headers: +if request.headers['Content-Type'] != 'application/json': +abort(417, No or incorrect Content-Type header was supplied) + +index = cloudstack-%s % time.strftime(%Y.%m.%d, time.gmtime()) +timestamp = time.strftime(%Y-%m-%dT%H:%M:%SZ, time.gmtime()) + +es = Elasticsearch() +es.indices.create(index=index, ignore=400) + +report = json.loads(request.data) +report[unique_id] = unique_id +report[timestamp] = timestamp + +es.index(index=index, doc_type=usage-report, body=json.dumps(report), timestamp=timestamp, refresh=True) + +response = {} +return json_response(response) + +return app + + +app = generate_app() + +# Only run the App if this script is invoked from a Shell +if __name__ == '__main__': +app.debug = True +app.run(host='0.0.0.0', port=8088) + +# Otherwise provide a variable called 'application' for mod_wsgi +else: --- End diff -- Where is this application var used? Its not global var as well? Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14643708#comment-14643708 ] ASF GitHub Bot commented on CLOUDSTACK-8677: Github user sedukull commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/625#discussion_r35605842 --- Diff: reporter/usage-report-collector.py --- @@ -0,0 +1,64 @@ +#!/usr/bin/env python +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# License); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from flask import abort, Flask, request, Response --- End diff -- This is good work i would say, but just add some comments on this service purpose, may be for people seeing it later can understand it easily. Any reason to have this service written in python and other usage code to run along with cs in java? Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CLOUDSTACK-8677) Call-home functionality for CloudStack
[ https://issues.apache.org/jira/browse/CLOUDSTACK-8677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14642430#comment-14642430 ] Wido den Hollander commented on CLOUDSTACK-8677: We need a VM on Apache Infra to send these statistics to Call-home functionality for CloudStack -- Key: CLOUDSTACK-8677 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8677 Project: CloudStack Issue Type: New Feature Security Level: Public(Anyone can view this level - this is the default.) Components: Management Server Affects Versions: Future, 4.6.0 Reporter: Wido den Hollander Assignee: Wido den Hollander Fix For: 4.6.0 A call-home feature for the CloudStack management server would send anonimized reports back to the CloudStack project. These statistics will contain numbers and details on how CloudStack will be used. It will NOT contain: * Hostnames * IP-Addresses * Instance names It will report back: * Hosts (Number, version, type, hypervisor) * Clusters (Hypervisor en Management type) * Primary storage (Type and provider) * Zones (Network type and providers) * Instances (Number and types) This gives the CloudStack project a better insight on how CloudStack is being used and allows us to develop accordingly. It will be OPT-OUT, using the usage.report.interval users can disable usage reporting. By default it will run every 7 days and send a JSON document to https://call-home.cloudstack.org/ -- This message was sent by Atlassian JIRA (v6.3.4#6332)