[GitHub] cloudstack pull request: CLOUDSTACK-8933 SSVm and CPVM do not surv...

2015-10-20 Thread bvbharatk
Github user bvbharatk commented on the pull request:

https://github.com/apache/cloudstack/pull/930#issuecomment-149456401
  
@karuturi @wilderrodrigues 

Hi guys,
Thanks for taking this up and finalising. It would have taken at lest 4 
days to start working on this again. appreciate the help 😄


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Improve marvin test site2site VPN

2015-10-20 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/952#issuecomment-149457564
  
Testing this one now!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Refactored & Added Internal LB smoke test

2015-10-20 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/933#issuecomment-149457679
  
Thanks for the rebase, @michaelandersen 

I will test this one as well!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8933 SSVm and CPVM do not surv...

2015-10-20 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/930#issuecomment-149458795
  
Hi @bvbharat , @karuturi and @remibergsma 

I will push a new PR based on this one, with a rebase on latest master and 
test reports.

Cheers,
Wilder


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8964: Can't create template or...

2015-10-20 Thread DaanHoogland
Github user DaanHoogland commented on the pull request:

https://github.com/apache/cloudstack/pull/954#issuecomment-149469471
  
Wei, this code looks sensible but can you ad a small explenation as it is 
actually two small fixes. It is one a the test in a bunch PRs to me.
The jenkins failure is due to the illegal state bug in hudson code that is 
byting us at times, not in this PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Quota

2015-10-20 Thread abhinandanprateek
Github user abhinandanprateek commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r42466343
  
--- Diff: 
framework/quota/src/org/apache/cloudstack/quota/dao/QuotaUsageDaoImpl.java ---
@@ -0,0 +1,78 @@
+//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.quota.dao;
+
+import com.cloud.utils.db.GenericDaoBase;
+import com.cloud.utils.db.SearchCriteria;
+import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionCallback;
+import com.cloud.utils.db.TransactionLegacy;
+import com.cloud.utils.db.TransactionStatus;
+import org.apache.cloudstack.quota.vo.QuotaUsageVO;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+@Component
+@Local(value = { QuotaUsageDao.class })
+public class QuotaUsageDaoImpl extends GenericDaoBase 
implements QuotaUsageDao {
+private static final Logger s_logger = 
Logger.getLogger(QuotaUsageDaoImpl.class);
+
+@Override
+public BigDecimal findTotalQuotaUsage(final Long accountId, final Long 
domainId, final Integer usageType, final Date startDate, final Date endDate) {
+List quotaUsage = findQuotaUsage(accountId, 
domainId, null, startDate, endDate);
+BigDecimal total = new BigDecimal(0);
+for (QuotaUsageVO quotaRecord: quotaUsage) {
+total = total.add(quotaRecord.getQuotaUsed());
+}
+return total;
+}
+
+@Override
+public List findQuotaUsage(final Long accountId, final 
Long domainId, final Integer usageType, final Date startDate, final Date 
endDate) {
+return Transaction.execute(TransactionLegacy.USAGE_DB, new 
TransactionCallback>() {
+@SuppressWarnings("deprecation")
--- End diff --

Looked at the code, they are just wrapper around a non deprecated method. 
The question is why should they even be deprecated ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Refactored & Added Internal LB smoke test

2015-10-20 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/933#issuecomment-149475560
  
First round of tests:

```
Test to verify access to loadbalancer haproxy admin stats page ... === 
TestName: test02_internallb_haproxy_stats_on_all_interfaces | Status : SUCCESS 
===
ok
Test create, assign, remove of an Internal LB with roundrobin http traffic 
to 3 vm's ... === TestName: test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 
| Status : SUCCESS ===
ok

--
Ran 2 tests in 1387.716s

OK
/tmp//MarvinLogs/test_internal_lb_MFM8DG/results.txt (END)
```

I will now run the other tests and post the results as those are done!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8933 - Improve the current tes...

2015-10-20 Thread wilderrodrigues
GitHub user wilderrodrigues opened a pull request:

https://github.com/apache/cloudstack/pull/957

CLOUDSTACK-8933 - Improve the current test_privategw_acls.py

   - Read cofiguration from the zone: template id; template id; and domain 
id
   - Create Account and VPC Offering
   - Add cleanup resources

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ekholabs/cloudstack 
fix/privategw_acl-CLOUDSTACK-8971

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/957.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 #957


commit ce70d4bb154f5adaaacfc4fa5c56fd46e24a0880
Author: Wilder Rodrigues 
Date:   2015-10-20T07:26:20Z

CLOUDSTACK-8933 - Improve the current test_privategw_acls.py

   - Read cofiguration from the zone: template id; template id; and domain 
id
   - Create Account and VPC Offering
   - Add cleanup resources




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8933 - Improve the current tes...

2015-10-20 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/957#issuecomment-149478991
  
Ping @remibergsma @michaelandersen @miguelaferreira @karuturi @DaanHoogland 
@wido 

Test results:

```
test_privategw_acl (integration.smoke.test_privategw_acl.TestPrivateGwACL) 
... === TestName: test_privategw_acl | Status : SUCCESS ===
ok

--
Ran 1 test in 301.406s

OK
```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


clue needed on marvin sources build

2015-10-20 Thread Daan Hoogland
H devs,

During a build that works for colleagues on a clean virtual machine I get
an error on the marvin generated sources part. The error is clear about
what happened but the cause is a mistery. Can anyone point me to the right
direction?

thanks,

[INFO]
[INFO] --- exec-maven-plugin:1.2.1:exec (generate-sources) @ cloud-marvin
---
the spec file
/data/git/cs1/cloudstack/tools/marvin/../apidoc/target/commands.xml does
not exists
Usage: codegenerator.py [options]

Options:
  -h, --helpshow this help message and exit
  -o OUTPUT, --output=OUTPUT
The path to the generated code entities, default is
.
  -s SPEC, --specfile=SPEC
The path and name of the api spec xml file, default
is
/etc/cloud/cli/commands.xml
  -e ENDPOINT, --endpoint=ENDPOINT
The endpoint mgmt server (with open 8096) where apis
are discovered, default is localhost
None
[INFO]
[INFO]

[INFO] Skipping Apache CloudStack Utils
[INFO] This project has been banned from the build due to previous failures.
[INFO]


-- 
Daan


[GitHub] cloudstack pull request: CLOUDSTACK-8933 - Improve the current tes...

2015-10-20 Thread borisroman
Github user borisroman commented on the pull request:

https://github.com/apache/cloudstack/pull/957#issuecomment-149482385
  
@wilderrodrigues Ran tests. OK.

```
=== TestName: test_privategw_acl | Status : SUCCESS ===
ok

--
Ran 1 test in 250.320s
```

OK


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: clue needed on marvin sources build

2015-10-20 Thread Daan Hoogland
that gives me a warm fuzzy feeling ;)

On Tue, Oct 20, 2015 at 11:04 AM, Boris Schrijver 
wrote:

> Hi Dahn,
>
> I must admit, I ran into it a couple weeks ago. No idea how I fixed it...
>
> On October 20, 2015 at 10:42 AM Daan Hoogland 
> wrote:
>
>
> H devs,
>
> During a build that works for colleagues on a clean virtual machine I get
> an error on the marvin generated sources part. The error is clear about
> what happened but the cause is a mistery. Can anyone point me to the right
> direction?
>
> thanks,
>
> [INFO]
> [INFO] --- exec-maven-plugin:1.2.1:exec (generate-sources) @ cloud-marvin
> ---
> the spec file
> /data/git/cs1/cloudstack/tools/marvin/../apidoc/target/commands.xml does
> not exists
> Usage: codegenerator.py [options]
>
> Options:
> -h, --help show this help message and exit
> -o OUTPUT, --output=OUTPUT
> The path to the generated code entities, default is
> .
> -s SPEC, --specfile=SPEC
> The path and name of the api spec xml file, default
> is
> /etc/cloud/cli/commands.xml
> -e ENDPOINT, --endpoint=ENDPOINT
> The endpoint mgmt server (with open 8096) where apis
> are discovered, default is localhost
> None
> [INFO]
> [INFO]
> 
> [INFO] Skipping Apache CloudStack Utils
> [INFO] This project has been banned from the build due to previous
> failures.
> [INFO]
> 
>
> --
> Daan
>
>


-- 
Daan


[GitHub] cloudstack pull request: CLOUDSTACK-8933 - Improve the current tes...

2015-10-20 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/957#issuecomment-149486636
  
Thanks, @borisroman !

Cheers,
Wilder


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Improve marvin test site2site VPN

2015-10-20 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/952#issuecomment-149487696
  
Run the tests and it LGTM :+1: 

```
Test Remote Access VPN in VPC ... === TestName: test_vpc_remote_access_vpn 
| Status : SUCCESS ===
ok
Test VPN in VPC ... === TestName: test_vpc_site2site_vpn | Status : SUCCESS 
===
ok

--
Ran 2 tests in 1008.486s

OK
/tmp//MarvinLogs/test_vpc_vpn_NGALOC/results.txt (END)
```

Thanks for this PR, @michaelandersen 

Cheers,
Wilder


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8969 VPN customer gateway can'...

2015-10-20 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/955#issuecomment-149494651
  
Hi @SudharmaJain,

Any test to cover your changes? In case no, how should we test this PR? 
Which steps to follow?

Cheers,
Wilder


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8933 - Improve the current tes...

2015-10-20 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/957#issuecomment-149500308
  
LGTM!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8933 - Improve the current tes...

2015-10-20 Thread remibergsma
Github user remibergsma commented on the pull request:

https://github.com/apache/cloudstack/pull/957#issuecomment-149506439
  
@michaelandersen Can you please let us know what you tested / reviewed? 
Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Improve marvin test site2site VPN

2015-10-20 Thread remibergsma
Github user remibergsma commented on the pull request:

https://github.com/apache/cloudstack/pull/952#issuecomment-149508039
  
Please have a look at Jenkins and/or force push to trigger another run.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Refactored & Added Internal LB smoke test

2015-10-20 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/933#issuecomment-149515675
  
Although @michaelandersen did not change any router code, I ran some more 
tests just to testify the rebase. It all looks good!

LGTM :+1: 

Tests results:

```
Create a redundant VPC with two networks with two VMs in each network ... 
=== TestName: test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | Status : 
SUCCESS ===
ok
Create a redundant VPC with two networks with two VMs in each network and 
check default routes ... === TestName: test_02_redundant_VPC_default_routes | 
Status : SUCCESS ===
ok
Stop existing router, add a PF rule and check we can access the VM ... === 
TestName: test_isolate_network_FW_PF_default_routes | Status : SUCCESS ===
ok
Test redundant router internals ... === TestName: 
test_RVR_Network_FW_PF_SSH_default_routes | Status : SUCCESS ===
ok
Test iptables default INPUT/FORWARD policy on RouterVM ... === TestName: 
test_02_routervm_iptables_policies | Status : SUCCESS ===
ok
Test iptables default INPUT/FORWARD policies on VPC router ... === 
TestName: test_01_single_VPC_iptables_policies | Status : SUCCESS ===
ok
Create a VPC with two networks with one VM in each network and test nics 
after destroy ... === TestName: test_01_VPC_nics_after_destroy | Status : 
SUCCESS ===
ok
Create a VPC with two networks with one VM in each network and test default 
routes ... === TestName: test_02_VPC_default_routes | Status : SUCCESS ===
ok

--
Ran 8 tests in 7116.174s

OK
/tmp//MarvinLogs/test_vpc_router_nics_MSQNVM/results.txt (END)
```

Pinging @remibergsma @karuturi @wido @bhaisaab @miguelaferreira  for a 
second LGTM :)

Cheers,
Wilder


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8708: gson update and ArrayTyp...

2015-10-20 Thread wido
Github user wido commented on the pull request:

https://github.com/apache/cloudstack/pull/932#issuecomment-149531398
  
So, this PR is hard to test. For now I've verified that it compiles on my 
Ubuntu desktop with Java 8 and all the Unit Tests succeed, so that's good.

Asking @borisroman if we can spin up a KVM cluster and verify the Agent 
communcation.

This PR is a blocker for #625 since that PR also requires the new Gson.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: [DISCUSS] KVM HA with IPMI Fencing

2015-10-20 Thread Ronald van Zantvoort

On 19/10/15 23:10, ilya wrote:

Ronald,

Please see response in-line...

And you too :)



On 10/19/15 2:18 AM, Ronald van Zantvoort wrote:

On 16/10/15 00:21, ilya wrote:

I noticed several attempts to address the issue with KVM HA in Jira and
Dev ML. As we all know, there are many ways to solve the same problem,
on our side, we've given it some thought as well - and its on our to do
list.

Specifically a mail thread "KVM HA is broken, let's fix it"
JIRA: https://issues.apache.org/jira/browse/CLOUDSTACK-8943
JIRA: https://issues.apache.org/jira/browse/CLOUDSTACK-8643

We propose the following solution that in our understanding should cover
all use cases and provide a fencing mechanism.

NOTE: Proposed IPMI fencing, is just a script. If you are using HP
hardware with ILO, it could be an ILO executable with specific
parameters. In theory - this can be *any* action script not just IPMI.

Please take few minutes to read this through, to avoid duplicate
efforts...


Proposed FS below:


https://cwiki.apache.org/confluence/display/CLOUDSTACK/KVM+HA+with+IPMI+Fencing





Hi Ilja, thanks for the design; I've put a comment int 8943, here it is
verbatim as my 5c in the discussion:

ilya musayev: Thanks for the design document. I can't comment in
Confluence, so here goes:
When to fence; Simon Weller: Of course you're right that it should be
highly unlikely that your storage completely dissappears from the
cluster. Be that as it may, as you yourself note, first of all if you're
using NFS without HA that likelihood increases manyfold. Secondly,
defining it as an anlikely disastrous event seems no reason not to take
it into account; making it a catastrophic event by 'fencing' all
affected hypervisors will not serve anyone as it would be unexpected and
unwelcome.



The entire concept of fencing exists to absolutely ensure state.
Specifically in this regard the state of the block devices and their
data. Marcus Sorensen: For that same reason it's not reasonable to 'just
assume' VM's gone. There's a ton of failure domains that could cause an
agent to disconnect from the manager but still have the same VM's
running, and there's nothing stopping CloudStack from starting the same
VM twice on the same block devices, with desastrous results. That's why
you need to know the VM's are very definitely not running anymore, which
is exactly what fencing is supposed to do.



For this, IPMI fencing is a nice and very often used option; absolutely
ensuring a hypervisor has died, and ergo the running VM's. It will
however not fix the case of the mass rebooting hypervisors (but rather
quite likely making it even more of an adventure if not addressed properly)
Now, with all that in mind, I'd like to make the following comments
regarding ilya musayev 's design.



First of the IPMI implementation: There's is IMHO no need to define IPMI
(Executable,Start,Stop,Reboot,Blink,Test). IPMI is a protocol, all these
are standard commands. For example, using the venerable `ipmitool` gives
you `chassis power (on,status,poweroff,identify,reset)` etc. which will
work on any IPMI device; only authentication details (User, Pass, Proto)
differ. There's bound to be some library that does it without having to
resort to (possibly numerous) different (versions of) external binaries.

I am well aware of this - however, i want this to be flexible. There may
be a hardware that does not conform to OpenIPMI standard (yet). Perhaps
i want to use a wrapper script instead that may do few more actions
besides IPMI. While initially we intended for this to be IPMI, i dont
want to limit it to just IPMI. Hence, some flexibility would not hurt.
It can be IPMI - or anything else, but i want this to be flexible.


Something like STONITH comes to mind; This venerable Linux-HA project 
has been the fencing cornerstone of Pacemaker/Corosync clusters for 
years. It contains a ton of standarized fencing mechanisms and although 
I haven't used in quite a while, it should be generically employable.


You'd simply provide a configuration interface for maybe even multiple 
STONITH fencing mechanisms without having to reinvent all these wheels 
yourself.




Secondly you're assuming that hypervisors can access the IPMI's of their
cluster/pod peers; although I'm not against this assumption per sé, I'm
also not convinced we're servicing everybody by forcing that assumption
to be true; some kind of IPMI agent/proxy comes to mind, or even
relegating the task back to the manager or some SystemVM. Also bear in
mind that you need access to those IPMI's to ensure cluster
functionality, so a failure domain should be in maintenance state if any
of the fence devices can't be reached

Good point, perhaps a test needs to be build in to confirm that ACS can
reach its target with proper credentials.



Thirdly your proposed testing algorithm needs more discussion; after
all, it directly hits the fundamental principal reasons for why to fence
a host, and that's a lot more than just

[GitHub] cloudstack pull request: CLOUDSTACK-8708: gson update and ArrayTyp...

2015-10-20 Thread borisroman
Github user borisroman commented on the pull request:

https://github.com/apache/cloudstack/pull/932#issuecomment-149531857
  
@wido Will do!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: cloud-apidoc module depends on cloud-clie...

2015-10-20 Thread miguelaferreira
GitHub user miguelaferreira opened a pull request:

https://github.com/apache/cloudstack/pull/958

cloud-apidoc module depends on cloud-client-ui

When building the cloud-apidoc module a script called `./build-apidoc.sh` 
is executed with an argument that points to 
`../../client/target/cloud-client-ui-${project.version}/WEB-INF/lib`. The 
script uses that argument to build a Java classpath. However, since the 
cloud-apidoc module does not explicitly depend on cloud-client-ui, a parallel 
maven build will often fail because the required jars are not present when 
needed.

Error message when build fails:
```
Error: Could not find or load main class com.cloud.api.doc.ApiXmlDocWriter
```

This PR makes the dependency explicit.

Resulting build:
```
mvn clean install -T4 -Pdeveloper,systemvm

[INFO] 

[INFO] BUILD SUCCESS
[INFO] 

[INFO] Total time: 09:02 min (Wall Clock)
[INFO] Finished at: 2015-10-20T13:31:30+02:00
[INFO] Final Memory: 98M/1526M
[INFO] 

```

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/miguelaferreira/cloudstack 
cloud-apidoc-depends-on-cloud-client-ui

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/958.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 #958


commit 9f9f6a2dda05e0e493c5a7192c3df2b77d55e61a
Author: Miguel Ferreira 
Date:   2015-10-20T10:32:46Z

cloud-apidoc module depends on cloud-client-ui




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: cloud-apidoc module depends on cloud-clie...

2015-10-20 Thread miguelaferreira
Github user miguelaferreira commented on the pull request:

https://github.com/apache/cloudstack/pull/958#issuecomment-149534258
  
ping @DaanHoogland this is the error you were asking me about right?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Corrected sentence

2015-10-20 Thread thinktwo
Github user thinktwo commented on the pull request:

https://github.com/apache/cloudstack/pull/951#issuecomment-149560916
  
@remibergsma Done.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8971 - Improve the current tes...

2015-10-20 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/957#issuecomment-149573159
  
@remibergsma @michaelandersen 

I added the wrong ACS issue to the PR title and the commit. I already 
edited the title, will now amend the commit and force push. Sorry for that!

Cheers,
Wilder


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: From4.5.1: NSX/Nicira Plugin does not sup...

2015-10-20 Thread nvazquez
Github user nvazquez commented on the pull request:

https://github.com/apache/cloudstack/pull/935#issuecomment-149582907
  
@miguelaferreira  @remibergsma 
Thanks again for your help! As you suggested I rebased master branch. I 
also added a more detailed description of the patch on this PR description and 
JIRA ticket.

Thanks,
Nicolas


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8933 SSVm and CPVM do not surv...

2015-10-20 Thread wilderrodrigues
GitHub user wilderrodrigues opened a pull request:

https://github.com/apache/cloudstack/pull/959

CLOUDSTACK-8933 SSVm and CPVM do not survive a reboot from API

This closes PR #930 as well.

I Rebased @bvbharat's PR with latest Master and tested the SSVM/CPVM and 
the routers: rVPC; VPC; VR; and RVR.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ekholabs/cloudstack pr/930-CLOUDSTACK-8933

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/959.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 #959


commit ac68f2a116650f9bebc80b183261ba350f8a7db7
Author: Bharat Kumar 
Date:   2014-12-24T11:18:55Z

CLOUDSTACK-8933 SSVm and CPVM do not survive a reboot from API




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8933 SSVm and CPVM do not surv...

2015-10-20 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/959#issuecomment-149588601
  
Ping @karuturi @bvbharat @borisroman @wido @remibergsma @miguelaferreira 
@DaanHoogland 

Test Environment:

* Management Server + MySQL on CentOS 7.1
* KVM host on CentOS 7.1
* ACS Agent and Common built from source

Tests Results:

```
Test SSVM Internals ... === TestName: test_03_ssvm_internals | Status : 
SUCCESS ===
ok
Test CPVM Internals ... === TestName: test_04_cpvm_internals | Status : 
SUCCESS ===
ok
Test stop SSVM ... === TestName: test_05_stop_ssvm | Status : SUCCESS ===
ok
Test stop CPVM ... === TestName: test_06_stop_cpvm | Status : SUCCESS ===
ok
Test reboot SSVM ... === TestName: test_07_reboot_ssvm | Status : SUCCESS 
===
ok
Test reboot CPVM ... === TestName: test_08_reboot_cpvm | Status : SUCCESS 
===
ok
Test destroy SSVM ... === TestName: test_09_destroy_ssvm | Status : SUCCESS 
===
ok
Test destroy CPVM ... === TestName: test_10_destroy_cpvm | Status : SUCCESS 
===
ok

--
Ran 8 tests in 2099.701s

OK
/tmp//MarvinLogs/test_ssvm_VGNRI1/results.txt (END)



Create a redundant VPC with two networks with two VMs in each network ... 
=== TestName: test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | Status : 
SUCCESS ===
ok
Create a redundant VPC with two networks with two VMs in each network and 
check default routes ... === TestName: test_02_redundant_VPC_default_routes | 
Status : SUCCESS ===
ok
Create a VPC with two networks with one VM in each network and test nics 
after destroy ... === TestName: test_01_VPC_nics_after_destroy | Status : 
SUCCESS ===
ok
Create a VPC with two networks with one VM in each network and test default 
routes ... === TestName: test_02_VPC_default_routes | Status : SUCCESS ===
ok
Test iptables default INPUT/FORWARD policy on RouterVM ... === TestName: 
test_02_routervm_iptables_policies | Status : SUCCESS ===
ok
Test iptables default INPUT/FORWARD policies on VPC router ... === 
TestName: test_01_single_VPC_iptables_policies | Status : SUCCESS ===
ok
Stop existing router, add a PF rule and check we can access the VM ... === 
TestName: test_isolate_network_FW_PF_default_routes | Status : SUCCESS ===
ok
Test redundant router internals ... === TestName: 
test_RVR_Network_FW_PF_SSH_default_routes | Status : SUCCESS ===
ok

--
Ran 8 tests in 7418.431s

OK
/tmp//MarvinLogs/test_routers_network_ops_VMU09R/results.txt (END)



Test to create Load balancing rule with source NAT ... === TestName: 
test_01_create_lb_rule_src_nat | Status : SUCCESS ===
ok
Test to create Load balancing rule with non source NAT ... === TestName: 
test_02_create_lb_rule_non_nat | Status : SUCCESS ===
ok
Test for assign & removing load balancing rule ... === TestName: 
test_assign_and_removal_lb | Status : SUCCESS ===
ok

--
Ran 3 tests in 871.657s

OK
/tmp//MarvinLogs/test_loadbalance_AHQVYG/results.txt (END)
```

Cheers,
Wilder


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: cloud-apidoc module depends on cloud-clie...

2015-10-20 Thread DaanHoogland
Github user DaanHoogland commented on the pull request:

https://github.com/apache/cloudstack/pull/958#issuecomment-149610350
  
@miguelaferreira , yes this is one of the obstakels I encountered the last 
few days.
LGTM, will test if I get a test env working.
Another one is the marvin not finding the result of the apidoc builds; 
commans.xml In those cases I did not see this error in the logs as expected 
because the build would have failed. not sure if there is a relation.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: [4.6]CLOUDSTACK-8912: Fixed listGuestOsMa...

2015-10-20 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request:

https://github.com/apache/cloudstack/pull/890#issuecomment-149677795
  
@borisroman, 
Is this PR intended to fix the ordering of the response of 
listGuestOsMappingCommand?
I did not see where you changed the ordering on the SC used. Looking at the 
changed files list, I just see you changing types from Long to String.

I noticed that the order by is done in ascending order, using the field 
“hypervisorType”, is “hypervisorType” that same as “ostypeid”? 
Moreover, I could not find a field called “ostypeid”.  

Interesting that the filtering and the order by was already there, this PR 
seems to be related to something else.Is it really a problem to let those field 
as they are (Long types)?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: [4.6]CLOUDSTACK-8912: Fixed listGuestOsMa...

2015-10-20 Thread ustcweizhou
Github user ustcweizhou commented on the pull request:

https://github.com/apache/cloudstack/pull/890#issuecomment-149691403
  
why not add 'uuid' column in guest_os_type table?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Improve marvin test site2site VPN

2015-10-20 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/952#issuecomment-149694171
  
@remibergsma: why another run?  Jenkins (and travis) is green


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Quota

2015-10-20 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r42552096
  
--- Diff: 
framework/quota/src/org/apache/cloudstack/quota/constant/QuotaConfig.java ---
@@ -0,0 +1,53 @@
+//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.quota.constant;
+
+import org.apache.cloudstack.framework.config.ConfigKey;
+
+public interface QuotaConfig {
--- End diff --

The ``public`` modifiers on the the constants are unnecessary for a 
``public`` interface definition.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Quota

2015-10-20 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r42553475
  
--- Diff: 
framework/quota/src/org/apache/cloudstack/quota/constant/QuotaConfig.java ---
@@ -0,0 +1,53 @@
+//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.quota.constant;
+
+import org.apache.cloudstack.framework.config.ConfigKey;
+
+public interface QuotaConfig {
+
+public static final ConfigKey QuotaPluginEnabled = new 
ConfigKey("Advanced", Boolean.class, "quota.enable.service", "false", 
"Indicates whether Quota plugin is enabled or not",
+true);
+
+public static final ConfigKey QuotaEnableEnforcement = new 
ConfigKey("Advanced", String.class, "quota.enable.enforcement", "false",
+"Enable the usage quota enforcement, i.e. on true when 
exceeding quota the respective account will be locked.", true);
+
+public static final ConfigKey QuotaCurrencySymbol = new 
ConfigKey("Advanced", String.class, "quota.currency.symbol", "R", "The 
symbol for the currency in use to measure usage.",
+true);
+
+public static final ConfigKey QuotaSmtpHost = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.host", "", "Quota 
SMTP host for quota related emails", true);
+
+public static final ConfigKey QuotaSmtpTimeout = new 
ConfigKey("Advanced", String.class, 
"quota.usage.smtp.connection.timeout", "60",
+"Quota SMTP server connection timeout duration", true);
+
+public static final ConfigKey QuotaSmtpUser = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.user", "", "Quota 
SMTP server username", true);
+
+public static final ConfigKey QuotaSmtpPassword = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.password", "", 
"Quota SMTP server password", true);
+
+public static final ConfigKey QuotaSmtpPort = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.port", "", "Quota 
SMTP port", true);
+
+public static final ConfigKey QuotaSmtpAuthType = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.useAuth", "",
+"If true, use secure SMTP authentication when sending 
emails.", true);
+
+public static final ConfigKey QuotaSmtpSender = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.sender", "",
+"Sender of quota alert email (will be in the From header of 
the email)", true);
+
--- End diff --

The 
(specification)[https://cwiki.apache.org/confluence/display/CLOUDSTACK/Quota+Service+-+FS]
 states that the following configuration options will be provided, but they are 
not defined in this list:

   * quota.period.type
   * quota.period.config
   * quota.activity.generate
   * quota.email.outgoing.record
   * quota.limit.critical
   * quota.limit.incremental

Also, why have the alert.smtp.* options been replicated for quota 
notifications?  It seems unlikely that a user would have a different mail 
infrastructures for alerts and quota notifications.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8971 - Improve the current tes...

2015-10-20 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/957#issuecomment-149706192
  
@remibergsma @wilderrodrigues  LGTM'ed this one too soon, was a bit too 
enthusiastic. sorry about that.  Ran the test just now, but it's failing!

nosetests --with-marvin --log-folder-path=/tmp/marvin/ 
--marvin-config=../../../mct-zone1-kvm1.cfg -a 
tags=advanced,required_hardware=false  test_privategw_acl.py


=== Marvin Init Logging Successful===
Creating Admin Account for Domain ID ==> 
01634a5a-726d-11e5-9395-5254001daa62
Creating a VPC offering..
Enabling the VPC offering created
Creating a VPC network in the account: 
test-TestPrivateGwACL-test_privategw_acl-KZ68F5
cCreate NetworkOffering
Created and Enabled NetworkOffering
Adding Network={'netmask': '255.255.255.0', 'displaytext': 'Test Network', 
'name': 'NETWORK-10.1.1.1'}
Created network with ID: b8914c96-9a92-4bbb-8e6b-51b1ed74a803
===final results are now copied to: 
/tmp/marvin//MarvinLogs/test_privategw_acl_GYMPT8===




test_privategw_acl (integration.smoke.test_privategw_acl.TestPrivateGwACL) 
... === TestName: test_privategw_acl | Status : FAILED ===
FAIL

==
FAIL: test_privategw_acl 
(integration.smoke.test_privategw_acl.TestPrivateGwACL)
--
Traceback (most recent call last):
  File 
"/Users/mandersen/Projects/cloudstack/test/integration/smoke/test_privategw_acl.py",
 line 199, in test_privategw_acl
self.createPvtGw()
  File 
"/Users/mandersen/Projects/cloudstack/test/integration/smoke/test_privategw_acl.py",
 line 275, in createPvtGw
self.fail("Failed to create Private Gateway ==> %s" % e)
AssertionError: Failed to create Private Gateway ==> Execute cmd: 
createprivategateway failed, due to: errorCode: 530, errorText:None
 >> begin captured stdout << -
=== TestName: test_privategw_acl | Status : FAILED ===




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8971 - Improve the current tes...

2015-10-20 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/957#issuecomment-149706469
  
requests.packages.urllib3.connectionpool: INFO: Starting new HTTP 
connection (1): cs2.cloud.lan
requests.packages.urllib3.connectionpool: DEBUG: "GET 
/client/api?physicalnetworkid=200&vpcid=f2839995-7ebb-49be-b466-ad1da9274c7d&sourcenatsupported=true&aclid=420b9956-1ce3-4a7e-ac12-03615dcb09a2&vlan=30&gateway=10.147.30.1&netmask

=255.255.255.0&apiKey=m5d8bqnS-qAVICCTlFiUHwPKd_dWXSOkKEnd8ur_UO-1Kcza8fD3a97OqDDB96NuElYmNY_4q4klE7sdpgJYWQ&command=createPrivateGateway&signature=uD9jjAKOWv%2B%2F3oRHIhWU3VBSW%2Bc%3D&ipaddress=10.147.30.200&response=json
 HTTP/1.1" 
530 83
test_privategw_acl (integration.smoke.test_privategw_acl.TestPrivateGwACL): 
ERROR: Exception:['Traceback (most recent call last):\n', '  File 
"/Library/Python/2.7/site-packages/marvin/cloudstackConnection.py", line 306, 
in __parseAnd
GetResponse\nresponse_cls)\n', '  File 
"/Library/Python/2.7/site-packages/marvin/jsonHelper.py", line 151, in 
getResultObj\nraise cloudstackException.CloudstackAPIException(respname, 
errMsg)\n', 'CloudstackAPIException: Execu
te cmd: createprivategateway failed, due to: errorCode: 530, 
errorText:None\n']
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/marvin/cloudstackConnection.py", 
line 306, in __parseAndGetResponse
response_cls)
  File "/Library/Python/2.7/site-packages/marvin/jsonHelper.py", line 151, 
in getResultObj
raise cloudstackException.CloudstackAPIException(respname, errMsg)
CloudstackAPIException: Execute cmd: createprivategateway failed, due to: 
errorCode: 530, errorText:None



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8971 - Improve the current tes...

2015-10-20 Thread michaelandersen
Github user michaelandersen commented on the pull request:

https://github.com/apache/cloudstack/pull/957#issuecomment-149706996
  
from the mgt server log:
WARN  [c.c.a.d.ParamGenericValidationWorker] 
(709693495@qtp-265638379-0:ctx-dfba94e8 ctx-8090674b ctx-c8da340d) Received 
unknown parameters for command createNetworkACL. Unknown p
arameters : cidr
INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-5:ctx-8ec951c2 
job-1957) Add job-1957 into job monitoring
WARN  [c.c.a.d.ParamGenericValidationWorker] 
(API-Job-Executor-5:ctx-8ec951c2 job-1957 ctx-173033b6) Received unknown 
parameters for command createNetworkACL. Unknown parameters :
 cidr
INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-5:ctx-8ec951c2 
job-1957) Remove job-1957 from job monitoring
WARN  [c.c.a.d.ParamGenericValidationWorker] 
(709693495@qtp-265638379-0:ctx-f8a13dcf ctx-86f02aa9 ctx-57be2ff6) Received 
unknown parameters for command createNetworkOffering. Unkn
own parameters : usevpc
ERROR [c.c.a.ApiServer] (709693495@qtp-265638379-0:ctx-ac06c612 
ctx-aacaf035 ctx-2f37a8d5) unhandled exception executing api command: 
[Ljava.lang.String;@9976afa
java.lang.NullPointerException
at 
com.cloud.network.vpc.VpcManagerImpl.createVpcPrivateGateway(VpcManagerImpl.java:1610)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at 
org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:106)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at 
com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy148.createVpcPrivateGateway(Unknown Source)
at 
org.apache.cloudstack.api.command.admin.vpc.CreatePrivateGatewayCmd.create(CreatePrivateGatewayCmd.java:150)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8971 - Improve the current tes...

2015-10-20 Thread remibergsma
Github user remibergsma commented on the pull request:

https://github.com/apache/cloudstack/pull/957#issuecomment-149718198
  
It works fine for me:

```
nosetests --with-marvin --marvin-config=${marvinCfg} -s -a 
tags=advanced,required_hardware=false smoke/test_privategw_acl.py
```

Result:
```
test_privategw_acl (integration.smoke.test_privategw_acl.TestPrivateGwACL) 
... === TestName: test_privategw_acl | Status : SUCCESS ===
ok

--
Ran 1 test in 223.325s

OK
```

Based on the above: LGTM

@michaelandersen are you sure it isn't a local problem? Maybe try to deploy 
again? I'll hold this PR until tomorrow morning.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8708: gson update and ArrayTyp...

2015-10-20 Thread rafaelweingartner
Github user rafaelweingartner commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/932#discussion_r42564487
  
--- Diff: 
core/src/org/apache/cloudstack/agent/transport/AnswerArrayTypeAdaptor.java ---
@@ -0,0 +1,33 @@
+package org.apache.cloudstack.agent.transport;
+
+import java.io.IOException;
+import java.lang.reflect.Array;
+
+import com.cloud.agent.api.Answer;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.gson.stream.JsonWriter;
+
+public class AnswerArrayTypeAdaptor extends 
GenericArrayTypeAdaptor {
+
+@Override
+protected Answer[] newArray(int size) {
+Answer[] answers = (Answer[])Array.newInstance(Answer.class, size);
--- End diff --

what do you think about using "return 
(Answer[])Array.newInstance(Answer.class, size);"?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8708: gson update and ArrayTyp...

2015-10-20 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request:

https://github.com/apache/cloudstack/pull/932#issuecomment-149742333
  
@ DaanHoogland, 
I ran the tests from my Windows environments, after I did some work arounds 
everything started passing the tests. The fixes I did I created a PR into your 
branch.

I used JDK 1.8.66, running from eclipse into a Windows 8 environment.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Sorting of security groups

2015-10-20 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request:

https://github.com/apache/cloudstack/pull/937#issuecomment-149743155
  
Nice work
LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8656: tests ignoring exception...

2015-10-20 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request:

https://github.com/apache/cloudstack/pull/850#issuecomment-149744151
  
Do you guys really think that is a good idea to log exceptions in a test 
case?
If the case is just to ignore them, it could be done without logging.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Quota

2015-10-20 Thread abhinandanprateek
Github user abhinandanprateek commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r42581119
  
--- Diff: 
framework/quota/src/org/apache/cloudstack/quota/constant/QuotaConfig.java ---
@@ -0,0 +1,53 @@
+//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.quota.constant;
+
+import org.apache.cloudstack.framework.config.ConfigKey;
+
+public interface QuotaConfig {
+
+public static final ConfigKey QuotaPluginEnabled = new 
ConfigKey("Advanced", Boolean.class, "quota.enable.service", "false", 
"Indicates whether Quota plugin is enabled or not",
+true);
+
+public static final ConfigKey QuotaEnableEnforcement = new 
ConfigKey("Advanced", String.class, "quota.enable.enforcement", "false",
+"Enable the usage quota enforcement, i.e. on true when 
exceeding quota the respective account will be locked.", true);
+
+public static final ConfigKey QuotaCurrencySymbol = new 
ConfigKey("Advanced", String.class, "quota.currency.symbol", "R", "The 
symbol for the currency in use to measure usage.",
+true);
+
+public static final ConfigKey QuotaSmtpHost = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.host", "", "Quota 
SMTP host for quota related emails", true);
+
+public static final ConfigKey QuotaSmtpTimeout = new 
ConfigKey("Advanced", String.class, 
"quota.usage.smtp.connection.timeout", "60",
+"Quota SMTP server connection timeout duration", true);
+
+public static final ConfigKey QuotaSmtpUser = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.user", "", "Quota 
SMTP server username", true);
+
+public static final ConfigKey QuotaSmtpPassword = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.password", "", 
"Quota SMTP server password", true);
+
+public static final ConfigKey QuotaSmtpPort = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.port", "", "Quota 
SMTP port", true);
+
+public static final ConfigKey QuotaSmtpAuthType = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.useAuth", "",
+"If true, use secure SMTP authentication when sending 
emails.", true);
+
+public static final ConfigKey QuotaSmtpSender = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.sender", "",
+"Sender of quota alert email (will be in the From header of 
the email)", true);
+
--- End diff --

period.* params are already defined by usage server as usage.period.*. 
Quota uses the same values.  quota.limit.* are no longer global config but 
configurable per account by using credit API. "quota.email.outgoing.record" is 
not implemented in this version but can be a nice addition.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Quota

2015-10-20 Thread abhinandanprateek
Github user abhinandanprateek commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r42581161
  
--- Diff: 
framework/quota/src/org/apache/cloudstack/quota/constant/QuotaConfig.java ---
@@ -0,0 +1,53 @@
+//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.quota.constant;
+
+import org.apache.cloudstack.framework.config.ConfigKey;
+
+public interface QuotaConfig {
--- End diff --

yes optional though but more readable.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Quota

2015-10-20 Thread abhinandanprateek
Github user abhinandanprateek commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r42581420
  
--- Diff: 
framework/quota/src/org/apache/cloudstack/quota/constant/QuotaConfig.java ---
@@ -0,0 +1,53 @@
+//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.quota.constant;
+
+import org.apache.cloudstack.framework.config.ConfigKey;
+
+public interface QuotaConfig {
+
+public static final ConfigKey QuotaPluginEnabled = new 
ConfigKey("Advanced", Boolean.class, "quota.enable.service", "false", 
"Indicates whether Quota plugin is enabled or not",
+true);
+
+public static final ConfigKey QuotaEnableEnforcement = new 
ConfigKey("Advanced", String.class, "quota.enable.enforcement", "false",
+"Enable the usage quota enforcement, i.e. on true when 
exceeding quota the respective account will be locked.", true);
+
+public static final ConfigKey QuotaCurrencySymbol = new 
ConfigKey("Advanced", String.class, "quota.currency.symbol", "R", "The 
symbol for the currency in use to measure usage.",
+true);
+
+public static final ConfigKey QuotaSmtpHost = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.host", "", "Quota 
SMTP host for quota related emails", true);
+
+public static final ConfigKey QuotaSmtpTimeout = new 
ConfigKey("Advanced", String.class, 
"quota.usage.smtp.connection.timeout", "60",
+"Quota SMTP server connection timeout duration", true);
+
+public static final ConfigKey QuotaSmtpUser = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.user", "", "Quota 
SMTP server username", true);
+
+public static final ConfigKey QuotaSmtpPassword = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.password", "", 
"Quota SMTP server password", true);
+
+public static final ConfigKey QuotaSmtpPort = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.port", "", "Quota 
SMTP port", true);
+
+public static final ConfigKey QuotaSmtpAuthType = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.useAuth", "",
+"If true, use secure SMTP authentication when sending 
emails.", true);
+
+public static final ConfigKey QuotaSmtpSender = new 
ConfigKey("Advanced", String.class, "quota.usage.smtp.sender", "",
+"Sender of quota alert email (will be in the From header of 
the email)", true);
+
--- End diff --

smtp params: Currently there are project smtp and alert smtp params. we can 
go with alert smtp params. The alert code is not written as a standalone 
package and that will not help us in reducing redundant code.
I will check how easy it is to refactor alerts code as a framework package. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: Quota

2015-10-20 Thread abhinandanprateek
Github user abhinandanprateek commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/768#discussion_r42582358
  
--- Diff: 
framework/quota/src/org/apache/cloudstack/quota/dao/QuotaBalanceDaoImpl.java ---
@@ -0,0 +1,199 @@
+//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.quota.dao;
+
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.utils.db.Filter;
+import com.cloud.utils.db.GenericDaoBase;
+import com.cloud.utils.db.SearchCriteria;
+import com.cloud.utils.db.Transaction;
+import com.cloud.utils.db.TransactionCallback;
+import com.cloud.utils.db.TransactionLegacy;
+import com.cloud.utils.db.TransactionStatus;
+
+import org.apache.cloudstack.quota.vo.QuotaBalanceVO;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
+
+import javax.ejb.Local;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+
+@Component
+@Local(value = { QuotaBalanceDao.class })
+public class QuotaBalanceDaoImpl extends GenericDaoBase implements QuotaBalanceDao {
+private static final Logger s_logger = 
Logger.getLogger(QuotaBalanceDaoImpl.class.getName());
+
+@SuppressWarnings("deprecation")
+@Override
+public QuotaBalanceVO findLastBalanceEntry(final Long accountId, final 
Long domainId, final Date beforeThis) {
+return Transaction.execute(TransactionLegacy.USAGE_DB, new 
TransactionCallback() {
+@Override
+public QuotaBalanceVO doInTransaction(final TransactionStatus 
status) {
+List quotaBalanceEntries = new 
ArrayList<>();
+Filter filter = new Filter(QuotaBalanceVO.class, 
"updatedOn", false, 0L, 1L);
+SearchCriteria sc = createSearchCriteria();
+sc.addAnd("accountId", SearchCriteria.Op.EQ, accountId);
+sc.addAnd("domainId", SearchCriteria.Op.EQ, domainId);
+sc.addAnd("creditsId", SearchCriteria.Op.EQ, 0);
+sc.addAnd("updatedOn", SearchCriteria.Op.LT, beforeThis);
+quotaBalanceEntries = search(sc, filter);
+return quotaBalanceEntries.size() > 0 ? 
quotaBalanceEntries.get(0) : null;
+}
+});
+}
+
+@SuppressWarnings("deprecation")
--- End diff --

On further scanning the code: this can be replaced with QueryBuilder.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8933 SSVm and CPVM do not surv...

2015-10-20 Thread karuturi
Github user karuturi commented on the pull request:

https://github.com/apache/cloudstack/pull/959#issuecomment-149782673
  
The code concerns(incase of stop-start on a slow network and the changes of 
outer while waiting infinitely) with it were not addressed.
I am ok with merging this and taking up those later. But, if they are 
simple, better to address them now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: [4.6]CLOUDSTACK-8912: Fixed listGuestOsMa...

2015-10-20 Thread ustcweizhou
Github user ustcweizhou commented on the pull request:

https://github.com/apache/cloudstack/pull/890#issuecomment-149790401
  
I tested this api just now, 
It works fine.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: cloud-apidoc module depends on cloud-clie...

2015-10-20 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/958#issuecomment-149790526
  
I built ACS and the RPMs based on this PR, with 4 threads - as suggested in 
@miguelaferreira's comment. All worked fine!

LGTM :+1: 

Cheers,
Wilder


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8971 - Improve the current tes...

2015-10-20 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/957#issuecomment-149791585
  
@michaelandersen 

Could you give some details on how you executed the tests? It looks like 
env issues.

Did you...

* checked out the PR
* built ACS and RPMs
* installed RPMs on KVM
* cleaned the DB
* deployed DC
* ran the tests

...?

Or was it executed towards an existing/running environment?

As you can see in the Python stack trace, it says errorTest: None

```
AssertionError: Failed to create Private Gateway ==> Execute cmd: 
createprivategateway failed, due to: errorCode: 530, errorText:None
```

When you ran it, were the templates ready? Could you please follow steps 
above and try again? I will also try on my side.

Cheers,
Wilder




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8933 SSVm and CPVM do not surv...

2015-10-20 Thread wilderrodrigues
Github user wilderrodrigues commented on the pull request:

https://github.com/apache/cloudstack/pull/959#issuecomment-149792585
  
Hi @karuturi ,

I did not change the code as I thought the work needed was more tests 
related. I had a better look at PR #930 and will address your concerns in the 
code.

Thanks for the hints. :)

Cheers,
Wilder


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-8964: Can't create template or...

2015-10-20 Thread ustcweizhou
Github user ustcweizhou commented on the pull request:

https://github.com/apache/cloudstack/pull/954#issuecomment-149793103
  
Daan, I just edited the commit message to describe the issue.
This two issue looks small, but the functions are called by many other 
functions. hence it may have large impact on other processes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---