[GitHub] cloudstack pull request: CLOUDSTACK-9340: General DB Optimization

2016-05-03 Thread koushik-das
Github user koushik-das commented on the pull request:

https://github.com/apache/cloudstack/pull/1466#issuecomment-216751340
  
I am getting this error during deploy DB "Specified key was too long; max 
key length is 767 bytes". I have provided another inline comment in the code 
which is failing. Mysql version is 5.6.12.

> Processing upgrade: com.cloud.upgrade.DatabaseUpgradeChecker
[WARNING] 
java.lang.reflect.InvocationTargetException
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.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:724)
Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to 
upgrade the database
at 
com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:394)
at 
com.cloud.upgrade.DatabaseUpgradeChecker.check(DatabaseUpgradeChecker.java:490)
at com.cloud.upgrade.DatabaseCreator.main(DatabaseCreator.java:217)
... 6 more
Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to 
execute upgrade script: 
/Users/koushik/code/cloudstack-apache/cloudstack/developer/target/db/db/schema-481to490.sql
at 
com.cloud.upgrade.DatabaseUpgradeChecker.runScript(DatabaseUpgradeChecker.java:306)
at 
com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:363)
... 8 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 
Specified key was too long; max key length is 767 bytes
at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:185)
at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:87)
at 
com.cloud.upgrade.DatabaseUpgradeChecker.runScript(DatabaseUpgradeChecker.java:297)
... 9 more
[INFO] 

[INFO] BUILD FAILURE
[INFO] 

[INFO] Total time: 40.361 s
[INFO] Finished at: 2016-05-04T11:07:42+05:30
[INFO] Final Memory: 70M/263M
[INFO] 

[ERROR] Failed to execute goal 
org.codehaus.mojo:exec-maven-plugin:1.2.1:java (create-schema) on project 
cloud-developer: An exception occured while executing the Java class. null: 
InvocationTargetException: Unable to upgrade the database: Unable to execute 
upgrade script: 
/Users/koushik/code/cloudstack-apache/cloudstack/developer/target/db/db/schema-481to490.sql:
 Specified key was too long; max key length is 767 bytes -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, 
please read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


---
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-9340: General DB Optimization

2016-05-03 Thread koushik-das
Github user koushik-das commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1466#discussion_r61992331
  
--- Diff: setup/db/db/schema-481to490.sql ---
@@ -413,3 +413,26 @@ VIEW `user_vm_view` AS
 
 -- Add cluster.storage.operations.exclude property
 INSERT INTO `cloud`.`configuration` (`category`, `instance`, `component`, 
`name`, `description`, `default_value`, `updated`, `scope`, `is_dynamic`) 
VALUES ('Advanced', 'DEFAULT', 'CapacityManager', 
'cluster.storage.operations.exclude', 'Exclude cluster from storage 
operations', 'false', now(), 'Cluster', '1');
+
+- 3) Missing indexes (Add indexes to avoid full table scans)
+ALTER TABLE `cloud`.`op_it_work` ADD INDEX `i_type_and_updated` (`type` 
ASC, `updated_at` ASC);
+ALTER TABLE `cloud`.`vm_root_disk_tags` ADD INDEX `i_vm_id` (`vm_id` ASC);
+ALTER TABLE `cloud`.`vm_compute_tags` ADD INDEX `i_vm_id` (`vm_id` ASC);
+ALTER TABLE `cloud`.`vm_network_map` ADD INDEX `i_vm_id` (`vm_id` ASC);
+ALTER TABLE `cloud`.`ssh_keypairs` ADD INDEX `i_public_key` (`public_key` 
ASC);
--- End diff --

The public_key field is varchar(5120) and creating an index on this is 
failing with error 
Error Code: 1071. Specified key was too long; max key length is 767 bytes



---
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-05-03 Thread rhtyd
Github user rhtyd commented on the pull request:

https://github.com/apache/cloudstack/pull/1489#issuecomment-216749200
  
@jburwell The API is transactional and you're right if more than one admin 
decide to change the order, client side final order checking will be needed. 
This is also true for VPC ACL rules too, where the same sort of order is used 
(it also supports draggable allow/deny items in the UI).

If I implement the API to apply change the order at once (instead of 
multiple single operations) and there are multiple root admins changing the 
rules, the order saved by the last user will be in effect; and client side 
tracking/verification will still be required.

 Realistically, only root admins will be using this feature and it's 
unlikely to hit such a case often.


---
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: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread mike-tutkowski
Github user mike-tutkowski commented on the pull request:

https://github.com/apache/cloudstack/pull/1529#issuecomment-216743316
  
@jburwell I actually like this better because it tells me specifically what 
the particular failure is.

assert validationresult is not None, "'validationresult' should not 
be equal to 'None'."

assert isinstance(validationresult, list), "'validationresult' 
should be a 'list'."

assert len(validationresult) == 3, "'validationresult' should be a 
list with three items in it."


---
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: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread mike-tutkowski
Github user mike-tutkowski commented on the pull request:

https://github.com/apache/cloudstack/pull/1529#issuecomment-216742996
  
@jburwell How's about this?

assert validationresult is not None and isinstance(validationresult, list) 
and len(validationresult) == 3,\
"'validationresult' should be a list with three items in it."


---
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: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread jburwell
Github user jburwell commented on the pull request:

https://github.com/apache/cloudstack/pull/1529#issuecomment-216735024
  
@mike-tutkowski I apologize for being behind on my review queue.  I will 
move #1403 up on my list and get to it as quickly as I can.


---
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-05-03 Thread jburwell
Github user jburwell commented on the pull request:

https://github.com/apache/cloudstack/pull/1489#issuecomment-216734107
  
@rhtyd I am trying to understand how reordering should work.   User creates 
a role with rules ordered as follows:

1. Rule A
1. Rule B
1. Rule C
1. Rule D
1. Rule E
1. Rule F

When the user creates this role, the API guarantees that these six rules 
and their order will be persisted atomically.  Later, the user wants to reorder 
the rules as follows:

1. Rule A
1. Rule D
1. Rule B
1. Rule C
1. Rule E
1. Rule F

As I understand the API, the following discrete API calls are required to 
affect this change:

1. ```updateRolePermission(roleId: "Rule D", parentUUID: "Rule A")```
1. ```updateRolePermission(roleId: "Rule B", parentUUID: "Rule D")```
1. ```updateRolePermission(roleId: "Rule C", parentUUID: "Rule B")```

Assuming my understanding regarding the API usage is correct, I have the 
following concerns about this approach:

1. **Operation Interleaving**: Since each API call can only provide a 
guarantee the persistence of a single list mutation, it is possible for two 
users to change the order of rules for permission simultaneously.  The result 
of this operation interleaving would leave the order of the rules in an 
indeterminate order.  
1. **Client Complexity**: It places a burden on clients to track the 
mutations to the list of rules rather than simply tracking the current order of 
the list.  This additional complexity could lead to more error prone client 
code.

As a user my expectation would be to reorder all rules associated with a 
permission in one atomic operation rather than a series of atomic mutation 
operations.


---
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: [ANNOUNCE] New committer: Simon Weller

2016-05-03 Thread Ahmad Emneina
Congratulations Simon!

On Thu, Apr 28, 2016 at 12:23 AM, Erik Weber  wrote:

> The Project Management Committee (PMC) for Apache CloudStack
> has asked Simon Weller to become a committer and we are pleased to
> announce that they have accepted.
>
>
> Being a committer allows many contributors to contribute more
> autonomously. For developers, it makes it easier to submit changes and
> eliminates the need to have contributions reviewed via the patch
> submission process. Whether contributions are development-related or
> otherwise, it is a recognition of a contributor's participation in the
> project and commitment to the project and the Apache Way.
>
> Please join me in congratulating Simon
>
> --Erik
> on behalf of the CloudStack PMC
>


Re: Rafael Weingartner joining the PMC

2016-05-03 Thread Ahmad Emneina
Congrats Rafael!

On Thu, Apr 28, 2016 at 3:59 AM, Daan Hoogland 
wrote:

> People,
>
> The PMC has ask Rafael to join them to oversee the project and he has
> gracefully accepted. Please join me in congratulating Rafael and wish him
> wisdom in his new task.
>
> ​on behalve of the PMC,​
> --
> Daan
>


Re: Rafael Weingartner joining the PMC

2016-05-03 Thread Nicolás Vázquez
Congratulations Rafael!

Nicolas

2016-05-03 19:20 GMT-03:00 John Burwell :

> Congrats Rafael.
>
> >
> Regards,
>
> John Burwell
>
> john.burw...@shapeblue.com
> www.shapeblue.com
> 53 Chandos Place, Covent Garden, London VA WC2N 4HSUK
> @shapeblue
> On May 2, 2016, at 9:21 AM, Rohit Yadav  wrote:
> >
> > Congrats Rafael.
> >
> > Regards,
> > Rohit Yadav
> >
> >
> > Regards,
> >
> > Rohit Yadav
> >
> > rohit.ya...@shapeblue.com
> > www.shapeblue.com
> > 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
> > @shapeblue
> > On Apr 29 2016, at 1:20 am, Rafael Weingärtner <
> rafaelweingart...@gmail.com> wrote:
> >
> > Thank you all for the warm welcome. It is an honor to be part of the
> Apache
> > CloudStack (ACS) committee. I will try to work as much as I can to help
> the
> > PMC, committers, and contributors on improving the ACS. Sometimes I might
> > not be as present as others (as it is happening now), but that is due to
> my
> > Ph. D. tasks.
> >
> > As soon as I get things back on tracks I make myself more present :)
> >
> > On Thu, Apr 28, 2016 at 10:55 AM, Patrick Dube 
> > wrote:
> >
> >> Congratulations!
> >>
> >> On Thu, Apr 28, 2016 at 8:19 AM, Simon Weller  wrote:
> >>
> >>> Congratulations Rafael!
> >>>
> >>> - Si
> >>>
> >>> 
> >>> From: Nux! 
> >>> Sent: Thursday, April 28, 2016 7:06 AM
> >>> To: dev@cloudstack.apache.org
> >>> Subject: Re: Rafael Weingartner joining the PMC
> >>>
> >>> Congrats Rafael :)
> >>>
> >>> --
> >>> Sent from the Delta quadrant using Borg technology!
> >>>
> >>> Nux!
> >>> www.nux.ro
> >>>
> >>> - Original Message -
>  From: "Daan Hoogland" 
>  To: "dev" 
>  Sent: Thursday, 28 April, 2016 11:59:28
>  Subject: Rafael Weingartner joining the PMC
> >>>
>  People,
> 
>  The PMC has ask Rafael to join them to oversee the project and he has
>  gracefully accepted. Please join me in congratulating Rafael and wish
> >> him
>  wisdom in his new task.
> 
>  ​on behalve of the PMC,​
>  --
>  Daan
> >>>
> >>
> >
> > --
> > Rafael Weingärtner
>
>


[GitHub] cloudstack pull request: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1529#discussion_r61979134
  
--- Diff: tools/marvin/marvin/lib/base.py ---
@@ -2459,13 +2460,31 @@ def create(cls, apiclient, cluster, services, 
zoneid=None, podid=None, hyperviso
   GetDetailExceptionInfo(e)
 return FAILED
 
+@staticmethod
+def _check_resource_state(apiclient, hostid, resourcestate):
+hosts = Host.list(apiclient, id=hostid, listall=True)
+
+validationresult = validateList(hosts)
+
+if validationresult[0] == FAIL:
--- End diff --

@mike-tutkowski yes, the exception will fail 


---
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-9362: Skip VXLANs when rewriti...

2016-05-03 Thread kiwiflyer
Github user kiwiflyer commented on the pull request:

https://github.com/apache/cloudstack/pull/1513#issuecomment-216709951
  
Tested this in a hardware 4.8 lab: I was able to migrate VXLAN enabled VMs 
between hosts as expected.

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: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread mike-tutkowski
Github user mike-tutkowski commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1529#discussion_r61974541
  
--- Diff: tools/marvin/marvin/lib/base.py ---
@@ -2459,13 +2460,31 @@ def create(cls, apiclient, cluster, services, 
zoneid=None, podid=None, hyperviso
   GetDetailExceptionInfo(e)
 return FAILED
 
+@staticmethod
+def _check_resource_state(apiclient, hostid, resourcestate):
+hosts = Host.list(apiclient, id=hostid, listall=True)
+
+validationresult = validateList(hosts)
+
+if validationresult[0] == FAIL:
+raise Exception("Host list validation failed: %s" % 
validationresult[2])
+
+if str(hosts[0].resourcestate).lower().decode("string_escape") == 
str(resourcestate).lower():
+return True, None
+
+return False, "Host is not in the following state: " + 
str(resourcestate)
+
 def delete(self, apiclient):
 """Delete Host"""
 # Host must be in maintenance mode before deletion
 cmd = prepareHostForMaintenance.prepareHostForMaintenanceCmd()
 cmd.id = self.id
 apiclient.prepareHostForMaintenance(cmd)
-time.sleep(30)
+
+wait_result, return_val = wait_until(10, 10, 
Host._check_resource_state, apiclient, self.id, HOST_RS_MAINTENANCE)
--- End diff --

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: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread mike-tutkowski
Github user mike-tutkowski commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1529#discussion_r61974533
  
--- Diff: tools/marvin/marvin/lib/base.py ---
@@ -2459,13 +2460,31 @@ def create(cls, apiclient, cluster, services, 
zoneid=None, podid=None, hyperviso
   GetDetailExceptionInfo(e)
 return FAILED
 
+@staticmethod
+def _check_resource_state(apiclient, hostid, resourcestate):
+hosts = Host.list(apiclient, id=hostid, listall=True)
+
+validationresult = validateList(hosts)
+
+if validationresult[0] == FAIL:
+raise Exception("Host list validation failed: %s" % 
validationresult[2])
+
+if str(hosts[0].resourcestate).lower().decode("string_escape") == 
str(resourcestate).lower():
+return True, None
+
+return False, "Host is not in the following state: " + 
str(resourcestate)
+
 def delete(self, apiclient):
 """Delete Host"""
 # Host must be in maintenance mode before deletion
 cmd = prepareHostForMaintenance.prepareHostForMaintenanceCmd()
 cmd.id = self.id
 apiclient.prepareHostForMaintenance(cmd)
-time.sleep(30)
+
+wait_result, return_val = wait_until(10, 10, 
Host._check_resource_state, apiclient, self.id, HOST_RS_MAINTENANCE)
+
+if wait_result == False:
--- End diff --

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: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread mike-tutkowski
Github user mike-tutkowski commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1529#discussion_r61974484
  
--- Diff: tools/marvin/marvin/lib/base.py ---
@@ -2459,13 +2460,31 @@ def create(cls, apiclient, cluster, services, 
zoneid=None, podid=None, hyperviso
   GetDetailExceptionInfo(e)
 return FAILED
 
+@staticmethod
+def _check_resource_state(apiclient, hostid, resourcestate):
+hosts = Host.list(apiclient, id=hostid, listall=True)
+
+validationresult = validateList(hosts)
--- End diff --

validateList should catch those issues.


---
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: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread mike-tutkowski
Github user mike-tutkowski commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1529#discussion_r61974295
  
--- Diff: tools/marvin/marvin/lib/base.py ---
@@ -2459,13 +2460,31 @@ def create(cls, apiclient, cluster, services, 
zoneid=None, podid=None, hyperviso
   GetDetailExceptionInfo(e)
 return FAILED
 
+@staticmethod
+def _check_resource_state(apiclient, hostid, resourcestate):
+hosts = Host.list(apiclient, id=hostid, listall=True)
+
+validationresult = validateList(hosts)
+
+if validationresult[0] == FAIL:
+raise Exception("Host list validation failed: %s" % 
validationresult[2])
--- End diff --

Same comment as above regarding "What if validationresult" is 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: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread mike-tutkowski
Github user mike-tutkowski commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1529#discussion_r61974235
  
--- Diff: tools/marvin/marvin/lib/base.py ---
@@ -2459,13 +2460,31 @@ def create(cls, apiclient, cluster, services, 
zoneid=None, podid=None, hyperviso
   GetDetailExceptionInfo(e)
 return FAILED
 
+@staticmethod
+def _check_resource_state(apiclient, hostid, resourcestate):
+hosts = Host.list(apiclient, id=hostid, listall=True)
+
+validationresult = validateList(hosts)
+
+if validationresult[0] == FAIL:
--- End diff --

I hear you, @jburwell, but the API description points out that the return 
type is a List with three items (and what each item indicates). We can 
certainly validate return types, but it adds overhead (both in terms of 
execution time and extra logic clouding things up) for limited value here (it 
will just throw an exception if the value happened to be None).

Thoughts on that?


---
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: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread mike-tutkowski
Github user mike-tutkowski commented on the pull request:

https://github.com/apache/cloudstack/pull/1529#issuecomment-216696449
  
Thanks @jburwell While you're in a code-review mood, maybe you take a look 
at #1403 again as that one is pretty high value to a bunch of people. :)


---
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: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread jburwell
Github user jburwell commented on the pull request:

https://github.com/apache/cloudstack/pull/1529#issuecomment-216684125
  
@mike-tutkowski the ``wait_until`` version looks very nice ;)  A definite 
improvement in the reliability of the test case.

I added a couple of minor comments which, hopefully, will be 
straightforward to address.


---
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: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1529#discussion_r61967545
  
--- Diff: tools/marvin/marvin/lib/base.py ---
@@ -2459,13 +2460,31 @@ def create(cls, apiclient, cluster, services, 
zoneid=None, podid=None, hyperviso
   GetDetailExceptionInfo(e)
 return FAILED
 
+@staticmethod
+def _check_resource_state(apiclient, hostid, resourcestate):
+hosts = Host.list(apiclient, id=hostid, listall=True)
+
+validationresult = validateList(hosts)
+
+if validationresult[0] == FAIL:
+raise Exception("Host list validation failed: %s" % 
validationresult[2])
+
+if str(hosts[0].resourcestate).lower().decode("string_escape") == 
str(resourcestate).lower():
+return True, None
+
+return False, "Host is not in the following state: " + 
str(resourcestate)
+
 def delete(self, apiclient):
 """Delete Host"""
 # Host must be in maintenance mode before deletion
 cmd = prepareHostForMaintenance.prepareHostForMaintenanceCmd()
 cmd.id = self.id
 apiclient.prepareHostForMaintenance(cmd)
-time.sleep(30)
+
+wait_result, return_val = wait_until(10, 10, 
Host._check_resource_state, apiclient, self.id, HOST_RS_MAINTENANCE)
--- End diff --

Consider extracting the interval and timeout to constants to make the code 
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: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1529#discussion_r61967452
  
--- Diff: tools/marvin/marvin/lib/base.py ---
@@ -2459,13 +2460,31 @@ def create(cls, apiclient, cluster, services, 
zoneid=None, podid=None, hyperviso
   GetDetailExceptionInfo(e)
 return FAILED
 
+@staticmethod
+def _check_resource_state(apiclient, hostid, resourcestate):
+hosts = Host.list(apiclient, id=hostid, listall=True)
+
+validationresult = validateList(hosts)
+
+if validationresult[0] == FAIL:
+raise Exception("Host list validation failed: %s" % 
validationresult[2])
+
+if str(hosts[0].resourcestate).lower().decode("string_escape") == 
str(resourcestate).lower():
+return True, None
+
+return False, "Host is not in the following state: " + 
str(resourcestate)
+
 def delete(self, apiclient):
 """Delete Host"""
 # Host must be in maintenance mode before deletion
 cmd = prepareHostForMaintenance.prepareHostForMaintenanceCmd()
 cmd.id = self.id
 apiclient.prepareHostForMaintenance(cmd)
-time.sleep(30)
+
+wait_result, return_val = wait_until(10, 10, 
Host._check_resource_state, apiclient, self.id, HOST_RS_MAINTENANCE)
+
+if wait_result == False:
--- End diff --

Consider changing to ``if not wait_result`` which is a more Pythonic 
expression.


---
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: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1529#discussion_r61967329
  
--- Diff: tools/marvin/marvin/lib/base.py ---
@@ -2459,13 +2460,31 @@ def create(cls, apiclient, cluster, services, 
zoneid=None, podid=None, hyperviso
   GetDetailExceptionInfo(e)
 return FAILED
 
+@staticmethod
+def _check_resource_state(apiclient, hostid, resourcestate):
+hosts = Host.list(apiclient, id=hostid, listall=True)
+
+validationresult = validateList(hosts)
--- End diff --

What if ``hosts`` is ``None`` or empty?


---
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: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1529#discussion_r61967231
  
--- Diff: tools/marvin/marvin/lib/base.py ---
@@ -2459,13 +2460,31 @@ def create(cls, apiclient, cluster, services, 
zoneid=None, podid=None, hyperviso
   GetDetailExceptionInfo(e)
 return FAILED
 
+@staticmethod
+def _check_resource_state(apiclient, hostid, resourcestate):
+hosts = Host.list(apiclient, id=hostid, listall=True)
+
+validationresult = validateList(hosts)
+
+if validationresult[0] == FAIL:
+raise Exception("Host list validation failed: %s" % 
validationresult[2])
--- End diff --

What if ``validationresult`` does not contain 3 elements?


---
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: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread jburwell
Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1529#discussion_r61967100
  
--- Diff: tools/marvin/marvin/lib/base.py ---
@@ -2459,13 +2460,31 @@ def create(cls, apiclient, cluster, services, 
zoneid=None, podid=None, hyperviso
   GetDetailExceptionInfo(e)
 return FAILED
 
+@staticmethod
+def _check_resource_state(apiclient, hostid, resourcestate):
+hosts = Host.list(apiclient, id=hostid, listall=True)
+
+validationresult = validateList(hosts)
+
+if validationresult[0] == FAIL:
--- End diff --

What if ``validationresult`` is ``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: SystemVM cleanups

2016-05-03 Thread resmo
Github user resmo commented on the pull request:

https://github.com/apache/cloudstack/pull/1414#issuecomment-216683077
  
@rhtyd rebased and squashed


---
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: Rafael Weingartner joining the PMC

2016-05-03 Thread John Burwell
Congrats Rafael.

> 
Regards,

John Burwell

john.burw...@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London VA WC2N 4HSUK
@shapeblue
On May 2, 2016, at 9:21 AM, Rohit Yadav  wrote:
> 
> Congrats Rafael.
> 
> Regards,
> Rohit Yadav
> 
> 
> Regards,
> 
> Rohit Yadav
> 
> rohit.ya...@shapeblue.com 
> www.shapeblue.com
> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
> @shapeblue
> On Apr 29 2016, at 1:20 am, Rafael Weingärtner  
> wrote:
> 
> Thank you all for the warm welcome. It is an honor to be part of the Apache
> CloudStack (ACS) committee. I will try to work as much as I can to help the
> PMC, committers, and contributors on improving the ACS. Sometimes I might
> not be as present as others (as it is happening now), but that is due to my
> Ph. D. tasks.
> 
> As soon as I get things back on tracks I make myself more present :)
> 
> On Thu, Apr 28, 2016 at 10:55 AM, Patrick Dube 
> wrote:
> 
>> Congratulations!
>> 
>> On Thu, Apr 28, 2016 at 8:19 AM, Simon Weller  wrote:
>> 
>>> Congratulations Rafael!
>>> 
>>> - Si
>>> 
>>> 
>>> From: Nux! 
>>> Sent: Thursday, April 28, 2016 7:06 AM
>>> To: dev@cloudstack.apache.org
>>> Subject: Re: Rafael Weingartner joining the PMC
>>> 
>>> Congrats Rafael :)
>>> 
>>> --
>>> Sent from the Delta quadrant using Borg technology!
>>> 
>>> Nux!
>>> www.nux.ro
>>> 
>>> - Original Message -
 From: "Daan Hoogland" 
 To: "dev" 
 Sent: Thursday, 28 April, 2016 11:59:28
 Subject: Rafael Weingartner joining the PMC
>>> 
 People,
 
 The PMC has ask Rafael to join them to oversee the project and he has
 gracefully accepted. Please join me in congratulating Rafael and wish
>> him
 wisdom in his new task.
 
 ​on behalve of the PMC,​
 --
 Daan
>>> 
>> 
> 
> --
> Rafael Weingärtner



Re: [ANNOUNCE] New committer: Simon Weller

2016-05-03 Thread John Burwell
Congrats, Simon.

> 
Regards,

John Burwell

john.burw...@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London VA WC2N 4HSUK
@shapeblue
On May 2, 2016, at 9:21 AM, Rohit Yadav  wrote:
> 
> Congrats Simon.
> 
> Regards,
> Rohit Yadav
> 
> 
> Regards,
> 
> Rohit Yadav
> 
> rohit.ya...@shapeblue.com 
> www.shapeblue.com
> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
> @shapeblue
> On Apr 28 2016, at 12:53 pm, Erik Weber  wrote:
> 
> The Project Management Committee (PMC) for Apache CloudStack
> has asked Simon Weller to become a committer and we are pleased to
> announce that they have accepted.
> 
> Being a committer allows many contributors to contribute more
> autonomously. For developers, it makes it easier to submit changes and
> eliminates the need to have contributions reviewed via the patch
> submission process. Whether contributions are development-related or
> otherwise, it is a recognition of a contributor's participation in the
> project and commitment to the project and the Apache Way.
> 
> Please join me in congratulating Simon
> 
> --Erik
> on behalf of the CloudStack PMC



[GitHub] cloudstack pull request: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread mike-tutkowski
Github user mike-tutkowski commented on the pull request:

https://github.com/apache/cloudstack/pull/1529#issuecomment-216678631
  
@jburwell Thanks for pointing out that utility method. I have updated the 
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-9368: Fix for Support configur...

2016-05-03 Thread serg38
Github user serg38 commented on the pull request:

https://github.com/apache/cloudstack/pull/1518#issuecomment-216650029
  
All checks passed. @rhtyd, @wido or @GabrielBrascher   can you review and 
give second 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: [ANNOUNCE] Open source distributed virtual machine scheduling platform

2016-05-03 Thread Rafael Weingärtner
Hi Rohit, thanks ;)

I will answer your questions in line.


I did not look at the code but I'm curious on how you're powering off
hosts, I think with my out-of-band management PR you can use the oobm
subsystem to perform power management operations for IPMI 2.0 enabled hosts.

A: when we developed the first version (around October 2015), Apache
CloudStack (ACS) did not have support to activate and deactivate hosts, it
still does not have; you are working on that for Shapeblue, right? If there
was something at that time, it would have been great. Therefore, we had to
develop something to allow us to power on/off hosts (that was not our
focus, but we needed it). So, we created the simplest solution possible
(just to suffice our needs). Our cloud computing environment is created
using pretty outdated servers, half of them do not have support for IPMI.
Therefore, to shut down hosts, we use the hypervisors API. We noticed that
most of the hypervisors have a shutdown command in their APIs; that is why
we used it. We could not use many resources (time and energy) on developing
that for every hypervisor ACS supports, so we did it only for XenServer to
be used as a proof of concept (POC); to add the support to other
hypervisors it would be a matter of implementing an interface.

Even though we did the “shutdown“ using the hypervisor API, it would be
nice to have it also through the IPMI interface; it is rare, but we have
seen servers hung during the shutdown process.

Then, to activate (start) servers, we used the wake on LAN (WOL) protocol.
We found that to be the easiest way to activate servers on a LAN (there are
some requirements to do that, giving that it uses the layer 2 of the OSI
model to send the commands). However, once again, our environment did not
help much. One of our servers did not support WOL, but gladly it had IPMI
support. Therefore, to start servers depending on a flag that we add to the
“cloud.host” table we use IPMI or WOL.


Did the explanation help? You are welcome to look at the code, we think it
is more or less clear and documented.

Also curious how you implemented the heuristics and wrote tests (esp.
integration ones), some of us had a related discussion about such a feature
and we looked at this paper from VMware DRS team:
http://www.waldspurger.org/carl/papers/drs-vmtj-mar12.pdf

A: well, the heuristics are written in Java; we have an interface with a
set of methods that have to be implemented and that can be used by our
agents; also, we have a set of basic classes to support the development of
new heuristics. We have created only two simple heuristics to be used as a
proof of concept of the whole architecture we have created. Our first goal
was to formalize and finish the whole architecture; after that, we could
work on some more interesting things. Right now we are working on
techniques to mix (add) neural or Bayesian networks into our heuristics; we
intend to use those techniques to improve our VM mapping algorithms or the
ranking of hosts.

We have not read the VMware’s paper (we have based our whole proposals
solely on academic work until now); I have just glanced at it, and it seems
interesting; though I would need much more time and a deeper reading to be
able to comment on it.

The testing is done in a test environment we have, we isolate and control
the variables of the environment and everything that can affect the agents
behaviors; then, we start to test every functionalities and the agent
behavior. The process of testing for the first release was very manual.
However, now that we know the whole framework works. We are covering it
with test cases (unit and integration) and then to test a heuristic it
would be a matter of writing test cases for it.

Even with test cases, every experiment we do or release that is closed, we
execute a thorough batch of tests to check if everything is working; sadly,
those tests today manually executed.

I can say that the fun is going to start now. I find it much more
interesting to create methods/heuristics to manage the environment than to
create the structure that uses the heuristics.

Do you have some other doubts?

On Tue, May 3, 2016 at 12:18 PM, Rohit Yadav 
wrote:

> Nice feature :)
>
> I did not look at the code but I'm curious on how you're powering off
> hosts, I think with my out-of-band management PR you can use the oobm
> subsystem to perform power management operations for IPMI 2.0 enabled hosts.
>
> Also curious how you implemented the heuristics and wrote tests (esp.
> integration ones), some of us had a related discussion about such a feature
> and we looked at this paper from VMware DRS team:
> http://www.waldspurger.org/carl/papers/drs-vmtj-mar12.pdf
>
> Regards,
> Rohit Yadav
>
>
> Regards,
>
> Rohit Yadav
>
> rohit.ya...@shapeblue.com
> www.shapeblue.com
> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
> @shapeblue
> On Apr 27 2016, at 2:29 am, Gabriel Beims Bräscher 

[GitHub] cloudstack pull request: Lower the time we wait for interfaces to ...

2016-05-03 Thread jburwell
Github user jburwell commented on the pull request:

https://github.com/apache/cloudstack/pull/1471#issuecomment-216646244
  
@remibergsma you want to consider cribbing 
[``wait_until``](https://github.com/apache/cloudstack/blob/12d8e53dd54d83242b3dabf2151249ab7963d5a8/tools/marvin/marvin/lib/utils.py#L527-L543)
 from Marvin.  It allows you check for a condition at a fixed interval and give 
up after a specified period of time.  Therefore, you could have the best of 
both worlds -- check every 2 seconds and give up after 15 seconds.


---
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-9040: Use Tomcat6 for Debian p...

2016-05-03 Thread ymolinet
Github user ymolinet commented on the pull request:

https://github.com/apache/cloudstack/pull/1040#issuecomment-216646082
  
Tomcat6 is End Of Life : https://tomcat.apache.org/tomcat-60-eol.html



---
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-9040: Use Tomcat6 for Debian p...

2016-05-03 Thread serverchief
Github user serverchief commented on the pull request:

https://github.com/apache/cloudstack/pull/1040#issuecomment-216645498
  
I know you can get it to work with ease on CentOS6 and 7..

Cant really comment on Debian as i don't have any instances.


---
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-9040: Use Tomcat6 for Debian p...

2016-05-03 Thread ymolinet
Github user ymolinet commented on the pull request:

https://github.com/apache/cloudstack/pull/1040#issuecomment-216634399
  
I'm just trying to use with Tomcat7 ( cloudstack-setup-management --tomcat7)

> 
Starting to configure CloudStack Management Server:
Configure Firewall ...[OK]
Configure CloudStack Management Server ...[Failed]
Cannot find /etc/cloudstack/management/server7-nonssl.xml, https enable 
failed
Try to restore your system:
Restore Firewall ...  [OK]
Restore CloudStack Management Server ...[OK]

In addition, the /etc/init.d/cloudstack-management LSB Script refer only 
Tomcat6.

Tomcat6 is depreaced under Debian and it seems that only this version is 
supported ??? I think it's very important to fix this.



---
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: Marvin: Replace a timer.sleep(30) with pu...

2016-05-03 Thread jburwell
Github user jburwell commented on the pull request:

https://github.com/apache/cloudstack/pull/1529#issuecomment-216632803
  
@mike-tutkowski you may want to consider refactoring to use the 
[``wait_until`` 
function](https://github.com/apache/cloudstack/blob/12d8e53dd54d83242b3dabf2151249ab7963d5a8/tools/marvin/marvin/lib/utils.py#L527-L543)
 was recently added to utils.py.   It provides a concise, Pythonic way of 
waiting for a condition.  For example of its usage, see the  
[test_host_maintenance.py](https://github.com/apache/cloudstack/blob/12d8e53dd54d83242b3dabf2151249ab7963d5a8/test/integration/component/test_host_maintenance.py#L181)
 where it is used to wait until VM migration has completed before proceeding 
with the test.


---
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: Trouble with Marvin

2016-05-03 Thread Will Stevens
Yes, I just realized that and am testing it.  I have it installed and I am
doing my first set of tests with the latest code now...

Thanks...

*Will STEVENS*
Lead Developer

*CloudOps* *| *Cloud Solutions Experts
420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6
w cloudops.com *|* tw @CloudOps_

On Tue, May 3, 2016 at 2:34 PM, Remi Bergsma 
wrote:

> Hi Will,
>
> For me it is solved by installing two packages; did you pull this pr? We
> fixed it in cosmic and ported it to the cloudstack config as well.
>
> https://github.com/MissionCriticalCloud/bubble-toolkit/pull/123/files
>
> Regards, Remi
>
>
> Sent from my iPhone
>
> > On 03 May 2016, at 19:25, Will Stevens  wrote:
> >
> > It looks like we now have a dependency on 'python-cffi', but the
> following
> > does not help.
> >
> > $ sudo yum install python-cffi
> >
> > Ideas?
> >
> > On Tue, May 3, 2016 at 1:18 PM, Will Stevens 
> > wrote:
> >
> >> I have been running into this the last couple days and I am trying to
> >> understand what I need to change in my CI environment.
> >>
> >> My CI environment has not changed and everything that went into master
> is
> >> stuff I have run through my CI, so I am trying to figure out what
> happened
> >> here.
> >>
> >> It is like we got a new dependency on 'gcc' which we didn't have before.
> >>
> >> The installation of Marvin has not changed, it is currently set as:
> >>
> >> pip install --upgrade tools/marvin/dist/Marvin-*.tar.gz --allow-external
> >> mysql-connector-python
> >>
> >> Installing Marvin
> >> DEPRECATION: --allow-external has been deprecated and will be removed in
> >> the future. Due to changes in the repository protocol, it no longer has
> any
> >> effect.
> >> Processing ./tools/marvin/dist/Marvin-4.9.0-SNAPSHOT.tar.gz
> >> Requirement already up-to-date: mysql-connector-python>=1.1.6 in
> >> /usr/lib/python2.7/site-packages (from Marvin===4.9.0-SNAPSHOT)
> >> Collecting requests>=2.2.1 (from Marvin===4.9.0-SNAPSHOT)
> >>  Downloading requests-2.10.0-py2.py3-none-any.whl (506kB)
> >>100% || 512kB 1.8MB/s
> >> Collecting paramiko>=1.13.0 (from Marvin===4.9.0-SNAPSHOT)
> >>  Downloading paramiko-2.0.0-py2.py3-none-any.whl (170kB)
> >>100% || 174kB 3.2MB/s
> >> Requirement already up-to-date: nose>=1.3.3 in
> >> /usr/lib/python2.7/site-packages/nose-1.3.7-py2.7.egg (from
> >> Marvin===4.9.0-SNAPSHOT)
> >> Collecting ddt>=0.4.0 (from Marvin===4.9.0-SNAPSHOT)
> >>  Downloading ddt-1.0.1-py2.py3-none-any.whl
> >> Collecting pyvmomi>=5.5.0 (from Marvin===4.9.0-SNAPSHOT)
> >>  Downloading pyvmomi-6.0.0.2016.4.tar.gz (216kB)
> >>100% || 225kB 3.4MB/s
> >> Collecting netaddr>=0.7.14 (from Marvin===4.9.0-SNAPSHOT)
> >>  Downloading netaddr-0.7.18-py2.py3-none-any.whl (1.5MB)
> >>100% || 1.5MB 605kB/s
> >> Collecting pyasn1>=0.1.7 (from
> paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
> >>  Downloading pyasn1-0.1.9-py2.py3-none-any.whl
> >> Collecting cryptography>=1.1 (from
> >> paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
> >>  Downloading cryptography-1.3.1.tar.gz (383kB)
> >>100% || 389kB 1.1MB/s
> >> Collecting six>=1.7.3 (from pyvmomi>=5.5.0->Marvin===4.9.0-SNAPSHOT)
> >>  Downloading six-1.10.0-py2.py3-none-any.whl
> >> Collecting idna>=2.0 (from
> >> cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
> >>  Downloading idna-2.1-py2.py3-none-any.whl (54kB)
> >>100% || 61kB 3.0MB/s
> >> Collecting setuptools>=11.3 (from
> >> cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
> >>  Downloading setuptools-21.0.0-py2.py3-none-any.whl (509kB)
> >>100% || 512kB 1.0MB/s
> >> Collecting enum34 (from
> >> cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
> >>  Downloading enum34-1.1.4-py2.py3-none-any.whl (61kB)
> >>100% || 61kB 2.7MB/s
> >> Collecting ipaddress (from
> >> cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
> >>  Downloading ipaddress-1.0.16-py27-none-any.whl
> >> Collecting cffi>=1.4.1 (from
> >> cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
> >>  Downloading cffi-1.6.0.tar.gz (397kB)
> >>100% || 399kB 1.8MB/s
> >> Collecting pycparser (from
> >>
> cffi>=1.4.1->cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
> >>  Downloading pycparser-2.14.tar.gz (223kB)
> >>100% || 225kB 1.9MB/s
> >> Building wheels for collected packages: Marvin, pyvmomi, cryptography,
> >> cffi, pycparser
> >>  Running setup.py bdist_wheel for Marvin ... done
> >>  Stored in directory:
> >>
> /root/.cache/pip/wheels/7f/5a/37/7f723796f0a05b8f4a5eb63ebe90f381663e638e7556f46916
> >>  Running setup.py bdist_wheel for pyvmomi ... 

Re: Trouble with Marvin

2016-05-03 Thread Remi Bergsma
Hi Will,

For me it is solved by installing two packages; did you pull this pr? We fixed 
it in cosmic and ported it to the cloudstack config as well. 

https://github.com/MissionCriticalCloud/bubble-toolkit/pull/123/files

Regards, Remi 


Sent from my iPhone

> On 03 May 2016, at 19:25, Will Stevens  wrote:
> 
> It looks like we now have a dependency on 'python-cffi', but the following
> does not help.
> 
> $ sudo yum install python-cffi
> 
> Ideas?
> 
> On Tue, May 3, 2016 at 1:18 PM, Will Stevens 
> wrote:
> 
>> I have been running into this the last couple days and I am trying to
>> understand what I need to change in my CI environment.
>> 
>> My CI environment has not changed and everything that went into master is
>> stuff I have run through my CI, so I am trying to figure out what happened
>> here.
>> 
>> It is like we got a new dependency on 'gcc' which we didn't have before.
>> 
>> The installation of Marvin has not changed, it is currently set as:
>> 
>> pip install --upgrade tools/marvin/dist/Marvin-*.tar.gz --allow-external
>> mysql-connector-python
>> 
>> Installing Marvin
>> DEPRECATION: --allow-external has been deprecated and will be removed in
>> the future. Due to changes in the repository protocol, it no longer has any
>> effect.
>> Processing ./tools/marvin/dist/Marvin-4.9.0-SNAPSHOT.tar.gz
>> Requirement already up-to-date: mysql-connector-python>=1.1.6 in
>> /usr/lib/python2.7/site-packages (from Marvin===4.9.0-SNAPSHOT)
>> Collecting requests>=2.2.1 (from Marvin===4.9.0-SNAPSHOT)
>>  Downloading requests-2.10.0-py2.py3-none-any.whl (506kB)
>>100% || 512kB 1.8MB/s
>> Collecting paramiko>=1.13.0 (from Marvin===4.9.0-SNAPSHOT)
>>  Downloading paramiko-2.0.0-py2.py3-none-any.whl (170kB)
>>100% || 174kB 3.2MB/s
>> Requirement already up-to-date: nose>=1.3.3 in
>> /usr/lib/python2.7/site-packages/nose-1.3.7-py2.7.egg (from
>> Marvin===4.9.0-SNAPSHOT)
>> Collecting ddt>=0.4.0 (from Marvin===4.9.0-SNAPSHOT)
>>  Downloading ddt-1.0.1-py2.py3-none-any.whl
>> Collecting pyvmomi>=5.5.0 (from Marvin===4.9.0-SNAPSHOT)
>>  Downloading pyvmomi-6.0.0.2016.4.tar.gz (216kB)
>>100% || 225kB 3.4MB/s
>> Collecting netaddr>=0.7.14 (from Marvin===4.9.0-SNAPSHOT)
>>  Downloading netaddr-0.7.18-py2.py3-none-any.whl (1.5MB)
>>100% || 1.5MB 605kB/s
>> Collecting pyasn1>=0.1.7 (from paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
>>  Downloading pyasn1-0.1.9-py2.py3-none-any.whl
>> Collecting cryptography>=1.1 (from
>> paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
>>  Downloading cryptography-1.3.1.tar.gz (383kB)
>>100% || 389kB 1.1MB/s
>> Collecting six>=1.7.3 (from pyvmomi>=5.5.0->Marvin===4.9.0-SNAPSHOT)
>>  Downloading six-1.10.0-py2.py3-none-any.whl
>> Collecting idna>=2.0 (from
>> cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
>>  Downloading idna-2.1-py2.py3-none-any.whl (54kB)
>>100% || 61kB 3.0MB/s
>> Collecting setuptools>=11.3 (from
>> cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
>>  Downloading setuptools-21.0.0-py2.py3-none-any.whl (509kB)
>>100% || 512kB 1.0MB/s
>> Collecting enum34 (from
>> cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
>>  Downloading enum34-1.1.4-py2.py3-none-any.whl (61kB)
>>100% || 61kB 2.7MB/s
>> Collecting ipaddress (from
>> cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
>>  Downloading ipaddress-1.0.16-py27-none-any.whl
>> Collecting cffi>=1.4.1 (from
>> cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
>>  Downloading cffi-1.6.0.tar.gz (397kB)
>>100% || 399kB 1.8MB/s
>> Collecting pycparser (from
>> cffi>=1.4.1->cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
>>  Downloading pycparser-2.14.tar.gz (223kB)
>>100% || 225kB 1.9MB/s
>> Building wheels for collected packages: Marvin, pyvmomi, cryptography,
>> cffi, pycparser
>>  Running setup.py bdist_wheel for Marvin ... done
>>  Stored in directory:
>> /root/.cache/pip/wheels/7f/5a/37/7f723796f0a05b8f4a5eb63ebe90f381663e638e7556f46916
>>  Running setup.py bdist_wheel for pyvmomi ... done
>>  Stored in directory:
>> /root/.cache/pip/wheels/b8/4a/84/b57aa91d338fdb54c766ef9d3c4b8d7c7a9f6b0da53e7b112d
>>  Running setup.py bdist_wheel for cryptography ... error
>>  Complete output from command /usr/bin/python -u -c "import setuptools,
>> tokenize;__file__='/tmp/pip-build-ViZ0L8/cryptography/setup.py';exec(compile(getattr(tokenize,
>> 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
>> bdist_wheel -d /tmp/tmp878XjXpip-wheel- --python-tag cp27:
>>  Package libffi was not found in the pkg-config search path.
>>  Perhaps you 

Re: how to go about codebase quality when colisions occur?

2016-05-03 Thread ilya
Linas

Congrats on first java project ever!

CloudStack supports custom pluggable APIs that you dont have to bake
into code base - unless you feel many other users will benefit from it.
We do it all the time and i'm sure many others orgs do the same...

Search the web for CloudStack custom API, there is a baked in example
for creating custom API plugin and get time date from Management Server..

Also, this thread is a good example:
https://www.mail-archive.com/dev@cloudstack.apache.org/msg9.html

I recall there was a doc that explained it in greater detail, but i
havent had a chance to look for it.

Regards
ilya

On 5/3/16 5:36 AM, Linas Žilinskas wrote:
> Hello.
> 
> I implemented a new API call for myself, which returns the VNC url for a VM.
> Currently i'm using some classes from the consoleproxy servlet package as 
> well as copied some code over to my own package/class (specifically the 
> encryption stuff)
> Now i have questions regarding this way of doing things.
> 
> I'm all about isolation and making stuff portable as much as possible. To me 
> the consoleproxy seems like a semi-standalone project. Therefore it doesn't 
> seem nice to be using packages/classes willy nilly across other packages.
> 
> So should i split the reusable code into a separate package and store it 
> somewhere in the shared codebase, or should i just duplicate code. I saw that 
> the servlet itself has a copied over class from the standalone consoleproxy 
> project.
> 
> Or maybe there's some way of implementing the api calls into the consoleproxy 
> project itself?
> 
> PS. This is my first java project ever, so i'm learning as i go through the 
> code. So bear with me if the language i use seems off
> 
> Regards
> 
> Linas Žilinskas
> 
> Development Lead
> 
> [http://host1plus.com/images/h1p_e_sig/sig_logo.png]
> 
> website
> 
> facebook
> 
> twitter
> 
> linkedin
> 
> 
> 
> 
> Phone: +44 870 8200222
> 
> Fax: +44 870 8200222
> 
> Host1Plus is a division of Digital Energy Technologies Ltd.
> 
> 26 York Street, London W1U 6PZ, United Kingdom
> 
> 
> 


[GitHub] cloudstack pull request: CLOUDSTACK-9334: Support jenv and pyenv t...

2016-05-03 Thread rhtyd
Github user rhtyd commented on the pull request:

https://github.com/apache/cloudstack/pull/1460#issuecomment-216603725
  
I'll play with pyenv, jenv tomorrow and keep you posted


---
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: Trouble with Marvin

2016-05-03 Thread Will Stevens
It looks like we now have a dependency on 'python-cffi', but the following
does not help.

$ sudo yum install python-cffi

Ideas?

On Tue, May 3, 2016 at 1:18 PM, Will Stevens 
wrote:

> I have been running into this the last couple days and I am trying to
> understand what I need to change in my CI environment.
>
> My CI environment has not changed and everything that went into master is
> stuff I have run through my CI, so I am trying to figure out what happened
> here.
>
> It is like we got a new dependency on 'gcc' which we didn't have before.
>
> The installation of Marvin has not changed, it is currently set as:
>
> pip install --upgrade tools/marvin/dist/Marvin-*.tar.gz --allow-external
> mysql-connector-python
>
> Installing Marvin
> DEPRECATION: --allow-external has been deprecated and will be removed in
> the future. Due to changes in the repository protocol, it no longer has any
> effect.
> Processing ./tools/marvin/dist/Marvin-4.9.0-SNAPSHOT.tar.gz
> Requirement already up-to-date: mysql-connector-python>=1.1.6 in
> /usr/lib/python2.7/site-packages (from Marvin===4.9.0-SNAPSHOT)
> Collecting requests>=2.2.1 (from Marvin===4.9.0-SNAPSHOT)
>   Downloading requests-2.10.0-py2.py3-none-any.whl (506kB)
> 100% || 512kB 1.8MB/s
> Collecting paramiko>=1.13.0 (from Marvin===4.9.0-SNAPSHOT)
>   Downloading paramiko-2.0.0-py2.py3-none-any.whl (170kB)
> 100% || 174kB 3.2MB/s
> Requirement already up-to-date: nose>=1.3.3 in
> /usr/lib/python2.7/site-packages/nose-1.3.7-py2.7.egg (from
> Marvin===4.9.0-SNAPSHOT)
> Collecting ddt>=0.4.0 (from Marvin===4.9.0-SNAPSHOT)
>   Downloading ddt-1.0.1-py2.py3-none-any.whl
> Collecting pyvmomi>=5.5.0 (from Marvin===4.9.0-SNAPSHOT)
>   Downloading pyvmomi-6.0.0.2016.4.tar.gz (216kB)
> 100% || 225kB 3.4MB/s
> Collecting netaddr>=0.7.14 (from Marvin===4.9.0-SNAPSHOT)
>   Downloading netaddr-0.7.18-py2.py3-none-any.whl (1.5MB)
> 100% || 1.5MB 605kB/s
> Collecting pyasn1>=0.1.7 (from paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
>   Downloading pyasn1-0.1.9-py2.py3-none-any.whl
> Collecting cryptography>=1.1 (from
> paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
>   Downloading cryptography-1.3.1.tar.gz (383kB)
> 100% || 389kB 1.1MB/s
> Collecting six>=1.7.3 (from pyvmomi>=5.5.0->Marvin===4.9.0-SNAPSHOT)
>   Downloading six-1.10.0-py2.py3-none-any.whl
> Collecting idna>=2.0 (from
> cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
>   Downloading idna-2.1-py2.py3-none-any.whl (54kB)
> 100% || 61kB 3.0MB/s
> Collecting setuptools>=11.3 (from
> cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
>   Downloading setuptools-21.0.0-py2.py3-none-any.whl (509kB)
> 100% || 512kB 1.0MB/s
> Collecting enum34 (from
> cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
>   Downloading enum34-1.1.4-py2.py3-none-any.whl (61kB)
> 100% || 61kB 2.7MB/s
> Collecting ipaddress (from
> cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
>   Downloading ipaddress-1.0.16-py27-none-any.whl
> Collecting cffi>=1.4.1 (from
> cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
>   Downloading cffi-1.6.0.tar.gz (397kB)
> 100% || 399kB 1.8MB/s
> Collecting pycparser (from
> cffi>=1.4.1->cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
>   Downloading pycparser-2.14.tar.gz (223kB)
> 100% || 225kB 1.9MB/s
> Building wheels for collected packages: Marvin, pyvmomi, cryptography,
> cffi, pycparser
>   Running setup.py bdist_wheel for Marvin ... done
>   Stored in directory:
> /root/.cache/pip/wheels/7f/5a/37/7f723796f0a05b8f4a5eb63ebe90f381663e638e7556f46916
>   Running setup.py bdist_wheel for pyvmomi ... done
>   Stored in directory:
> /root/.cache/pip/wheels/b8/4a/84/b57aa91d338fdb54c766ef9d3c4b8d7c7a9f6b0da53e7b112d
>   Running setup.py bdist_wheel for cryptography ... error
>   Complete output from command /usr/bin/python -u -c "import setuptools,
> tokenize;__file__='/tmp/pip-build-ViZ0L8/cryptography/setup.py';exec(compile(getattr(tokenize,
> 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
> bdist_wheel -d /tmp/tmp878XjXpip-wheel- --python-tag cp27:
>   Package libffi was not found in the pkg-config search path.
>   Perhaps you should add the directory containing `libffi.pc'
>   to the PKG_CONFIG_PATH environment variable
>   No package 'libffi' found
>   Package libffi was not found in the pkg-config search path.
>   Perhaps you should add the directory containing `libffi.pc'
>   to the PKG_CONFIG_PATH environment variable
>   No package 'libffi' found
>   Package libffi was not found in the pkg-config search path.
>   Perhaps you should 

[GitHub] cloudstack pull request: CLOUDSTACK-8562: Dynamic Role-Based API C...

2016-05-03 Thread rhtyd
Github user rhtyd commented on the pull request:

https://github.com/apache/cloudstack/pull/1489#issuecomment-216603249
  
@swill I'm fine with all changes, I've ran a final set of tests as well. 
@jburwell please share any outstanding issue that should be fixed, 
@borisstoyanov and I are LGTM on this


---
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: Adding new host to existing cluster which has Fiber Channel storage as primary storage

2016-05-03 Thread Timothy Lothering
Hi Anil,

I assume you have followed this guide? 
http://docs.cloudstack.apache.org/projects/cloudstack-installation/en/4.5/hypervisor/xenserver.html

Also, there is a section for FC:

"Primary Storage Setup for XenServer"

Hope this helps

Kind Regards,
Timothy Lothering
Timothy Lothering
Solutions Architect
Managed Services

T: +27877415535
F: +27877415100
C: +27824904099
E: tlother...@datacentrix.co.za


DISCLAIMER NOTICE: 

Everything in this e-mail and any attachments relating to the official business 
of Datacentrix Holdings Ltd. and its subsidiaries 
('Datacentrix') is proprietary to Datacentrix. It is confidential, legally 
privileged and protected by law. Datacentrix does not 
own and endorse any other content. Views and opinions are those of the sender 
unless clearly stated as being that of Datacentrix. 
The person addressed in the e-mail is the sole authorised recipient. Please 
notify the sender immediately if it has unintentionally 
reached you and do not read, disclose or use the content in any way. 
Datacentrix cannot assure that the integrity of this communication 
has been maintained nor that it is free of errors, virus, interception or 
interference.
-Original Message-
From: anil lakineni [mailto:anilkumar459.lakin...@gmail.com] 
Sent: Tuesday, 03 May 2016 3:46 PM
To: us...@cloudstack.apache.org; dev@cloudstack.apache.org
Subject: Adding new host to existing cluster which has Fiber Channel storage as 
primary storage

Hi All,

Please some body guide me to add new host to existing cluster in CloudStack.

Host: XenServer 6.2
CloudPlatform version: 4.5

My existing cluster is configured with Fiber channel storage.

Now, i need to add new xen host to existing cluster.

I was able to add new host to existing cluster but the newly added host is 
unable to plugin primary storage.

I followed below steps to add host,
- In XenCenter i added new host to existing xen pool
- Added host in the cloud platform UI
- After adding the new host in the UI to existing cluster, i can see UUID 
generated by cloud to local storage.
- Now i cannot see the existing primary storage LUNs at newly added server i 
can see them in old servers.

And we are seeing alert in cloudplatform UI "Unable to attach storage
pool15 to the host28"

Do i need to follow any procedure before adding in CCP to get storage mapped to 
new host?

Please suggest..

Thanks,
Anil.


Trouble with Marvin

2016-05-03 Thread Will Stevens
I have been running into this the last couple days and I am trying to
understand what I need to change in my CI environment.

My CI environment has not changed and everything that went into master is
stuff I have run through my CI, so I am trying to figure out what happened
here.

It is like we got a new dependency on 'gcc' which we didn't have before.

The installation of Marvin has not changed, it is currently set as:

pip install --upgrade tools/marvin/dist/Marvin-*.tar.gz --allow-external
mysql-connector-python

Installing Marvin
DEPRECATION: --allow-external has been deprecated and will be removed in
the future. Due to changes in the repository protocol, it no longer has any
effect.
Processing ./tools/marvin/dist/Marvin-4.9.0-SNAPSHOT.tar.gz
Requirement already up-to-date: mysql-connector-python>=1.1.6 in
/usr/lib/python2.7/site-packages (from Marvin===4.9.0-SNAPSHOT)
Collecting requests>=2.2.1 (from Marvin===4.9.0-SNAPSHOT)
  Downloading requests-2.10.0-py2.py3-none-any.whl (506kB)
100% || 512kB 1.8MB/s
Collecting paramiko>=1.13.0 (from Marvin===4.9.0-SNAPSHOT)
  Downloading paramiko-2.0.0-py2.py3-none-any.whl (170kB)
100% || 174kB 3.2MB/s
Requirement already up-to-date: nose>=1.3.3 in
/usr/lib/python2.7/site-packages/nose-1.3.7-py2.7.egg (from
Marvin===4.9.0-SNAPSHOT)
Collecting ddt>=0.4.0 (from Marvin===4.9.0-SNAPSHOT)
  Downloading ddt-1.0.1-py2.py3-none-any.whl
Collecting pyvmomi>=5.5.0 (from Marvin===4.9.0-SNAPSHOT)
  Downloading pyvmomi-6.0.0.2016.4.tar.gz (216kB)
100% || 225kB 3.4MB/s
Collecting netaddr>=0.7.14 (from Marvin===4.9.0-SNAPSHOT)
  Downloading netaddr-0.7.18-py2.py3-none-any.whl (1.5MB)
100% || 1.5MB 605kB/s
Collecting pyasn1>=0.1.7 (from paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
  Downloading pyasn1-0.1.9-py2.py3-none-any.whl
Collecting cryptography>=1.1 (from
paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
  Downloading cryptography-1.3.1.tar.gz (383kB)
100% || 389kB 1.1MB/s
Collecting six>=1.7.3 (from pyvmomi>=5.5.0->Marvin===4.9.0-SNAPSHOT)
  Downloading six-1.10.0-py2.py3-none-any.whl
Collecting idna>=2.0 (from
cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
  Downloading idna-2.1-py2.py3-none-any.whl (54kB)
100% || 61kB 3.0MB/s
Collecting setuptools>=11.3 (from
cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
  Downloading setuptools-21.0.0-py2.py3-none-any.whl (509kB)
100% || 512kB 1.0MB/s
Collecting enum34 (from
cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
  Downloading enum34-1.1.4-py2.py3-none-any.whl (61kB)
100% || 61kB 2.7MB/s
Collecting ipaddress (from
cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
  Downloading ipaddress-1.0.16-py27-none-any.whl
Collecting cffi>=1.4.1 (from
cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
  Downloading cffi-1.6.0.tar.gz (397kB)
100% || 399kB 1.8MB/s
Collecting pycparser (from
cffi>=1.4.1->cryptography>=1.1->paramiko>=1.13.0->Marvin===4.9.0-SNAPSHOT)
  Downloading pycparser-2.14.tar.gz (223kB)
100% || 225kB 1.9MB/s
Building wheels for collected packages: Marvin, pyvmomi, cryptography,
cffi, pycparser
  Running setup.py bdist_wheel for Marvin ... done
  Stored in directory:
/root/.cache/pip/wheels/7f/5a/37/7f723796f0a05b8f4a5eb63ebe90f381663e638e7556f46916
  Running setup.py bdist_wheel for pyvmomi ... done
  Stored in directory:
/root/.cache/pip/wheels/b8/4a/84/b57aa91d338fdb54c766ef9d3c4b8d7c7a9f6b0da53e7b112d
  Running setup.py bdist_wheel for cryptography ... error
  Complete output from command /usr/bin/python -u -c "import setuptools,
tokenize;__file__='/tmp/pip-build-ViZ0L8/cryptography/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
bdist_wheel -d /tmp/tmp878XjXpip-wheel- --python-tag cp27:
  Package libffi was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libffi.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'libffi' found
  Package libffi was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libffi.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'libffi' found
  Package libffi was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libffi.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'libffi' found
  Package libffi was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libffi.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'libffi' found
  Package libffi was not found in the pkg-config search path.
  Perhaps you 

[GitHub] cloudstack pull request: CLOUDSTACK-8800 : Improved the listVirtua...

2016-05-03 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request:

https://github.com/apache/cloudstack/pull/1444#issuecomment-216597727
  
That is a nice suggestion.
I have done that, what do you think 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-9203 Implement security group ...

2016-05-03 Thread DaanHoogland
GitHub user DaanHoogland reopened a pull request:

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

CLOUDSTACK-9203 Implement security group move on updateVM API call

  cherry-picked from a exoscale internal fix

Conflicts:
api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
server/src/com/cloud/vm/UserVmManager.java
server/src/com/cloud/vm/UserVmManagerImpl.java

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

$ git pull https://github.com/DaanHoogland/cloudstack CLOUDSTACK-9203

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

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


commit 8c633f27622b09aca4f49062baeca83523071c06
Author: Daan Hoogland 
Date:   2016-04-11T18:22:34Z

CLOUDSTACK-9203 Implement security group move on updateVM API call

  cherry-picked from a exoscale internal fix

Conflicts:
api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
server/src/com/cloud/vm/UserVmManager.java
server/src/com/cloud/vm/UserVmManagerImpl.java

commit 6e7260ed246f955429a3a1c0e93576c9d4864fca
Author: Daan Hoogland 
Date:   2015-12-30T12:13:38Z

CLOUDSTACK-9203 refactorred DeployVM code to be used by UpdateVM as well

 Conflicts:
api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java

commit 4506fa93f00c18800d31a2d00e5698c80622936b
Author: Loic Lambiel 
Date:   2015-05-15T13:15:26Z

CLOUDSTACK-9203 Prevent security group update while instance is running

  cherry-picked from a exoscale internal fix

 Conflicts:
api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java

commit 7bce4badbe29724e575883ef9485312603dfc46c
Author: Wei Zhou 
Date:   2016-01-12T09:56:07Z

CLOUDSTACK-9203: fix issue if there are multiple shared networks

commit 3d859c90effd71aab99f97ae65e2cad30960ca4b
Author: Wei Zhou 
Date:   2016-01-22T11:45:13Z

CLOUDSTACK-9203: fix issue when update vm in isolated networks

commit b7d58e6451a2f2234f05d6899a62a0e5da7e87e2
Author: Daan Hoogland 
Date:   2016-04-11T18:22:34Z

CLOUDSTACK-9203 Implement security group move on updateVM API call

  cherry-picked from a exoscale internal fix

Conflicts:
api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java
server/src/com/cloud/vm/UserVmManager.java
server/src/com/cloud/vm/UserVmManagerImpl.java

commit 82a8d2dde76289dcd7a17ebda6fec8af07f8df73
Author: Daan Hoogland 
Date:   2015-12-30T12:13:38Z

CLOUDSTACK-9203 refactorred DeployVM code to be used by UpdateVM as well

 Conflicts:
api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java




---
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-9203 Implement security group ...

2016-05-03 Thread DaanHoogland
Github user DaanHoogland closed the pull request at:

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


---
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-6928: fix issue disk I/O throt...

2016-05-03 Thread ustcweizhou
Github user ustcweizhou commented on the pull request:

https://github.com/apache/cloudstack/pull/1410#issuecomment-216585629
  
rebased with apache/4.7


---
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: Remodeling of Nuage VSP Plugin + CLOUDSTA...

2016-05-03 Thread swill
Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1494#issuecomment-216582523
  
Can you force push again to see if we can get Jenkins green.  The errors in 
Jenkins are not ones I am used to seeing, but Travis is green, so I suspect 
that a force push should clear this up.

Can I get some code reviews on this?


---
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-05-03 Thread swill
Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1493#issuecomment-216581383
  
Perfect, this one is queued up to be merged...  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: Set default networkDomain to empty instea...

2016-05-03 Thread swill
Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1485#issuecomment-216578573
  
My CI does not have the capability of testing this, so even if I ran CI it 
would not cover this.  I tend to agree that his is fine as is.


---
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-9336 surround the execution of...

2016-05-03 Thread swill
Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1463#issuecomment-216576816
  
Yes, this one is ready.  I just need to verify master is in a good state 
before I continue merging into master.  We had a merge conflict yesterday which 
we resolved, but we need to validate master is stable before I do more merging 
for 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-9340: General DB Optimization

2016-05-03 Thread swill
Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1466#issuecomment-216576269
  
I was having problems with this in my CI, but I am still trying to 
determine if it is my environment or not.  I will try again once I get master 
tested (since we fixed a merge conflict last night).


---
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-9289:Automation for feature de...

2016-05-03 Thread swill
Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1417#issuecomment-216575327
  
@nitt10prashant no problem.  Thanks for the work.  I just want to remind 
you that the 4.9 release will be frozen on May 16th, so if you want to get it 
into that release we need to get the code in and test it before the code 
freeze.  Cheers...


---
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-9340: General DB Optimization

2016-05-03 Thread serg38
Github user serg38 commented on the pull request:

https://github.com/apache/cloudstack/pull/1466#issuecomment-216574386
  
All checks have been passed after squashing. @swill did you CI run pass? If 
so can you merge it please?


---
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-9334: Support jenv and pyenv t...

2016-05-03 Thread swill
Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1460#issuecomment-216573789
  
Since both Jenkins and Travis are green, I agree that we don't need to do 
any further testing on this one.

I will give this a LGTM, can I get one more?


---
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.7] vmware: improve support for disks

2016-05-03 Thread swill
Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1365#issuecomment-216572547
  
No worries @GabrielBrascher, I realized after I CCed you that you really 
just fixed a typo.  :)  Thanks for the feedback...


---
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.7] vmware: improve support for disks

2016-05-03 Thread GabrielBrascher
Github user GabrielBrascher commented on the pull request:

https://github.com/apache/cloudstack/pull/1365#issuecomment-216571886
  
@swill I haven't worked much on that file (I had fixed a typo in the name 
of the "ROOT_DISK_CONTROLLER" variable).

At the first look I would agree with @mike-tutkowski, but I have a limited 
background on this file. I need to look with more care to be helpful.


---
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-05-03 Thread rhtyd
Github user rhtyd commented on the pull request:

https://github.com/apache/cloudstack/pull/1444#issuecomment-216569013
  
@rafaelweingartner just checked that the first commit indeed is by someone 
else, though I think it would be still valid to note in your commit (the 2nd 
one) the JIRA ID (same as the first one) and summarize details on what extra 
work you're doing to improve (i.e. why we need it, how we are doing it etc.). 
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: CLOUDSTACK-9334: Support jenv and pyenv t...

2016-05-03 Thread jburwell
Github user jburwell commented on the pull request:

https://github.com/apache/cloudstack/pull/1460#issuecomment-216564080
  
@rhtyd @DaanHoogland @swill I don't think any tests are necessary for this 
PR.  Would y'all mind reviewing for 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.
---


Re: [ANNOUNCE] Open source distributed virtual machine scheduling platform

2016-05-03 Thread Rohit Yadav
Nice feature :)

I did not look at the code but I'm curious on how you're powering off hosts, I 
think with my out-of-band management PR you can use the oobm subsystem to 
perform power management operations for IPMI 2.0 enabled hosts.

Also curious how you implemented the heuristics and wrote tests (esp. 
integration ones), some of us had a related discussion about such a feature and 
we looked at this paper from VMware DRS team: 
http://www.waldspurger.org/carl/papers/drs-vmtj-mar12.pdf

Regards,
Rohit Yadav


Regards,

Rohit Yadav

rohit.ya...@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue
On Apr 27 2016, at 2:29 am, Gabriel Beims Bräscher  wrote:

Hello CloudStack community members (@dev and @users),

This email is meant to announce the publication of a project on Github that
provides a distributed virtual machine scheduling platform that can be
easily integrated with Apache CloudStack (ACS). The project is available at
[1], you can find a detailed explanation of the idea of the project, its
aspirations, basic concepts, installation and uninstallation processes and
other information at [2]. Also, if you want to know more about the
Autonomiccs and its creators, you can access the link [3].

The code that was opened at Github is part of a bigger system that has the
goal of managing a cloud computing environment autonomously. All of that is
being developed and used in my Ph. D. thesis and the masters’ thesis of
some colleagues. The formalization of that component will be published at
the 12th IEEE World Congress on Services (SERVICES 2016) at San Francisco
USA.

You can see the stats of our code at [4] and [5]. Right now we only have
~40% of code test coverage. However, we intend to increase that value to
~60% until next week and ~90% until the end of June.

To give you a picture of what we are preparing for the future, we can
highlight the following goals for this year (You can find others short term
goals at [6]):

   -

   Integrate our platform [1] with a multi-agent system (MAS) platform, in
   order to facilitate the development of agents. Currently, we are using
   Spring-integration to “emulate” and an agent life cycle; that can become a
   problem when needing to add more agents and they start to communicate with
   each other. Therefore, we will integrate the platform in [1] with JADE [7];
   -

   Today the metrics about the use of resource are not properly gathered by
   ACS; in order to develop more accurate predictions we need to store
   resource usage metrics. Also, those metrics have to be gathered in a
   distributed way without causing service degradation. For that and a few
   other reasons (you can send us an email so we can provide you more
   details), we are developing an autonomic monitoring platform that will
   integrate with the system available in [1];
   -

   We also foresee the need to develop a better way to visualize the cloud
   environment, a way to detect hot spots (pods and hosts) with higher
   resource usage trends (VMs trends). We see the need to change the rustic
   view of the environment with tables for a better suitable one for humans
   (this is a surprise that we intend to present at the CCCBR).

We hope you like the software and that it meets your expectations. If it
does not suffice all of your needs, let’s work together to improve it. If
you have any doubts or suggestions please send us an email; we will reply
it as fast as we can. Also, critics that can help us improve that platform
are very welcome.

[1] https://github.com/Autonomiccs/autonomiccs-platform

[2] https://github.com/Autonomiccs/autonomiccs-platform/wiki

[3] http://autonomiccs.com.br/

[4] http://jenkins.autonomiccs.com.br/

[5] http://sonar.autonomiccs.com.br/

[6] https://github.com/Autonomiccs/autonomiccs-platform#project-evolution

[7] http://jade.tilab.com/

Cheers, Gabriel.


[GitHub] cloudstack pull request: [CLOUDSTACK-9207] Test to verify restarti...

2016-05-03 Thread swill
Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1304#issuecomment-216560467
  
Thank you @sanju1010, I will get this in for testing again.


---
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-9287 - Fix unique mac address ...

2016-05-03 Thread swill
Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1413#issuecomment-216560940
  
Thank you sir...


---
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-05-03 Thread swill
Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1489#issuecomment-216559351
  
Great, thanks for the additional details @borisstoyanov.  👍   Once Rohit 
and John are in agreement on the final details, I think we are ready to merge 
this one.  Thanks everyone...

Sorry for accidentally introducing you into this @borisroman.  :)


---
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: Status of tests

2016-05-03 Thread swill
Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1525#issuecomment-21603
  
A few more details.

The full run took: `55h 59m 30s`

The following tests took longer than an hour to complete:
```
1h 01m 46s => /tmp/MarvinLogs/test_resource_limits_NXZ78Y
4h 27m 45s => /tmp/MarvinLogs/test_shared_networks_DKG901
1h 17m 39s => /tmp/MarvinLogs/test_portable_ip_19JH7D
2h 04m 22s => /tmp/MarvinLogs/test_stopped_vm_U32ILW
1h 04m 40s => /tmp/MarvinLogs/test_escalations_instances_VGGKIS
1h 44m 23s => /tmp/MarvinLogs/test_persistent_networks_SA4CJC
1h 03m 11s => /tmp/MarvinLogs/test_vpc_network_pfrules_OF7F63
2h 01m 12s => /tmp/MarvinLogs/test_snapshot_limits_6XF7FG
1h 12m 14s => /tmp/MarvinLogs/test_deploy_vm_iso_34RU69
8h 01m 51s => /tmp/MarvinLogs/test_recurring_snapshots_UVBKKN
1h 33m 25s => /tmp/MarvinLogs/test_base_image_updation_EC1K1N
1h 17m 57s => /tmp/MarvinLogs/test_affinity_groups_00G23N
1h 21m 59s => /tmp/MarvinLogs/test_multiple_ips_per_nic_MYZJWD
```

Obviously the recurring snapshots test can be improved.  Also, the shared 
network tests seem to take a pretty long time as well.  Not sure why it took 2 
hours to test stopped vm, that seems a bit odd.  

All said, we have some areas for improvement here...


---
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-05-03 Thread borisstoyanov
Github user borisstoyanov commented on the pull request:

https://github.com/apache/cloudstack/pull/1489#issuecomment-216550819
  
Thanks @swill as Rohit mentioned we did migration testing of 4.8.1 to 4.9 
without enabling the feature, to confirm users are able to continue using CS 
without dynamic-checker. Then we executed the migration script and verified the 
commands.properties are no longer available and all the rules are migrated in 
the DB. This was performed with regular users as well as LDAP and SAML users. 
Fresh installation of 4.9 was also tested, by default dynamic-checker is 
enabled. Also regression testing was performed on creating and using custom 
rules. My LGTM is up in the thread. 


---
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.7] vmware: improve support for disks

2016-05-03 Thread swill
Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1365#issuecomment-216541819
  
@mike-tutkowski, yes I think the change is expected.  I just want some more 
eyes on this since it did not go through the usual CI and code review channels 
because we were fixing a merge conflict, so I figured it was prudent to do a 
bit of an 'after the fact' code review to make sure everyone is comfortable 
with the current state.

I meant to CC @nvazquez as well since I know he has spent time with this 
file 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.
---


Adding new host to existing cluster which has Fiber Channel storage as primary storage

2016-05-03 Thread anil lakineni
Hi All,

Please some body guide me to add new host to existing cluster in CloudStack.

Host: XenServer 6.2
CloudPlatform version: 4.5

My existing cluster is configured with Fiber channel storage.

Now, i need to add new xen host to existing cluster.

I was able to add new host to existing cluster but the newly added host is
unable to plugin primary storage.

I followed below steps to add host,
- In XenCenter i added new host to existing xen pool
- Added host in the cloud platform UI
- After adding the new host in the UI to existing cluster, i can see UUID
generated by cloud to local storage.
- Now i cannot see the existing primary storage LUNs at newly added server
i can see them in old servers.

And we are seeing alert in cloudplatform UI "Unable to attach storage
pool15 to the host28"

Do i need to follow any procedure before adding in CCP to get storage
mapped to new host?

Please suggest..

Thanks,
Anil.


[GitHub] cloudstack pull request: Lower the time we wait for interfaces to ...

2016-05-03 Thread nlivens
Github user nlivens commented on the pull request:

https://github.com/apache/cloudstack/pull/1471#issuecomment-216524904
  
@remibergsma, down from 15 to 2 seconds is pretty big in terms of computing 
time. Is there an internal retry in CS might this script give a timeout? I 
think this is a good change though, waiting 15 seconds on something to come up 
is really long.


---
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-9207] Test to verify restarti...

2016-05-03 Thread sanju1010
Github user sanju1010 commented on the pull request:

https://github.com/apache/cloudstack/pull/1304#issuecomment-216524259
  
@swill , added check to see if m has any match object and fail if not. 


---
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-9287 - Fix unique mac address ...

2016-05-03 Thread kiwiflyer
Github user kiwiflyer commented on the pull request:

https://github.com/apache/cloudstack/pull/1413#issuecomment-216517829
  
Well, the open version of it - PR 1483


---
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-9287 - Fix unique mac address ...

2016-05-03 Thread kiwiflyer
Github user kiwiflyer commented on the pull request:

https://github.com/apache/cloudstack/pull/1413#issuecomment-216517631
  
I'm about to start testing 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: Set default networkDomain to empty instea...

2016-05-03 Thread kiwiflyer
Github user kiwiflyer commented on the pull request:

https://github.com/apache/cloudstack/pull/1485#issuecomment-216516629
  
@swill This has 2 x LGTM. Simple change and probably doesn't require any 
additional CI IMO.
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: Vmdk findbugs

2016-05-03 Thread DaanHoogland
GitHub user DaanHoogland opened a pull request:

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

Vmdk findbugs

replacing #1351 

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

$ git pull https://github.com/DaanHoogland/cloudstack vmdk-findbugs

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

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


commit 2e23d875637937fc1e4f910aeb6cb47980bc42da
Author: Daan Hoogland 
Date:   2016-01-19T15:55:05Z

findbugs: pre-fix reformat

commit a2b349d6c3ff49a0d758f1734213b3ab7200d0d2
Author: Daan Hoogland 
Date:   2016-01-19T15:56:20Z

findbugs: use explicit encoding




---
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: Vmdk findbugs

2016-05-03 Thread DaanHoogland
Github user DaanHoogland closed the pull request at:

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


---
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: Vmdk findbugs

2016-05-03 Thread DaanHoogland
Github user DaanHoogland commented on the pull request:

https://github.com/apache/cloudstack/pull/1351#issuecomment-216515896
  
@rhtyd you are right, I rebased against master instead of 4.7, sorry, will 
close and reopen against master


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


how to go about codebase quality when colisions occur?

2016-05-03 Thread Linas Žilinskas
Hello.

I implemented a new API call for myself, which returns the VNC url for a VM.
Currently i'm using some classes from the consoleproxy servlet package as well 
as copied some code over to my own package/class (specifically the encryption 
stuff)
Now i have questions regarding this way of doing things.

I'm all about isolation and making stuff portable as much as possible. To me 
the consoleproxy seems like a semi-standalone project. Therefore it doesn't 
seem nice to be using packages/classes willy nilly across other packages.

So should i split the reusable code into a separate package and store it 
somewhere in the shared codebase, or should i just duplicate code. I saw that 
the servlet itself has a copied over class from the standalone consoleproxy 
project.

Or maybe there's some way of implementing the api calls into the consoleproxy 
project itself?

PS. This is my first java project ever, so i'm learning as i go through the 
code. So bear with me if the language i use seems off

Regards

Linas Žilinskas

Development Lead

[http://host1plus.com/images/h1p_e_sig/sig_logo.png]

website

facebook

twitter

linkedin




Phone: +44 870 8200222

Fax: +44 870 8200222

Host1Plus is a division of Digital Energy Technologies Ltd.

26 York Street, London W1U 6PZ, United Kingdom





[GitHub] cloudstack pull request: Set default networkDomain to empty instea...

2016-05-03 Thread nlivens
Github user nlivens commented on the pull request:

https://github.com/apache/cloudstack/pull/1485#issuecomment-216513556
  
According to the explanation of @remibergsma, and the code changes : 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-9289:Automation for feature de...

2016-05-03 Thread nitt10prashant
Github user nitt10prashant commented on the pull request:

https://github.com/apache/cloudstack/pull/1417#issuecomment-216513459
  
@swill thanks for your comment and time , it seems the code is not in the 
master for which i have written the test script , it will take another 2 weeks 
to get it in , more details can be found here  
https://issues.apache.org/jira/browse/CLOUDSTACK-8676.


---
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: Removed Unused Void Class

2016-05-03 Thread nlivens
Github user nlivens commented on the pull request:

https://github.com/apache/cloudstack/pull/1440#issuecomment-216511879
  
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-8800 : Improved the listVirtua...

2016-05-03 Thread rafaelweingartner
Github user rafaelweingartner commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1444#discussion_r61870927
  
--- Diff: server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java ---
@@ -205,14 +205,21 @@ public UserVmResponse newUserVmResponse(ResponseView 
view, String objectName, Us
 
 
userVmResponse.setNetworkKbsWrite((long)vmStats.getNetworkWriteKBs());
 
-if ((userVm.getHypervisorType() != null) && 
(userVm.getHypervisorType().equals(HypervisorType.KVM) || 
userVm.getHypervisorType().equals(HypervisorType.XenServer))) { // support KVM 
and XenServer only util 2013.06.25
+if ((userVm.getHypervisorType() != null) && 
(userVm.getHypervisorType().equals(HypervisorType.KVM) || 
userVm.getHypervisorType().equals(HypervisorType.XenServer) || 
userVm.getHypervisorType().equals(HypervisorType.VMware))) { // support KVM and 
XenServer only util 2013.06.25 . supporting Vmware from 2015.09.02
--- End diff --

@koushik-das,  that is a great question.
I have no idea why we need to check the hypervisor type. This is something 
that probably comes way before @maneesha-p changes, giving that she/he just 
added the check for VMware.



---
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-05-03 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request:

https://github.com/apache/cloudstack/pull/1444#issuecomment-216508737
  
@rhtyd, I understand and I agree with your concerns. The point here is that 
I am not fragmenting commits, I just cherry picked a commit that was reverted 
and then I fixed the issues it introduced.

About the commit message, both commits are pretty clear what they do, not?

The commit “7ad3c5e” from @maneesha-p, has the Jira ticket and a 
description. 

And the commit “6c3d8ca” that I introduced, has only a title, but it is 
pretty clear what it is doing (it fix issues that were introduced by a PR). Do 
you mean that it should have some Jira ticket opened?



---
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-9336 surround the execution of...

2016-05-03 Thread kiwiflyer
Github user kiwiflyer commented on the pull request:

https://github.com/apache/cloudstack/pull/1463#issuecomment-216508518
  
@swill  4 x LGTM + CI from Daan. 
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: CLOUDSTACK-6928: fix issue disk I/O throt...

2016-05-03 Thread kiwiflyer
Github user kiwiflyer commented on the pull request:

https://github.com/apache/cloudstack/pull/1410#issuecomment-216507445
  
@ustcweizhou Could you rebase this to resolve the conflicts? I'll pull this 
in for testing once you've had a chance to do that. 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: CLOUDSTACK-9348: Use non-blocking SSL han...

2016-05-03 Thread rhtyd
Github user rhtyd commented on the pull request:

https://github.com/apache/cloudstack/pull/1493#issuecomment-216489209
  
@swill all green 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-8562: Dynamic Role-Based API C...

2016-05-03 Thread rhtyd
Github user rhtyd commented on the pull request:

https://github.com/apache/cloudstack/pull/1489#issuecomment-216488843
  
@jburwell I did not get the question, is it for oobm? dynamic-checker has 
no update counter in any of the api or schema. If this was for oobm, the update 
counter is used only for updating the power state and there is no API exposing 
or requiring this field. The power action 'status' causes update of the power 
state if it's different (or if ownership has changed only).


---
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-05-03 Thread borisroman
Github user borisroman commented on the pull request:

https://github.com/apache/cloudstack/pull/1489#issuecomment-216487485
  
@swill I think you mentioned the wrong Boris :)



---
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-05-03 Thread jburwell
Github user jburwell commented on the pull request:

https://github.com/apache/cloudstack/pull/1489#issuecomment-216486309
  
@rhtyd for optimistic locking, is the update counter returned on the get 
APIs and required on the update APIs?


---
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: Remodeling of Nuage VSP Plugin + CLOUDSTA...

2016-05-03 Thread nlivens
Github user nlivens commented on the pull request:

https://github.com/apache/cloudstack/pull/1494#issuecomment-216476619
  
Fixed issues with the added multi-zone support to "nuageTestCase.py" and 
"test_nuage_vpc_network_multizone" testcase in "test_nuage_vpc_network.py":

Test basic VPC Network functionality with Nuage VSP SDN plugin ... === 
TestName: test_nuage_vpc_network | Status : SUCCESS ===
ok
Test basic VPC Network functionality with Nuage VSP SDN plugin on multiple 
zones ... === TestName: test_nuage_vpc_network_multizone | Status : SUCCESS ===
ok

Ran 2 tests in 711.604s

OK

PyFlakes and PEP8 compliance:
$ pyflakes test/integration/plugins/nuagevsp/.py
$
$
$ pep8 --max-line-length=150 test/integration/plugins/nuagevsp/.py
$
$

Test Run:

$ nosetests --with-marvin --marvin-config=nuage.cfg 
test/integration/plugins/nuagevsp/

Test Restults:

Test user data and password reset functionality with Nuage VSP SDN plugin 
... === TestName: test_nuage_UserDataPasswordReset | Status : SUCCESS ===
ok
Test Nuage VSP VPC Offering with different combinations of LB service 
providers ... === TestName: test_01_nuage_internallb_vpc_Offering | Status : 
SUCCESS ===
ok
Test Nuage VSP VPC Network Offering with and without Internal LB service 
... === TestName: test_02_nuage_internallb_vpc_network_offering | Status : 
SUCCESS ===
ok
Test Nuage VSP VPC Networks with and without Internal LB service ... === 
TestName: test_03_nuage_internallb_vpc_networks | Status : SUCCESS ===
ok
Test Nuage VSP VPC Internal LB functionality with different combinations of 
Internal LB rules ... === TestName: test_04_nuage_internallb_rules | Status : 
SUCCESS ===
ok
Test Nuage VSP VPC Internal LB functionality by performing (wget) traffic 
tests within a VPC ... === TestName: test_05_nuage_internallb_traffic | Status 
: SUCCESS ===
ok
Test Nuage VSP VPC Internal LB functionality with different LB algorithms 
by performing (wget) traffic tests ... === TestName: 
test_06_nuage_internallb_algorithms_traffic | Status : SUCCESS ===
ok
Test Nuage VSP VPC Internal LB functionality with restarts of VPC network 
components by performing (wget) ... === TestName: 
test_07_nuage_internallb_vpc_network_restarts_traffic | Status : SUCCESS ===
ok
Test Nuage VSP VPC Internal LB functionality with InternalLbVm appliance 
operations by performing (wget) ... === TestName: 
test_08_nuage_internallb_appliance_operations_traffic | Status : SUCCESS ===
ok
Test basic VPC Network functionality with Nuage VSP SDN plugin ... === 
TestName: test_nuage_vpc_network | Status : SUCCESS ===
ok
Test basic VPC Network functionality with Nuage VSP SDN plugin on multiple 
zones ... === TestName: test_nuage_vpc_network_multizone | Status : SUCCESS ===
ok
Test Nuage VSP SDN plugin with basic Isolated Network functionality ... === 
TestName: test_nuage_vsp | Status : SUCCESS ===
ok

Ran 12 tests in 9242.442s

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


[GitHub] cloudstack pull request: CLOUDSTACK-9299: Out-of-band Management f...

2016-05-03 Thread rhtyd
Github user rhtyd commented on the pull request:

https://github.com/apache/cloudstack/pull/1502#issuecomment-216472391
  
@jburwell I've fixed based on your review, please re-review and advise 
further improvements, thanks

Integration test after last PR review changes:

=== TestName: test_oobm_background_powerstate_sync | Status : SUCCESS ===

=== TestName: test_oobm_change_password | Status : SUCCESS ===

=== TestName: test_oobm_configure_default_driver | Status : SUCCESS ===

=== TestName: test_oobm_configure_invalid_driver | Status : SUCCESS ===

=== TestName: test_oobm_disable_feature_invalid | Status : SUCCESS ===

=== TestName: test_oobm_disable_feature_valid | Status : SUCCESS ===

=== TestName: test_oobm_enable_feature_invalid | Status : SUCCESS ===

=== TestName: test_oobm_enable_feature_valid | Status : SUCCESS ===

=== TestName: test_oobm_enabledisable_across_clusterzones | Status : 
SUCCESS ===

=== TestName: test_oobm_issue_power_cycle | Status : SUCCESS ===

=== TestName: test_oobm_issue_power_off | Status : SUCCESS ===

=== TestName: test_oobm_issue_power_on | Status : SUCCESS ===

=== TestName: test_oobm_issue_power_reset | Status : SUCCESS ===

=== TestName: test_oobm_issue_power_soft | Status : SUCCESS ===

=== TestName: test_oobm_issue_power_status | Status : SUCCESS ===

=== TestName: test_oobm_multiple_mgmt_server_ownership | Status : SUCCESS 
===



---
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-8751 minimise downtime of netw...

2016-05-03 Thread bvbharatk
Github user bvbharatk commented on the pull request:

https://github.com/apache/cloudstack/pull/866#issuecomment-216466217
  
rebased with master and moved the db changes to schema481to490


---
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-9299: Out-of-band Management f...

2016-05-03 Thread rhtyd
Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r61850479
  
--- Diff: 
server/test/org/apache/cloudstack/outofbandmanagement/OutOfBandManagementServiceTest.java
 ---
@@ -0,0 +1,119 @@
+// 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.outofbandmanagement;
+
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.collect.ImmutableMap;
+import 
org.apache.cloudstack.outofbandmanagement.driver.OutOfBandManagementDriverResponse;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+@RunWith(MockitoJUnitRunner.class)
+public class OutOfBandManagementServiceTest {
+
+OutOfBandManagementServiceImpl oobmService = new 
OutOfBandManagementServiceImpl();
+
+@Test
+public void testOutOfBandManagementDriverResponseEvent() {
+OutOfBandManagementDriverResponse r = new 
OutOfBandManagementDriverResponse("some result", "some error", false);
+
+r.setSuccess(false);
+r.setAuthFailure(false);
+Assert.assertEquals(r.toEvent(), 
OutOfBandManagement.PowerState.Event.Unknown);
+
+r.setSuccess(false);
+r.setAuthFailure(true);
+Assert.assertEquals(r.toEvent(), 
OutOfBandManagement.PowerState.Event.AuthError);
+
+r.setAuthFailure(false);
+r.setSuccess(true);
+r.setPowerState(OutOfBandManagement.PowerState.On);
+Assert.assertEquals(r.toEvent(), 
OutOfBandManagement.PowerState.Event.On);
+
+r.setPowerState(OutOfBandManagement.PowerState.Off);
+Assert.assertEquals(r.toEvent(), 
OutOfBandManagement.PowerState.Event.Off);
+
+r.setPowerState(OutOfBandManagement.PowerState.Disabled);
+Assert.assertEquals(r.toEvent(), 
OutOfBandManagement.PowerState.Event.Disabled);
+}
+
+private ImmutableMap 
buildRandomOptionsMap() {
+ImmutableMap.Builder builder = 
new ImmutableMap.Builder<>();
+builder.put(OutOfBandManagement.Option.ADDRESS, "localhost");
+builder.put(OutOfBandManagement.Option.DRIVER, "ipmitool");
+return builder.build();
+}
+
+@Test
+public void testUpdateOutOfBandManagementConfigValid() {
+OutOfBandManagement config = new OutOfBandManagementVO(123L);
+Assert.assertEquals(config.getPowerState(), 
OutOfBandManagement.PowerState.Disabled);
+config = oobmService.updateConfig(config, buildRandomOptionsMap());
+Assert.assertEquals(config.getAddress(), "localhost");
+Assert.assertEquals(config.getDriver(), "ipmitool");
+Assert.assertEquals(config.getPowerState(), 
OutOfBandManagement.PowerState.Disabled);
+}
+
+@Test
+public void testUpdateOutOfBandManagementConfigInValid() {
+try {
+oobmService.updateConfig(null, buildRandomOptionsMap());
+Assert.fail("CloudRuntimeException was expect for out-of-band 
management not configured for the host");
+} catch (CloudRuntimeException ignored) {
+}
+
+try {
+oobmService.updateConfig(null, null);
+Assert.fail("CloudRuntimeException was expect for out-of-band 
management not configured for the host");
+} catch (CloudRuntimeException ignored) {
+}
+
+OutOfBandManagement config = new OutOfBandManagementVO(123L);
+config.setAddress(null);
+config = oobmService.updateConfig(config, null);
+Assert.assertEquals(config.getAddress(), null);
+Assert.assertEquals(config.getPowerState(), 
OutOfBandManagement.PowerState.Disabled);
--- End diff --

Fixed, split into three unit tests


---
If your project is set up for it, you 

[GitHub] cloudstack pull request: CLOUDSTACK-9299: Out-of-band Management f...

2016-05-03 Thread rhtyd
Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r61850255
  
--- Diff: test/integration/smoke/test_outofbandmanagement.py ---
@@ -0,0 +1,561 @@
+# 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.
+
+
+import marvin
+from marvin.cloudstackTestCase import *
+from marvin.cloudstackAPI import *
+from marvin.lib.utils import *
+from marvin.lib.base import *
+from marvin.lib.common import *
+from marvin.lib.utils import (random_gen)
+from nose.plugins.attrib import attr
+
+from ipmisim.ipmisim import IpmiServerContext, IpmiServer, 
ThreadedIpmiServer
+
+import socket
+import sys
+import thread
+import time
+
+
+class TestOutOfBandManagement(cloudstackTestCase):
+""" Test cases for out of band management
+"""
+
+def setUp(self):
+self.apiclient = self.testClient.getApiClient()
+self.hypervisor = self.testClient.getHypervisorInfo()
+self.dbclient = self.testClient.getDbConnection()
+self.services = self.testClient.getParsedTestDataConfig()
+self.mgtSvrDetails = self.config.__dict__["mgtSvr"][0].__dict__
+
+self.zone = get_zone(self.apiclient, 
self.testClient.getZoneForTests())
+self.host = None
+self.server = None
+
+# use random port for ipmisim
+s = socket.socket()
+s.bind(('', 0))
+self.serverPort = s.getsockname()[1]
+s.close()
+
+self.cleanup = []
+
+
+def tearDown(self):
+try:
+self.dbclient.execute("delete from oobm where port=%d" % 
self.getIpmiServerPort())
+self.dbclient.execute("delete from mshost_peer where 
peer_runid=%s" % self.getFakeMsRunId())
+self.dbclient.execute("delete from mshost where runid=%s" % 
self.getFakeMsRunId())
+self.dbclient.execute("delete from cluster_details where 
name='outOfBandManagementEnabled'")
+self.dbclient.execute("delete from data_center_details where 
name='outOfBandManagementEnabled'")
+cleanup_resources(self.apiclient, self.cleanup)
+if self.server:
+self.server.shutdown()
+self.server.server_close()
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+
+
+def getFakeMsId(self):
+return 1234567890
--- End diff --

fixed


---
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-9299: Out-of-band Management f...

2016-05-03 Thread rhtyd
Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r61850243
  
--- Diff: test/integration/smoke/test_outofbandmanagement.py ---
@@ -0,0 +1,561 @@
+# 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.
+
+
+import marvin
+from marvin.cloudstackTestCase import *
+from marvin.cloudstackAPI import *
+from marvin.lib.utils import *
+from marvin.lib.base import *
+from marvin.lib.common import *
+from marvin.lib.utils import (random_gen)
+from nose.plugins.attrib import attr
+
+from ipmisim.ipmisim import IpmiServerContext, IpmiServer, 
ThreadedIpmiServer
+
+import socket
+import sys
+import thread
+import time
+
+
+class TestOutOfBandManagement(cloudstackTestCase):
+""" Test cases for out of band management
+"""
+
+def setUp(self):
+self.apiclient = self.testClient.getApiClient()
+self.hypervisor = self.testClient.getHypervisorInfo()
+self.dbclient = self.testClient.getDbConnection()
+self.services = self.testClient.getParsedTestDataConfig()
+self.mgtSvrDetails = self.config.__dict__["mgtSvr"][0].__dict__
+
+self.zone = get_zone(self.apiclient, 
self.testClient.getZoneForTests())
+self.host = None
+self.server = None
+
+# use random port for ipmisim
+s = socket.socket()
+s.bind(('', 0))
+self.serverPort = s.getsockname()[1]
+s.close()
+
+self.cleanup = []
+
+
+def tearDown(self):
+try:
+self.dbclient.execute("delete from oobm where port=%d" % 
self.getIpmiServerPort())
+self.dbclient.execute("delete from mshost_peer where 
peer_runid=%s" % self.getFakeMsRunId())
+self.dbclient.execute("delete from mshost where runid=%s" % 
self.getFakeMsRunId())
+self.dbclient.execute("delete from cluster_details where 
name='outOfBandManagementEnabled'")
+self.dbclient.execute("delete from data_center_details where 
name='outOfBandManagementEnabled'")
+cleanup_resources(self.apiclient, self.cleanup)
+if self.server:
+self.server.shutdown()
+self.server.server_close()
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+
+
+def getFakeMsId(self):
+return 1234567890
+
+
+def getFakeMsRunId(self):
+return 123456
--- End diff --

Fixed, uses random.randint 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-9299: Out-of-band Management f...

2016-05-03 Thread rhtyd
Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r61849798
  
--- Diff: test/integration/smoke/test_outofbandmanagement.py ---
@@ -0,0 +1,561 @@
+# 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.
+
+
+import marvin
+from marvin.cloudstackTestCase import *
+from marvin.cloudstackAPI import *
+from marvin.lib.utils import *
+from marvin.lib.base import *
+from marvin.lib.common import *
+from marvin.lib.utils import (random_gen)
+from nose.plugins.attrib import attr
+
+from ipmisim.ipmisim import IpmiServerContext, IpmiServer, 
ThreadedIpmiServer
+
+import socket
+import sys
+import thread
+import time
+
+
+class TestOutOfBandManagement(cloudstackTestCase):
+""" Test cases for out of band management
+"""
+
+def setUp(self):
+self.apiclient = self.testClient.getApiClient()
+self.hypervisor = self.testClient.getHypervisorInfo()
+self.dbclient = self.testClient.getDbConnection()
+self.services = self.testClient.getParsedTestDataConfig()
+self.mgtSvrDetails = self.config.__dict__["mgtSvr"][0].__dict__
+
+self.zone = get_zone(self.apiclient, 
self.testClient.getZoneForTests())
+self.host = None
+self.server = None
+
+# use random port for ipmisim
+s = socket.socket()
+s.bind(('', 0))
+self.serverPort = s.getsockname()[1]
+s.close()
+
+self.cleanup = []
+
+
+def tearDown(self):
+try:
+self.dbclient.execute("delete from oobm where port=%d" % 
self.getIpmiServerPort())
+self.dbclient.execute("delete from mshost_peer where 
peer_runid=%s" % self.getFakeMsRunId())
+self.dbclient.execute("delete from mshost where runid=%s" % 
self.getFakeMsRunId())
+self.dbclient.execute("delete from cluster_details where 
name='outOfBandManagementEnabled'")
+self.dbclient.execute("delete from data_center_details where 
name='outOfBandManagementEnabled'")
+cleanup_resources(self.apiclient, self.cleanup)
+if self.server:
+self.server.shutdown()
+self.server.server_close()
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+
+
+def getFakeMsId(self):
+return 1234567890
+
+
+def getFakeMsRunId(self):
+return 123456
+
+
+def getHost(self, hostId=None):
+if self.host and hostId is None:
+return self.host
+
+response = list_hosts(
+self.apiclient,
+zoneid=self.zone.id,
+type='Routing',
+id=hostId
+)
+if len(response) > 0:
+self.host = response[0]
+return self.host
+raise self.skipTest("No hosts found, skipping out-of-band 
management test")
+
+
+def getIpmiServerIp(self):
+s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+s.connect((self.mgtSvrDetails["mgtSvrIp"], 
self.mgtSvrDetails["port"]))
+return s.getsockname()[0]
+
+
+def getIpmiServerPort(self):
+return self.serverPort
+
+
+def getOobmConfigCmd(self):
+cmd = 
configureOutOfBandManagement.configureOutOfBandManagementCmd()
+cmd.driver = 'ipmitool' # The default available driver
+cmd.address = self.getIpmiServerIp()
+cmd.port = self.getIpmiServerPort()
+cmd.username = 'admin'
+cmd.password = 'password'
+cmd.hostid = self.getHost().id
+return cmd
+
+
+def getOobmEnableCmd(self):
+cmd = 
enableOutOfBandManagementForHost.enableOutOfBandManagementForHostCmd()
+ 

[GitHub] cloudstack pull request: CLOUDSTACK-9299: Out-of-band Management f...

2016-05-03 Thread rhtyd
Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r61849729
  
--- Diff: test/integration/smoke/test_outofbandmanagement.py ---
@@ -0,0 +1,561 @@
+# 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.
+
+
+import marvin
+from marvin.cloudstackTestCase import *
+from marvin.cloudstackAPI import *
+from marvin.lib.utils import *
+from marvin.lib.base import *
+from marvin.lib.common import *
+from marvin.lib.utils import (random_gen)
+from nose.plugins.attrib import attr
+
+from ipmisim.ipmisim import IpmiServerContext, IpmiServer, 
ThreadedIpmiServer
+
+import socket
+import sys
+import thread
+import time
+
+
+class TestOutOfBandManagement(cloudstackTestCase):
+""" Test cases for out of band management
+"""
+
+def setUp(self):
+self.apiclient = self.testClient.getApiClient()
+self.hypervisor = self.testClient.getHypervisorInfo()
+self.dbclient = self.testClient.getDbConnection()
+self.services = self.testClient.getParsedTestDataConfig()
+self.mgtSvrDetails = self.config.__dict__["mgtSvr"][0].__dict__
+
+self.zone = get_zone(self.apiclient, 
self.testClient.getZoneForTests())
+self.host = None
+self.server = None
+
+# use random port for ipmisim
+s = socket.socket()
+s.bind(('', 0))
+self.serverPort = s.getsockname()[1]
+s.close()
+
+self.cleanup = []
+
+
+def tearDown(self):
+try:
+self.dbclient.execute("delete from oobm where port=%d" % 
self.getIpmiServerPort())
+self.dbclient.execute("delete from mshost_peer where 
peer_runid=%s" % self.getFakeMsRunId())
+self.dbclient.execute("delete from mshost where runid=%s" % 
self.getFakeMsRunId())
+self.dbclient.execute("delete from cluster_details where 
name='outOfBandManagementEnabled'")
+self.dbclient.execute("delete from data_center_details where 
name='outOfBandManagementEnabled'")
+cleanup_resources(self.apiclient, self.cleanup)
+if self.server:
+self.server.shutdown()
+self.server.server_close()
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+
+
+def getFakeMsId(self):
+return 1234567890
+
+
+def getFakeMsRunId(self):
+return 123456
+
+
+def getHost(self, hostId=None):
+if self.host and hostId is None:
+return self.host
+
+response = list_hosts(
+self.apiclient,
+zoneid=self.zone.id,
+type='Routing',
+id=hostId
+)
+if len(response) > 0:
+self.host = response[0]
+return self.host
+raise self.skipTest("No hosts found, skipping out-of-band 
management test")
+
+
+def getIpmiServerIp(self):
+s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+s.connect((self.mgtSvrDetails["mgtSvrIp"], 
self.mgtSvrDetails["port"]))
+return s.getsockname()[0]
+
+
+def getIpmiServerPort(self):
+return self.serverPort
+
+
+def getOobmConfigCmd(self):
+cmd = 
configureOutOfBandManagement.configureOutOfBandManagementCmd()
+cmd.driver = 'ipmitool' # The default available driver
+cmd.address = self.getIpmiServerIp()
+cmd.port = self.getIpmiServerPort()
+cmd.username = 'admin'
+cmd.password = 'password'
+cmd.hostid = self.getHost().id
+return cmd
+
+
+def getOobmEnableCmd(self):
+cmd = 
enableOutOfBandManagementForHost.enableOutOfBandManagementForHostCmd()
+ 

[GitHub] cloudstack pull request: CLOUDSTACK-9336 surround the execution of...

2016-05-03 Thread nlivens
Github user nlivens commented on the pull request:

https://github.com/apache/cloudstack/pull/1463#issuecomment-216462358
  
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-9299: Out-of-band Management f...

2016-05-03 Thread rhtyd
Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r61848360
  
--- Diff: test/integration/smoke/test_outofbandmanagement.py ---
@@ -0,0 +1,561 @@
+# 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.
+
+
+import marvin
+from marvin.cloudstackTestCase import *
+from marvin.cloudstackAPI import *
+from marvin.lib.utils import *
+from marvin.lib.base import *
+from marvin.lib.common import *
+from marvin.lib.utils import (random_gen)
+from nose.plugins.attrib import attr
+
+from ipmisim.ipmisim import IpmiServerContext, IpmiServer, 
ThreadedIpmiServer
+
+import socket
+import sys
+import thread
+import time
+
+
+class TestOutOfBandManagement(cloudstackTestCase):
+""" Test cases for out of band management
+"""
+
+def setUp(self):
+self.apiclient = self.testClient.getApiClient()
+self.hypervisor = self.testClient.getHypervisorInfo()
+self.dbclient = self.testClient.getDbConnection()
+self.services = self.testClient.getParsedTestDataConfig()
+self.mgtSvrDetails = self.config.__dict__["mgtSvr"][0].__dict__
+
+self.zone = get_zone(self.apiclient, 
self.testClient.getZoneForTests())
+self.host = None
+self.server = None
+
+# use random port for ipmisim
+s = socket.socket()
+s.bind(('', 0))
+self.serverPort = s.getsockname()[1]
+s.close()
+
+self.cleanup = []
+
+
+def tearDown(self):
+try:
+self.dbclient.execute("delete from oobm where port=%d" % 
self.getIpmiServerPort())
+self.dbclient.execute("delete from mshost_peer where 
peer_runid=%s" % self.getFakeMsRunId())
+self.dbclient.execute("delete from mshost where runid=%s" % 
self.getFakeMsRunId())
+self.dbclient.execute("delete from cluster_details where 
name='outOfBandManagementEnabled'")
+self.dbclient.execute("delete from data_center_details where 
name='outOfBandManagementEnabled'")
+cleanup_resources(self.apiclient, self.cleanup)
+if self.server:
+self.server.shutdown()
+self.server.server_close()
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+
+
+def getFakeMsId(self):
+return 1234567890
+
+
+def getFakeMsRunId(self):
+return 123456
+
+
+def getHost(self, hostId=None):
+if self.host and hostId is None:
+return self.host
+
+response = list_hosts(
+self.apiclient,
+zoneid=self.zone.id,
+type='Routing',
+id=hostId
+)
+if len(response) > 0:
+self.host = response[0]
+return self.host
+raise self.skipTest("No hosts found, skipping out-of-band 
management test")
+
+
+def getIpmiServerIp(self):
+s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+s.connect((self.mgtSvrDetails["mgtSvrIp"], 
self.mgtSvrDetails["port"]))
+return s.getsockname()[0]
+
+
+def getIpmiServerPort(self):
+return self.serverPort
+
+
+def getOobmConfigCmd(self):
+cmd = 
configureOutOfBandManagement.configureOutOfBandManagementCmd()
+cmd.driver = 'ipmitool' # The default available driver
+cmd.address = self.getIpmiServerIp()
+cmd.port = self.getIpmiServerPort()
+cmd.username = 'admin'
+cmd.password = 'password'
+cmd.hostid = self.getHost().id
+return cmd
+
+
+def getOobmEnableCmd(self):
+cmd = 
enableOutOfBandManagementForHost.enableOutOfBandManagementForHostCmd()
+ 

[GitHub] cloudstack pull request: CLOUDSTACK-9299: Out-of-band Management f...

2016-05-03 Thread rhtyd
Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r61847657
  
--- Diff: test/integration/smoke/test_outofbandmanagement.py ---
@@ -0,0 +1,561 @@
+# 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.
+
+
+import marvin
+from marvin.cloudstackTestCase import *
+from marvin.cloudstackAPI import *
+from marvin.lib.utils import *
+from marvin.lib.base import *
+from marvin.lib.common import *
+from marvin.lib.utils import (random_gen)
+from nose.plugins.attrib import attr
+
+from ipmisim.ipmisim import IpmiServerContext, IpmiServer, 
ThreadedIpmiServer
+
+import socket
+import sys
+import thread
+import time
+
+
+class TestOutOfBandManagement(cloudstackTestCase):
+""" Test cases for out of band management
+"""
+
+def setUp(self):
+self.apiclient = self.testClient.getApiClient()
+self.hypervisor = self.testClient.getHypervisorInfo()
+self.dbclient = self.testClient.getDbConnection()
+self.services = self.testClient.getParsedTestDataConfig()
+self.mgtSvrDetails = self.config.__dict__["mgtSvr"][0].__dict__
+
+self.zone = get_zone(self.apiclient, 
self.testClient.getZoneForTests())
+self.host = None
+self.server = None
+
+# use random port for ipmisim
+s = socket.socket()
+s.bind(('', 0))
+self.serverPort = s.getsockname()[1]
+s.close()
+
+self.cleanup = []
+
+
+def tearDown(self):
+try:
+self.dbclient.execute("delete from oobm where port=%d" % 
self.getIpmiServerPort())
+self.dbclient.execute("delete from mshost_peer where 
peer_runid=%s" % self.getFakeMsRunId())
+self.dbclient.execute("delete from mshost where runid=%s" % 
self.getFakeMsRunId())
+self.dbclient.execute("delete from cluster_details where 
name='outOfBandManagementEnabled'")
+self.dbclient.execute("delete from data_center_details where 
name='outOfBandManagementEnabled'")
+cleanup_resources(self.apiclient, self.cleanup)
+if self.server:
+self.server.shutdown()
+self.server.server_close()
+except Exception as e:
+raise Exception("Warning: Exception during cleanup : %s" % e)
+
+
+def getFakeMsId(self):
+return 1234567890
+
+
+def getFakeMsRunId(self):
+return 123456
+
+
+def getHost(self, hostId=None):
+if self.host and hostId is None:
+return self.host
+
+response = list_hosts(
+self.apiclient,
+zoneid=self.zone.id,
+type='Routing',
+id=hostId
+)
+if len(response) > 0:
+self.host = response[0]
+return self.host
+raise self.skipTest("No hosts found, skipping out-of-band 
management test")
+
+
+def getIpmiServerIp(self):
+s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+s.connect((self.mgtSvrDetails["mgtSvrIp"], 
self.mgtSvrDetails["port"]))
+return s.getsockname()[0]
+
+
+def getIpmiServerPort(self):
+return self.serverPort
+
+
+def getOobmConfigCmd(self):
+cmd = 
configureOutOfBandManagement.configureOutOfBandManagementCmd()
+cmd.driver = 'ipmitool' # The default available driver
+cmd.address = self.getIpmiServerIp()
+cmd.port = self.getIpmiServerPort()
+cmd.username = 'admin'
+cmd.password = 'password'
+cmd.hostid = self.getHost().id
+return cmd
+
+
+def getOobmEnableCmd(self):
+cmd = 
enableOutOfBandManagementForHost.enableOutOfBandManagementForHostCmd()
+ 

[GitHub] cloudstack pull request: CLOUDSTACK-9299: Out-of-band Management f...

2016-05-03 Thread rhtyd
Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r61847561
  
--- Diff: 
server/test/org/apache/cloudstack/outofbandmanagement/OutOfBandManagementServiceTest.java
 ---
@@ -0,0 +1,119 @@
+// 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.outofbandmanagement;
+
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.google.common.collect.ImmutableMap;
+import 
org.apache.cloudstack.outofbandmanagement.driver.OutOfBandManagementDriverResponse;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.runners.MockitoJUnitRunner;
+
+@RunWith(MockitoJUnitRunner.class)
+public class OutOfBandManagementServiceTest {
+
+OutOfBandManagementServiceImpl oobmService = new 
OutOfBandManagementServiceImpl();
+
+@Test
+public void testOutOfBandManagementDriverResponseEvent() {
+OutOfBandManagementDriverResponse r = new 
OutOfBandManagementDriverResponse("some result", "some error", false);
+
+r.setSuccess(false);
+r.setAuthFailure(false);
+Assert.assertEquals(r.toEvent(), 
OutOfBandManagement.PowerState.Event.Unknown);
+
+r.setSuccess(false);
+r.setAuthFailure(true);
+Assert.assertEquals(r.toEvent(), 
OutOfBandManagement.PowerState.Event.AuthError);
+
+r.setAuthFailure(false);
+r.setSuccess(true);
+r.setPowerState(OutOfBandManagement.PowerState.On);
+Assert.assertEquals(r.toEvent(), 
OutOfBandManagement.PowerState.Event.On);
+
+r.setPowerState(OutOfBandManagement.PowerState.Off);
+Assert.assertEquals(r.toEvent(), 
OutOfBandManagement.PowerState.Event.Off);
+
+r.setPowerState(OutOfBandManagement.PowerState.Disabled);
+Assert.assertEquals(r.toEvent(), 
OutOfBandManagement.PowerState.Event.Disabled);
+}
+
+private ImmutableMap 
buildRandomOptionsMap() {
+ImmutableMap.Builder builder = 
new ImmutableMap.Builder<>();
+builder.put(OutOfBandManagement.Option.ADDRESS, "localhost");
+builder.put(OutOfBandManagement.Option.DRIVER, "ipmitool");
+return builder.build();
+}
+
+@Test
+public void testUpdateOutOfBandManagementConfigValid() {
+OutOfBandManagement config = new OutOfBandManagementVO(123L);
+Assert.assertEquals(config.getPowerState(), 
OutOfBandManagement.PowerState.Disabled);
+config = oobmService.updateConfig(config, buildRandomOptionsMap());
+Assert.assertEquals(config.getAddress(), "localhost");
+Assert.assertEquals(config.getDriver(), "ipmitool");
+Assert.assertEquals(config.getPowerState(), 
OutOfBandManagement.PowerState.Disabled);
+}
+
+@Test
+public void testUpdateOutOfBandManagementConfigInValid() {
+try {
+oobmService.updateConfig(null, buildRandomOptionsMap());
+Assert.fail("CloudRuntimeException was expect for out-of-band 
management not configured for the host");
+} catch (CloudRuntimeException ignored) {
+}
+
+try {
+oobmService.updateConfig(null, null);
+Assert.fail("CloudRuntimeException was expect for out-of-band 
management not configured for the host");
+} catch (CloudRuntimeException ignored) {
+}
+
+OutOfBandManagement config = new OutOfBandManagementVO(123L);
+config.setAddress(null);
+config = oobmService.updateConfig(config, null);
+Assert.assertEquals(config.getAddress(), null);
+Assert.assertEquals(config.getPowerState(), 
OutOfBandManagement.PowerState.Disabled);
+}
+
+@Test
+public void testGetOutOfBandManagementOptionsValid() {
+

[GitHub] cloudstack pull request: CLOUDSTACK-9299: Out-of-band Management f...

2016-05-03 Thread rhtyd
Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r61847460
  
--- Diff: server/test/com/cloud/resource/MockResourceManagerImpl.java ---
@@ -172,6 +173,12 @@ public Cluster getCluster(final Long clusterId) {
 return null;
 }
 
+@Override
+public DataCenter getZone(Long zoneId) {
+// TODO Auto-generated method stub
--- End diff --

This is a test mock, from test 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.
---


  1   2   >