You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by an...@apache.org on 2014/02/14 01:12:03 UTC
[1/7] git commit: updated refs/heads/4.3 to adf4dd5
Updated Branches:
refs/heads/4.3 8fec09ba4 -> adf4dd592
CLOUDSTACK-6068: set display flag to true in service/disk_offering_details tables
(cherry picked from commit aff22869cc18bcfb0845af2624fdd2afeabb3787)
Signed-off-by: Animesh Chaturvedi <an...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8673ca12
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8673ca12
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8673ca12
Branch: refs/heads/4.3
Commit: 8673ca1273cea1c4fddc0f142934500985c968e4
Parents: 8fec09b
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Mon Feb 10 10:21:34 2014 -0800
Committer: Animesh Chaturvedi <an...@apache.org>
Committed: Thu Feb 13 15:44:22 2014 -0800
----------------------------------------------------------------------
setup/db/db/schema-421to430.sql | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8673ca12/setup/db/db/schema-421to430.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-421to430.sql b/setup/db/db/schema-421to430.sql
index 43e94db..dc6131d 100644
--- a/setup/db/db/schema-421to430.sql
+++ b/setup/db/db/schema-421to430.sql
@@ -173,7 +173,7 @@ CREATE VIEW `cloud`.`disk_offering_view` AS
DROP VIEW IF EXISTS `cloud`.`service_offering_view`;
CREATE VIEW `cloud`.`service_offering_view` AS
- select
+ select
service_offering.id,
disk_offering.uuid,
disk_offering.name,
@@ -212,10 +212,10 @@ CREATE VIEW `cloud`.`service_offering_view` AS
`cloud`.`domain` ON disk_offering.domain_id = domain.id
where
disk_offering.state='Active';
-
+
DROP VIEW IF EXISTS `cloud`.`template_view`;
CREATE VIEW `cloud`.`template_view` AS
- select
+ select
vm_template.id,
vm_template.uuid,
vm_template.unique_name,
@@ -257,7 +257,7 @@ CREATE VIEW `cloud`.`template_view` AS
domain.path domain_path,
projects.id project_id,
projects.uuid project_uuid,
- projects.name project_name,
+ projects.name project_name,
data_center.id data_center_id,
data_center.uuid data_center_uuid,
data_center.name data_center_name,
@@ -287,23 +287,23 @@ CREATE VIEW `cloud`.`template_view` AS
from
`cloud`.`vm_template`
inner join
- `cloud`.`guest_os` ON guest_os.id = vm_template.guest_os_id
+ `cloud`.`guest_os` ON guest_os.id = vm_template.guest_os_id
inner join
`cloud`.`account` ON account.id = vm_template.account_id
inner join
`cloud`.`domain` ON domain.id = account.domain_id
left join
- `cloud`.`projects` ON projects.project_account_id = account.id
+ `cloud`.`projects` ON projects.project_account_id = account.id
left join
- `cloud`.`vm_template_details` ON vm_template_details.template_id = vm_template.id
+ `cloud`.`vm_template_details` ON vm_template_details.template_id = vm_template.id
left join
- `cloud`.`vm_template` source_template ON source_template.id = vm_template.source_template_id
+ `cloud`.`vm_template` source_template ON source_template.id = vm_template.source_template_id
left join
`cloud`.`template_store_ref` ON template_store_ref.template_id = vm_template.id and template_store_ref.store_role = 'Image'
left join
- `cloud`.`image_store` ON image_store.removed is NULL AND template_store_ref.store_id is not NULL AND image_store.id = template_store_ref.store_id
+ `cloud`.`image_store` ON image_store.removed is NULL AND template_store_ref.store_id is not NULL AND image_store.id = template_store_ref.store_id
left join
- `cloud`.`template_zone_ref` ON template_zone_ref.template_id = vm_template.id AND template_store_ref.store_id is NULL AND template_zone_ref.removed is null
+ `cloud`.`template_zone_ref` ON template_zone_ref.template_id = vm_template.id AND template_store_ref.store_id is NULL AND template_zone_ref.removed is null
left join
`cloud`.`data_center` ON (image_store.data_center_id = data_center.id OR template_zone_ref.zone_id = data_center.id)
left join
@@ -420,7 +420,7 @@ CREATE VIEW `cloud`.`volume_view` AS
`cloud`.`async_job` ON async_job.instance_id = volumes.id
and async_job.instance_type = 'Volume'
and async_job.job_status = 0;
-
+
DROP VIEW IF EXISTS `cloud`.`storage_pool_view`;
CREATE VIEW `cloud`.`storage_pool_view` AS
select
@@ -1093,3 +1093,9 @@ CREATE VIEW `cloud`.`user_vm_view` AS
INSERT IGNORE INTO `cloud`.`configuration`(category, instance, component, name, value, description, default_value) VALUES ('NetworkManager', 'DEFAULT', 'management-server', 'network.router.EnableServiceMonitoring', 'true', 'service monitoring in router enable/disable option, default true', 'true') ON DUPLICATE KEY UPDATE category='NetworkManager';
+
+ALTER TABLE `cloud`.`service_offering_details` CHANGE `display` `display` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'True if the detail can be displayed to the end user';
+UPDATE `cloud`.`service_offering_details` set `display`=1 where id> 0;
+
+ALTER TABLE `cloud`.`disk_offering_details` CHANGE `display` `display` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'True if the detail can be displayed to the end user';
+UPDATE `cloud`.`disk_offering_details` set `display`=1 where id> 0;
[4/7] git commit: updated refs/heads/4.3 to adf4dd5
Posted by an...@apache.org.
CLOUDSTACK-6089: Implement equals() method for ResourceTagResponse
so that the java Set can properly determine if a ResourceTagResponse
is unique. This ensures we don't get duplicate resource tags showing
up any time a UserVmResponse is crafted (which can be quite often
due to the way the responses are crafted).
(cherry picked from commit 06ae23710ddc3784939bcd499b7437c13495bb88)
Signed-off-by: Animesh Chaturvedi <an...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1c640448
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1c640448
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1c640448
Branch: refs/heads/4.3
Commit: 1c640448df26ac97330705ee0af04fe024ec3150
Parents: a10a083
Author: Marcus Sorensen <ma...@betterservers.com>
Authored: Wed Feb 12 16:07:34 2014 -0700
Committer: Animesh Chaturvedi <an...@apache.org>
Committed: Thu Feb 13 15:55:43 2014 -0800
----------------------------------------------------------------------
.../api/response/ResourceTagResponse.java | 30 ++++++++++++++++++++
1 file changed, 30 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1c640448/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java b/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java
index 47b0625..8044376 100644
--- a/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java
@@ -101,4 +101,34 @@ public class ResourceTagResponse extends BaseResponse implements ControlledViewE
public void setCustomer(String customer) {
this.customer = customer;
}
+
+ public String getResourceId() {
+ return this.resourceId;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ String rId = this.getResourceId();
+ result = prime * result + ((rId== null) ? 0 : rId.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (this.getClass() != obj.getClass())
+ return false;
+ ResourceTagResponse other = (ResourceTagResponse) obj;
+ String rId = this.getResourceId();
+ if (rId == null && other.getResourceId() != null) {
+ return false;
+ } else if (!rId.equals(other.getResourceId()))
+ return false;
+ return true;
+ }
}
[6/7] git commit: updated refs/heads/4.3 to adf4dd5
Posted by an...@apache.org.
CLOUDSTACK-6083 corrected firewall rule cidr load issue
(cherry picked from commit e8f93f28fc424c73156723d9b65b13c05dafc5a8)
Signed-off-by: Animesh Chaturvedi <an...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/88463cd1
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/88463cd1
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/88463cd1
Branch: refs/heads/4.3
Commit: 88463cd10b3dae6af3168177355fd0ba92f87ecc
Parents: 0ff1522
Author: Jayapal <ja...@apache.org>
Authored: Thu Feb 13 14:24:42 2014 +0530
Committer: Animesh Chaturvedi <an...@apache.org>
Committed: Thu Feb 13 15:56:50 2014 -0800
----------------------------------------------------------------------
.../src/com/cloud/network/dao/FirewallRulesCidrsDaoImpl.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/88463cd1/engine/schema/src/com/cloud/network/dao/FirewallRulesCidrsDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/network/dao/FirewallRulesCidrsDaoImpl.java b/engine/schema/src/com/cloud/network/dao/FirewallRulesCidrsDaoImpl.java
index 52d5279..aa3b82e 100644
--- a/engine/schema/src/com/cloud/network/dao/FirewallRulesCidrsDaoImpl.java
+++ b/engine/schema/src/com/cloud/network/dao/FirewallRulesCidrsDaoImpl.java
@@ -39,8 +39,7 @@ public class FirewallRulesCidrsDaoImpl extends GenericDaoBase<FirewallRulesCidrs
protected FirewallRulesCidrsDaoImpl() {
CidrsSearch = createSearchBuilder();
CidrsSearch.and("firewallRuleId", CidrsSearch.entity().getFirewallRuleId(), SearchCriteria.Op.EQ);
- CidrsSearch.and("firewallRuleId", CidrsSearch.entity().getId(), SearchCriteria.Op.EQ);
- CidrsSearch.done();
+ CidrsSearch.done();
}
@Override @DB
[5/7] git commit: updated refs/heads/4.3 to adf4dd5
Posted by an...@apache.org.
CLOUDSTACK-6089: Use resource tag's key to determine match in
equals() method for ResourceTagResponse
(cherry picked from commit ed73e3e1b30c7c49c5dbfe8f2cac3d3dac85090e)
Signed-off-by: Animesh Chaturvedi <an...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0ff15225
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0ff15225
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0ff15225
Branch: refs/heads/4.3
Commit: 0ff152258eb62db09ba5cad2698a2e9d370fdd7c
Parents: 1c64044
Author: Marcus Sorensen <ma...@betterservers.com>
Authored: Wed Feb 12 17:00:10 2014 -0700
Committer: Animesh Chaturvedi <an...@apache.org>
Committed: Thu Feb 13 15:56:08 2014 -0800
----------------------------------------------------------------------
.../api/response/ResourceTagResponse.java | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0ff15225/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java b/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java
index 8044376..00db1b5 100644
--- a/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java
@@ -102,16 +102,16 @@ public class ResourceTagResponse extends BaseResponse implements ControlledViewE
this.customer = customer;
}
- public String getResourceId() {
- return this.resourceId;
+ public String getKey() {
+ return this.key;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
- String rId = this.getResourceId();
- result = prime * result + ((rId== null) ? 0 : rId.hashCode());
+ String key = this.getKey();
+ result = prime * result + ((key == null) ? 0 : key.hashCode());
return result;
}
@@ -121,13 +121,14 @@ public class ResourceTagResponse extends BaseResponse implements ControlledViewE
return true;
if (obj == null)
return false;
- if (this.getClass() != obj.getClass())
+ if (getClass() != obj.getClass())
return false;
ResourceTagResponse other = (ResourceTagResponse) obj;
- String rId = this.getResourceId();
- if (rId == null && other.getResourceId() != null) {
- return false;
- } else if (!rId.equals(other.getResourceId()))
+ String key = this.getKey();
+ if (key == null) {
+ if (other.getKey() != null)
+ return false;
+ } else if (!key.equals(other.getKey()))
return false;
return true;
}
[2/7] git commit: updated refs/heads/4.3 to adf4dd5
Posted by an...@apache.org.
CLOUDSTACK-6068: set display flag to true in service/disk_offering_details tables
(cherry picked from commit 1cfbfab8162b82b30d797d4805112a75cfef3ce0)
Signed-off-by: Animesh Chaturvedi <an...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7016e6a0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7016e6a0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7016e6a0
Branch: refs/heads/4.3
Commit: 7016e6a03877ef283fc4d5ec70f6a03d2c33f9ee
Parents: 8673ca1
Author: Alena Prokharchyk <al...@citrix.com>
Authored: Mon Feb 10 17:15:50 2014 -0800
Committer: Animesh Chaturvedi <an...@apache.org>
Committed: Thu Feb 13 15:44:43 2014 -0800
----------------------------------------------------------------------
setup/db/db/schema-421to430.sql | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7016e6a0/setup/db/db/schema-421to430.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-421to430.sql b/setup/db/db/schema-421to430.sql
index dc6131d..b55e388 100644
--- a/setup/db/db/schema-421to430.sql
+++ b/setup/db/db/schema-421to430.sql
@@ -1097,5 +1097,5 @@ INSERT IGNORE INTO `cloud`.`configuration`(category, instance, component, name,
ALTER TABLE `cloud`.`service_offering_details` CHANGE `display` `display` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'True if the detail can be displayed to the end user';
UPDATE `cloud`.`service_offering_details` set `display`=1 where id> 0;
-ALTER TABLE `cloud`.`disk_offering_details` CHANGE `display` `display` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'True if the detail can be displayed to the end user';
-UPDATE `cloud`.`disk_offering_details` set `display`=1 where id> 0;
+ALTER TABLE `cloud`.`disk_offering_details` CHANGE `display_detail` `display_detail` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'True if the detail can be displayed to the end user';
+UPDATE `cloud`.`disk_offering_details` set `display_detail`=1 where id> 0;
[3/7] git commit: updated refs/heads/4.3 to adf4dd5
Posted by an...@apache.org.
pass isSourceNat to second ip on the same network(cherry picked from commit 5af163ff7f658c30c6d93b50ac17c9cc0c5eb8c1)
Signed-off-by: Animesh Chaturvedi <an...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a10a0832
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a10a0832
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a10a0832
Branch: refs/heads/4.3
Commit: a10a0832b6f2ef4f5db31bc7e5a1d2cd4f4067c9
Parents: 7016e6a
Author: Daan Hoogland <da...@onecht.net>
Authored: Tue Feb 11 14:12:00 2014 +0100
Committer: Animesh Chaturvedi <an...@apache.org>
Committed: Thu Feb 13 15:54:57 2014 -0800
----------------------------------------------------------------------
server/src/com/cloud/network/vpc/VpcManagerImpl.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a10a0832/server/src/com/cloud/network/vpc/VpcManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/VpcManagerImpl.java b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
index f7c38d4..40e910d 100644
--- a/server/src/com/cloud/network/vpc/VpcManagerImpl.java
+++ b/server/src/com/cloud/network/vpc/VpcManagerImpl.java
@@ -1444,7 +1444,8 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
Long nextMac = mac + 1;
dc.setMacAddress(nextMac);
- privateIp = new PrivateIpVO(ipAddress, privateNtwk.getId(), nextMac, vpcId, true);
+ s_logger.info("creating private ip adress for vpc (" + ipAddress + ", " + privateNtwk.getId() + ", " + nextMac + ", " + vpcId + ", " + isSourceNat + ")");
+ privateIp = new PrivateIpVO(ipAddress, privateNtwk.getId(), nextMac, vpcId, isSourceNat);
_privateIpDao.persist(privateIp);
_dcDao.update(dc.getId(), dc);
[7/7] git commit: updated refs/heads/4.3 to adf4dd5
Posted by an...@apache.org.
CLOUDSTACK-6065: Fix NPE problem caused by the lack of context setup in threads from agent manager thread pool
(cherry picked from commit 1283919f02e2c4d2652ca18693b6cf2906b2263d)
Signed-off-by: Animesh Chaturvedi <an...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/adf4dd59
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/adf4dd59
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/adf4dd59
Branch: refs/heads/4.3
Commit: adf4dd59270917b1607940d7064748bd438cbbcc
Parents: 88463cd
Author: Kelven Yang <ke...@gmail.com>
Authored: Thu Feb 13 14:34:06 2014 -0800
Committer: Animesh Chaturvedi <an...@apache.org>
Committed: Thu Feb 13 15:57:19 2014 -0800
----------------------------------------------------------------------
.../framework/jobs/AsyncJobExecutionContext.java | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/adf4dd59/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java
----------------------------------------------------------------------
diff --git a/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java b/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java
index 966e638..4343a4d 100644
--- a/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java
+++ b/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java
@@ -29,6 +29,8 @@ import org.apache.cloudstack.managed.threadlocal.ManagedThreadLocal;
import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InsufficientCapacityException;
import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.user.Account;
+import com.cloud.user.User;
public class AsyncJobExecutionContext {
private static final Logger s_logger = Logger.getLogger(AsyncJobExecutionContext.class);
@@ -167,10 +169,15 @@ public class AsyncJobExecutionContext {
public static AsyncJobExecutionContext getCurrentExecutionContext() {
AsyncJobExecutionContext context = s_currentExectionContext.get();
if (context == null) {
- // TODO, this has security implicitions
+ // TODO, this has security implications, operations carried from API layer should always
+ // set its context, otherwise, the fall-back here will use system security context
+ //
s_logger.warn("Job is executed without a context, setup psudo job for the executing thread");
- context = registerPseudoExecutionContext(CallContext.current().getCallingAccountId(),
- CallContext.current().getCallingUserId());
+ if (CallContext.current() != null)
+ context = registerPseudoExecutionContext(CallContext.current().getCallingAccountId(),
+ CallContext.current().getCallingUserId());
+ else
+ context = registerPseudoExecutionContext(Account.ACCOUNT_ID_SYSTEM, User.UID_SYSTEM);
}
return context;
}