[GitHub] cloudstack pull request: L10n update 4.8 20160422

2016-04-29 Thread milamberspace
Github user milamberspace commented on the pull request:

https://github.com/apache/cloudstack/pull/1515#issuecomment-215645435
  
@swill Now the Jenkins build works, but the Travis failed with:
No output has been received in the last 10m0s, this potentially indicates a 
stalled build or something wrong with the build itself.
...


---
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-9350: KVM-HA- Fix CheckOnHost ...

2016-04-29 Thread abhinandanprateek
Github user abhinandanprateek commented on the pull request:

https://github.com/apache/cloudstack/pull/1496#issuecomment-215651932
  
@swill rebased it. Thank you.


---
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: L10n update 4.8 20160422

2016-04-29 Thread milamberspace
Github user milamberspace commented on the pull request:

https://github.com/apache/cloudstack/pull/1515#issuecomment-215671781
  
@swill after a new push to start a new Travis build, Travis and Jenkins are 
now green! You can merge the 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: CLOUDSTACK-9348: Use non-blocking SSL han...

2016-04-29 Thread rhtyd
Github user rhtyd commented on the pull request:

https://github.com/apache/cloudstack/pull/1493#issuecomment-215675646
  
@swill can you try again with your CI?

@agneya2001 @jburwell @wido @kiwiflyer @nvazquez @DaanHoogland and others - 
please review and share your LGTM, 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: L10n update 4.8 20160422

2016-04-29 Thread swill
Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1515#issuecomment-215698702
  
awesome, thank you sir.  i will get this merged today...


---
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-9348: Use non-blocking SSL han...

2016-04-29 Thread kiwiflyer
Github user kiwiflyer commented on the pull request:

https://github.com/apache/cloudstack/pull/1493#issuecomment-215741459
  
@rhtyd - We'll pull this in for functional testing.


---
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: Building Ubuntu 16.04 packages

2016-04-29 Thread Wido den Hollander

> Op 27 april 2016 om 19:38 schreef Wido den Hollander :
> 
> 
> 
> > Op 27 april 2016 om 14:19 schreef Rohit Yadav :
> > 
> > 
> > Hi Wido,
> > 
> > Thanks for starting this discussion. I'm not sure exactly how to do it 
> > either, but I suppose we can exploit post installation step to write custom 
> > scripts that setup initd or systemd scripts at suitable locations. For this 
> > we include both init/systemd scripts in the package (let say at some 
> > location like /usr/share/... and let post install script pick up the 
> > template and setup inid scripts). This way I think we can explore if there 
> > is a way to solve for building universal deb package.
> > 
> 
> No, a postinst file is not the way to go, that I am sure of.
> 
> I'm looking at the Ceph project and how they build their packages. They have 
> the same issue. I haven't figured it out completely, but they are not doing 
> this in the postinst or so.
> 
> You should never do that either since dpkg should always know which files it 
> created when installing a package.
> 

Working on the packaging: 
https://github.com/wido/cloudstack/commits/systemd-ubuntu1604

Learning from other projects like Ceph how have seem to have figured this out. 
It's all WIP.

The management server also has to go systemd for example.

Wido

> Wido
> 
> > Regards.
> > 
> > Regards,
> > 
> > Rohit Yadav
> > 
> > rohit.ya...@shapeblue.com 
> > www.shapeblue.com
> > 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
> > @shapeblue
> > 
> > -Original Message-
> > From: Wido den Hollander [mailto:w...@widodh.nl] 
> > Sent: Wednesday, April 27, 2016 1:40 PM
> > To: dev@cloudstack.apache.org
> > Subject: Building Ubuntu 16.04 packages
> > 
> > Hi,
> > 
> > Ubuntu 16.04 LTS was released about a week ago and I want to start on 
> > packages.
> > 
> > The cool things about the LTS:
> > - systemd
> > - Java 8
> > - libvirt 1.3.1
> > - Qemu 2.5
> > 
> > I'm familiar with building DEB packages, but there is something which I 
> > don't know how to fix yet.
> > 
> > We want to build packages for Ubuntu 14.04 and Ubuntu 16.04, but the first 
> > still uses Upstart / sysvinit and the newest uses systemd.
> > 
> > We already have systemd service files in 'packaging/systemd', so that is no 
> > the problem.
> > 
> > I however don't know how to build packages for 14.04 (Trusty) and 16.04 
> > (Xenial) using dpkg-buildpackage.
> > 
> > I see other projects use tools like pbuilder [0], but I don't know how that 
> > exactly works.
> > 
> > Before I put a lot of effort in this: Does anybody know how to build 
> > packages for different Ubuntu versions?
> > 
> > Eventually we will end up with packages like:
> > 
> > - cloudstack-agent-XXX~trusty.deb
> > - cloudstack-agent-XXX~xenial.deb
> > 
> > Thanks,
> > 
> > Wido
> > 
> > [0]: https://pbuilder.alioth.debian.org/


[GitHub] cloudstack pull request: CLOUDSTACK-9348: Use non-blocking SSL han...

2016-04-29 Thread rhtyd
Github user rhtyd commented on the pull request:

https://github.com/apache/cloudstack/pull/1493#issuecomment-215815079
  
thanks @kiwiflyer 


---
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-9348: Use non-blocking SSL han...

2016-04-29 Thread jburwell
Github user jburwell commented on the pull request:

https://github.com/apache/cloudstack/pull/1493#issuecomment-215818023
  
LGTM for code review


---
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-8800 : Improved the listVirtua...

2016-04-29 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request:

https://github.com/apache/cloudstack/pull/1444#issuecomment-215822574
  
@swill conflicts solved


---
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-8800 : Improved the listVirtua...

2016-04-29 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request:

https://github.com/apache/cloudstack/pull/1444#issuecomment-215829693
  
@swill Jenkins is complaining about a file called "testsmallfileinactive", 
but I have not introduced any sort of file like that. Is that some sort of 
trash that was left behind on the Jenkins VM?


---
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-8800 : Improved the listVirtua...

2016-04-29 Thread swill
Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1444#issuecomment-215832199
  
Just do a force push again.  Jenkins is being a bit of a princess recently, 
so we just have to keep trying.  This has been happening to a lot of PRs and it 
is almost never related to the PR.  Maybe I should get my hands dirty and see 
if I can improve the Jenkins implementation, but I just don't have time right 
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: CLOUDSTACK-8800 : Improved the listVirtua...

2016-04-29 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request:

https://github.com/apache/cloudstack/pull/1444#issuecomment-215833023
  
Ok, I will do that.
I can help youwith that (If we get access to the VM).
It would be nice, something like this plugin 
"https://github.com/janinko/ghprb";, then we could use sentences such "test this 
please" or "retest this please". I have used it, and it is very interesting.


---
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-9305: Cloudstack Usage Breaks ...

2016-04-29 Thread kiwiflyer
Github user kiwiflyer commented on the pull request:

https://github.com/apache/cloudstack/pull/1433#issuecomment-215840094
  
2 x LGTMs and CI complete. This is Ready to Merge.


---
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: Addresses CLOUDSTACK-9300 where the MySQL...

2016-04-29 Thread kiwiflyer
Github user kiwiflyer commented on the pull request:

https://github.com/apache/cloudstack/pull/1428#issuecomment-215840702
  
@Slair1 @dmabry @remibergsma 

Could I get some review on this when you get a chance? I'd like to get this 
PR moving.


---
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-8800 : Improved the listVirtua...

2016-04-29 Thread swill
Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1444#issuecomment-215847599
  
ya, that is interesting.  a couple people have mentioned similar tools.  
once I get the repo moved to the new github org I can start look into adding 
such tooling...


---
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-9305: Cloudstack Usage Breaks ...

2016-04-29 Thread swill
Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1433#issuecomment-215848580
  
Sorry, I missed the LGTMs.  :)  I will add this to my merge queue.  Thanks 
@kiwiflyer for following up.


---
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: Fix Sync of template.properties in Swift

2016-04-29 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request:

https://github.com/apache/cloudstack/pull/1331#issuecomment-215851189
  
@jburwell, that is great that we understood each other ;)

Your questions is a great one, why are we discussion this, and why testing 
that. Actually, I do not care much about the writing of test cases to check if 
something is logged.

The point is that there is that “cleanupStagingNfs” method. If we want 
to write a nice test to it, we would have to test the happy day flow; that 
means if the method is creating the “DeleteCommand” object and then if it 
call the “execute” method with that object. That is one test case. I see 
that kind of test as an integration test; meaning, a test if a method is using 
some other method.

Having said that, I see another flow of execution; we might have an 
exception. So, if an exception occurs, what happens? By the code, today we log 
the exception and the execution continues.

Then we would have to ask ourselves, do we want to enforce that? If someone 
silences that exception, would we like to catch that?

If someone re-throws the exception, using a runtime one; would we like to 
detect that?

At first sight, I think that we should guarantee both executions flows. 
But, if it becomes a burden, we can let it go.


---
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-9368: Fix for Support configur...

2016-04-29 Thread nvazquez
Github user nvazquez commented on the pull request:

https://github.com/apache/cloudstack/pull/1518#issuecomment-215852047
  
@rafaelweingartner I added test cases and the new hierarchy


---
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: Addresses CLOUDSTACK-9300 where the MySQL...

2016-04-29 Thread Slair1
Github user Slair1 commented on the pull request:

https://github.com/apache/cloudstack/pull/1428#issuecomment-215854412
  
this LGTM.  we have been running this in our environment for over a month 
(ACS 4.8).  This PR fixes the issue we had with cloudstack-mangaement not 
starting when sql ha is enabled.

On a related note, we may have another issue somewhere else.  When 
cloudstack is failed over to the slave sql server, we cannot launch a console 
or issue a reboot of a systemvm from the web-interface.  @kiwiflyer have you 
tested those two actions when failed over to the slave sql server?  I just 
noticed this on our side yesterday while doing maintenance.


---
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: Addresses CLOUDSTACK-9300 where the MySQL...

2016-04-29 Thread kiwiflyer
Github user kiwiflyer commented on the pull request:

https://github.com/apache/cloudstack/pull/1428#issuecomment-215856646
  
@Slair1 Are you failing a ACS management server in addition to the MySQL 
instance?
If so, make sure your Load Balancer is also moving the traffic to the 
backup server. Host communication occurs on port 8250.


---
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: Addresses CLOUDSTACK-9300 where the MySQL...

2016-04-29 Thread Slair1
Github user Slair1 commented on the pull request:

https://github.com/apache/cloudstack/pull/1428#issuecomment-215859262
  
@kiwiflyer No, we were not failing over our ACS mgmt servers.  We still had 
both up and functional and were able to log directly into both (and of course 
through our load-balancer).  The load-balancing of the ACS mgmt servers works 
great.  I tried opening console windows through both mgmt servers.

when i issue a netstat from the mgmt servers, i see them trying to contact 
the offline mysql server, when i attempt opening a console.  Although, i know 
most other functions we have tested work fine.  In the netstat we see a slew of 
established connections with the slave mysql server (as it should).  But, for 
some reason when we attempt to open a console it doesn't work and we see the 
mgmt server try to connect to the offline mysql server.

As soon as the primary mysql server is online, the console windows 
immediately work.


---
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: Addresses CLOUDSTACK-9300 where the MySQL...

2016-04-29 Thread kiwiflyer
Github user kiwiflyer commented on the pull request:

https://github.com/apache/cloudstack/pull/1428#issuecomment-215860378
  
Interesting. I'll go digging into the code. I'm not that familiar with the 
console proxy (yet).


---
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: Followup fix for #1162: Add support for n...

2016-04-29 Thread kiwiflyer
Github user kiwiflyer commented on the pull request:

https://github.com/apache/cloudstack/pull/1330#issuecomment-215872240
  
Team,

Where are we currently on 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: Bump ssh retries to prevent false positiv...

2016-04-29 Thread kiwiflyer
Github user kiwiflyer commented on the pull request:

https://github.com/apache/cloudstack/pull/1473#issuecomment-215873345
  
This is a trivial config change for a smoke test. 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: Add lsb-release dependency to agent and m...

2016-04-29 Thread kiwiflyer
Github user kiwiflyer commented on the pull request:

https://github.com/apache/cloudstack/pull/1412#issuecomment-215874307
  
@ProjectMoon Can you open a new PR against 4.7 with this?  We're really 
only supporting 4.7.x onward.
Trivial packing change. LTGM





---
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-9368: Fix for Support configur...

2016-04-29 Thread rafaelweingartner
Github user rafaelweingartner commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1518#discussion_r61643519
  
--- Diff: 
core/src/com/cloud/agent/api/storage/StorageNfsVersionCommand.java ---
@@ -0,0 +1,44 @@
+//
+// 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 com.cloud.agent.api.storage;
+
+import com.cloud.agent.api.Command;
+
+public abstract class StorageNfsVersionCommand extends Command {
+
+protected StorageNfsVersionCommand(){
--- End diff --

are you using this constructor?


---
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-9368: Fix for Support configur...

2016-04-29 Thread rafaelweingartner
Github user rafaelweingartner commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1518#discussion_r61645464
  
--- Diff: 
plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/resource/VmwareResourceTest.java
 ---
@@ -117,4 +154,79 @@ public void testStartVm3dgpuEnabled() throws Exception{
 verify(vmMo3dgpu).configureVm(any(VirtualMachineConfigSpec.class));
 }
 
-}
+// 
---
+
+@Test
+public void testgetNfsVersionFromNfsTONull(){
+assertFalse(_resource.getStorageNfsVersionFromNfsTO(null));
+}
+
+@Test
+public void testgetNfsVersionFromNfsTONfsVersionNull(){
+
when(srcDataNfsTO.getNfsVersion()).thenReturn(NFS_VERSION_NOT_PRESENT);
+assertFalse(_resource.getStorageNfsVersionFromNfsTO(srcDataNfsTO));
+}
+
+@Test
+public void testgetNfsVersionFromNfsTONfsVersion(){
+assertTrue(_resource.getStorageNfsVersionFromNfsTO(srcDataNfsTO));
+}
+
+// 
---
+
+@Test
+public void testSetCurrentNfsVersionInProcessorAndHandler(){
+_resource.setCurrentNfsVersionInProcessorAndHandler();
+verify(storageHandler).reconfigureNfsVersion(any(Integer.class));
+}
+
+// 
---
+
+@Test
+public void testExamineStorageSubSystemCommandNfsVersionNotPresent(){
+
when(srcDataNfsTO.getNfsVersion()).thenReturn(NFS_VERSION_NOT_PRESENT);
+_resource.examineStorageSubSystemCommandNfsVersion(storageCmd);
+verify(_resource, 
never()).setCurrentNfsVersionInProcessorAndHandler();
+}
+
+@Test
+public void testExamineStorageSubSystemCommandNfsVersion(){
+_resource.examineStorageSubSystemCommandNfsVersion(storageCmd);
+verify(_resource).setCurrentNfsVersionInProcessorAndHandler();
+}
+
+// 
---
+
+@Test
+public void testStorageSetNfsVersion(){
--- End diff --

I did not quite understand this test.
It feels like two tests in one, is it right?
Also, I believe the comments could be removed. Maybe a better name for the 
method would help, what do you think?



---
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-9368: Fix for Support configur...

2016-04-29 Thread rafaelweingartner
Github user rafaelweingartner commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1518#discussion_r61646120
  
--- Diff: 
plugins/hypervisors/vmware/test/com/cloud/hypervisor/vmware/resource/VmwareResourceTest.java
 ---
@@ -117,4 +154,79 @@ public void testStartVm3dgpuEnabled() throws Exception{
 verify(vmMo3dgpu).configureVm(any(VirtualMachineConfigSpec.class));
 }
 
-}
+// 
---
+
+@Test
+public void testgetNfsVersionFromNfsTONull(){
+assertFalse(_resource.getStorageNfsVersionFromNfsTO(null));
+}
+
+@Test
+public void testgetNfsVersionFromNfsTONfsVersionNull(){
+
when(srcDataNfsTO.getNfsVersion()).thenReturn(NFS_VERSION_NOT_PRESENT);
+assertFalse(_resource.getStorageNfsVersionFromNfsTO(srcDataNfsTO));
+}
+
+@Test
+public void testgetNfsVersionFromNfsTONfsVersion(){
+assertTrue(_resource.getStorageNfsVersionFromNfsTO(srcDataNfsTO));
+}
+
+// 
---
+
+@Test
+public void testSetCurrentNfsVersionInProcessorAndHandler(){
+_resource.setCurrentNfsVersionInProcessorAndHandler();
+verify(storageHandler).reconfigureNfsVersion(any(Integer.class));
+}
+
+// 
---
+
+@Test
+public void testExamineStorageSubSystemCommandNfsVersionNotPresent(){
+
when(srcDataNfsTO.getNfsVersion()).thenReturn(NFS_VERSION_NOT_PRESENT);
+_resource.examineStorageSubSystemCommandNfsVersion(storageCmd);
+verify(_resource, 
never()).setCurrentNfsVersionInProcessorAndHandler();
+}
+
+@Test
+public void testExamineStorageSubSystemCommandNfsVersion(){
+_resource.examineStorageSubSystemCommandNfsVersion(storageCmd);
+verify(_resource).setCurrentNfsVersionInProcessorAndHandler();
+}
+
+// 
---
+
+@Test
+public void testStorageSetNfsVersion(){
+
_resource.checkStorageProcessorAndHandlerNfsVersionAttribute(storageCmd);
+assertEquals(NFS_VERSION, _resource._storageNfsVersion);
+
+//Call again to verify that version won't be set again once it is 
set (examineStorageSubSystemCommandNfsVersion - only one time)
+
_resource.checkStorageProcessorAndHandlerNfsVersionAttribute(storageCmd);
+
verify(_resource).examineStorageSubSystemCommandNfsVersion(storageCmd); 
//Only 1 time, default for verify.
+}
+
+@Test
+public void testStorageNfsVersionNotPresent(){
--- End diff --

I believe this method could be simpler. 
If it wants to test what is coded now. It would only need check if 
"_storageNfsVersion == null", then, Mockito.verify(mock, 
times(0)).examineStorageSubSystemCommandNfsVersion

Also for the other case you can use Mockito.doNothing, when calling 
"examineStorageSubSystemCommandNfsVersion". This is an integration test, you do 
not need to test the whole execution flow, you only need to test if the method 
(the one being tested) is calling the methods it should.

That means, to test the 
"checkStorageProcessorAndHandlerNfsVersionAttribute", you only need to worry 
about the "examineStorageSubSystemCommandNfsVersion" method.


---
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-9350: KVM-HA- Fix CheckOnHost ...

2016-04-29 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1496#discussion_r61649158
  
--- Diff: server/src/com/cloud/ha/HighAvailabilityManagerImpl.java ---
@@ -264,6 +265,11 @@ public void scheduleRestartForVmsOnHost(final HostVO 
host, boolean investigate)
 "Host [" + hostDesc + "] is down." + ((sb != null) ? 
sb.toString() : ""));
 
 for (VMInstanceVO vm : reorderedVMList) {
+ServiceOfferingVO vmOffering = 
_serviceOfferingDao.findById(vm.getServiceOfferingId());
--- End diff --

@alexandrelimassantana I don't see where ``vmOffering`` is being used only 
for debug.  It is being used on line 269 to determine if the VM is using local 
storage -- before debugging logging code.


---
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-8562: Dynamic Role-Based API C...

2016-04-29 Thread rhtyd
Github user rhtyd commented on the pull request:

https://github.com/apache/cloudstack/pull/1489#issuecomment-215889804
  
@swill fixed the issue of orderable permissions, PR is ready for 
testing/merge


---
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-9350: KVM-HA- Fix CheckOnHost ...

2016-04-29 Thread jburwell
Github user jburwell commented on the pull request:

https://github.com/apache/cloudstack/pull/1496#issuecomment-215890052
  
LGTM for code review


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


Python Question (with regards to Marvin)

2016-04-29 Thread Tutkowski, Mike
Hi everyone,


I received an error when trying to invoke the instance version of 
enableMaintenance (below).


'TypeError: enableMaintenance() takes exactly 3 arguments (2 given)\n']


I looked at base.py and it has the following with regards to maintenance mode 
for hosts:


def enableMaintenance(self, apiclient):

"""enables maintenance mode Host"""


cmd = prepareHostForMaintenance.prepareHostForMaintenanceCmd()

cmd.id = self.id

return apiclient.prepareHostForMaintenance(cmd)


@classmethod

def enableMaintenance(cls, apiclient, id):

"""enables maintenance mode Host"""


cmd = prepareHostForMaintenance.prepareHostForMaintenanceCmd()

cmd.id = id

return apiclient.prepareHostForMaintenance(cmd)


Now, I definitely have a lot more Java experience than Python, but - as far as 
I know - having two methods with the same name such as this (even if one is an 
instance method and the other is a class method) is not really "permitted" in 
Python.


I mean, technically it's permitted, but the second one will override the first 
one.


Can any of our Python people comment on this?


I was thinking I'd remove the class method (assuming my knowledge here 
regarding this topic is correct).


Thanks!

Mike





Access to Docker Hub repo

2016-04-29 Thread Wido den Hollander
Hi,

I am working on the Ubuntu 14.04 and 16.04 packaging. Using Docker I want to 
start building the packages for all distros.

I'd like to publish the Docker images to Docker Hub: 
https://hub.docker.com/r/cloudstack/

Can somebody grant 'widodh' access to the registry?

Wido