RE: Git Push Summary

2013-07-30 Thread Saksham Srivastava
Isaac, I tried some of your changes. Looks good.

Regards,
Saksham

-Original Message-
From: Isaac Chiang [mailto:isaacchi...@gmail.com] 
Sent: Wednesday, July 24, 2013 3:12 PM
To: Pranav Saxena
Cc: dev@cloudstack.apache.org
Subject: Re: Git Push Summary

Hi all,
 I've been working on re-factoring the dedication UI code in these days 
and just finished.
I discussed the requirements with Pranav before. The changes are listed as
following:

1. zone wizard: (JIRA ticket :
https://issues.apache.org/jira/browse/CLOUDSTACK-3700)

Add a dedication step to activating zone process with rules as:
(A) if the user check the dedicate checkbox and provide correct 
account information, the wizard will have an extra dedicating step
  when activating the newly created zone(show in the activating 
steps).
(B) if the user check the dedicate checkbox and provide incorrect 
account information, the wizard will return to Setup Zone step. Let

  the user has the opportunity to modify the acc or uncheck the 
dedicate checkbox. It runs into two cases after the user click on fix
  error through the wizard:
  (a) If the user unchecks the dedicate checkbox this time, the 
wizard will continue to finish the rest of the activating process without
showing the dedicating step.
  (b) If the user provides the correct account this time, the 
wizard will process the dedicating step again(show in the wizard) and
finish the rest of activating process

2. Create pod/cluster/host from dialog: (JIRA ticket :
https://issues.apache.org/jira/browse/CLOUDSTACK-3388)
 Fix the dedication code to fit asynchronous dedication api commands.
The UI now shows correct notification message for the dedication operation.

Please let me know if you have any concerns, thanks! :)


Regards

Isaac









On Fri, Jul 19, 2013 at 10:04 AM, Isaac Chiang isaacchi...@gmail.comwrote:

 Hi Pranav,
 I'll do more tests before applying the code to master in next 
 few days. Since the UI code has been re-formatted yesterday, I'd like 
 to copy/paste the modified part into master instead of merging the branch.
 Thanks for all the help and advice :)

 Regards


 On Thu, Jul 18, 2013 at 2:47 PM, Pranav Saxena psb...@gmail.com wrote:

 Hey Isaac ,

 I verified your code changes in your private asf branch . The code 
 changes look good to me. I am assuming that it would work fine for 
 the following cases -
 1) Dedication is a success , addition of resource is a success
 2) Dedication is a failure , addition of resource is still a success
 3) Dedication is a failure , addition is also a failure

  - All 3 cases should have notification displayed for each of the API 
 calls getting triggered ( which I believe would be there after your 
 code
 changes)
  - Also you could provide a setInterval waiting time function of 
 say
 2-3 seconds between two successive notifications.

 One thing which I realized after looking at your code changes is that 
 you would have to bear the pain of resolving the merge conflicts when 
 you merge your branch with master. Since your code 
 modifications/additions have been done on the already existing code , 
 I am pretty sure you would have to take care of these conflicts. 
 Since the changes aren't that huge, you could manually copy them to 
 the master branch or replace the entire system.js file in your branch 
 in the master assuming you forked your branch out of master and there 
 haven't been other changes in system.js file . First option is a safer 
 approach though !!

 Thanks,
 Pranav


 On Thu, Jul 18, 2013 at 8:18 AM, Isaac Chiang isaacchi...@gmail.comwrote:

 Hi Pranav:
  I just pushed part of modified code in to the branch.
 Please have a look if the commit fix the issue as expected.

 Thanks,

 Regards


 -- Forwarded message --
 From: Pranav Saxena psb...@gmail.com
 Date: Tue, Jul 16, 2013 at 4:52 PM
 Subject: Re: Git Push Summary
 To: dev@cloudstack.apache.org, jessica.w...@citrix.com, 
 sonny.ch...@citrix.com
 Cc: comm...@cloudstack.apache.org


 Thanks Isaac for creating this branch. I'll keep an eye on the 
 commits you make your here . Once the code for handling nested query 
 API calls are ready , you can merge it into master.

 @Jessica - I have had conversations with Isaac and he is in the 
 process of re-factoring the code for dedicated resources to handle 
 the nested query API calls . You could review it once as well when 
 he sends out a request for merge . It should not be a big change 
 though !

 Thanks,
 Pranav


 On Tue, Jul 16, 2013 at 2:00 PM, isaacchi...@apache.org wrote:

  Updated Branches:
refs/heads/ui-dedicatedresources-refactoring [created] 22ddc3fa0
 






Re: Review Request 12968: CLOUDSTACK-3686: Registering a template does not generate a usage event.

2013-07-30 Thread Saksham Srivastava


 On July 28, 2013, 3:59 a.m., Min Chen wrote:
  server/src/com/cloud/template/HypervisorTemplateAdapter.java, line 249
  https://reviews.apache.org/r/12968/diff/2/?file=329846#file329846line249
 
  This is not right. For cross-zone template, in 
  HypervisorTemplateAdapter.create(TemplateProfile) method, you will see that 
  there is a for-loop to download the template to each image store for each 
  zone. For each image store, this createTemplateAsyncCallback will be 
  invoked. So in this callback, you should just generate usage event for this 
  zone.

The reason I do it is because, this part of code will be executed only once 
even when template is cross zone.
If I do not generate all the events here, only the first template that got 
created will publish the usage event.
Usage records do not have the information about store id, so we cannot be sure 
if the usage_record for that store id is already created or not.

It is too much of unnecessary hack to bypass the root issue, I am discarding 
the whole patch and will wait for the root cause (2 async call backs for a 
single register-template) to get fix.
Then it won't be required to do this.


 On July 28, 2013, 3:59 a.m., Min Chen wrote:
  server/src/com/cloud/template/HypervisorTemplateAdapter.java, line 229
  https://reviews.apache.org/r/12968/diff/2/?file=329846#file329846line229
 
  How can you guarantee that listSrcTmpltStore.get(0) is the entry you 
  desire? You should find that exact (templateId, storeId) entry by passing 
  both templateId and storeId, which should be able to be obtained from 
  template.getDataStore().getId().

This is based on 2 assumptions:
1)Size/physical size of cross-zone template on all the stores will be equal
2)Size/physical sizes are populated only when 100% download is complete.
So even if there are multiple results for the same, all results will have same 
sizes.
For the first time when the template is downloaded to a store, there would be a 
single result having the correct sizes.
For later downloads of template this variable would not be even required 
because I am trying to publish all events at the first shot.


 On July 28, 2013, 3:59 a.m., Min Chen wrote:
  server/src/com/cloud/template/HypervisorTemplateAdapter.java, line 234
  https://reviews.apache.org/r/12968/diff/2/?file=329846#file329846line234
 
  Why cannot you provide a method in UsageEventDao to search by template 
  id and event type? This way, you don't need to find a bigger set and filter 
  here by looping.

Not sure how much we can save here, even though we can add a filter for the 
event-type, a single crosszone template can have multiple usage-records for 
same event-type.
But yes, it will make the search results smaller.


- Saksham


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12968/#review24049
---


On July 27, 2013, 6:58 p.m., Saksham Srivastava wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/12968/
 ---
 
 (Updated July 27, 2013, 6:58 p.m.)
 
 
 Review request for cloudstack and Min Chen.
 
 
 Bugs: 3686
 
 
 Repository: cloudstack-git
 
 
 Description
 ---
 
 Registering a template does not generate a usage event.
 The process should generate a usage event when the template is 100% 
 downloaded.
 Added a new usage event that has virtual_size also as a parameter.
 
 
 Diffs
 -
 
   engine/schema/src/com/cloud/event/dao/UsageEventDao.java 01979e1 
   engine/schema/src/com/cloud/event/dao/UsageEventDaoImpl.java cda02ef 
   server/src/com/cloud/template/HypervisorTemplateAdapter.java 4b3cade 
 
 Diff: https://reviews.apache.org/r/12968/diff/
 
 
 Testing
 ---
 
 Now usage_event table is getting updated with the new usage_event.
 
  select * from usage_event where id = 23;
 ++-++-+-+-+---+-+-+--+---+---+--+
 | id | type| account_id | created | zone_id | 
 resource_id | resource_name | offering_id | template_id | size | 
 resource_type | processed | virtual_size |
 ++-++-+-+-+---+-+-+--+---+---+--+
 | 23 | TEMPLATE.CREATE |  2 | 2013-07-26 12:04:29 |   0 | 
 215 | r8|NULL |NULL | 1628 | NULL  |  
0 | 16777216 |
 ++-++-+-+-+---+-+-+--+---+---+--+
 
 
 Build

Re: Review Request 12968: CLOUDSTACK-3686: Registering a template does not generate a usage event.

2013-07-30 Thread Saksham Srivastava


 On July 28, 2013, 3:59 a.m., Min Chen wrote:
  server/src/com/cloud/template/HypervisorTemplateAdapter.java, line 249
  https://reviews.apache.org/r/12968/diff/2/?file=329846#file329846line249
 
  This is not right. For cross-zone template, in 
  HypervisorTemplateAdapter.create(TemplateProfile) method, you will see that 
  there is a for-loop to download the template to each image store for each 
  zone. For each image store, this createTemplateAsyncCallback will be 
  invoked. So in this callback, you should just generate usage event for this 
  zone.
 
 Saksham Srivastava wrote:
 The reason I do it is because, this part of code will be executed only 
 once even when template is cross zone.
 If I do not generate all the events here, only the first template that 
 got created will publish the usage event.
 Usage records do not have the information about store id, so we cannot be 
 sure if the usage_record for that store id is already created or not.
 
 It is too much of unnecessary hack to bypass the root issue, I am 
 discarding the whole patch and will wait for the root cause (2 async call 
 backs for a single register-template) to get fix.
 Then it won't be required to do this.
 
 Min Chen wrote:
 I disagree on this. Yes, Usage event will not have store id information, 
 but it has zone information. For zone-wide image store, your code of 
 searching for duplicate should use zone_id to filter as well.
 
 Min Chen wrote:
 I have fixed the issue of callback method invoked twice, and checked in a 
 fix for this bug, 20831d00fb56d0553860bcb5efe47ce45bd1e74c. So, we can close 
 this patch.

Discarding the patch as the root cause is reported to be fixed.


- Saksham


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12968/#review24049
---


On July 27, 2013, 6:58 p.m., Saksham Srivastava wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/12968/
 ---
 
 (Updated July 27, 2013, 6:58 p.m.)
 
 
 Review request for cloudstack and Min Chen.
 
 
 Bugs: 3686
 
 
 Repository: cloudstack-git
 
 
 Description
 ---
 
 Registering a template does not generate a usage event.
 The process should generate a usage event when the template is 100% 
 downloaded.
 Added a new usage event that has virtual_size also as a parameter.
 
 
 Diffs
 -
 
   engine/schema/src/com/cloud/event/dao/UsageEventDao.java 01979e1 
   engine/schema/src/com/cloud/event/dao/UsageEventDaoImpl.java cda02ef 
   server/src/com/cloud/template/HypervisorTemplateAdapter.java 4b3cade 
 
 Diff: https://reviews.apache.org/r/12968/diff/
 
 
 Testing
 ---
 
 Now usage_event table is getting updated with the new usage_event.
 
  select * from usage_event where id = 23;
 ++-++-+-+-+---+-+-+--+---+---+--+
 | id | type| account_id | created | zone_id | 
 resource_id | resource_name | offering_id | template_id | size | 
 resource_type | processed | virtual_size |
 ++-++-+-+-+---+-+-+--+---+---+--+
 | 23 | TEMPLATE.CREATE |  2 | 2013-07-26 12:04:29 |   0 | 
 215 | r8|NULL |NULL | 1628 | NULL  |  
0 | 16777216 |
 ++-++-+-+-+---+-+-+--+---+---+--+
 
 
 Build passed.
 Patch applies cleanly.
 
 
 Thanks,
 
 Saksham Srivastava
 




Review Request 13020: CLOUDSTACK-3252 An instance deployed using explicit or implicit dedication doesn't generate a usage even

2013-07-29 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/13020/
---

Review request for cloudstack, Devdeep Singh and Kishan Kavala.


Bugs: 3252


Repository: cloudstack-git


Description
---

If an instance is deployed using explicit or implicit dedication, or neither of 
them a usage event isn't generated. 
Added 2 new usage_events : 
EVENT_DEDICATED_VM_CREATE_IMPLICIT and EVENT_DEDICATED_VM_CREATE_EXPLICIT
generated when VMs are deployed using corresponding dedications.


Diffs
-

  api/src/com/cloud/event/EventTypes.java 6f1eed6 
  server/src/com/cloud/vm/UserVmManagerImpl.java 0ec296e 

Diff: https://reviews.apache.org/r/13020/diff/


Testing
---

usage_events table has now entries for new types:
select * from usage_event where type like VM%CREATE%
   id: 25
 type: VM.CREATE.IMPLICIT
   account_id: 2
  created: 2013-07-29 15:46:36
  zone_id: 1
  resource_id: 7
resource_name: c85cbc76-36fb-4fdc-97d6-8179f670cc54
  offering_id: 15
  template_id: 5
 size: NULL
resource_type: XenServer
processed: 0
 virtual_size: NULL


Build passed.
Patch applies cleanly.


Thanks,

Saksham Srivastava



Review Request 12993: CLOUDSTACK-3874: Adding method to cloud-early-config to allow updation of systemvms log rotation

2013-07-27 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12993/
---

Review request for cloudstack and Abhinandan Prateek.


Bugs: 3874


Repository: cloudstack-git


Description
---

log4j policies in systemvms must be updated to avoid getting full disk space 
used. 
cloud-early-config must replace log4j.xml with updated policies.


Diffs
-

  patches/systemvm/debian/config/etc/init.d/cloud-early-config 02af602 

Diff: https://reviews.apache.org/r/12993/diff/


Testing
---

Build is successful.
Patch applies cleanly.


Thanks,

Saksham Srivastava



Re: Review Request 12968: CLOUDSTACK-3686: Registering a template does not generate a usage event.

2013-07-27 Thread Saksham Srivastava


 On July 26, 2013, 5:38 p.m., Min Chen wrote:
  server/src/com/cloud/template/HypervisorTemplateAdapter.java, line 230
  https://reviews.apache.org/r/12968/diff/1/?file=328266#file328266line230
 
  I don't understand why you need to do a bunch of search here. This 
  method is invoked when a template is successfully downloaded to a secondary 
  storage, why cannot you just do a simple UsageEventUtils.publishUsageEvents 
  here just like _resourceLimitMgr.incrementResourceCount? template should 
  have all the information you need to publish a usage event.

Min,
I had to add these checks because the method was getting called twice for a 
single event of register template, due to which there were duplicate entries 
for usage event.
Until the method is guaranteed to be called once, duplicate entries would be 
made for a single usage record and also incrementResourceCount was getting 
executed twice and thus resulted in a faulty resource count.
So for usage-event I am trying to search the usage records and if an entry for 
template creation for the same template exists, refrain from creating a usage 
entry again.
Once the root issue is fixed, the changes won't be needed but until then, they 
are required.


- Saksham


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12968/#review23955
---


On July 26, 2013, 12:42 p.m., Saksham Srivastava wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/12968/
 ---
 
 (Updated July 26, 2013, 12:42 p.m.)
 
 
 Review request for cloudstack and Min Chen.
 
 
 Bugs: 3686
 
 
 Repository: cloudstack-git
 
 
 Description
 ---
 
 Registering a template does not generate a usage event.
 The process should generate a usage event when the template is 100% 
 downloaded.
 Added a new usage event that has virtual_size also as a parameter.
 
 
 Diffs
 -
 
   engine/schema/src/com/cloud/event/dao/UsageEventDao.java 01979e1 
   engine/schema/src/com/cloud/event/dao/UsageEventDaoImpl.java cda02ef 
   server/src/com/cloud/template/HypervisorTemplateAdapter.java 4b3cade 
 
 Diff: https://reviews.apache.org/r/12968/diff/
 
 
 Testing
 ---
 
 Now usage_event table is getting updated with the new usage_event.
 
  select * from usage_event where id = 23;
 ++-++-+-+-+---+-+-+--+---+---+--+
 | id | type| account_id | created | zone_id | 
 resource_id | resource_name | offering_id | template_id | size | 
 resource_type | processed | virtual_size |
 ++-++-+-+-+---+-+-+--+---+---+--+
 | 23 | TEMPLATE.CREATE |  2 | 2013-07-26 12:04:29 |   0 | 
 215 | r8|NULL |NULL | 1628 | NULL  |  
0 | 16777216 |
 ++-++-+-+-+---+-+-+--+---+---+--+
 
 
 Build passed.
 Patch applies cleanly.
 
 
 Thanks,
 
 Saksham Srivastava
 




Re: Review Request 12968: CLOUDSTACK-3686: Registering a template does not generate a usage event.

2013-07-27 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12968/#review24036
---



server/src/com/cloud/template/HypervisorTemplateAdapter.java
https://reviews.apache.org/r/12968/#comment47832

Min, I have created a new patch addressing all the concerns, also removed 
extra checks.


- Saksham Srivastava


On July 27, 2013, 6:58 p.m., Saksham Srivastava wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/12968/
 ---
 
 (Updated July 27, 2013, 6:58 p.m.)
 
 
 Review request for cloudstack and Min Chen.
 
 
 Bugs: 3686
 
 
 Repository: cloudstack-git
 
 
 Description
 ---
 
 Registering a template does not generate a usage event.
 The process should generate a usage event when the template is 100% 
 downloaded.
 Added a new usage event that has virtual_size also as a parameter.
 
 
 Diffs
 -
 
   engine/schema/src/com/cloud/event/dao/UsageEventDao.java 01979e1 
   engine/schema/src/com/cloud/event/dao/UsageEventDaoImpl.java cda02ef 
   server/src/com/cloud/template/HypervisorTemplateAdapter.java 4b3cade 
 
 Diff: https://reviews.apache.org/r/12968/diff/
 
 
 Testing
 ---
 
 Now usage_event table is getting updated with the new usage_event.
 
  select * from usage_event where id = 23;
 ++-++-+-+-+---+-+-+--+---+---+--+
 | id | type| account_id | created | zone_id | 
 resource_id | resource_name | offering_id | template_id | size | 
 resource_type | processed | virtual_size |
 ++-++-+-+-+---+-+-+--+---+---+--+
 | 23 | TEMPLATE.CREATE |  2 | 2013-07-26 12:04:29 |   0 | 
 215 | r8|NULL |NULL | 1628 | NULL  |  
0 | 16777216 |
 ++-++-+-+-+---+-+-+--+---+---+--+
 
 
 Build passed.
 Patch applies cleanly.
 
 
 Thanks,
 
 Saksham Srivastava
 




Re: Review Request 12968: CLOUDSTACK-3686: Registering a template does not generate a usage event.

2013-07-27 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12968/
---

(Updated July 27, 2013, 6:58 p.m.)


Review request for cloudstack and Min Chen.


Changes
---

Updated diff rebased against latest.


Bugs: 3686


Repository: cloudstack-git


Description
---

Registering a template does not generate a usage event.
The process should generate a usage event when the template is 100% downloaded.
Added a new usage event that has virtual_size also as a parameter.


Diffs (updated)
-

  engine/schema/src/com/cloud/event/dao/UsageEventDao.java 01979e1 
  engine/schema/src/com/cloud/event/dao/UsageEventDaoImpl.java cda02ef 
  server/src/com/cloud/template/HypervisorTemplateAdapter.java 4b3cade 

Diff: https://reviews.apache.org/r/12968/diff/


Testing
---

Now usage_event table is getting updated with the new usage_event.

 select * from usage_event where id = 23;
++-++-+-+-+---+-+-+--+---+---+--+
| id | type| account_id | created | zone_id | 
resource_id | resource_name | offering_id | template_id | size | 
resource_type | processed | virtual_size |
++-++-+-+-+---+-+-+--+---+---+--+
| 23 | TEMPLATE.CREATE |  2 | 2013-07-26 12:04:29 |   0 | 
215 | r8|NULL |NULL | 1628 | NULL  |
 0 | 16777216 |
++-++-+-+-+---+-+-+--+---+---+--+


Build passed.
Patch applies cleanly.


Thanks,

Saksham Srivastava



Review Request 12968: CLOUDSTACK-3686: Registering a template does not generate a usage event.

2013-07-26 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12968/
---

Review request for cloudstack and Min Chen.


Bugs: 3686


Repository: cloudstack-git


Description
---

Registering a template does not generate a usage event.
The process should generate a usage event when the template is 100% downloaded.
Added a new usage event that has virtual_size also as a parameter.


Diffs
-

  engine/schema/src/com/cloud/event/dao/UsageEventDao.java 01979e1 
  engine/schema/src/com/cloud/event/dao/UsageEventDaoImpl.java cda02ef 
  server/src/com/cloud/template/HypervisorTemplateAdapter.java 4b3cade 

Diff: https://reviews.apache.org/r/12968/diff/


Testing
---

Now usage_event table is getting updated with the new usage_event.

 select * from usage_event where id = 23;
++-++-+-+-+---+-+-+--+---+---+--+
| id | type| account_id | created | zone_id | 
resource_id | resource_name | offering_id | template_id | size | 
resource_type | processed | virtual_size |
++-++-+-+-+---+-+-+--+---+---+--+
| 23 | TEMPLATE.CREATE |  2 | 2013-07-26 12:04:29 |   0 | 
215 | r8|NULL |NULL | 1628 | NULL  |
 0 | 16777216 |
++-++-+-+-+---+-+-+--+---+---+--+


Build passed.
Patch applies cleanly.


Thanks,

Saksham Srivastava



Re: Review Request 12852: CLOUDSTACK-2508: Template usage should report both physical and virtual sizes

2013-07-24 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12852/
---

(Updated July 24, 2013, 6:30 a.m.)


Review request for cloudstack and Kishan Kavala.


Changes
---

Updated diff, resolving merge conflicts with latest.


Bugs: 2508


Repository: cloudstack-git


Description
---

Usage entries for template and iso should include virtual_size parameter.
Added new column to usage_event table which contains the virtual size.
Modified the usage event creation when a template is created.


Diffs (updated)
-

  api/src/org/apache/cloudstack/api/response/UsageRecordResponse.java 4b355cb 
  api/src/org/apache/cloudstack/usage/Usage.java c74d3b7 
  engine/schema/src/com/cloud/event/UsageEventVO.java c92972b 
  engine/schema/src/com/cloud/event/dao/UsageEventDaoImpl.java 004ab7c 
  engine/schema/src/com/cloud/usage/UsageStorageVO.java 1337edc 
  engine/schema/src/com/cloud/usage/UsageVO.java 18a3a6b 
  engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java 2237d56 
  engine/schema/src/com/cloud/usage/dao/UsageStorageDaoImpl.java 297c8f4 
  server/src/com/cloud/api/ApiResponseHelper.java e058105 
  server/src/com/cloud/event/UsageEventUtils.java 2d92fae 
  server/src/com/cloud/template/TemplateManagerImpl.java c87f8eb 
  usage/src/com/cloud/usage/UsageManagerImpl.java 4901dd9 
  usage/src/com/cloud/usage/parser/StorageUsageParser.java 337e8e2 

Diff: https://reviews.apache.org/r/12852/diff/


Testing
---

Usage event generated for creating template with virtual size.


Thanks,

Saksham Srivastava



RE: Git Push Summary

2013-07-24 Thread Saksham Srivastava
Not there in 4.2?

-Original Message-
From: Isaac Chiang [mailto:isaacchi...@gmail.com] 
Sent: Wednesday, July 24, 2013 3:12 PM
To: Pranav Saxena
Cc: dev@cloudstack.apache.org
Subject: Re: Git Push Summary

Hi all,
 I've been working on re-factoring the dedication UI code in these days 
and just finished.
I discussed the requirements with Pranav before. The changes are listed as
following:

1. zone wizard: (JIRA ticket :
https://issues.apache.org/jira/browse/CLOUDSTACK-3700)

Add a dedication step to activating zone process with rules as:
(A) if the user check the dedicate checkbox and provide correct 
account information, the wizard will have an extra dedicating step
  when activating the newly created zone(show in the activating 
steps).
(B) if the user check the dedicate checkbox and provide incorrect 
account information, the wizard will return to Setup Zone step. Let

  the user has the opportunity to modify the acc or uncheck the 
dedicate checkbox. It runs into two cases after the user click on fix
  error through the wizard:
  (a) If the user unchecks the dedicate checkbox this time, the 
wizard will continue to finish the rest of the activating process without
showing the dedicating step.
  (b) If the user provides the correct account this time, the 
wizard will process the dedicating step again(show in the wizard) and
finish the rest of activating process

2. Create pod/cluster/host from dialog: (JIRA ticket :
https://issues.apache.org/jira/browse/CLOUDSTACK-3388)
 Fix the dedication code to fit asynchronous dedication api commands.
The UI now shows correct notification message for the dedication operation.

Please let me know if you have any concerns, thanks! :)


Regards

Isaac









On Fri, Jul 19, 2013 at 10:04 AM, Isaac Chiang isaacchi...@gmail.comwrote:

 Hi Pranav,
 I'll do more tests before applying the code to master in next 
 few days. Since the UI code has been re-formatted yesterday, I'd like 
 to copy/paste the modified part into master instead of merging the branch.
 Thanks for all the help and advice :)

 Regards


 On Thu, Jul 18, 2013 at 2:47 PM, Pranav Saxena psb...@gmail.com wrote:

 Hey Isaac ,

 I verified your code changes in your private asf branch . The code 
 changes look good to me. I am assuming that it would work fine for 
 the following cases -
 1) Dedication is a success , addition of resource is a success
 2) Dedication is a failure , addition of resource is still a success
 3) Dedication is a failure , addition is also a failure

  - All 3 cases should have notification displayed for each of the API 
 calls getting triggered ( which I believe would be there after your 
 code
 changes)
  - Also you could provide a setInterval waiting time function of 
 say
 2-3 seconds between two successive notifications.

 One thing which I realized after looking at your code changes is that 
 you would have to bear the pain of resolving the merge conflicts when 
 you merge your branch with master. Since your code 
 modifications/additions have been done on the already existing code , 
 I am pretty sure you would have to take care of these conflicts. 
 Since the changes aren't that huge, you could manually copy them to 
 the master branch or replace the entire system.js file in your branch 
 in the master assuming you forked your branch out of master and there 
 haven't been other changes in system.js file . First option is a safer 
 approach though !!

 Thanks,
 Pranav


 On Thu, Jul 18, 2013 at 8:18 AM, Isaac Chiang isaacchi...@gmail.comwrote:

 Hi Pranav:
  I just pushed part of modified code in to the branch.
 Please have a look if the commit fix the issue as expected.

 Thanks,

 Regards


 -- Forwarded message --
 From: Pranav Saxena psb...@gmail.com
 Date: Tue, Jul 16, 2013 at 4:52 PM
 Subject: Re: Git Push Summary
 To: dev@cloudstack.apache.org, jessica.w...@citrix.com, 
 sonny.ch...@citrix.com
 Cc: comm...@cloudstack.apache.org


 Thanks Isaac for creating this branch. I'll keep an eye on the 
 commits you make your here . Once the code for handling nested query 
 API calls are ready , you can merge it into master.

 @Jessica - I have had conversations with Isaac and he is in the 
 process of re-factoring the code for dedicated resources to handle 
 the nested query API calls . You could review it once as well when 
 he sends out a request for merge . It should not be a big change 
 though !

 Thanks,
 Pranav


 On Tue, Jul 16, 2013 at 2:00 PM, isaacchi...@apache.org wrote:

  Updated Branches:
refs/heads/ui-dedicatedresources-refactoring [created] 22ddc3fa0
 






Re: Review Request 12811: CLOUDSTACK-3612: 3.0.6 to ASF 4.2 Upgrade: Database Schema Inconsistencies on the Upgraded Setup

2013-07-24 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12811/
---

(Updated July 24, 2013, 10:53 a.m.)


Review request for cloudstack, Alena Prokharchyk and Kishan Kavala.


Changes
---

Updated Patch for 4.2 branch.


Bugs: 3612


Repository: cloudstack-git


Description
---

This fix is a part of missing db_upgrade bug 3612.
Adding column virtual_size that will be a part of fix for CS-2508


Diffs (updated)
-

  setup/db/db/schema-410to420.sql f9417a0 

Diff: https://reviews.apache.org/r/12811/diff/


Testing
---


Thanks,

Saksham Srivastava



Review Request 12852: CLOUDSTACK-2508: Template usage should report both physical and virtual sizes

2013-07-23 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12852/
---

Review request for cloudstack and Kishan Kavala.


Bugs: 2508


Repository: cloudstack-git


Description
---

Usage entries for template and iso should include virtual_size parameter.
Added new column to usage_event table which contains the virtual size.
Modified the usage event creation when a template is created.


Diffs
-

  api/src/org/apache/cloudstack/api/response/UsageRecordResponse.java 4b355cb 
  api/src/org/apache/cloudstack/usage/Usage.java c74d3b7 
  engine/schema/src/com/cloud/event/UsageEventVO.java c92972b 
  engine/schema/src/com/cloud/event/dao/UsageEventDaoImpl.java 004ab7c 
  engine/schema/src/com/cloud/usage/UsageStorageVO.java 1337edc 
  engine/schema/src/com/cloud/usage/UsageVO.java 18a3a6b 
  engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java 2237d56 
  engine/schema/src/com/cloud/usage/dao/UsageStorageDaoImpl.java 297c8f4 
  server/src/com/cloud/api/ApiResponseHelper.java e058105 
  server/src/com/cloud/event/UsageEventUtils.java 2d92fae 
  server/src/com/cloud/template/TemplateManagerImpl.java 5005ee0 
  usage/src/com/cloud/usage/UsageManagerImpl.java 4901dd9 
  usage/src/com/cloud/usage/parser/StorageUsageParser.java 337e8e2 

Diff: https://reviews.apache.org/r/12852/diff/


Testing
---

Usage event generated for creating template with virtual size.


Thanks,

Saksham Srivastava



Re: Review Request 12720: CLOUDSTACK: 3382 Unable to Migrate VM's If the hosts are implicitly or explicitly dedicated.

2013-07-22 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12720/
---

(Updated July 22, 2013, 11:28 a.m.)


Review request for cloudstack and Devdeep Singh.


Bugs: 3382


Repository: cloudstack-git


Description
---

Allow root admin to migrate VMs across dedicated hosts.
Generate alerts for each migration performed between dedicated hosts.
Alerts are generated for VM migration between:
1) Source host is dedicated and destination host is not.
2) Source host is not dedicated and destination host is dedicated.
3) Both hosts are dedicated.
Alerts are now generated for both explicit and implicit dedication.


Diffs
-

  server/src/com/cloud/deploy/dao/PlannerHostReservationDao.java 69118f1 
  server/src/com/cloud/deploy/dao/PlannerHostReservationDaoImpl.java 41e0964 
  server/src/com/cloud/vm/UserVmManagerImpl.java 9968690 

Diff: https://reviews.apache.org/r/12720/diff/


Testing
---

Migrated VMs across explicitly dedicated hosts and alerts are generated.
Migrated VMs across implicitly dedicated hosts and alerts are generated.
 


Thanks,

Saksham Srivastava



Re: Review Request 12720: CLOUDSTACK: 3382 Unable to Migrate VM's If the hosts are implicitly or explicitly dedicated.

2013-07-22 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12720/
---

(Updated July 22, 2013, 11:28 a.m.)


Review request for cloudstack and Devdeep Singh.


Changes
---

Updated diff.


Bugs: 3382


Repository: cloudstack-git


Description
---

Allow root admin to migrate VMs across dedicated hosts.
Generate alerts for each migration performed between dedicated hosts.
Alerts are generated for VM migration between:
1) Source host is dedicated and destination host is not.
2) Source host is not dedicated and destination host is dedicated.
3) Both hosts are dedicated.
Alerts are now generated for both explicit and implicit dedication.


Diffs (updated)
-

  server/src/com/cloud/deploy/dao/PlannerHostReservationDao.java 69118f1 
  server/src/com/cloud/deploy/dao/PlannerHostReservationDaoImpl.java 41e0964 
  server/src/com/cloud/vm/UserVmManagerImpl.java 9968690 

Diff: https://reviews.apache.org/r/12720/diff/


Testing
---

Migrated VMs across explicitly dedicated hosts and alerts are generated.
Migrated VMs across implicitly dedicated hosts and alerts are generated.
 


Thanks,

Saksham Srivastava



Review Request 12811: CLOUDSTACK-3612: 3.0.6 to ASF 4.2 Upgrade: Database Schema Inconsistencies on the Upgraded Setup

2013-07-22 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12811/
---

Review request for cloudstack, Alena Prokharchyk and Kishan Kavala.


Bugs: 3612


Repository: cloudstack-git


Description
---

This fix is a part of missing db_upgrade bug 3612.
Adding column virtual_size that will be a part of fix for CS-2508


Diffs
-

  setup/db/db/schema-410to420.sql 05ff0da 

Diff: https://reviews.apache.org/r/12811/diff/


Testing
---


Thanks,

Saksham Srivastava



Re: Review Request 12720: CLOUDSTACK: 3382 Unable to Migrate VM's If the hosts are implicitly or explicitly dedicated.

2013-07-19 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12720/
---

(Updated July 19, 2013, 11:52 a.m.)


Review request for cloudstack and Devdeep Singh.


Changes
---

Updated diff.


Bugs: 3382


Repository: cloudstack-git


Description
---

Allow root admin to migrate VMs across dedicated hosts.
Generate alerts for each migration performed between dedicated hosts.
Alerts are generated for VM migration between:
1) Source host is dedicated and destination host is not.
2) Source host is not dedicated and destination host is dedicated.
3) Both hosts are dedicated.
Alerts are now generated for both explicit and implicit dedication.


Diffs (updated)
-

  server/src/com/cloud/deploy/dao/PlannerHostReservationDao.java 69118f1 
  server/src/com/cloud/deploy/dao/PlannerHostReservationDaoImpl.java 41e0964 
  server/src/com/cloud/vm/UserVmManagerImpl.java 9968690 

Diff: https://reviews.apache.org/r/12720/diff/


Testing
---

Migrated VMs across explicitly dedicated hosts and alerts are generated.
Migrated VMs across implicitly dedicated hosts and alerts are generated.
 


Thanks,

Saksham Srivastava



Re: Review Request 12720: CLOUDSTACK: 3382 Unable to Migrate VM's If the hosts are implicitly or explicitly dedicated.

2013-07-19 Thread Saksham Srivastava


 On July 18, 2013, 11:09 a.m., Prasanna Santhanam wrote:
  Do you think you can add a integration test to test_explicit_dedication.py 
  for this failure? That would be really useful to catch this part of tricky 
  code

Prasanna the changes I have made are specifically related to alert generation, 
the original functionality is kept unchanged.
Do you suggest to additional test that checks for alert generation ?


- Saksham


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12720/#review23372
---


On July 19, 2013, 11:52 a.m., Saksham Srivastava wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/12720/
 ---
 
 (Updated July 19, 2013, 11:52 a.m.)
 
 
 Review request for cloudstack and Devdeep Singh.
 
 
 Bugs: 3382
 
 
 Repository: cloudstack-git
 
 
 Description
 ---
 
 Allow root admin to migrate VMs across dedicated hosts.
 Generate alerts for each migration performed between dedicated hosts.
 Alerts are generated for VM migration between:
 1) Source host is dedicated and destination host is not.
 2) Source host is not dedicated and destination host is dedicated.
 3) Both hosts are dedicated.
 Alerts are now generated for both explicit and implicit dedication.
 
 
 Diffs
 -
 
   server/src/com/cloud/deploy/dao/PlannerHostReservationDao.java 69118f1 
   server/src/com/cloud/deploy/dao/PlannerHostReservationDaoImpl.java 41e0964 
   server/src/com/cloud/vm/UserVmManagerImpl.java 9968690 
 
 Diff: https://reviews.apache.org/r/12720/diff/
 
 
 Testing
 ---
 
 Migrated VMs across explicitly dedicated hosts and alerts are generated.
 Migrated VMs across implicitly dedicated hosts and alerts are generated.
  
 
 
 Thanks,
 
 Saksham Srivastava
 




Review Request 12720: CLOUDSTACK: 3382 Unable to Migrate VM's If the hosts are implicitly or explicitly dedicated.

2013-07-18 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12720/
---

Review request for cloudstack and Devdeep Singh.


Bugs: 3382


Repository: cloudstack-git


Description
---

Allow root admin to migrate VMs across dedicated hosts.
Generate alerts for each migration performed between dedicated hosts.
Alerts are generated for VM migration between:
1) Source host is dedicated and destination host is not.
2) Source host is not dedicated and destination host is dedicated.
3) Both hosts are dedicated.
Alerts are now generated for both explicit and implicit dedication.


Diffs
-

  server/src/com/cloud/deploy/dao/PlannerHostReservationDao.java 69118f1 
  server/src/com/cloud/deploy/dao/PlannerHostReservationDaoImpl.java 41e0964 
  server/src/com/cloud/vm/UserVmManagerImpl.java 9968690 

Diff: https://reviews.apache.org/r/12720/diff/


Testing
---

Migrated VMs across explicitly dedicated hosts and alerts are generated.
Migrated VMs across implicitly dedicated hosts and alerts are generated.
 


Thanks,

Saksham Srivastava



RE: Review Request 12510: CLOUDSTACK 3476 : deleteDomain api should fail when release dedicated resource to that domain fails:

2013-07-18 Thread Saksham Srivastava
The fix should qualify for 4.1.1

Thanks,
Saksham

-Original Message-
From: Musayev, Ilya [mailto:imusa...@webmd.net] 
Sent: Thursday, July 18, 2013 6:41 AM
To: dev@cloudstack.apache.org; Alena Prokharchyk; Devdeep Singh
Cc: Saksham Srivastava; cloudstack
Subject: RE: Review Request 12510: CLOUDSTACK 3476 : deleteDomain api should 
fail when release dedicated resource to that domain fails:

Does this fix qualify for 4.1.1?

 -Original Message-
 From: Alena Prokharchyk [mailto:nore...@reviews.apache.org] On Behalf 
 Of Alena Prokharchyk
 Sent: Wednesday, July 17, 2013 2:26 PM
 To: Devdeep Singh; Alena Prokharchyk
 Cc: Saksham Srivastava; cloudstack
 Subject: Re: Review Request 12510: CLOUDSTACK 3476 : deleteDomain api 
 should fail when release dedicated resource to that domain fails:
 
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/12510/#review23314
 ---
 
 Ship it!
 
 
 Ship It!
 
 - Alena Prokharchyk
 
 
 On July 13, 2013, 6 a.m., Saksham Srivastava wrote:
 
  ---
  This is an automatically generated e-mail. To reply, visit:
  https://reviews.apache.org/r/12510/
  ---
 
  (Updated July 13, 2013, 6 a.m.)
 
 
  Review request for cloudstack, Alena Prokharchyk and Devdeep Singh.
 
 
  Bugs: 3476
 
 
  Repository: cloudstack-git
 
 
  Description
  ---
 
  In case the release dedicate resource fails, deletion of domain 
  should not
 happen.
  Whenever deleting a domain all the resources dedicated to it must be
 released of dedication and moved to shared pool.
  Currently even if release API fails the deleteDomain API is executed
 successfully.
 
  Further if there are dedicated resources to a domiain and cleanup is 
  not
 true, resources should not be released.
  Added checks to prohibit this behaviour.
 
 
  Diffs
  -
 
server/src/com/cloud/user/DomainManagerImpl.java aad5787
 
  Diff: https://reviews.apache.org/r/12510/diff/
 
 
  Testing
  ---
 
  If domain has dedicated resources, cleanup=true will release 
  dedication
 and delete the domain.
  cleanup=false will not release dedication and will not delete the domain.
 
 
  Thanks,
 
  Saksham Srivastava
 
 



Review Request 12510: CLOUDSTACK 3476 : deleteDomain api should fail when release dedicated resource to that domain fails:

2013-07-12 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12510/
---

Review request for cloudstack, Alena Prokharchyk and Devdeep Singh.


Bugs: 3476


Repository: cloudstack-git


Description
---

In case the release dedicate resource fails, deletion of domain should not 
happen. 
Whenever deleting a domain all the resources dedicated to it must be released 
of dedication and moved to shared pool. 
Currently even if release API fails the deleteDomain API is executed 
successfully. 

Further if there are dedicated resources to a domiain and cleanup is not true, 
resources should not be released.
Added checks to prohibit this behaviour.


Diffs
-

  server/src/com/cloud/user/DomainManagerImpl.java aad5787 

Diff: https://reviews.apache.org/r/12510/diff/


Testing
---

If domain has dedicated resources, cleanup=true will release dedication and 
delete the domain.
cleanup=false will not release dedication and will not delete the domain.


Thanks,

Saksham Srivastava



Re: Review Request 12510: CLOUDSTACK 3476 : deleteDomain api should fail when release dedicated resource to that domain fails:

2013-07-12 Thread Saksham Srivastava


 On July 12, 2013, 5:08 p.m., Alena Prokharchyk wrote:
  1) Replace
  
  hasDedicatedResources == false
  
  with 
  
  !hasDedicatedResources
  
  
  and else if (hasDedicatedResources == true) {
  
  with 
  
  else if (hasDedicatedResources) {
  
  
  2) Add rollbackState=true to this statement:
  
  for (DedicatedResourceVO dr : dedicatedResources){
  if (!_dedicatedDao.remove(dr.getId())) {
  s_logger.warn(Fail to release 
  dedicated resources for domain  + domain.getId());
  insert here
  return false;
  }
  }

Alena for comment #2 :
rollBackState is not a local variable to this method(cleanupDomain)
Also this should not be required because if cleanupDomain fails (returns false) 
, rollBackState is always set to true in deleteDomain.


- Saksham


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12510/#review23089
---


On July 12, 2013, 2:01 p.m., Saksham Srivastava wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/12510/
 ---
 
 (Updated July 12, 2013, 2:01 p.m.)
 
 
 Review request for cloudstack, Alena Prokharchyk and Devdeep Singh.
 
 
 Bugs: 3476
 
 
 Repository: cloudstack-git
 
 
 Description
 ---
 
 In case the release dedicate resource fails, deletion of domain should not 
 happen. 
 Whenever deleting a domain all the resources dedicated to it must be released 
 of dedication and moved to shared pool. 
 Currently even if release API fails the deleteDomain API is executed 
 successfully. 
 
 Further if there are dedicated resources to a domiain and cleanup is not 
 true, resources should not be released.
 Added checks to prohibit this behaviour.
 
 
 Diffs
 -
 
   server/src/com/cloud/user/DomainManagerImpl.java aad5787 
 
 Diff: https://reviews.apache.org/r/12510/diff/
 
 
 Testing
 ---
 
 If domain has dedicated resources, cleanup=true will release dedication and 
 delete the domain.
 cleanup=false will not release dedication and will not delete the domain.
 
 
 Thanks,
 
 Saksham Srivastava
 




Review Request 12326: CLOUDSTACK-3094: Adding a shared network to already deployed VM is failing.

2013-07-08 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12326/
---

Review request for cloudstack and mice xia.


Bugs: 3094


Repository: cloudstack-git


Description
---

If a nic entry is present in the db, even if it is marked as removed, 
listDistinctHostnames returns the name of the corresponding vm.
This caused the addNic API to fail whenever a NIC entry was present in db even 
if it was removed.
Added checks that ensure to throw exception only if the vm with nondistict 
hostname has a NIC in the network.


Diffs
-

  engine/schema/src/com/cloud/vm/dao/VMInstanceDao.java 830e464 
  engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java ffb1a0b 
  server/src/com/cloud/vm/UserVmManagerImpl.java 5b2b283 

Diff: https://reviews.apache.org/r/12326/diff/


Testing
---

Created a shared network.
Added the NIC to a vm with error state, causing a NIC entry in db but removed 
as not null.
Added the same network again without error state, the network gets added.


Thanks,

Saksham Srivastava



Re: Review Request 11627: CLOUDSTACK-1012:Encrypt system.vm.password for 4.0 to 4.1 upgrades

2013-06-28 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11627/
---

(Updated June 28, 2013, 8:24 a.m.)


Review request for cloudstack and Kishan Kavala.


Bugs: CLOUDSTACK-1012


Repository: cloudstack-git


Description
---

Encrypt system.vm.password and make the configuration as Secure.


Diffs (updated)
-

  server/src/com/cloud/upgrade/dao/Upgrade410to411.java 5b25620 

Diff: https://reviews.apache.org/r/11627/diff/


Testing
---

Tested on local setup.
Build successful.


Thanks,

Saksham Srivastava



Re: Review Request: CLOUDSTACK-1012:Encrypt system.vm.password for 4.0 to 4.1 upgrades

2013-06-24 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11627/
---

(Updated June 24, 2013, 12:06 p.m.)


Review request for cloudstack and Kishan Kavala.


Changes
---

Changing the upgrade file.


Description
---

Encrypt system.vm.password and make the configuration as Secure.


This addresses bug CLOUDSTACK-1012.


Diffs (updated)
-

  server/src/com/cloud/upgrade/dao/Upgrade410to411.java 5b25620 

Diff: https://reviews.apache.org/r/11627/diff/


Testing
---

Tested on local setup.
Build successful.


Thanks,

Saksham Srivastava



Review Request: CLOUDSTACK-3064: Able to create VM from different account of the same domain without using Affinity group even the Zone is dedicated to an Account.

2013-06-21 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12028/
---

Review request for cloudstack and Devdeep Singh.


Description
---

When a zone is dedicated to an account, other accounts should not be able to 
deploy vms on that zone.
Also if no explicit dedication type affinity group is chosen, vm deployment 
from the same account should fail.


This addresses bug 3064.


Diffs
-

  server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java 4ef2152 

Diff: https://reviews.apache.org/r/12028/diff/


Testing
---

Tested dedicating zone, then deploying vms from other accounts, it fails now.
Also if no affinity group is chosen for the same account, vm deployment fails.


Thanks,

Saksham Srivastava



Re: Review Request: CLOUDSTACK-2167: The Vlan ranges displayed are not in ascending order.

2013-06-19 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11708/
---

(Updated June 19, 2013, 11:37 a.m.)


Review request for cloudstack and Devdeep Singh.


Changes
---

Updated diff with incorporated suggestions.


Description
---

When multiple vlan ranges are added to a physical networks the vlan ranges 
displayed in the output of the listPhysicalNetworks api displays the vlan range 
in the order the ranges were added,Instead if they are displayed in the 
ascending order range this would make it easy for the end user.


This addresses bug CLOUDSTACK-2167.


Diffs (updated)
-

  server/src/com/cloud/api/ApiResponseHelper.java 7ffa30f 

Diff: https://reviews.apache.org/r/11708/diff/


Testing
---

The response of list api is now enhanced:
listphysicalnetworksresponse cloud-stack-version=4.2.0-SNAPSHOT
count1/count
physicalnetwork
id49e5cdfc-2c14-415a-9dd3-38ac2fdeef54/id
namePhysical Network 1/name
broadcastdomainrangeZONE/broadcastdomainrange
zoneid0bd17058-2931-479b-98b5-29c8c91c24d3/zoneid
stateEnabled/state
vlan480-504;910-914;916-918;920-923;925-934;936-940/vlan
isolationmethodsVLAN/isolationmethods
/physicalnetwork
/listphysicalnetworksresponse
Build passes successfully.


Thanks,

Saksham Srivastava



Review Request: CLOUDSTACK-2167: The Vlan ranges displayed are not in ascending order.

2013-06-07 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11708/
---

Review request for cloudstack and Devdeep Singh.


Description
---

When multiple vlan ranges are added to a physical networks the vlan ranges 
displayed in the output of the listPhysicalNetworks api displays the vlan range 
in the order the ranges were added,Instead if they are displayed in the 
ascending order range this would make it easy for the end user.


This addresses bug CLOUDSTACK-2167.


Diffs
-

  server/src/com/cloud/api/ApiResponseHelper.java bcc1605 

Diff: https://reviews.apache.org/r/11708/diff/


Testing
---

The response of list api is now enhanced:
listphysicalnetworksresponse cloud-stack-version=4.2.0-SNAPSHOT
count1/count
physicalnetwork
id49e5cdfc-2c14-415a-9dd3-38ac2fdeef54/id
namePhysical Network 1/name
broadcastdomainrangeZONE/broadcastdomainrange
zoneid0bd17058-2931-479b-98b5-29c8c91c24d3/zoneid
stateEnabled/state
vlan480-504;910-914;916-918;920-923;925-934;936-940/vlan
isolationmethodsVLAN/isolationmethods
/physicalnetwork
/listphysicalnetworksresponse
Build passes successfully.


Thanks,

Saksham Srivastava



RE: Review Request: CLOUDSTACK-1012:Encrypt system.vm.password for 4.0 to 4.1 upgrades

2013-06-05 Thread Saksham Srivastava
In  4.1 during encryption the category was made 'Secure'.
So this will check if encryption is actually needed and will prevent encrypting 
twice. Unencrypted value will have category as 'Hidden'.
I will wait for 4.1.1 upgrade path and add the fix then.
 
Thanks,
Saksham

-Original Message-
From: Chip Childers [mailto:chip.child...@sungard.com] 
Sent: Wednesday, June 05, 2013 12:40 AM
To: dev@cloudstack.apache.org; Chiradeep Vittal
Cc: Kishan Kavala; Saksham Srivastava; cloudstack
Subject: Re: Review Request: CLOUDSTACK-1012:Encrypt system.vm.password for 4.0 
to 4.1 upgrades

Also, we already released 4.1.0.  If this is needed, how should it be correctly 
done for a 4.1.1 release?


On Tue, Jun 04, 2013 at 05:03:49PM +, Chiradeep Vittal wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/11627/#review21422
 ---
 
 
 
 engine/schema/src/com/cloud/upgrade/dao/Upgrade40to41.java
 https://reviews.apache.org/r/11627/#comment44357
 
 The logic is not clear. Can you add a few comments and logs as to WHY the 
 system vm password is being updated?
 
 
 - Chiradeep Vittal
 
 
 On June 4, 2013, 12:53 p.m., Saksham Srivastava wrote:
  
  ---
  This is an automatically generated e-mail. To reply, visit:
  https://reviews.apache.org/r/11627/
  ---
  
  (Updated June 4, 2013, 12:53 p.m.)
  
  
  Review request for cloudstack and Kishan Kavala.
  
  
  Description
  ---
  
  Encrypt system.vm.password and make the configuration as Secure.
  
  
  This addresses bug CLOUDSTACK-1012.
  
  
  Diffs
  -
  
engine/schema/src/com/cloud/upgrade/dao/Upgrade40to41.java 9e386b9
  
  Diff: https://reviews.apache.org/r/11627/diff/
  
  
  Testing
  ---
  
  Tested on local setup.
  Build successful.
  
  
  Thanks,
  
  Saksham Srivastava
  
 
 


Re: Review Request: CLOUDSTACK-1647: IP Reservation should not happen if the guest-vm cidr and network cidr is not same but their start ip and end ip are same.

2013-06-05 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10005/
---

(Updated June 5, 2013, 11:39 a.m.)


Review request for cloudstack, Murali Reddy and Sateesh Chodapuneedi.


Changes
---

Resolving merge conflicts with latest master.


Description
---

In cases where the start ip and end ip of guest vm cidr and network cidr are 
same, even when the cidrs appear to be different,the reservation procedure 
should not go through and user should get a message mentioning that.
Added extra check for the same with proper alert message.


This addresses bug CLOUDSTACK-1647.


Diffs (updated)
-

  server/src/com/cloud/network/NetworkServiceImpl.java 2bf9f40 
  utils/src/com/cloud/utils/net/NetUtils.java 8c094c8 
  utils/test/com/cloud/utils/net/NetUtilsTest.java 16d3402 

Diff: https://reviews.apache.org/r/10005/diff/


Testing (updated)
---

CIDR : 10.0.144.0/20, Network CIDR : null, guestVmCidr : 10.0.151.0/20 = 
Reservation is not applied.
CIDR : 10.0.144.0/21, Network CIDR : 10.0.144.0/20, guestVmCidr : 10.0.151.0/20 
= Existing Reservation is not affected.
Added UnitTest testIsSameIpRange()


Thanks,

Saksham Srivastava



Review Request: CLOUDSTACK-2130:UpdateDefaultNicForVirtualMachine api should also create usage events for updating new default network

2013-05-29 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11511/
---

Review request for cloudstack and mice xia.


Description
---

The resource_name in usage_event table must refer to the NIC ID.
Updated the Events with old NIC Id.


This addresses bug CLOUDSTACK-2130.


Diffs
-

  server/src/com/cloud/vm/UserVmManagerImpl.java 5657877 

Diff: https://reviews.apache.org/r/11511/diff/


Testing
---

Manually tested.
Changed default NIC from id = 8 to 12.

select * from usage_event;

| 25 | NETWORK.OFFERING.REMOVE |  2 | 2013-05-29 12:31:58 |   1 |   
3 | 8  |   8 |NULL |   1 | NULL 
  | 0 |
| 26 | NETWORK.OFFERING.ASSIGN |  2 | 2013-05-29 12:31:58 |   1 |   
3 | 12 |   8 |NULL |   1 | NULL 
  | 0 |
| 27 | NETWORK.OFFERING.REMOVE |  2 | 2013-05-29 12:31:58 |   1 |   
3 | 12 |   8 |NULL |   0 | NULL 
  | 0 |
| 28 | NETWORK.OFFERING.ASSIGN |  2 | 2013-05-29 12:31:58 |   1 |   
3 | 8  |   8 |NULL |   0 | NULL 
  | 0 |


Thanks,

Saksham Srivastava



Re: Review Request: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host.

2013-05-28 Thread Saksham Srivastava
/api/commands/ListDedicatedClustersCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedHostsCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedPodsCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedZonesCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedClusterCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedHostCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedPodCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedZoneCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateClusterResponse.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateHostResponse.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicatePodResponse.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateZoneResponse.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/manager/DedicatedResourceManagerImpl.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/services/DedicatedService.java
 PRE-CREATION 
  
plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/manager/DedicatedApiUnitTest.java
 PRE-CREATION 
  plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
  plugins/pom.xml 2efa248 
  server/src/com/cloud/api/query/QueryManagerImpl.java c586a7b 
  server/src/com/cloud/configuration/ConfigurationManagerImpl.java 214e292 
  server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
  server/src/com/cloud/resource/ResourceManagerImpl.java 25f451e 
  server/src/com/cloud/user/AccountManagerImpl.java e72005e 
  server/src/com/cloud/user/DomainManagerImpl.java c451041 
  server/src/com/cloud/vm/UserVmManagerImpl.java 96b9529 
  server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java 
f862a2a 
  setup/db/create-schema.sql b1feb02 
  setup/db/db/schema-410to420.sql 348523f 
  test/integration/component/test_explicit_dedication.py PRE-CREATION 
  tools/apidoc/gen_toc.py 793f720 

Diff: https://reviews.apache.org/r/11379/diff/


Testing
---

Unittest: For the new APIs and Service, added unit tests under : 
plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is 
deployed on the dedicated host.
Rat Build Successful.


Thanks,

Saksham Srivastava



Re: Review Request: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host.

2013-05-27 Thread Saksham Srivastava
/cloudstack/dedicated/api/commands/DedicatePodCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/DedicateZoneCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedClustersCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedHostsCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedPodsCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedZonesCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedClusterCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedHostCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedPodCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedZoneCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateClusterResponse.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateHostResponse.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicatePodResponse.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateZoneResponse.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/manager/DedicatedResourceManagerImpl.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/services/DedicatedService.java
 PRE-CREATION 
  
plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/manager/DedicatedApiUnitTest.java
 PRE-CREATION 
  plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
  plugins/pom.xml 2efa248 
  server/src/com/cloud/api/query/QueryManagerImpl.java c586a7b 
  server/src/com/cloud/configuration/ConfigurationManagerImpl.java 214e292 
  server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
  server/src/com/cloud/resource/ResourceManagerImpl.java 25f451e 
  server/src/com/cloud/user/AccountManagerImpl.java 7421422 
  server/src/com/cloud/user/DomainManagerImpl.java c451041 
  server/src/com/cloud/vm/UserVmManagerImpl.java 96b9529 
  server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java 
f862a2a 
  setup/db/create-schema.sql b1feb02 
  setup/db/db/schema-410to420.sql 435bb83 
  test/integration/component/test_explicit_dedication.py PRE-CREATION 
  tools/apidoc/gen_toc.py 793f720 

Diff: https://reviews.apache.org/r/11379/diff/


Testing
---

Unittest: For the new APIs and Service, added unit tests under : 
plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is 
deployed on the dedicated host.
Rat Build Successful.


Thanks,

Saksham Srivastava



Re: Review Request: Patch 2: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host

2013-05-27 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11380/
---

(Updated May 28, 2013, 1:47 a.m.)


Review request for cloudstack, Devdeep Singh and Prachi Damle.


Description
---

Patch 2 for https://reviews.apache.org/r/11379/
Created for files 
server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java, 
server/test/com/cloud/vm/DeploymentPlanningManagerImplTest.java, 
server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java


This addresses bug CLOUDSTACK-681.


Diffs (updated)
-

  server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java 795b526 
  server/test/com/cloud/vm/DeploymentPlanningManagerImplTest.java e3b7d31 
  server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java 484b044 

Diff: https://reviews.apache.org/r/11380/diff/


Testing
---

Unittest: For the new APIs and Service, added unit tests under : 
plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is 
deployed on the dedicated host.
Rat Build Successful.


Thanks,

Saksham Srivastava



Review Request: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host.

2013-05-24 Thread Saksham Srivastava
/dedicated/api/commands/ListDedicatedHostsCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedPodsCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedZonesCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedClusterCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedHostCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedPodCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedZoneCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateClusterResponse.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateHostResponse.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicatePodResponse.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateZoneResponse.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/manager/DedicatedResourceManagerImpl.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/services/DedicatedService.java
 PRE-CREATION 
  
plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/manager/DedicatedApiUnitTest.java
 PRE-CREATION 
  plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
  plugins/pom.xml 2efa248 
  server/src/com/cloud/api/query/QueryManagerImpl.java c586a7b 
  server/src/com/cloud/configuration/ConfigurationManagerImpl.java 214e292 
  server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
  server/src/com/cloud/resource/ResourceManagerImpl.java 25f451e 
  server/src/com/cloud/user/AccountManagerImpl.java 7421422 
  server/src/com/cloud/user/DomainManagerImpl.java c451041 
  server/src/com/cloud/vm/UserVmManagerImpl.java 96b9529 
  server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java 
f862a2a 
  setup/db/create-schema.sql b1feb02 
  setup/db/db/schema-410to420.sql 435bb83 
  test/integration/component/test_explicit_dedication.py PRE-CREATION 
  tools/apidoc/gen_toc.py 793f720 

Diff: https://reviews.apache.org/r/11379/diff/


Testing
---

Unittest: For the new APIs and Service, added unit tests under : 
plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is 
deployed on the dedicated host.
Rat Build Successful.


Thanks,

Saksham Srivastava



Review Request: Patch 2: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host

2013-05-24 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11380/
---

Review request for cloudstack, Devdeep Singh and Prachi Damle.


Description
---

Patch 2 for https://reviews.apache.org/r/11379/
Created for files 
server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java, 
server/test/com/cloud/vm/DeploymentPlanningManagerImplTest.java, 
server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java


This addresses bug CLOUDSTACK-681.


Diffs
-

  server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java 795b526 
  server/test/com/cloud/vm/DeploymentPlanningManagerImplTest.java e3b7d31 
  server/test/org/apache/cloudstack/affinity/AffinityApiUnitTest.java 484b044 

Diff: https://reviews.apache.org/r/11380/diff/


Testing
---

Unittest: For the new APIs and Service, added unit tests under : 
plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is 
deployed on the dedicated host.
Rat Build Successful.


Thanks,

Saksham Srivastava



Re: Review Request: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host.

2013-05-24 Thread Saksham Srivastava
/ListDedicatedClustersCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedHostsCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedPodsCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ListDedicatedZonesCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedClusterCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedHostCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedPodCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedZoneCmd.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateClusterResponse.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateHostResponse.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicatePodResponse.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/response/DedicateZoneResponse.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/manager/DedicatedResourceManagerImpl.java
 PRE-CREATION 
  
plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/services/DedicatedService.java
 PRE-CREATION 
  
plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/manager/DedicatedApiUnitTest.java
 PRE-CREATION 
  plugins/dedicated-resources/test/resource/dedicatedContext.xml PRE-CREATION 
  plugins/pom.xml 2efa248 
  server/src/com/cloud/api/query/QueryManagerImpl.java c586a7b 
  server/src/com/cloud/configuration/ConfigurationManagerImpl.java 214e292 
  server/src/com/cloud/dc/DedicatedResourceVO.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDao.java PRE-CREATION 
  server/src/com/cloud/dc/dao/DedicatedResourceDaoImpl.java PRE-CREATION 
  server/src/com/cloud/resource/ResourceManagerImpl.java 25f451e 
  server/src/com/cloud/user/AccountManagerImpl.java 7421422 
  server/src/com/cloud/user/DomainManagerImpl.java c451041 
  server/src/com/cloud/vm/UserVmManagerImpl.java 96b9529 
  server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java 
f862a2a 
  setup/db/create-schema.sql b1feb02 
  setup/db/db/schema-410to420.sql 435bb83 
  test/integration/component/test_explicit_dedication.py PRE-CREATION 
  tools/apidoc/gen_toc.py 793f720 

Diff: https://reviews.apache.org/r/11379/diff/


Testing
---

Unittest: For the new APIs and Service, added unit tests under : 
plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
Marvin Test: To dedicate host, create affinity group, deploy-vm, check if vm is 
deployed on the dedicated host.
Rat Build Successful.


Thanks,

Saksham Srivastava



Re: Review Request: CLOUDSTACK-681: Dedicated Resources - Explicit Dedication, Private zone, pod, cluster or host.

2013-05-24 Thread Saksham Srivastava


 On May 24, 2013, 4:31 p.m., Rajesh Battala wrote:
  engine/schema/src/com/cloud/host/dao/HostDaoImpl.java, line 223
  https://reviews.apache.org/r/11379/diff/1/?file=296552#file296552line223
 
  current code is searching with pod and it is replacing with podId 
  make sure this won't break other calls.

It should not break because the search builder is used from findByPodId and 
expects podId.


 On May 24, 2013, 4:31 p.m., Rajesh Battala wrote:
  plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/api/commands/ReleaseDedicatedPodCmd.java,
   line 35
  https://reviews.apache.org/r/11379/diff/1/?file=296566#file296566line35
 
  Api Command Description is not proper. have the description to be 
  specific not generic (release the dedication)

Fixed for all resources.


- Saksham


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11379/#review21000
---


On May 24, 2013, 7:30 p.m., Saksham Srivastava wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/11379/
 ---
 
 (Updated May 24, 2013, 7:30 p.m.)
 
 
 Review request for cloudstack, Devdeep Singh and Prachi Damle.
 
 
 Description
 ---
 
 Review Request for Dedicated Resources: Explicit Dedication
 =
 
 Functional Spec for the above Private zone, pod, cluster or host, can be 
 found here: 
 https://cwiki.apache.org/CLOUDSTACK/dedicated-resources-private-zone-pod-cluster-host-functional-spec.html
 This patch request is a part of this feature.
 
 This feature allows a user to deploy VMs only in the resources dedicated to 
 his account or domain.
 
 1. Resources(Zones, Pods, Clusters or hosts) can be dedicated to an account 
 or domain.
Implemented 12 new APIs to dedicate/list/release resources:
- dedicateZone, listDedicatedZones, releaseDedicatedZone for a Zone.
- dedicatePod, listDedicatedPods, releaseDedicatedPod for a Pod.
- dedicateCluster, listDedicatedClusters, releaseDedicatedCluster for a 
 Cluster
- dedicateHost, listDedicatedHosts, releaseDedicatedHost for a Host.
 2. Once a resource(eg. pod) is dedicated to an account, other resources(eg. 
 clusters/hosts) inside that cannot be further dedicated.
 3. Once a resource is dedicated to a domain, other resources inside that can 
 be further dedicated to its sub-domain or account.
 4. If any resource (eg.cluster) is dedicated to a account/domain, then 
 resources(eg. Pod) above that cannot be dedicated to different 
 accounts/domain (not belonging to the same domain) 
 5. To use Explicit dedication, user needs to create an Affinity Group of type 
 'ExplicitDedication'
 6. A VM can be deployed with the above affinity group parameter as an input.
 7. A new ExplicitDedicationProcessor has been added which will process the 
 affinity group of type 'Explicit Dedication' for a deployment of a VM that 
 demands dedicated resources.
This processor implements the AffinityGroupProcessor adapter. This 
 processor will update the avoid list.
 8. A VM requesting dedication will be deployed on dedicatd resources if 
 available with the user account.
 9. A VM requesting dedication can also be deployed on the dedicated resources 
 available with the parent domains iff no dedicated resources are available 
 with the current user's account or 
domain. 
 10. A VM (without dedication) can be deployed on shared host but not on 
 dedicated hosts.
 11. To modify the dedication, the resource has to be released first.
 12. Existing Private zone functionality has been redirected to Explicit 
 dedication of zones.
 13. Updated the db upgrade schema script. A new table dedicated_resources 
 has been added.
 14. Added the right permissions in commands.properties
 15. Unit tests:  For the new APIs and Service, added unit tests under : 
 plugins/dedicated-resources/test/org/apache/cloudstack/dedicated/DedicatedApiUnitTest.java
 16. Marvin Test: To dedicate host, create affinity group, deploy-vm, check if 
 vm is deployed on the dedicated host.
 
 Created 2 patches for the bug:
 Patch 2 is for files that are modifying the files that have windows line 
 endings. git am will not work for such files in a single patch.
 
 
 This addresses bug CLOUDSTACK-681.
 
 
 Diffs
 -
 
   api/src/com/cloud/dc/DedicatedResources.java PRE-CREATION 
   api/src/com/cloud/event/EventTypes.java da96294 
   client/pom.xml 0c38ecb 
   client/tomcatconf/applicationContext.xml.in edf83a9 
   client/tomcatconf/commands.properties.in fd5479f 
   client/tomcatconf/componentContext.xml.in e946f44 
   
 engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java
  963e4d7 
   engine/schema/src/com

Re: [ANNOUNCE] New committer: Venkata Swamy

2013-05-23 Thread Saksham Srivastava
Congrats Swamy.

On Friday 24 May 2013 02:51 AM, Chip Childers wrote:
 The Project Management Committee (PMC) for Apache CloudStack
 has asked Venkata Swamy 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 Venkata!

 -chip
 on behalf of the CloudStack PMC


Review Request: CLOUDSTACK-2130: UpdateDefaultNicForVirtualMachine api should also create usage events for updating new default network

2013-05-14 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11156/
---

Review request for cloudstack and mice xia.


Description
---

When we call UpdateDefaultNicForVirtualMachine we should call appropriate usage 
events as well for updating information related to default nic for proper usage 
calculation.
Added 4 usage events : 2 for network.offerings.remove and 2 for 
network.offerings.assign
Events are :  network.offerings.assign for new nic to be made default, 
network.offerings.remove for removal of non-default
network.offerings.assign for old default nic to be made non default and 
network.offerings.remove for removal of default.


This addresses bug 2130.


Diffs
-

  server/src/com/cloud/vm/UserVmManagerImpl.java 0f6adc0 

Diff: https://reviews.apache.org/r/11156/diff/


Testing
---

Tested manually.
Rat build passed.
Rebased to latest master.


Thanks,

Saksham Srivastava



Template not getting downloaded on latest master

2013-05-10 Thread Saksham Srivastava
Hi,

I did a fresh setup of CloudStack master,
Both the system vms are running fine and the secondary storage is also 
shown enabled.
But the built-in template is not getting downloaded.
ISO Registration happens but the ISO download is not initiated.

I keep on getting this message in the logs:

2013-05-10 19:12:20,380 DEBUG [cloud.server.StatsCollector] 
(StatsCollector-2:null) There is no secondary storage VM for secondary 
storage host nfs://10.102.192.100/cpg_vol/saksham/secondaryapachemay

Has anyone else seen this issue?

I am using VMWare ESX as my host and  systemvmtemplate-4.2.ova as my 
system-vm template.

Thanks,
Saksham

RE: Template not getting downloaded on latest master

2013-05-10 Thread Saksham Srivastava
Kishan, the logs do not show any error related to permission. It does not 
appear to be related to 2064.
The only message in the logs is There is no secondary storage VM for secondary
storage host

Seems like Water Duan has raised a similar issue on dev-list.

Thanks,
Saksham

From: Kishan Kavala [kishan.kav...@citrix.com]
Sent: Friday, May 10, 2013 8:31 PM
To: dev@cloudstack.apache.org
Cc: dev@cloudstack.apache.org
Subject: Re: Template not getting downloaded on latest master

Saksham,
 Can you check the logs for file permission related errors? It could be related 
to CLOUDSTACK-2064

On 10-May-2013, at 7:20 PM, Saksham Srivastava 
saksham.srivast...@citrix.com wrote:

 Hi,

 I did a fresh setup of CloudStack master,
 Both the system vms are running fine and the secondary storage is also
 shown enabled.
 But the built-in template is not getting downloaded.
 ISO Registration happens but the ISO download is not initiated.

 I keep on getting this message in the logs:

 2013-05-10 19:12:20,380 DEBUG [cloud.server.StatsCollector]
 (StatsCollector-2:null) There is no secondary storage VM for secondary
 storage host nfs://10.102.192.100/cpg_vol/saksham/secondaryapachemay

 Has anyone else seen this issue?

 I am using VMWare ESX as my host and  systemvmtemplate-4.2.ova as my
 system-vm template.

 Thanks,
 Saksham


Fix for CLOUDSTACK-2277

2013-05-09 Thread Saksham Srivastava
Hi Mice ,

I just saw your commit for 
https://issues.apache.org/jira/browse/CLOUDSTACK-2277
So  I recently picked this bug, marked it  as in progress as I was 
working on it and was about to submit the patch for the same, but then I 
saw that you already fixed it :)

A quick comment :
The fix makes sure that if vm-tools are not running on the vm, 
add/remove nic fails.
What I have observed is that if vm-tools are not running, a reboot of 
the vm will actually show up the added NIC. IMO we should allow the api 
to pass, but provide a log message that reboot of vm will be required 
for added NIC to show up, rather than completely failing the api.

Your thoughts ?

Thanks,
Saksham

RE: Review Request: CLOUDSTACK-1748: IP Reservation results in reserving the broadcast IP of the network as well

2013-05-02 Thread Saksham Srivastava
Sateesh,

I have implemented the same calculator that is used here :  
http://jodies.de/ipcalc?host=10.1.1.0mask1=26mask2=
The BroadCast IP is 10.1.1.63. Since we are not creating subnets at all for 
guest vms, this broadcast IP is actually to be used for reservation.
There is common broadcast IP (10.1.1.255) for the entire network.

Am I missing something?

Regards,
Saksham

From: Sateesh Chodapuneedi
Sent: Thursday, May 02, 2013 3:55 PM
To: Saksham Srivastava; Murali Reddy
Cc: cloudstack
Subject: RE: Review Request: CLOUDSTACK-1748: IP Reservation results in 
reserving the broadcast IP of the network as well

Saksham,


 Since broadcast is an assignable IP so it should be a part of Reserved range. 
 Closing the request.
Currently last IP of guest ip range is being included in reserved range.
This needs to be fixed.
User is providing CIDR to specify ip range, then we should ensure all IPs that 
come under that CIDR needs to be considered for guests.
Hence CIDR 10.1.1.0/26 means reservation would be 10.1.1.64 to 10.1.1.254 
instead of 10.1.1.63-10.1.1.254 as per current behaviour.
Please fix this and resubmit the patch.

Regards,
Sateesh

From: Saksham Srivastava [mailto:nore...@reviews.apache.org] On Behalf Of 
Saksham Srivastava
Sent: 30 April 2013 14:10
To: Sateesh Chodapuneedi; Murali Reddy
Cc: Saksham Srivastava; cloudstack
Subject: Re: Review Request: CLOUDSTACK-1748: IP Reservation results in 
reserving the broadcast IP of the network as well

This is an automatically generated e-mail. To reply, visit: 
https://reviews.apache.org/r/10078/




Since we are not creating subnets for guest CIDR, there is no need for a 
separate broadcast IP.

The guest Broadcast will be same as the Network Broadcast.



Currently this is the behaviour :



CIDR 10.1.1.0/26

Network CIDR 10.1.1.0/24

Reserved Range : 10.1.1.63-10.1.1.254



CIDR 10.1.1.224/27

Network CIDR 10.1.1.0/24

Reserved Range : 10.1.1.1-10.1.1.224



CIDR 10.1.1.32/27

Network CIDR 10.1.1.0/24

Reserved Range : 10.1.1.1-10.1.1.32 , 10.1.1.63-10.1.1.254



Since broadcast is an assignable IP so it should be a part of Reserved range. 
Closing the request.


- Saksham


On March 22nd, 2013, 10:04 a.m., Saksham Srivastava wrote:
Review request for cloudstack, Murali Reddy and Sateesh Chodapuneedi.
By Saksham Srivastava.

Updated March 22, 2013, 10:04 a.m.

Description

While reserving IPs, broadcast IPs of guestvmcidr is also getting reserved.


Testing

CIDR : 10.1.1.0/26 (10.1.1.1-10.1.1.62, Broadcast: 10.1.1.63)

Network CIDR: 10.1.1.0/24 (10.1.1.1-10.1.1.254, Broadcast: 10.1.1.255)

Reserved Range: 10.1.1.64-10.1.1.254


Diffs

  *   server/src/com/cloud/api/ApiResponseHelper.java (663139d)

View Diffhttps://reviews.apache.org/r/10078/diff/




Re: Review Request: CLOUDSTACK-1748: IP Reservation results in reserving the broadcast IP of the network as well

2013-04-30 Thread Saksham Srivastava


 On April 18, 2013, 5:18 p.m., Sateesh Chodapuneedi wrote:
 

Since we are not creating subnets for guest CIDR, there is no need for a 
separate broadcast IP.
The guest Broadcast will be same as the Network Broadcast.

Currently this is the behaviour :

CIDR 10.1.1.0/26
Network CIDR 10.1.1.0/24
Reserved Range : 10.1.1.63-10.1.1.254

CIDR 10.1.1.224/27
Network CIDR 10.1.1.0/24
Reserved Range : 10.1.1.1-10.1.1.224

CIDR 10.1.1.32/27
Network CIDR 10.1.1.0/24
Reserved Range : 10.1.1.1-10.1.1.32 , 10.1.1.63-10.1.1.254

Since broadcast is an assignable IP so it should be a part of Reserved range. 
Closing the request.


- Saksham


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10078/#review19395
---


On March 22, 2013, 10:04 a.m., Saksham Srivastava wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/10078/
 ---
 
 (Updated March 22, 2013, 10:04 a.m.)
 
 
 Review request for cloudstack, Murali Reddy and Sateesh Chodapuneedi.
 
 
 Description
 ---
 
 While reserving IPs, broadcast IPs of guestvmcidr is also getting reserved.
 
 
 Diffs
 -
 
   server/src/com/cloud/api/ApiResponseHelper.java 663139d 
 
 Diff: https://reviews.apache.org/r/10078/diff/
 
 
 Testing
 ---
 
 CIDR : 10.1.1.0/26 (10.1.1.1-10.1.1.62, Broadcast: 10.1.1.63)
 Network CIDR: 10.1.1.0/24 (10.1.1.1-10.1.1.254, Broadcast: 10.1.1.255)
 Reserved Range: 10.1.1.64-10.1.1.254
 
 
 Thanks,
 
 Saksham Srivastava
 




Re: Review Request: CLOUDSTACK-1647: IP Reservation should not happen if the guest-vm cidr and network cidr is not same but their start ip and end ip are same.

2013-04-23 Thread Saksham Srivastava

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10005/
---

(Updated April 23, 2013, 11:17 a.m.)


Review request for cloudstack, Murali Reddy and Sateesh Chodapuneedi.


Description
---

In cases where the start ip and end ip of guest vm cidr and network cidr are 
same, even when the cidrs appear to be different,the reservation procedure 
should not go through and user should get a message mentioning that.
Added extra check for the same with proper alert message.


This addresses bug CLOUDSTACK-1647.


Diffs (updated)
-

  server/src/com/cloud/network/NetworkServiceImpl.java ac2ac45 
  utils/src/com/cloud/utils/net/NetUtils.java 5988dd5 
  utils/test/com/cloud/utils/net/NetUtilsTest.java 28bd71f 

Diff: https://reviews.apache.org/r/10005/diff/


Testing
---

CIDR : 10.0.144.0/20, Network CIDR : null, guestVmCidr : 10.0.151.0/20 = 
Reservation is not applied.
CIDR : 10.0.144.0/21, Network CIDR : 10.0.144.0/20, guestVmCidr : 10.0.151.0/20 
= Existing Reservation is not affected.


Thanks,

Saksham Srivastava



Re: Review Request: CLOUDSTACK-1647: IP Reservation should not happen if the guest-vm cidr and network cidr is not same but their start ip and end ip are same.

2013-04-19 Thread Saksham Srivastava


 On April 18, 2013, 5:21 p.m., Sateesh Chodapuneedi wrote:
  server/src/com/cloud/network/NetworkServiceImpl.java, line 1888
  https://reviews.apache.org/r/10005/diff/1/?file=271870#file271870line1888
 
  This code seems dueplicated because the logic to calculate reserved ip 
  range can be used to check if there exists some ip range to be reserved or 
  not. If the calculated range is empty then do not attempt to reserve. Code 
  to prepare response object already had this logic. May be we have to move 
  this to NetUtils and call that from both places.

Thanks for the comment.

I have added the logic to NetUtils.java to maker it more generic and usable.
However the response method does not need to call this boolean function, so 
making changes only in API checks.


- Saksham


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10005/#review19396
---


On April 19, 2013, 9:45 a.m., Saksham Srivastava wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/10005/
 ---
 
 (Updated April 19, 2013, 9:45 a.m.)
 
 
 Review request for cloudstack, Murali Reddy and Sateesh Chodapuneedi.
 
 
 Description
 ---
 
 In cases where the start ip and end ip of guest vm cidr and network cidr are 
 same, even when the cidrs appear to be different,the reservation procedure 
 should not go through and user should get a message mentioning that.
 Added extra check for the same with proper alert message.
 
 
 This addresses bug CLOUDSTACK-1647.
 
 
 Diffs
 -
 
   server/src/com/cloud/network/NetworkServiceImpl.java 878d2a8 
   utils/src/com/cloud/utils/net/NetUtils.java 5988dd5 
 
 Diff: https://reviews.apache.org/r/10005/diff/
 
 
 Testing
 ---
 
 CIDR : 10.0.144.0/20, Network CIDR : null, guestVmCidr : 10.0.151.0/20 = 
 Reservation is not applied.
 CIDR : 10.0.144.0/21, Network CIDR : 10.0.144.0/20, guestVmCidr : 
 10.0.151.0/20 = Existing Reservation is not affected.
 
 
 Thanks,
 
 Saksham Srivastava
 




Re: Add/Remove Network for VM : VMware Support

2013-04-17 Thread Saksham Srivastava
FS is available at :
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Add+Remove+Networks+to+VMs+%28Enhanced%29

Thanks,
Saksham

On Monday 15 April 2013 11:11 PM, Saksham Srivastava wrote:
 Following the discussion on bug: 
 https://issues.apache.org/jira/browse/CLOUDSTACK-645 , there needs to be some 
 work done for enhancing  VMware support for the feature Add/Remove Network on 
 VM.

 I will be updating the FS soon and will send out for review.

 Thanks,
 Saksham



RE: [Add/Remove Network to VM] Multiple NICs on same Guest Network

2013-04-15 Thread Saksham Srivastava
We have a feature Multiple IPs on the same NIC 
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Multiple+IP+address+per+NIC

Isn't the functionality covered by this feature.

I do not see a strong use case for having both the features (Multi NIC in same 
network and Multi IP per NIC).
Should we allow only one of them, as they both tend to serve the same purpose, 
or am I missing something?

Thanks,
Saksham

From: Marcus Sorensen [shadow...@gmail.com]
Sent: Saturday, April 13, 2013 9:03 PM
To: Saksham Srivastava
Cc: dev@cloudstack.apache.org
Subject: Re: [Add/Remove Network to VM] Multiple NICs on same Guest Network


I believe it was allowed because one can also create multiple NICs on the same 
network while deploying a VM.

There may be people doing that to get multiple IPS auto-assigned to a VM.

On Apr 13, 2013 3:28 AM, Saksham Srivastava 
saksham.srivast...@citrix.commailto:saksham.srivast...@citrix.com wrote:
Hi,

Using addNicToVirtualMachine API user can add multiple NICs to a VM

I am also able to add multiple NICs to a VM on the same isolated guest network.

Is this a valid scenario??
If yes what could be the use case for the same?

Thanks,
Saksham



Add/Remove Network for VM : VMware Support

2013-04-15 Thread Saksham Srivastava
Following the discussion on bug: 
https://issues.apache.org/jira/browse/CLOUDSTACK-645 , there needs to be some 
work done for enhancing  VMware support for the feature Add/Remove Network on 
VM.

I will be updating the FS soon and will send out for review.

Thanks,
Saksham


What should be the expected behaviour when VM is deployed (not through CloudStack) on CloudStack managed hosts? Was [IP Reservation] Is VM creation using the reserved IPs on cloudstack managed hosts

2013-04-12 Thread Saksham Srivastava
Changing the subject  and reposting.

-Original Message-
From: Abhinav Roy [mailto:abhinav@citrix.com] 
Sent: Tuesday, April 02, 2013 10:36 AM
To: dev@cloudstack.apache.org
Subject: RE: [IP Reservation] Is VM creation using the reserved IPs on 
cloudstack managed hosts supported?


Hi,

Is creation of VMs using the reserved IP (after doing IP reservation) on 
cloudstack managed hosts supported? Because when I tried to do that the VM got 
destroyed as soon as it was created.
While on hosts which are not managed by cloudstack VM creation using reserved 
IPs went through.



Thanks and regards,
Abhinav


<    1   2