RE: How to recreate ssvm & cpvm

2014-07-10 Thread Suresh Sadhu
Before destroying the cpvm and ssvm ,please analyse the logs. May be agent is 
not up.
Also check below 

https://cwiki.apache.org/confluence/display/CLOUDSTACK/SSVM%2C+templates%2C+Secondary+storage+troubleshooting

regards
sadhu


-Original Message-
From: Suresh Sadhu 
Sent: 11 July 2014 11:59
To: us...@cloudstack.apache.org; dev@cloudstack.apache.org
Subject: RE: How to recreate ssvm & cpvm

NO it won't impact guet vms .destroy the  ssvm and cpvm , it will recreate 
again and  during that  time you can't create new guest vms.

--sadhu

-Original Message-
From: Tejas Gadaria [mailto:refond.g...@gmail.com]
Sent: 11 July 2014 11:53
To: us...@cloudstack.apache.org; dev@cloudstack.apache.org
Subject: How to recreate ssvm & cpvm

If i recreate ssvm & cpvm, guest vm will be affected?


On Fri, Jul 11, 2014 at 11:50 AM, Tejas Gadaria 
wrote:

> Hi,
>
> Due to power blackout i have to recreate ssvm & cpvm, i am able to 
> deploy new vms also create new template but on System Capacity, & 
> General  Alerts area, latest alerts are not populating.
>
> Also ssvm & cpvm status is 'running' but Agent state is not displayed 
> in Cloudstack UI.
>
> I have production VMs running on ACS. how can i recreate ssvm & cpvm. ?
>
> I am using ACS 4.3 & Xenserver 6.2 SP1
>
> Regards,
> Tejas
>
>
> On Thu, Jul 10, 2014 at 6:30 PM, Tejas Gadaria 
> wrote:
>
>> Hi,
>>
>> I am getting below logs on CS 4.3 on Xenserver 6.2 SP1 i m getting 
>> huge amount of of memory allocated to vms, where it is not actully..
>>
>> 2014-07-10 16:43:16,643 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Done executing storage capacity update
>> 2014-07-10 16:43:16,643 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Executing capacity updates for public 
>> ip and Vlans
>> 2014-07-10 16:43:16,686 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Done capacity updates for public ip 
>> and Vlans
>> 2014-07-10 16:43:16,686 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Executing capacity updates for private 
>> ip
>> 2014-07-10 16:43:16,701 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Done executing capacity updates for 
>> private ip
>> 2014-07-10 16:43:16,701 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Done recalculating system capacity
>> 2014-07-10 16:43:16,705 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
>> (HostReservationReleaseChecker:ctx-0828f975) Checking if any host 
>> reservation can be released ...
>> 2014-07-10 16:43:16,720 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
>> (HostReservationReleaseChecker:ctx-0828f975) Cannot release 
>> reservation, Found 4 VMs Running on
>>
>> host 1
>> 2014-07-10 16:43:16,727 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
>> (HostReservationReleaseChecker:ctx-0828f975) Cannot release 
>> reservation, Found 4 VMs Running on
>>
>> host 5
>> 2014-07-10 16:43:16,732 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
>> (HostReservationReleaseChecker:ctx-0828f975) Cannot release 
>> reservation, Found 1 VMs Running on
>>
>> host 6
>> 2014-07-10 16:43:16,732 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
>> (HostReservationReleaseChecker:ctx-0828f975) Done running 
>> HostReservationReleaseChecker ...
>>
>
>


RE: How to recreate ssvm & cpvm

2014-07-10 Thread Suresh Sadhu
NO it won't impact guet vms .destroy the  ssvm and cpvm , it will recreate 
again and  during that  time you can't create new guest vms.

--sadhu

-Original Message-
From: Tejas Gadaria [mailto:refond.g...@gmail.com] 
Sent: 11 July 2014 11:53
To: us...@cloudstack.apache.org; dev@cloudstack.apache.org
Subject: How to recreate ssvm & cpvm

If i recreate ssvm & cpvm, guest vm will be affected?


On Fri, Jul 11, 2014 at 11:50 AM, Tejas Gadaria 
wrote:

> Hi,
>
> Due to power blackout i have to recreate ssvm & cpvm, i am able to 
> deploy new vms also create new template but on System Capacity, & 
> General  Alerts area, latest alerts are not populating.
>
> Also ssvm & cpvm status is 'running' but Agent state is not displayed 
> in Cloudstack UI.
>
> I have production VMs running on ACS. how can i recreate ssvm & cpvm. ?
>
> I am using ACS 4.3 & Xenserver 6.2 SP1
>
> Regards,
> Tejas
>
>
> On Thu, Jul 10, 2014 at 6:30 PM, Tejas Gadaria 
> wrote:
>
>> Hi,
>>
>> I am getting below logs on CS 4.3 on Xenserver 6.2 SP1 i m getting 
>> huge amount of of memory allocated to vms, where it is not actully..
>>
>> 2014-07-10 16:43:16,643 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Done executing storage capacity update
>> 2014-07-10 16:43:16,643 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Executing capacity updates for public 
>> ip and Vlans
>> 2014-07-10 16:43:16,686 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Done capacity updates for public ip 
>> and Vlans
>> 2014-07-10 16:43:16,686 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Executing capacity updates for private 
>> ip
>> 2014-07-10 16:43:16,701 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Done executing capacity updates for 
>> private ip
>> 2014-07-10 16:43:16,701 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Done recalculating system capacity
>> 2014-07-10 16:43:16,705 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
>> (HostReservationReleaseChecker:ctx-0828f975) Checking if any host 
>> reservation can be released ...
>> 2014-07-10 16:43:16,720 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
>> (HostReservationReleaseChecker:ctx-0828f975) Cannot release 
>> reservation, Found 4 VMs Running on
>>
>> host 1
>> 2014-07-10 16:43:16,727 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
>> (HostReservationReleaseChecker:ctx-0828f975) Cannot release 
>> reservation, Found 4 VMs Running on
>>
>> host 5
>> 2014-07-10 16:43:16,732 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
>> (HostReservationReleaseChecker:ctx-0828f975) Cannot release 
>> reservation, Found 1 VMs Running on
>>
>> host 6
>> 2014-07-10 16:43:16,732 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
>> (HostReservationReleaseChecker:ctx-0828f975) Done running 
>> HostReservationReleaseChecker ...
>>
>
>


Re: Cannot release reservation

2014-07-10 Thread Punith S
hi,

try restarting the MS and see whether agent and MS are in sync.
also check the ssvm by running the health script by logging into to the
ssvm.
for more troubleshooting refer this link
https://cwiki.apache.org/confluence/display/CLOUDSTACK/SSVM%2C+templates%2C+Secondary+storage+troubleshooting

thanks


On Fri, Jul 11, 2014 at 11:50 AM, Tejas Gadaria 
wrote:

> Hi,
>
> Due to power blackout i have to recreate ssvm & cpvm, i am able to deploy
> new vms also create new template but on System Capacity, & General  Alerts
> area, latest alerts are not populating.
>
> Also ssvm & cpvm status is 'running' but Agent state is not displayed in
> Cloudstack UI.
>
> I have production VMs running on ACS. how can i recreate ssvm & cpvm. ?
>
> I am using ACS 4.3 & Xenserver 6.2 SP1
>
> Regards,
> Tejas
>
>
> On Thu, Jul 10, 2014 at 6:30 PM, Tejas Gadaria 
> wrote:
>
> > Hi,
> >
> > I am getting below logs on CS 4.3 on Xenserver 6.2 SP1
> > i m getting huge amount of of memory allocated to vms, where it is not
> > actully..
> >
> > 2014-07-10 16:43:16,643 DEBUG [c.c.a.AlertManagerImpl]
> > (CapacityChecker:ctx-d205d3de) Done executing storage capacity update
> > 2014-07-10 16:43:16,643 DEBUG [c.c.a.AlertManagerImpl]
> > (CapacityChecker:ctx-d205d3de) Executing capacity updates for public ip
> and
> > Vlans
> > 2014-07-10 16:43:16,686 DEBUG [c.c.a.AlertManagerImpl]
> > (CapacityChecker:ctx-d205d3de) Done capacity updates for public ip and
> Vlans
> > 2014-07-10 16:43:16,686 DEBUG [c.c.a.AlertManagerImpl]
> > (CapacityChecker:ctx-d205d3de) Executing capacity updates for private ip
> > 2014-07-10 16:43:16,701 DEBUG [c.c.a.AlertManagerImpl]
> > (CapacityChecker:ctx-d205d3de) Done executing capacity updates for
> private
> > ip
> > 2014-07-10 16:43:16,701 DEBUG [c.c.a.AlertManagerImpl]
> > (CapacityChecker:ctx-d205d3de) Done recalculating system capacity
> > 2014-07-10 16:43:16,705 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
> > (HostReservationReleaseChecker:ctx-0828f975) Checking if any host
> > reservation can be released ...
> > 2014-07-10 16:43:16,720 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
> > (HostReservationReleaseChecker:ctx-0828f975) Cannot release reservation,
> > Found 4 VMs Running on
> >
> > host 1
> > 2014-07-10 16:43:16,727 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
> > (HostReservationReleaseChecker:ctx-0828f975) Cannot release reservation,
> > Found 4 VMs Running on
> >
> > host 5
> > 2014-07-10 16:43:16,732 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
> > (HostReservationReleaseChecker:ctx-0828f975) Cannot release reservation,
> > Found 1 VMs Running on
> >
> > host 6
> > 2014-07-10 16:43:16,732 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
> > (HostReservationReleaseChecker:ctx-0828f975) Done running
> > HostReservationReleaseChecker ...
> >
>



-- 
regards,

punith s
cloudbyte.com


How to recreate ssvm & cpvm

2014-07-10 Thread Tejas Gadaria
If i recreate ssvm & cpvm, guest vm will be affected?


On Fri, Jul 11, 2014 at 11:50 AM, Tejas Gadaria 
wrote:

> Hi,
>
> Due to power blackout i have to recreate ssvm & cpvm, i am able to deploy
> new vms also create new template but on System Capacity, & General  Alerts
> area, latest alerts are not populating.
>
> Also ssvm & cpvm status is 'running' but Agent state is not displayed in
> Cloudstack UI.
>
> I have production VMs running on ACS. how can i recreate ssvm & cpvm. ?
>
> I am using ACS 4.3 & Xenserver 6.2 SP1
>
> Regards,
> Tejas
>
>
> On Thu, Jul 10, 2014 at 6:30 PM, Tejas Gadaria 
> wrote:
>
>> Hi,
>>
>> I am getting below logs on CS 4.3 on Xenserver 6.2 SP1
>> i m getting huge amount of of memory allocated to vms, where it is not
>> actully..
>>
>> 2014-07-10 16:43:16,643 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Done executing storage capacity update
>> 2014-07-10 16:43:16,643 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Executing capacity updates for public ip and
>> Vlans
>> 2014-07-10 16:43:16,686 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Done capacity updates for public ip and Vlans
>> 2014-07-10 16:43:16,686 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Executing capacity updates for private ip
>> 2014-07-10 16:43:16,701 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Done executing capacity updates for private
>> ip
>> 2014-07-10 16:43:16,701 DEBUG [c.c.a.AlertManagerImpl]
>> (CapacityChecker:ctx-d205d3de) Done recalculating system capacity
>> 2014-07-10 16:43:16,705 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
>> (HostReservationReleaseChecker:ctx-0828f975) Checking if any host
>> reservation can be released ...
>> 2014-07-10 16:43:16,720 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
>> (HostReservationReleaseChecker:ctx-0828f975) Cannot release reservation,
>> Found 4 VMs Running on
>>
>> host 1
>> 2014-07-10 16:43:16,727 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
>> (HostReservationReleaseChecker:ctx-0828f975) Cannot release reservation,
>> Found 4 VMs Running on
>>
>> host 5
>> 2014-07-10 16:43:16,732 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
>> (HostReservationReleaseChecker:ctx-0828f975) Cannot release reservation,
>> Found 1 VMs Running on
>>
>> host 6
>> 2014-07-10 16:43:16,732 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
>> (HostReservationReleaseChecker:ctx-0828f975) Done running
>> HostReservationReleaseChecker ...
>>
>
>


Re: Cannot release reservation

2014-07-10 Thread Tejas Gadaria
Hi,

Due to power blackout i have to recreate ssvm & cpvm, i am able to deploy
new vms also create new template but on System Capacity, & General  Alerts
area, latest alerts are not populating.

Also ssvm & cpvm status is 'running' but Agent state is not displayed in
Cloudstack UI.

I have production VMs running on ACS. how can i recreate ssvm & cpvm. ?

I am using ACS 4.3 & Xenserver 6.2 SP1

Regards,
Tejas


On Thu, Jul 10, 2014 at 6:30 PM, Tejas Gadaria 
wrote:

> Hi,
>
> I am getting below logs on CS 4.3 on Xenserver 6.2 SP1
> i m getting huge amount of of memory allocated to vms, where it is not
> actully..
>
> 2014-07-10 16:43:16,643 DEBUG [c.c.a.AlertManagerImpl]
> (CapacityChecker:ctx-d205d3de) Done executing storage capacity update
> 2014-07-10 16:43:16,643 DEBUG [c.c.a.AlertManagerImpl]
> (CapacityChecker:ctx-d205d3de) Executing capacity updates for public ip and
> Vlans
> 2014-07-10 16:43:16,686 DEBUG [c.c.a.AlertManagerImpl]
> (CapacityChecker:ctx-d205d3de) Done capacity updates for public ip and Vlans
> 2014-07-10 16:43:16,686 DEBUG [c.c.a.AlertManagerImpl]
> (CapacityChecker:ctx-d205d3de) Executing capacity updates for private ip
> 2014-07-10 16:43:16,701 DEBUG [c.c.a.AlertManagerImpl]
> (CapacityChecker:ctx-d205d3de) Done executing capacity updates for private
> ip
> 2014-07-10 16:43:16,701 DEBUG [c.c.a.AlertManagerImpl]
> (CapacityChecker:ctx-d205d3de) Done recalculating system capacity
> 2014-07-10 16:43:16,705 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
> (HostReservationReleaseChecker:ctx-0828f975) Checking if any host
> reservation can be released ...
> 2014-07-10 16:43:16,720 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
> (HostReservationReleaseChecker:ctx-0828f975) Cannot release reservation,
> Found 4 VMs Running on
>
> host 1
> 2014-07-10 16:43:16,727 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
> (HostReservationReleaseChecker:ctx-0828f975) Cannot release reservation,
> Found 4 VMs Running on
>
> host 5
> 2014-07-10 16:43:16,732 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
> (HostReservationReleaseChecker:ctx-0828f975) Cannot release reservation,
> Found 1 VMs Running on
>
> host 6
> 2014-07-10 16:43:16,732 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
> (HostReservationReleaseChecker:ctx-0828f975) Done running
> HostReservationReleaseChecker ...
>


RE: Unable to view JIRA ticket CLOUDSTACK-967

2014-07-10 Thread Rajesh Battala
If it is a security issue I think we don't have permission to view them

-Original Message-
From: Sateesh Chodapuneedi [mailto:sateesh.chodapune...@citrix.com] 
Sent: Friday, July 11, 2014 7:11 AM
To: dev@cloudstack.apache.org
Subject: Unable to view JIRA ticket CLOUDSTACK-967

Hi,
In ACS JIRA unable to view the ticket CLOUDSTACK-967 
https://issues.apache.org/jira/browse/CLOUDSTACK-967
Error is,
---
Permission Violation

It seems that you have tried to perform an operation which you are not 
permitted to perform.

If you think this message is wrong, please contact your JIRA 
administrators.
---

This is not the case with any other tickets like CLOUDSTACK-966, CLOUDSTACK-968.

Regards,
Sateesh



Unable to view JIRA ticket CLOUDSTACK-967

2014-07-10 Thread Sateesh Chodapuneedi
Hi,
In ACS JIRA unable to view the ticket CLOUDSTACK-967 
https://issues.apache.org/jira/browse/CLOUDSTACK-967
Error is,
---
Permission Violation

It seems that you have tried to perform an operation which you are not 
permitted to perform.

If you think this message is wrong, please contact your JIRA 
administrators.
---

This is not the case with any other tickets like CLOUDSTACK-966, CLOUDSTACK-968.

Regards,
Sateesh



RE: Cant build master

2014-07-10 Thread Prachi Damle
I had faced this problem sometime back, here is the thread, check if this 
applies to your setup:

http://mail-archives.apache.org/mod_mbox/cloudstack-dev/201403.mbox/%3c75942ed3fd12d64eabe71209bd0f62cc1ba...@sjcpex01cl02.citrite.net%3E


Prachi
-Original Message-
From: Amogh Vasekar [mailto:amogh.vase...@citrix.com] 
Sent: Thursday, July 10, 2014 12:15 PM
To: dev@cloudstack.apache.org
Subject: Re: Cant build master

Without disabling the tests?

Thanks,
Amogh

On 7/10/14 12:07 PM, "Mike Tutkowski"  wrote:

>I just updated to the latest on master and was able to successfully 
>build the codebase. I'm on Ubuntu 12.04.
>
>
>On Thu, Jul 10, 2014 at 12:58 PM, Amogh Vasekar 
>
>wrote:
>
>> Hi,
>>
>> I am seeing this error when trying to build master branch :
>> Tests in error:
>>   getTableName(com.cloud.utils.DbUtilTest)
>>   getTableName(com.cloud.utils.DbUtilTest): Could not initialize 
>> class com.cloud.utils.db.TransactionLegacy
>>   closeStatement(com.cloud.utils.DbUtilTest): Could not initialize 
>> class com.cloud.utils.db.TransactionLega
>>
>>
>> Am I missing something, or is the build broken on master?
>>
>> Thanks,
>> Amogh
>>
>>
>
>
>--
>*Mike Tutkowski*
>*Senior CloudStack Developer, SolidFire Inc.*
>e: mike.tutkow...@solidfire.com
>o: 303.746.7302
>Advancing the way the world uses the cloud
>**



Re: Cant build master

2014-07-10 Thread Mike Tutkowski
I used mvn -P developer,systemvm clean install.


On Thu, Jul 10, 2014 at 1:16 PM, Nitin Mehta  wrote:

> Check out the thread below.
>
> http://mail-archives.apache.org/mod_mbox/cloudstack-dev/201403.mbox/%3C7594
> 2ed3fd12d64eabe71209bd0f62cc1ba...@sjcpex01cl02.citrite.net%3E
>
>
> Thanks,
> -Nitin
>
> On 10/07/14 12:07 PM, "Mike Tutkowski" 
> wrote:
>
> >I just updated to the latest on master and was able to successfully build
> >the codebase. I'm on Ubuntu 12.04.
> >
> >
> >On Thu, Jul 10, 2014 at 12:58 PM, Amogh Vasekar  >
> >wrote:
> >
> >> Hi,
> >>
> >> I am seeing this error when trying to build master branch :
> >> Tests in error:
> >>   getTableName(com.cloud.utils.DbUtilTest)
> >>   getTableName(com.cloud.utils.DbUtilTest): Could not initialize class
> >> com.cloud.utils.db.TransactionLegacy
> >>   closeStatement(com.cloud.utils.DbUtilTest): Could not initialize class
> >> com.cloud.utils.db.TransactionLega
> >>
> >>
> >> Am I missing something, or is the build broken on master?
> >>
> >> Thanks,
> >> Amogh
> >>
> >>
> >
> >
> >--
> >*Mike Tutkowski*
> >*Senior CloudStack Developer, SolidFire Inc.*
> >e: mike.tutkow...@solidfire.com
> >o: 303.746.7302
> >Advancing the way the world uses the cloud
> >* *
>
>


-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkow...@solidfire.com
o: 303.746.7302
Advancing the way the world uses the cloud
*™*


Re: Cant build master

2014-07-10 Thread Nitin Mehta
Check out the thread below.

http://mail-archives.apache.org/mod_mbox/cloudstack-dev/201403.mbox/%3C7594
2ed3fd12d64eabe71209bd0f62cc1ba...@sjcpex01cl02.citrite.net%3E


Thanks,
-Nitin

On 10/07/14 12:07 PM, "Mike Tutkowski" 
wrote:

>I just updated to the latest on master and was able to successfully build
>the codebase. I'm on Ubuntu 12.04.
>
>
>On Thu, Jul 10, 2014 at 12:58 PM, Amogh Vasekar 
>wrote:
>
>> Hi,
>>
>> I am seeing this error when trying to build master branch :
>> Tests in error:
>>   getTableName(com.cloud.utils.DbUtilTest)
>>   getTableName(com.cloud.utils.DbUtilTest): Could not initialize class
>> com.cloud.utils.db.TransactionLegacy
>>   closeStatement(com.cloud.utils.DbUtilTest): Could not initialize class
>> com.cloud.utils.db.TransactionLega
>>
>>
>> Am I missing something, or is the build broken on master?
>>
>> Thanks,
>> Amogh
>>
>>
>
>
>-- 
>*Mike Tutkowski*
>*Senior CloudStack Developer, SolidFire Inc.*
>e: mike.tutkow...@solidfire.com
>o: 303.746.7302
>Advancing the way the world uses the cloud
>**



Re: Cant build master

2014-07-10 Thread Amogh Vasekar
Without disabling the tests?

Thanks,
Amogh

On 7/10/14 12:07 PM, "Mike Tutkowski"  wrote:

>I just updated to the latest on master and was able to successfully build
>the codebase. I'm on Ubuntu 12.04.
>
>
>On Thu, Jul 10, 2014 at 12:58 PM, Amogh Vasekar 
>wrote:
>
>> Hi,
>>
>> I am seeing this error when trying to build master branch :
>> Tests in error:
>>   getTableName(com.cloud.utils.DbUtilTest)
>>   getTableName(com.cloud.utils.DbUtilTest): Could not initialize class
>> com.cloud.utils.db.TransactionLegacy
>>   closeStatement(com.cloud.utils.DbUtilTest): Could not initialize class
>> com.cloud.utils.db.TransactionLega
>>
>>
>> Am I missing something, or is the build broken on master?
>>
>> Thanks,
>> Amogh
>>
>>
>
>
>-- 
>*Mike Tutkowski*
>*Senior CloudStack Developer, SolidFire Inc.*
>e: mike.tutkow...@solidfire.com
>o: 303.746.7302
>Advancing the way the world uses the cloud
>**



Re: Cant build master

2014-07-10 Thread Mike Tutkowski
I just updated to the latest on master and was able to successfully build
the codebase. I'm on Ubuntu 12.04.


On Thu, Jul 10, 2014 at 12:58 PM, Amogh Vasekar 
wrote:

> Hi,
>
> I am seeing this error when trying to build master branch :
> Tests in error:
>   getTableName(com.cloud.utils.DbUtilTest)
>   getTableName(com.cloud.utils.DbUtilTest): Could not initialize class
> com.cloud.utils.db.TransactionLegacy
>   closeStatement(com.cloud.utils.DbUtilTest): Could not initialize class
> com.cloud.utils.db.TransactionLega
>
>
> Am I missing something, or is the build broken on master?
>
> Thanks,
> Amogh
>
>


-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkow...@solidfire.com
o: 303.746.7302
Advancing the way the world uses the cloud
*™*


Cant build master

2014-07-10 Thread Amogh Vasekar
Hi,

I am seeing this error when trying to build master branch :
Tests in error: 
  getTableName(com.cloud.utils.DbUtilTest)
  getTableName(com.cloud.utils.DbUtilTest): Could not initialize class
com.cloud.utils.db.TransactionLegacy
  closeStatement(com.cloud.utils.DbUtilTest): Could not initialize class
com.cloud.utils.db.TransactionLega


Am I missing something, or is the build broken on master?

Thanks,
Amogh



RE: "Bug" introduced by part of commit a600d8408ea86782318139c17cf346c8497943d0

2014-07-10 Thread Santhosh Edukulla
I just reverted the changes done to this specific file, then

built the management server, stopped and started again twice, issue is not 
reproducible
deployed a data center post the revert on simulator, it worked.

Please check. It seems,  TransactionLegacy now implements Closeable, new change 
under master, will check the reported issues for coverity to this file 
separately post the analysis.

Regards,
Santhosh

From: Funs Kessen [fkes...@schubergphilis.com]
Sent: Thursday, July 10, 2014 12:18 PM
To: dev@cloudstack.apache.org
Subject: RE: "Bug" introduced by part of commit 
a600d8408ea86782318139c17cf346c8497943d0

Hi Likitha,

You are absolutely spot on! This is the error message I found:
INFO  [c.c.c.ClusterManagerImpl] (main:null) Management server 90520734207775 
is being started
WARN  [c.c.u.d.T.Transaction] (main:null) txn: Commit called when it is not a 
transaction: 
-Transaction.execute:38-Transaction.execute:46-ClusterManagerImpl.start:940-CloudStackExtendedLifeCycle$1.with:75-CloudStackExtendedLifeCycle.with:153-CloudStackExtendedLifeCycle.startBeans:72-CloudStackExtendedLifeCycleStart.run:46-DefaultModuleDefinitionSet$1.with:105-DefaultModuleDefinitionSet.withModule:245-DefaultModuleDefinitionSet.withModule:250-DefaultModuleDefinitionSet.withModule:250-DefaultModuleDefinitionSet.withModule:233
INFO  [c.c.c.ClusterManagerImpl] (main:null) Management server (host id : 1) is 
being started at 127.0.0.1:9090

Cheers,

Funs

> -Original Message-
> From: Likitha Shetty [mailto:likitha.she...@citrix.com]
> Sent: Thursday, July 10, 2014 5:35 PM
> To: dev@cloudstack.apache.org
> Subject: RE: "Bug" introduced by part of commit
> a600d8408ea86782318139c17cf346c8497943d0
>
> Are you guys are referring to the update method that is throwing the error,
> 'update(long id, long runid, Date lastUpdate) ?. Agreed that this is just a
> symptom.
>
> But I was referring to the first update method in the file which is
> 'update(long id, long runid, String name, String version, String serviceIP, 
> int
> servicePort, Date lastUpdate)'.
> From what I understand this is the method that updates the MS runId when it
> is started. And the problem is that the transaction commit made in this
> update is getting rolled back, which is why we have a wrong runId in the DB
> for the MS. Since the second update method is based on the right runId it
> throws an exception.
> And I suspect the original transaction is getting rolled back because we are
> trying to close a transaction that is already closed.
>
> Thanks,
> Likitha
>
> -Original Message-
> From: Funs Kessen [mailto:fkes...@schubergphilis.com]
> Sent: Thursday, July 10, 2014 5:10 PM
> To: dev@cloudstack.apache.org
> Subject: RE: "Bug" introduced by part of commit
> a600d8408ea86782318139c17cf346c8497943d0
>
> Hi Santhosh,
>
> You're right indeed, it's the update statement in the update itself that adds
> the runid in the where clause, it came in three years and three months ago by
> the looks of it.
>
> Cheers,
>
> Funs
>
> > -Original Message-
> > From: Santhosh Edukulla [mailto:santhosh.eduku...@citrix.com]
> > Sent: Thursday, July 10, 2014 1:22 PM
> > To: dev@cloudstack.apache.org
> > Subject: RE: "Bug" introduced by part of commit
> > a600d8408ea86782318139c17cf346c8497943d0
> >
> > The mentioned issue by Funs was existing earlier as well but was
> > hidden by just logging it when update was failed, now with new change,
> > we resurfaced the problem by throwing it. Its not because of close
> > though. We can see to fix the original problem.
> >
> > Santhosh
> > 
> > From: Likitha Shetty [likitha.she...@citrix.com]
> > Sent: Thursday, July 10, 2014 7:18 AM
> > To: dev@cloudstack.apache.org
> > Subject: RE: "Bug" introduced by part of commit
> > a600d8408ea86782318139c17cf346c8497943d0
> >
> > Santhosh, I pulled the latest code and unfortunately the issue still exists.
> >
> > Looks like the problem is because we try to close the transaction
> > after it has been committed (which implicitly closes the transaction)
> > -
> /framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDao
> > Impl.java
> > txn.commit();
> > } catch (RuntimeException e) {
> > txn.rollback();
> > s_logger.warn("Unexpected exception, ", e);
> > throw new RuntimeException(e.getMessage(), e);
> > }finally {
> > txn.close();
> > }
> >
> > Thanks,
> > Likitha
> >
> > -Original Message-
> > From: Funs Kessen [mailto:fkes...@schubergphilis.com]
> > Sent: Thursday, July 10, 2014 2:38 PM
> > To: dev@cloudstack.apache.org
> > Subject: RE: "Bug" introduced by part of commit
> > a600d8408ea86782318139c17cf346c8497943d0
> >
> > Yeah I see that Ipasted the wrong bit of code *doh*, it was update
> > that was the problem from the same file:
> >
> > @@ -129,24 +133,29 @@
> >  @DB
> >  public void upda

Re: [ANNOUNCE] Apache Libcloud 0.15.1 release

2014-07-10 Thread Sebastien Goasguen
My bad, 

Obviously the wrong list.


On Jul 10, 2014, at 11:49 AM, Sebastien Goasguen  wrote:

> Libcloud is a Python library that abstracts away the differences among
> multiple cloud provider APIs. It allows users to manage cloud services
> (servers, storage, loadbalancers, DNS) offered by many different providers
> through a single, unified and easy to use API.
> 
> We are pleased to announce the release of Libcloud 0.15.1
> 
> This is a bug-fix only release. Among some smaller bugs it also fixes a 
> possible race condition in the deploy_node method which would occur if the 
> SSH key has not been installed yet, it also propagates an exception if the 
> path to a private key is invalid. 
> 
> Full change log can be found at 
> https://git-wip-us.apache.org/repos/asf?p=libcloud.git;a=blob;f=CHANGES.rst;h=d7a78612a3ced9edb82163b09f0262501ea66371;hb=6df77f6e2d3b4df9c3b23938dc65951d7f0a0059
> 
> Download:
> 
> Libcloud 0.15.1 can be downloaded from 
> http://libcloud.apache.org/downloads.html
> or installed using pip:
> 
> pip install apache-libcloud
> 
> Upgrading
> 
> If you have installed Libcloud using pip you can also use it to upgrade it:
> 
> pip install --upgrade apache-libcloud
> 
> Upgrade notes
> 
> A page which describes backward incompatible or semi-incompatible
> changes and how to preserve the old behavior when this is possible
> can be found at http://libcloud.apache.org/upgrade-notes.html.
> 
> Documentation is available at https://libcloud.readthedocs.org/en/latest/
> 
> Bugs / Issues
> 
> If you find any bug or issue, please report it on our issue tracker 
> https://issues.apache.org/jira/browse/LIBCLOUD.
> Don't forget to attach an example and / or test which reproduces your problem.
> 
> Thanks
> 
> Thanks to everyone who contributed and made this release possible! Full list 
> of
> people who contributed to this release can be found in the CHANGES file 
> https://git-wip-us.apache.org/repos/asf?p=libcloud.git;a=blob;f=CHANGES.rst;h=d7a78612a3ced9edb82163b09f0262501ea66371;hb=6df77f6e2d3b4df9c3b23938dc65951d7f0a0059.
> 
> -Sebastien
> On behalf of the Libcloud PMC



RE: "Bug" introduced by part of commit a600d8408ea86782318139c17cf346c8497943d0

2014-07-10 Thread Funs Kessen
Hi Likitha,

You are absolutely spot on! This is the error message I found:
INFO  [c.c.c.ClusterManagerImpl] (main:null) Management server 90520734207775 
is being started
WARN  [c.c.u.d.T.Transaction] (main:null) txn: Commit called when it is not a 
transaction: 
-Transaction.execute:38-Transaction.execute:46-ClusterManagerImpl.start:940-CloudStackExtendedLifeCycle$1.with:75-CloudStackExtendedLifeCycle.with:153-CloudStackExtendedLifeCycle.startBeans:72-CloudStackExtendedLifeCycleStart.run:46-DefaultModuleDefinitionSet$1.with:105-DefaultModuleDefinitionSet.withModule:245-DefaultModuleDefinitionSet.withModule:250-DefaultModuleDefinitionSet.withModule:250-DefaultModuleDefinitionSet.withModule:233
INFO  [c.c.c.ClusterManagerImpl] (main:null) Management server (host id : 1) is 
being started at 127.0.0.1:9090

Cheers,

Funs

> -Original Message-
> From: Likitha Shetty [mailto:likitha.she...@citrix.com]
> Sent: Thursday, July 10, 2014 5:35 PM
> To: dev@cloudstack.apache.org
> Subject: RE: "Bug" introduced by part of commit
> a600d8408ea86782318139c17cf346c8497943d0
> 
> Are you guys are referring to the update method that is throwing the error,
> 'update(long id, long runid, Date lastUpdate) ?. Agreed that this is just a
> symptom.
> 
> But I was referring to the first update method in the file which is
> 'update(long id, long runid, String name, String version, String serviceIP, 
> int
> servicePort, Date lastUpdate)'.
> From what I understand this is the method that updates the MS runId when it
> is started. And the problem is that the transaction commit made in this
> update is getting rolled back, which is why we have a wrong runId in the DB
> for the MS. Since the second update method is based on the right runId it
> throws an exception.
> And I suspect the original transaction is getting rolled back because we are
> trying to close a transaction that is already closed.
> 
> Thanks,
> Likitha
> 
> -Original Message-
> From: Funs Kessen [mailto:fkes...@schubergphilis.com]
> Sent: Thursday, July 10, 2014 5:10 PM
> To: dev@cloudstack.apache.org
> Subject: RE: "Bug" introduced by part of commit
> a600d8408ea86782318139c17cf346c8497943d0
> 
> Hi Santhosh,
> 
> You're right indeed, it's the update statement in the update itself that adds
> the runid in the where clause, it came in three years and three months ago by
> the looks of it.
> 
> Cheers,
> 
> Funs
> 
> > -Original Message-
> > From: Santhosh Edukulla [mailto:santhosh.eduku...@citrix.com]
> > Sent: Thursday, July 10, 2014 1:22 PM
> > To: dev@cloudstack.apache.org
> > Subject: RE: "Bug" introduced by part of commit
> > a600d8408ea86782318139c17cf346c8497943d0
> >
> > The mentioned issue by Funs was existing earlier as well but was
> > hidden by just logging it when update was failed, now with new change,
> > we resurfaced the problem by throwing it. Its not because of close
> > though. We can see to fix the original problem.
> >
> > Santhosh
> > 
> > From: Likitha Shetty [likitha.she...@citrix.com]
> > Sent: Thursday, July 10, 2014 7:18 AM
> > To: dev@cloudstack.apache.org
> > Subject: RE: "Bug" introduced by part of commit
> > a600d8408ea86782318139c17cf346c8497943d0
> >
> > Santhosh, I pulled the latest code and unfortunately the issue still exists.
> >
> > Looks like the problem is because we try to close the transaction
> > after it has been committed (which implicitly closes the transaction)
> > -
> /framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDao
> > Impl.java
> > txn.commit();
> > } catch (RuntimeException e) {
> > txn.rollback();
> > s_logger.warn("Unexpected exception, ", e);
> > throw new RuntimeException(e.getMessage(), e);
> > }finally {
> > txn.close();
> > }
> >
> > Thanks,
> > Likitha
> >
> > -Original Message-
> > From: Funs Kessen [mailto:fkes...@schubergphilis.com]
> > Sent: Thursday, July 10, 2014 2:38 PM
> > To: dev@cloudstack.apache.org
> > Subject: RE: "Bug" introduced by part of commit
> > a600d8408ea86782318139c17cf346c8497943d0
> >
> > Yeah I see that Ipasted the wrong bit of code *doh*, it was update
> > that was the problem from the same file:
> >
> > @@ -129,24 +133,29 @@
> >  @DB
> >  public void update(long id, long runid, Date lastUpdate) {
> >  TransactionLegacy txn = TransactionLegacy.currentTxn();
> > -PreparedStatement pstmt = null;
> >  try {
> >  txn.start();
> > +try( PreparedStatement pstmt =
> > + txn.prepareStatement("update mshost
> > set last_update=?, removed=null, alert_count=0 where id=? and
> > runid=?");) {
> > +pstmt.setString(1,
> > DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"),
> > lastUpdate));
> > +pstmt.setLong(2, id);
> > +pstmt.setLong(3, runid);
> >
> > -pstmt = txn.prepareAutoCloseStatement("update 

[ANNOUNCE] Apache Libcloud 0.15.1 release

2014-07-10 Thread Sebastien Goasguen
Libcloud is a Python library that abstracts away the differences among
multiple cloud provider APIs. It allows users to manage cloud services
(servers, storage, loadbalancers, DNS) offered by many different providers
through a single, unified and easy to use API.

We are pleased to announce the release of Libcloud 0.15.1

This is a bug-fix only release. Among some smaller bugs it also fixes a 
possible race condition in the deploy_node method which would occur if the SSH 
key has not been installed yet, it also propagates an exception if the path to 
a private key is invalid. 

Full change log can be found at 
https://git-wip-us.apache.org/repos/asf?p=libcloud.git;a=blob;f=CHANGES.rst;h=d7a78612a3ced9edb82163b09f0262501ea66371;hb=6df77f6e2d3b4df9c3b23938dc65951d7f0a0059

Download:

Libcloud 0.15.1 can be downloaded from http://libcloud.apache.org/downloads.html
or installed using pip:

pip install apache-libcloud

Upgrading

If you have installed Libcloud using pip you can also use it to upgrade it:

pip install --upgrade apache-libcloud

Upgrade notes

A page which describes backward incompatible or semi-incompatible
changes and how to preserve the old behavior when this is possible
can be found at http://libcloud.apache.org/upgrade-notes.html.

Documentation is available at https://libcloud.readthedocs.org/en/latest/

Bugs / Issues

If you find any bug or issue, please report it on our issue tracker 
https://issues.apache.org/jira/browse/LIBCLOUD.
Don't forget to attach an example and / or test which reproduces your problem.

Thanks

Thanks to everyone who contributed and made this release possible! Full list of
people who contributed to this release can be found in the CHANGES file 
https://git-wip-us.apache.org/repos/asf?p=libcloud.git;a=blob;f=CHANGES.rst;h=d7a78612a3ced9edb82163b09f0262501ea66371;hb=6df77f6e2d3b4df9c3b23938dc65951d7f0a0059.

-Sebastien
On behalf of the Libcloud PMC

RE: "Bug" introduced by part of commit a600d8408ea86782318139c17cf346c8497943d0

2014-07-10 Thread Likitha Shetty
Are you guys are referring to the update method that is throwing the error, 
'update(long id, long runid, Date lastUpdate) ?. Agreed that this is just a 
symptom.

But I was referring to the first update method in the file which is 
'update(long id, long runid, String name, String version, String serviceIP, int 
servicePort, Date lastUpdate)'.
>From what I understand this is the method that updates the MS runId when it is 
>started. And the problem is that the transaction commit made in this update is 
>getting rolled back, which is why we have a wrong runId in the DB for the MS. 
>Since the second update method is based on the right runId it throws an 
>exception.
And I suspect the original transaction is getting rolled back because we are 
trying to close a transaction that is already closed.

Thanks,
Likitha

-Original Message-
From: Funs Kessen [mailto:fkes...@schubergphilis.com] 
Sent: Thursday, July 10, 2014 5:10 PM
To: dev@cloudstack.apache.org
Subject: RE: "Bug" introduced by part of commit 
a600d8408ea86782318139c17cf346c8497943d0

Hi Santhosh,

You're right indeed, it's the update statement in the update itself that adds 
the runid in the where clause, it came in three years and three months ago by 
the looks of it.

Cheers,

Funs

> -Original Message-
> From: Santhosh Edukulla [mailto:santhosh.eduku...@citrix.com]
> Sent: Thursday, July 10, 2014 1:22 PM
> To: dev@cloudstack.apache.org
> Subject: RE: "Bug" introduced by part of commit
> a600d8408ea86782318139c17cf346c8497943d0
> 
> The mentioned issue by Funs was existing earlier as well but was 
> hidden by just logging it when update was failed, now with new change, 
> we resurfaced the problem by throwing it. Its not because of close 
> though. We can see to fix the original problem.
> 
> Santhosh
> 
> From: Likitha Shetty [likitha.she...@citrix.com]
> Sent: Thursday, July 10, 2014 7:18 AM
> To: dev@cloudstack.apache.org
> Subject: RE: "Bug" introduced by part of commit
> a600d8408ea86782318139c17cf346c8497943d0
> 
> Santhosh, I pulled the latest code and unfortunately the issue still exists.
> 
> Looks like the problem is because we try to close the transaction 
> after it has been committed (which implicitly closes the transaction) 
> - /framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDao
> Impl.java
> txn.commit();
> } catch (RuntimeException e) {
> txn.rollback();
> s_logger.warn("Unexpected exception, ", e);
> throw new RuntimeException(e.getMessage(), e);
> }finally {
> txn.close();
> }
> 
> Thanks,
> Likitha
> 
> -Original Message-
> From: Funs Kessen [mailto:fkes...@schubergphilis.com]
> Sent: Thursday, July 10, 2014 2:38 PM
> To: dev@cloudstack.apache.org
> Subject: RE: "Bug" introduced by part of commit
> a600d8408ea86782318139c17cf346c8497943d0
> 
> Yeah I see that Ipasted the wrong bit of code *doh*, it was update 
> that was the problem from the same file:
> 
> @@ -129,24 +133,29 @@
>  @DB
>  public void update(long id, long runid, Date lastUpdate) {
>  TransactionLegacy txn = TransactionLegacy.currentTxn();
> -PreparedStatement pstmt = null;
>  try {
>  txn.start();
> +try( PreparedStatement pstmt = 
> + txn.prepareStatement("update mshost
> set last_update=?, removed=null, alert_count=0 where id=? and 
> runid=?");) {
> +pstmt.setString(1,
> DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), 
> lastUpdate));
> +pstmt.setLong(2, id);
> +pstmt.setLong(3, runid);
> 
> -pstmt = txn.prepareAutoCloseStatement("update mshost set
> last_update=?, removed=null, alert_count=0 where id=? and runid=?");
> -pstmt.setString(1,
> DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), lastUpdate));
> -pstmt.setLong(2, id);
> -pstmt.setLong(3, runid);
> +int count = pstmt.executeUpdate();
> +txn.commit();
> 
> -int count = pstmt.executeUpdate();
> -txn.commit();
> -
> -if (count < 1) {
> -throw new CloudRuntimeException("Invalid cluster session
> detected", new ClusterInvalidSessionException("runid " + runid + " is 
> no longer valid"));
> +if (count < 1) {
> +throw new CloudRuntimeException("Invalid cluster 
> + session
> detected", new ClusterInvalidSessionException("runid " + runid + " is 
> no longer valid"));
> +}
> +}catch (SQLException e) {
> +throw new
> + CloudRuntimeException("update:Exception:"+e.getMessage(), e);
>  }
> -} catch (Exception e) {
> -s_logger.warn("Unexpected exception, ", e);
> -throw new RuntimeException(e.getMessage(), e);
> +} catch (RuntimeException e) {
> +txn.rollback

Re: [DISCUSS] Project Bylaw change - Adding Trademark Usage Approvals as an action

2014-07-10 Thread David Nalley
LGTM

On Thu, Jul 10, 2014 at 10:46 AM, Chip Childers  wrote:
> This email is being cross-posted specifically because bylaws changes are
> required to occur on the dev@ list.  However, the content of this
> message may be primarily of interest to those on the marketing@ list.
>
> For background, please see:
>
> http://s.apache.org/EXe
> http://s.apache.org/r9Y
>
> I have attached a proposed patch to the project bylaws, specifying the
> decision making process to use for trademark usage request approval /
> denial.  Comments are welcome!  I'll leave this out here for comment
> until at least Monday, when I will open a formal VOTE for the change to be
> applied (assuming no disagreements).
>
> -chip


[DISCUSS] Project Bylaw change - Adding Trademark Usage Approvals as an action

2014-07-10 Thread Chip Childers
This email is being cross-posted specifically because bylaws changes are
required to occur on the dev@ list.  However, the content of this
message may be primarily of interest to those on the marketing@ list.

For background, please see:

http://s.apache.org/EXe
http://s.apache.org/r9Y

I have attached a proposed patch to the project bylaws, specifying the
decision making process to use for trademark usage request approval /
denial.  Comments are welcome!  I'll leave this out here for comment
until at least Monday, when I will open a formal VOTE for the change to be
applied (assuming no disagreements).

-chip
Index: bylaws.mdtext
===
--- bylaws.mdtext   (revision 1609456)
+++ bylaws.mdtext   (working copy)
@@ -100,6 +100,8 @@
 
 2.4.1.7. Maintaining these bylaws and other guidelines of the project.
 
+2.4.1.8. Managing and protecting the project's trademarks and brand.
+
 2.4.2. Membership of the PMC is by invitation only and must be approved by a
 lazy consensus of active PMC members.
 
@@ -232,7 +234,8 @@
 3.4.2. Non-Technical Decisions
 
 A non-technical decisions is any decision that does not involve changes to the
-source code that we distribute in our official releases.
+source code that we distribute in our official releases (excluding questions 
of 
+trademark usage).
 
 Non-technical decisions should normally be made by the entire community using
 discussion-lead consensus-building, and not through formal voting.
@@ -330,6 +333,50 @@
 Any active committer or PMC member may call a vote. The vote must occur on the
 project development mailing list.
 
+3.4.11. Trademark Usage Approvals
+
+Our project maintains a formal Trademark Usage Guidelines document, which
+serves as a additive reference to the Apache Software Foundation's trademark
+policies. The Apache CloudStack PMC has had approval authority delegated to it
+for requests from third parties to use our trademarks. It is the PMC's
+responsibility to provide these approvals, and to ensure that any requests
+are in compliance with both the project and the foundation's trademark
+usage policies.
+
+The CloudStack Trademark Guidelines specify how a requestor is expected to
+request permission for usage of the trademarks.
+
+The process of approval will typically be as follows:
+
+* A request is made that includes the required information for the PMC to make 
+a decision.
+* A PMC member reviews the request and provides an initial acknowledgement 
+response to the requester.
+* If no PMC member raises a concern after 72 hours, the requester can assume 
+approval.
+
+In situations where a concern is raised, the PMC member is expected inform the
+requster that there is some discussion that needs to be had prior to approval
+from the PMC.  This notice serves to end the assumed approval after 72 hours.  
+
+After raising a concern, the PMC member in question is required to forward the
+concern to priv...@cloudstack.apache.org, explaining the issue that they have
+with the request.  The use of priv...@cloudstack.apache.org for discussing the
+request is to allow the PMC to deliberate without confusing the requester, and
+to ensure that a formal approval or denial is clear at the end of the
+discusion.
+
+The PMC will then attempt to achieve consensus on how the request for approval
+will be answered.  The requester may be asked for more information to help the
+PMC make a decision, may be asked to make a change to the proposal in order to
+gain approval, or may have their request be denied.
+
+If consensus is not achieved within the PMC by discussion, then a formal VOTE
+can be called as a Lazy 2/3 majority of voting PMC members.
+
+Votes related to trademark usage approvals may be performed on the
+priv...@cloudstack.apache.org mailing list.
+
 3.5. Voting Timeframes
 
 Formal votes are open for a period of at least 72 hours to allow all active


Documentation on cloud-engine and cloudstack-framework

2014-07-10 Thread Rohit Yadav

Hi,

I'm trying to read the code and follow architectural and design changes.
I see most of the code and various layers have the same workflow and
architecture, same as last year except for few places. Can anyone point
me to documentations and goals of cloud-engine and cloudstack-framework
modules, where we are heading with those and what's the current status,
and any on-going re-architecture or refactoring work?

Also, if we're going to implement any authentication framework (or have
already?) that was discussed last year [1], current state & docs on IAM
[2] which works or is still under development?

[1]
https://speakerdeck.com/jburwell/who-the-heck-are-you-integrating-sso-into-cloudstack
[2] http://en.wikipedia.org/wiki/Identity_and_Access_Management

Regards,
Rohit Yadav
Software Architect, ShapeBlue
M. +91 88 262 30892 | rohit.ya...@shapeblue.com
Blog: bhaisaab.org | Twitter: @_bhaisaab


Find out more about ShapeBlue and our range of CloudStack related services

IaaS Cloud Design & Build
CSForge – rapid IaaS deployment framework
CloudStack Consulting
CloudStack Infrastructure 
Support
CloudStack Bootcamp Training Courses

This email and any attachments to it may be confidential and are intended solely 
for the use of the individual to whom it is addressed. Any views or opinions 
expressed are solely those of the author and do not necessarily represent those of 
Shape Blue Ltd or related companies. If you are not the intended recipient of this 
email, you must neither take any action based upon its contents, nor copy or show 
it to anyone. Please contact the sender if you believe you have received this email 
in error. Shape Blue Ltd is a company incorporated in England & Wales. 
ShapeBlue Services India LLP is a company incorporated in India and is operated 
under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company 
incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue 
is a registered trademark.


Cannot release reservation

2014-07-10 Thread Tejas Gadaria
Hi,

I am getting below logs on CS 4.3 on Xenserver 6.2 SP1
i m getting huge amount of of memory allocated to vms, where it is not
actully..

2014-07-10 16:43:16,643 DEBUG [c.c.a.AlertManagerImpl]
(CapacityChecker:ctx-d205d3de) Done executing storage capacity update
2014-07-10 16:43:16,643 DEBUG [c.c.a.AlertManagerImpl]
(CapacityChecker:ctx-d205d3de) Executing capacity updates for public ip and
Vlans
2014-07-10 16:43:16,686 DEBUG [c.c.a.AlertManagerImpl]
(CapacityChecker:ctx-d205d3de) Done capacity updates for public ip and Vlans
2014-07-10 16:43:16,686 DEBUG [c.c.a.AlertManagerImpl]
(CapacityChecker:ctx-d205d3de) Executing capacity updates for private ip
2014-07-10 16:43:16,701 DEBUG [c.c.a.AlertManagerImpl]
(CapacityChecker:ctx-d205d3de) Done executing capacity updates for private
ip
2014-07-10 16:43:16,701 DEBUG [c.c.a.AlertManagerImpl]
(CapacityChecker:ctx-d205d3de) Done recalculating system capacity
2014-07-10 16:43:16,705 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
(HostReservationReleaseChecker:ctx-0828f975) Checking if any host
reservation can be released ...
2014-07-10 16:43:16,720 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
(HostReservationReleaseChecker:ctx-0828f975) Cannot release reservation,
Found 4 VMs Running on

host 1
2014-07-10 16:43:16,727 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
(HostReservationReleaseChecker:ctx-0828f975) Cannot release reservation,
Found 4 VMs Running on

host 5
2014-07-10 16:43:16,732 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
(HostReservationReleaseChecker:ctx-0828f975) Cannot release reservation,
Found 1 VMs Running on

host 6
2014-07-10 16:43:16,732 DEBUG [c.c.d.DeploymentPlanningManagerImpl]
(HostReservationReleaseChecker:ctx-0828f975) Done running
HostReservationReleaseChecker ...


RE: "Bug" introduced by part of commit a600d8408ea86782318139c17cf346c8497943d0

2014-07-10 Thread Funs Kessen
Hi Santhosh,

You're right indeed, it's the update statement in the update itself that adds 
the runid in the where clause, it came in three years and three months ago by 
the looks of it.

Cheers,

Funs

> -Original Message-
> From: Santhosh Edukulla [mailto:santhosh.eduku...@citrix.com]
> Sent: Thursday, July 10, 2014 1:22 PM
> To: dev@cloudstack.apache.org
> Subject: RE: "Bug" introduced by part of commit
> a600d8408ea86782318139c17cf346c8497943d0
> 
> The mentioned issue by Funs was existing earlier as well but was hidden by
> just logging it when update was failed, now with new change, we resurfaced
> the problem by throwing it. Its not because of close though. We can see to fix
> the original problem.
> 
> Santhosh
> 
> From: Likitha Shetty [likitha.she...@citrix.com]
> Sent: Thursday, July 10, 2014 7:18 AM
> To: dev@cloudstack.apache.org
> Subject: RE: "Bug" introduced by part of commit
> a600d8408ea86782318139c17cf346c8497943d0
> 
> Santhosh, I pulled the latest code and unfortunately the issue still exists.
> 
> Looks like the problem is because we try to close the transaction after it has
> been committed (which implicitly closes the transaction) -
> /framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDao
> Impl.java
> txn.commit();
> } catch (RuntimeException e) {
> txn.rollback();
> s_logger.warn("Unexpected exception, ", e);
> throw new RuntimeException(e.getMessage(), e);
> }finally {
> txn.close();
> }
> 
> Thanks,
> Likitha
> 
> -Original Message-
> From: Funs Kessen [mailto:fkes...@schubergphilis.com]
> Sent: Thursday, July 10, 2014 2:38 PM
> To: dev@cloudstack.apache.org
> Subject: RE: "Bug" introduced by part of commit
> a600d8408ea86782318139c17cf346c8497943d0
> 
> Yeah I see that Ipasted the wrong bit of code *doh*, it was update that was
> the problem from the same file:
> 
> @@ -129,24 +133,29 @@
>  @DB
>  public void update(long id, long runid, Date lastUpdate) {
>  TransactionLegacy txn = TransactionLegacy.currentTxn();
> -PreparedStatement pstmt = null;
>  try {
>  txn.start();
> +try( PreparedStatement pstmt = txn.prepareStatement("update 
> mshost
> set last_update=?, removed=null, alert_count=0 where id=? and runid=?");) {
> +pstmt.setString(1,
> DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), lastUpdate));
> +pstmt.setLong(2, id);
> +pstmt.setLong(3, runid);
> 
> -pstmt = txn.prepareAutoCloseStatement("update mshost set
> last_update=?, removed=null, alert_count=0 where id=? and runid=?");
> -pstmt.setString(1,
> DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), lastUpdate));
> -pstmt.setLong(2, id);
> -pstmt.setLong(3, runid);
> +int count = pstmt.executeUpdate();
> +txn.commit();
> 
> -int count = pstmt.executeUpdate();
> -txn.commit();
> -
> -if (count < 1) {
> -throw new CloudRuntimeException("Invalid cluster session
> detected", new ClusterInvalidSessionException("runid " + runid + " is no
> longer valid"));
> +if (count < 1) {
> +throw new CloudRuntimeException("Invalid cluster session
> detected", new ClusterInvalidSessionException("runid " + runid + " is no
> longer valid"));
> +}
> +}catch (SQLException e) {
> +throw new
> + CloudRuntimeException("update:Exception:"+e.getMessage(), e);
>  }
> -} catch (Exception e) {
> -s_logger.warn("Unexpected exception, ", e);
> -throw new RuntimeException(e.getMessage(), e);
> +} catch (RuntimeException e) {
> +txn.rollback();
> +s_logger.warn("update:Exception:"+e.getMessage(), e);
> +throw new RuntimeException("update:Exception:"+e.getMessage(), 
> e);
> +}
> +finally {
> +txn.close();
>  }
>  }
> 
> 
> > -Original Message-
> > From: Trippie [mailto:trip...@gmail.com] On Behalf Of Hugo Trippaers
> > Sent: Thursday, July 10, 2014 11:00 AM
> > To: dev@cloudstack.apache.org
> > Subject: Re: "Bug" introduced by part of commit
> > a600d8408ea86782318139c17cf346c8497943d0
> >
> > Fixed already, good job Santosh
> >
> > Cheers,
> >
> > Hugo
> >
> > On 10 jul. 2014, at 10:58, Hugo Trippaers  wrote:
> >
> > > Doesn't seem related to that particular commit, the function
> > invalidateRunSession appears to be dead code.
> > >
> > > I'll do some digging.
> > >
> > >
> > > Cheers,
> > >
> > > Hugo
> > >
> > > On 10 jul. 2014, at 10:40, Funs Kessen 
> > wrote:
> > >
> > >> Hi Devs,
> > >>
> > >> I recently noticed on master that after starting, stopping and
> > >> starting the
> > management server again I get stacktraces about e

RE: "Bug" introduced by part of commit a600d8408ea86782318139c17cf346c8497943d0

2014-07-10 Thread Santhosh Edukulla
The mentioned issue by Funs was existing earlier as well but was hidden by just 
logging it when update was failed, now with new change, we resurfaced the 
problem by throwing it. Its not because of close though. We can see to fix the 
original problem. 

Santhosh

From: Likitha Shetty [likitha.she...@citrix.com]
Sent: Thursday, July 10, 2014 7:18 AM
To: dev@cloudstack.apache.org
Subject: RE: "Bug" introduced by part of commit 
a600d8408ea86782318139c17cf346c8497943d0

Santhosh, I pulled the latest code and unfortunately the issue still exists.

Looks like the problem is because we try to close the transaction after it has 
been committed (which implicitly closes the transaction) -
/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java
txn.commit();
} catch (RuntimeException e) {
txn.rollback();
s_logger.warn("Unexpected exception, ", e);
throw new RuntimeException(e.getMessage(), e);
}finally {
txn.close();
}

Thanks,
Likitha

-Original Message-
From: Funs Kessen [mailto:fkes...@schubergphilis.com]
Sent: Thursday, July 10, 2014 2:38 PM
To: dev@cloudstack.apache.org
Subject: RE: "Bug" introduced by part of commit 
a600d8408ea86782318139c17cf346c8497943d0

Yeah I see that Ipasted the wrong bit of code *doh*, it was update that was the 
problem from the same file:

@@ -129,24 +133,29 @@
 @DB
 public void update(long id, long runid, Date lastUpdate) {
 TransactionLegacy txn = TransactionLegacy.currentTxn();
-PreparedStatement pstmt = null;
 try {
 txn.start();
+try( PreparedStatement pstmt = txn.prepareStatement("update mshost 
set last_update=?, removed=null, alert_count=0 where id=? and runid=?");) {
+pstmt.setString(1, 
DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), lastUpdate));
+pstmt.setLong(2, id);
+pstmt.setLong(3, runid);

-pstmt = txn.prepareAutoCloseStatement("update mshost set 
last_update=?, removed=null, alert_count=0 where id=? and runid=?");
-pstmt.setString(1, 
DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), lastUpdate));
-pstmt.setLong(2, id);
-pstmt.setLong(3, runid);
+int count = pstmt.executeUpdate();
+txn.commit();

-int count = pstmt.executeUpdate();
-txn.commit();
-
-if (count < 1) {
-throw new CloudRuntimeException("Invalid cluster session 
detected", new ClusterInvalidSessionException("runid " + runid + " is no longer 
valid"));
+if (count < 1) {
+throw new CloudRuntimeException("Invalid cluster session 
detected", new ClusterInvalidSessionException("runid " + runid + " is no longer 
valid"));
+}
+}catch (SQLException e) {
+throw new
+ CloudRuntimeException("update:Exception:"+e.getMessage(), e);
 }
-} catch (Exception e) {
-s_logger.warn("Unexpected exception, ", e);
-throw new RuntimeException(e.getMessage(), e);
+} catch (RuntimeException e) {
+txn.rollback();
+s_logger.warn("update:Exception:"+e.getMessage(), e);
+throw new RuntimeException("update:Exception:"+e.getMessage(), e);
+}
+finally {
+txn.close();
 }
 }


> -Original Message-
> From: Trippie [mailto:trip...@gmail.com] On Behalf Of Hugo Trippaers
> Sent: Thursday, July 10, 2014 11:00 AM
> To: dev@cloudstack.apache.org
> Subject: Re: "Bug" introduced by part of commit
> a600d8408ea86782318139c17cf346c8497943d0
>
> Fixed already, good job Santosh
>
> Cheers,
>
> Hugo
>
> On 10 jul. 2014, at 10:58, Hugo Trippaers  wrote:
>
> > Doesn't seem related to that particular commit, the function
> invalidateRunSession appears to be dead code.
> >
> > I'll do some digging.
> >
> >
> > Cheers,
> >
> > Hugo
> >
> > On 10 jul. 2014, at 10:40, Funs Kessen 
> wrote:
> >
> >> Hi Devs,
> >>
> >> I recently noticed on master that after starting, stopping and
> >> starting the
> management server again I get stacktraces about every second.
> >> After some digging with Daan we found that part of the
> a600d8408ea86782318139c17cf346c84979943d0 commit causes this. The
> problem is however deeper rooted, as the code is supposed to update
> the mshost table, but because another Session ID (actually _runId from
> ClusterManagerImpl.java from the previous run)  is already in there
> the update fails. The Session ID is based on time in milliseconds, and
> offcourse changes when you stop and start the management server again.
> >> Prior to the commit it failed silently, and has done so since the
> >> initial
> checkin it seems. The real question is what the original idea is
> behind the _runId, and is it something that requires fixin

RE: "Bug" introduced by part of commit a600d8408ea86782318139c17cf346c8497943d0

2014-07-10 Thread Likitha Shetty
Santhosh, I pulled the latest code and unfortunately the issue still exists. 

Looks like the problem is because we try to close the transaction after it has 
been committed (which implicitly closes the transaction) -
/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java
txn.commit();
} catch (RuntimeException e) {
txn.rollback();
s_logger.warn("Unexpected exception, ", e);
throw new RuntimeException(e.getMessage(), e);
}finally {
txn.close();
}

Thanks,
Likitha

-Original Message-
From: Funs Kessen [mailto:fkes...@schubergphilis.com] 
Sent: Thursday, July 10, 2014 2:38 PM
To: dev@cloudstack.apache.org
Subject: RE: "Bug" introduced by part of commit 
a600d8408ea86782318139c17cf346c8497943d0

Yeah I see that Ipasted the wrong bit of code *doh*, it was update that was the 
problem from the same file:

@@ -129,24 +133,29 @@
 @DB
 public void update(long id, long runid, Date lastUpdate) {
 TransactionLegacy txn = TransactionLegacy.currentTxn();
-PreparedStatement pstmt = null;
 try {
 txn.start();
+try( PreparedStatement pstmt = txn.prepareStatement("update mshost 
set last_update=?, removed=null, alert_count=0 where id=? and runid=?");) {
+pstmt.setString(1, 
DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), lastUpdate));
+pstmt.setLong(2, id);
+pstmt.setLong(3, runid);
 
-pstmt = txn.prepareAutoCloseStatement("update mshost set 
last_update=?, removed=null, alert_count=0 where id=? and runid=?");
-pstmt.setString(1, 
DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), lastUpdate));
-pstmt.setLong(2, id);
-pstmt.setLong(3, runid);
+int count = pstmt.executeUpdate();
+txn.commit();
 
-int count = pstmt.executeUpdate();
-txn.commit();
-
-if (count < 1) {
-throw new CloudRuntimeException("Invalid cluster session 
detected", new ClusterInvalidSessionException("runid " + runid + " is no longer 
valid"));
+if (count < 1) {
+throw new CloudRuntimeException("Invalid cluster session 
detected", new ClusterInvalidSessionException("runid " + runid + " is no longer 
valid"));
+}
+}catch (SQLException e) {
+throw new 
+ CloudRuntimeException("update:Exception:"+e.getMessage(), e);
 }
-} catch (Exception e) {
-s_logger.warn("Unexpected exception, ", e);
-throw new RuntimeException(e.getMessage(), e);
+} catch (RuntimeException e) {
+txn.rollback();
+s_logger.warn("update:Exception:"+e.getMessage(), e);
+throw new RuntimeException("update:Exception:"+e.getMessage(), e);
+}
+finally {
+txn.close();
 }
 }


> -Original Message-
> From: Trippie [mailto:trip...@gmail.com] On Behalf Of Hugo Trippaers
> Sent: Thursday, July 10, 2014 11:00 AM
> To: dev@cloudstack.apache.org
> Subject: Re: "Bug" introduced by part of commit
> a600d8408ea86782318139c17cf346c8497943d0
> 
> Fixed already, good job Santosh
> 
> Cheers,
> 
> Hugo
> 
> On 10 jul. 2014, at 10:58, Hugo Trippaers  wrote:
> 
> > Doesn't seem related to that particular commit, the function
> invalidateRunSession appears to be dead code.
> >
> > I'll do some digging.
> >
> >
> > Cheers,
> >
> > Hugo
> >
> > On 10 jul. 2014, at 10:40, Funs Kessen 
> wrote:
> >
> >> Hi Devs,
> >>
> >> I recently noticed on master that after starting, stopping and 
> >> starting the
> management server again I get stacktraces about every second.
> >> After some digging with Daan we found that part of the
> a600d8408ea86782318139c17cf346c84979943d0 commit causes this. The 
> problem is however deeper rooted, as the code is supposed to update 
> the mshost table, but because another Session ID (actually _runId from 
> ClusterManagerImpl.java from the previous run)  is already in there 
> the update fails. The Session ID is based on time in milliseconds, and 
> offcourse changes when you stop and start the management server again.
> >> Prior to the commit it failed silently, and has done so since the 
> >> initial
> checkin it seems. The real question is what the original idea is 
> behind the _runId, and is it something that requires fixing ?
> >>
> >> I've pasted part of the commit, sql and stacktrace below.
> >>
> >> Cheers,
> >>
> >> Funs
> >>
> >> ===
> >> mysql> select * from mshost;
> >> +++---+-+---+++--
> +-+-+-+
> >> | id | msid   | runid | name| state | version| 
> >> service_ip |
> service_port | last_update | removed | alert_count |
> >> ++-

RE: "Bug" introduced by part of commit a600d8408ea86782318139c17cf346c8497943d0

2014-07-10 Thread Funs Kessen
Yeah I see that Ipasted the wrong bit of code *doh*, it was update that was the 
problem from the same file:

@@ -129,24 +133,29 @@
 @DB
 public void update(long id, long runid, Date lastUpdate) {
 TransactionLegacy txn = TransactionLegacy.currentTxn();
-PreparedStatement pstmt = null;
 try {
 txn.start();
+try( PreparedStatement pstmt = txn.prepareStatement("update mshost 
set last_update=?, removed=null, alert_count=0 where id=? and runid=?");) {
+pstmt.setString(1, 
DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), lastUpdate));
+pstmt.setLong(2, id);
+pstmt.setLong(3, runid);
 
-pstmt = txn.prepareAutoCloseStatement("update mshost set 
last_update=?, removed=null, alert_count=0 where id=? and runid=?");
-pstmt.setString(1, 
DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), lastUpdate));
-pstmt.setLong(2, id);
-pstmt.setLong(3, runid);
+int count = pstmt.executeUpdate();
+txn.commit();
 
-int count = pstmt.executeUpdate();
-txn.commit();
-
-if (count < 1) {
-throw new CloudRuntimeException("Invalid cluster session 
detected", new ClusterInvalidSessionException("runid " + runid + " is no longer 
valid"));
+if (count < 1) {
+throw new CloudRuntimeException("Invalid cluster session 
detected", new ClusterInvalidSessionException("runid " + runid + " is no longer 
valid"));
+}
+}catch (SQLException e) {
+throw new 
CloudRuntimeException("update:Exception:"+e.getMessage(), e);
 }
-} catch (Exception e) {
-s_logger.warn("Unexpected exception, ", e);
-throw new RuntimeException(e.getMessage(), e);
+} catch (RuntimeException e) {
+txn.rollback();
+s_logger.warn("update:Exception:"+e.getMessage(), e);
+throw new RuntimeException("update:Exception:"+e.getMessage(), e);
+}
+finally {
+txn.close();
 }
 }


> -Original Message-
> From: Trippie [mailto:trip...@gmail.com] On Behalf Of Hugo Trippaers
> Sent: Thursday, July 10, 2014 11:00 AM
> To: dev@cloudstack.apache.org
> Subject: Re: "Bug" introduced by part of commit
> a600d8408ea86782318139c17cf346c8497943d0
> 
> Fixed already, good job Santosh
> 
> Cheers,
> 
> Hugo
> 
> On 10 jul. 2014, at 10:58, Hugo Trippaers  wrote:
> 
> > Doesn't seem related to that particular commit, the function
> invalidateRunSession appears to be dead code.
> >
> > I'll do some digging.
> >
> >
> > Cheers,
> >
> > Hugo
> >
> > On 10 jul. 2014, at 10:40, Funs Kessen 
> wrote:
> >
> >> Hi Devs,
> >>
> >> I recently noticed on master that after starting, stopping and starting the
> management server again I get stacktraces about every second.
> >> After some digging with Daan we found that part of the
> a600d8408ea86782318139c17cf346c84979943d0 commit causes this. The
> problem is however deeper rooted, as the code is supposed to update the
> mshost table, but because another Session ID (actually _runId from
> ClusterManagerImpl.java from the previous run)  is already in there the
> update fails. The Session ID is based on time in milliseconds, and offcourse
> changes when you stop and start the management server again.
> >> Prior to the commit it failed silently, and has done so since the initial
> checkin it seems. The real question is what the original idea is behind the
> _runId, and is it something that requires fixing ?
> >>
> >> I've pasted part of the commit, sql and stacktrace below.
> >>
> >> Cheers,
> >>
> >> Funs
> >>
> >> ===
> >> mysql> select * from mshost;
> >> +++---+-+---+++--
> +-+-+-+
> >> | id | msid   | runid | name| state | version| 
> >> service_ip |
> service_port | last_update | removed | alert_count |
> >> +++---+-+---+++--
> +-+-+-+
> >> |  1 | 90520734207775 | 1404924979461 | cs-mgmt | Up| 4.5.0-
> SNAPSHOT | 127.0.0.1  | 9090 | 2014-07-09 16:58:07 | NULL|
>0 |
> >> +++---+-+---+++--
> +-+-+-+
> >> 1 row in set (0.00 sec)
> >>
> >> ===
> >> commit a600d8408ea86782318139c17cf346c8497943d0
> >> Author: Santhosh Edukulla  2014-07-02
> >> 10:38:16
> >> Committer: Santhosh Edukulla  2014-07-
> 04
> >> 12:47:58
> >>
> >> Fixed Resource Leaks, null dereferences, few other issues reported by
> >> coverity
> >>
> >> -
> >>
> framework/cluster/src/com/cloud/cluster/dao/ManagementServ

Re: How to change primary storage

2014-07-10 Thread Giri Prasad
I have a new install of CS 4.1 on Ubuntu 12.04 LTS.  I currently dont have any 
vm's or applications or volumes configured or running on the CS 4.1. Basically 
a freshly installed Ubuntu kernel and CS 4.1.


The storage setup on the Ubuntu host pc is

XXX.XXX.1.5:/export/primary on /mnt/primary1

XXX.XXX.1.5:/export/secondary on /mnt/secondary

The external disk (My Book Live disk) is configured as 

XXX.XXX.1.20:/nfs/Public/primary on /mnt/primary

    This external disk is configured in Linux host using : apt-get install 
smbfs. The external disk is mounting and is read/write-able in the Linux host.

Now, I want to add the external disk (XXX.XXX.1.20) as the primary storage and 
remove the (local hdd) primary storage XXX.XXX.1.5:/export/primary.

 So, if I just add the XXX.XXX.1.20  as the primary storage in CS, and remove 
1.5:/export/primary will do? Or some other procedure?


Please take note that I have used only smfs, for mounting.


Regards,




 From: Prashant Kumar Mishra 
To: "dev@cloudstack.apache.org" ; Giri Prasad 
 
Cc: "us...@cloudstack.apache.org"  
Sent: Monday, 7 July 2014 10:56 AM
Subject: RE: How to change primary storage
 

Manually changing the db can help you but I prefer These steps ,  can be done  
without any downtime .

1-add http://XXX.XXX.1.20 with /export/dd
2- migrate volumes from http://XXX.XXX.1.5 to http://XXX.XXX.1.20
3-put http://XXX.XXX.1.5 to maintains mode
4- remove http://XXX.XXX.1.5.

thanks

-Original Message-
From: Mike Tutkowski [mailto:mike.tutkow...@solidfire.com] 
Sent: Monday, July 07, 2014 10:48 AM
To: dev@cloudstack.apache.org; Giri Prasad
Cc: us...@cloudstack.apache.org
Subject: Re: How to change primary storage

You can probably change the host_address field of the storage_pool table to 
change the IP address of your primary storage.

You will probably want to make sure you don't have any (non-deleted) volumes on 
the storage pool (primary storage) in question, though.

As you likely have seen, the volumes table is linked to the storage_pool table 
via the storage_pool.id and volumes.pool_id fields.

It might be easier for you to create new primary storage and migrate your 
volumes on the old primary storage to the new primary storage.


On Sun, Jul 6, 2014 at 11:07 PM, Giri Prasad 
wrote:

> Thanks.
>
> I want to change the primary storage IP address from 
> http://XXX.XXX.1.5 to http://XXX.XXX.1.20. Also, I need to change the 
> primary storage directory, from /export/aa to /export/dd.  What is the 
> procedure?
>
>
>
> 
>  From: Prashant Kumar Mishra 
> To: Giri Prasad ; "dev@cloudstack.apache.org" < 
> dev@cloudstack.apache.org>; "us...@cloudstack.apache.org" < 
> us...@cloudstack.apache.org>
> Sent: Monday, 7 July 2014 10:30 AM
> Subject: RE: How to change primary storage
>
>
> For error like "The storage pool will not be used but cleanup is needed"
> you should check global settings "global.clenup.interaval " ,For quick 
> cleanup you can set it to 300ms and check  parameter related to 
> cleanup like storage.template.cleanup.enable  , storage cleanup 
> enabled etc. If global settings are properly tuned I don't think  any 
> database modifications required
>
> ->cloud.volume  stores volumes information , if you are not able to 
> ->delete
> storage because"volume still exist on the storage" change the volume 
> state and delete.
>
> -> storage_pool, storage_pool_view  for primary storage
>
> Thanks
> Prashant
>
>
> -Original Message-
> From: Giri Prasad [mailto:g_p...@yahoo.com]
> Sent: Monday, July 07, 2014 10:00 AM
> To: Prashant Kumar Mishra; dev@cloudstack.apache.org; 
> us...@cloudstack.apache.org
> Subject: Re: How to change primary storage
>
> Hello,
>
> Thanks for suggestion, which I will try.
>
> Btw, I saw a lead as:
> http://comments.gmane.org/gmane.comp.apache.cloudstack.user/7000
> Which says :
>
> when I've had issues deleting primary storages in the past, I've ended 
> up having to delete volumes that were still associated with the 
> datastore from the cloud.volumes table.
>
> Is cloud.volumes the mysql table, where all the primary/secondary 
> storage setups are stored? Or what is the exact db.tablename which 
> stores the primary/secondary storage setups?
>
>
> Regards,
> D.Giriprasad
>
>
>
> - Original Message -
> From: Prashant Kumar Mishra 
> To: "dev@cloudstack.apache.org" ; Giri 
> Prasad < g_p...@yahoo.com>; "us...@cloudstack.apache.org" < 
> us...@cloudstack.apache.org>
> Cc:
> Sent: Sunday, 6 July 2014 9:42 AM
> Subject: RE: How to change primary storage
>
>
> I would suggest add you new  primary storage ,migrate volumes  from 
> old storage to new storage and  then remove ur old primary storage 
> after enabling  maintenance mode.
>
> Thanks
> Prashant
>
>
>
> -Original Message-
> From: Giri Prasad [mailto:g_p...@yahoo.com.INVALID]
> Sent: Saturday, July 05, 2014 10:16 AM
> To: us...@cloudstack.apache.org; dev@cloudstack.apach

Re: "Bug" introduced by part of commit a600d8408ea86782318139c17cf346c8497943d0

2014-07-10 Thread Hugo Trippaers
Fixed already, good job Santosh

Cheers,

Hugo

On 10 jul. 2014, at 10:58, Hugo Trippaers  wrote:

> Doesn’t seem related to that particular commit, the function 
> invalidateRunSession appears to be dead code.
> 
> I’ll do some digging.
> 
> 
> Cheers,
> 
> Hugo
> 
> On 10 jul. 2014, at 10:40, Funs Kessen  wrote:
> 
>> Hi Devs,
>> 
>> I recently noticed on master that after starting, stopping and starting the 
>> management server again I get stacktraces about every second.
>> After some digging with Daan we found that part of the 
>> a600d8408ea86782318139c17cf346c84979943d0 commit causes this. The problem is 
>> however deeper rooted, as the code is supposed to update the mshost table, 
>> but because another Session ID (actually _runId from ClusterManagerImpl.java 
>> from the previous run)  is already in there the update fails. The Session ID 
>> is based on time in milliseconds, and offcourse changes when you stop and 
>> start the management server again.
>> Prior to the commit it failed silently, and has done so since the initial 
>> checkin it seems. The real question is what the original idea is behind the 
>> _runId, and is it something that requires fixing ?
>> 
>> I've pasted part of the commit, sql and stacktrace below.
>> 
>> Cheers,
>> 
>> Funs
>> 
>> ===
>> mysql> select * from mshost;
>> +++---+-+---+++--+-+-+-+
>> | id | msid   | runid | name| state | version| 
>> service_ip | service_port | last_update | removed | alert_count |
>> +++---+-+---+++--+-+-+-+
>> |  1 | 90520734207775 | 1404924979461 | cs-mgmt | Up| 4.5.0-SNAPSHOT | 
>> 127.0.0.1  | 9090 | 2014-07-09 16:58:07 | NULL|   0 |
>> +++---+-+---+++--+-+-+-+
>> 1 row in set (0.00 sec)
>> 
>> ===
>> commit a600d8408ea86782318139c17cf346c8497943d0
>> Author: Santhosh Edukulla  2014-07-02 10:38:16
>> Committer: Santhosh Edukulla  2014-07-04 
>> 12:47:58
>> 
>> Fixed Resource Leaks, null dereferences, few other issues reported by 
>> coverity
>> 
>> - 
>> framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java 
>> diff --git 
>> a/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java
>>  
>> b/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java
>> index 3d0c3f5..89d7d27 100644
>> --- 
>> a/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java
>> +++ 
>> b/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java
>> @@ -53,15 +53,14 @@
>>@Override
>>public void invalidateRunSession(long id, long runid) {
>>TransactionLegacy txn = TransactionLegacy.currentTxn();
>> -PreparedStatement pstmt = null;
>> -try {
>> -pstmt = txn.prepareAutoCloseStatement("update mshost set 
>> runid=0, state='Down' where id=? and runid=?");
>> -pstmt.setLong(1, id);
>> -pstmt.setLong(2, runid);
>> -
>> -pstmt.executeUpdate();
>> +try (PreparedStatement pstmt = txn.prepareStatement("update mshost 
>> set runid=0, state='Down' where id=? and runid=?");){
>> +if(pstmt != null) {
>> +pstmt.setLong(1, id);
>> +pstmt.setLong(2, runid);
>> +pstmt.executeUpdate();
>> +}
>>} catch (SQLException e) {
>> -throw new CloudRuntimeException("DB exception on " + 
>> pstmt.toString(), e);
>> +throw new 
>> CloudRuntimeException("invalidateRunSession:Exception:"+ e.getMessage(), e);
>>}
>>}
>> 
>> ===
>> 2014-07-09 18:45:06,541 WARN  [c.c.c.d.ManagementServerHostDaoImpl] 
>> (Cluster-Heartbeat-1:ctx-5f2f8ad5) update:Exception:Invalid cluster session 
>> detected
>> com.cloud.utils.exception.CloudRuntimeException: Invalid cluster session 
>> detected
>>   at 
>> com.cloud.cluster.dao.ManagementServerHostDaoImpl.update(ManagementServerHostDaoImpl.java:147)
>>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>   at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>   at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>   at java.lang.reflect.Method.invoke(Method.java:606)
>>   at 
>> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>>   at 
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>>   at 
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>>   at 

Re: "Bug" introduced by part of commit a600d8408ea86782318139c17cf346c8497943d0

2014-07-10 Thread Hugo Trippaers
Doesn’t seem related to that particular commit, the function 
invalidateRunSession appears to be dead code.

I’ll do some digging.


Cheers,

Hugo

On 10 jul. 2014, at 10:40, Funs Kessen  wrote:

> Hi Devs,
> 
> I recently noticed on master that after starting, stopping and starting the 
> management server again I get stacktraces about every second.
> After some digging with Daan we found that part of the 
> a600d8408ea86782318139c17cf346c84979943d0 commit causes this. The problem is 
> however deeper rooted, as the code is supposed to update the mshost table, 
> but because another Session ID (actually _runId from ClusterManagerImpl.java 
> from the previous run)  is already in there the update fails. The Session ID 
> is based on time in milliseconds, and offcourse changes when you stop and 
> start the management server again.
> Prior to the commit it failed silently, and has done so since the initial 
> checkin it seems. The real question is what the original idea is behind the 
> _runId, and is it something that requires fixing ?
> 
> I've pasted part of the commit, sql and stacktrace below.
> 
> Cheers,
> 
> Funs
> 
> ===
> mysql> select * from mshost;
> +++---+-+---+++--+-+-+-+
> | id | msid   | runid | name| state | version| 
> service_ip | service_port | last_update | removed | alert_count |
> +++---+-+---+++--+-+-+-+
> |  1 | 90520734207775 | 1404924979461 | cs-mgmt | Up| 4.5.0-SNAPSHOT | 
> 127.0.0.1  | 9090 | 2014-07-09 16:58:07 | NULL|   0 |
> +++---+-+---+++--+-+-+-+
> 1 row in set (0.00 sec)
> 
> ===
> commit a600d8408ea86782318139c17cf346c8497943d0
> Author: Santhosh Edukulla  2014-07-02 10:38:16
> Committer: Santhosh Edukulla  2014-07-04 12:47:58
> 
> Fixed Resource Leaks, null dereferences, few other issues reported by coverity
> 
> - 
> framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java 
> diff --git 
> a/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java
>  
> b/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java
> index 3d0c3f5..89d7d27 100644
> --- 
> a/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java
> +++ 
> b/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java
> @@ -53,15 +53,14 @@
> @Override
> public void invalidateRunSession(long id, long runid) {
> TransactionLegacy txn = TransactionLegacy.currentTxn();
> -PreparedStatement pstmt = null;
> -try {
> -pstmt = txn.prepareAutoCloseStatement("update mshost set 
> runid=0, state='Down' where id=? and runid=?");
> -pstmt.setLong(1, id);
> -pstmt.setLong(2, runid);
> -
> -pstmt.executeUpdate();
> +try (PreparedStatement pstmt = txn.prepareStatement("update mshost 
> set runid=0, state='Down' where id=? and runid=?");){
> +if(pstmt != null) {
> +pstmt.setLong(1, id);
> +pstmt.setLong(2, runid);
> +pstmt.executeUpdate();
> +}
> } catch (SQLException e) {
> -throw new CloudRuntimeException("DB exception on " + 
> pstmt.toString(), e);
> +throw new 
> CloudRuntimeException("invalidateRunSession:Exception:"+ e.getMessage(), e);
> }
> }
> 
> ===
> 2014-07-09 18:45:06,541 WARN  [c.c.c.d.ManagementServerHostDaoImpl] 
> (Cluster-Heartbeat-1:ctx-5f2f8ad5) update:Exception:Invalid cluster session 
> detected
> com.cloud.utils.exception.CloudRuntimeException: Invalid cluster session 
> detected
>at 
> com.cloud.cluster.dao.ManagementServerHostDaoImpl.update(ManagementServerHostDaoImpl.java:147)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>at java.lang.reflect.Method.invoke(Method.java:606)
>at 
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
>at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>at 
> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
>at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:1

RE: "Bug" introduced by part of commit a600d8408ea86782318139c17cf346c8497943d0

2014-07-10 Thread Funs Kessen
Hi Likitha,

Ah cool thanks!

Cheers,

Funs

> -Original Message-
> From: Likitha Shetty [mailto:likitha.she...@citrix.com]
> Sent: Thursday, July 10, 2014 10:50 AM
> To: dev@cloudstack.apache.org
> Cc: Daan Hoogland
> Subject: RE: "Bug" introduced by part of commit
> a600d8408ea86782318139c17cf346c8497943d0
> 
> Funs, Santhosh fixed this problem yesterday.
> https://issues.apache.org/jira/browse/CLOUDSTACK-7079 has more details.
> 
> Thanks,
> Likitha
> 
> -Original Message-
> From: Funs Kessen [mailto:fkes...@schubergphilis.com]
> Sent: Thursday, July 10, 2014 2:10 PM
> To: dev@cloudstack.apache.org
> Cc: Daan Hoogland
> Subject: "Bug" introduced by part of commit
> a600d8408ea86782318139c17cf346c8497943d0
> 
> Hi Devs,
> 
> I recently noticed on master that after starting, stopping and starting the
> management server again I get stacktraces about every second.
> After some digging with Daan we found that part of the
> a600d8408ea86782318139c17cf346c84979943d0 commit causes this. The
> problem is however deeper rooted, as the code is supposed to update the
> mshost table, but because another Session ID (actually _runId from
> ClusterManagerImpl.java from the previous run)  is already in there the
> update fails. The Session ID is based on time in milliseconds, and offcourse
> changes when you stop and start the management server again.
> Prior to the commit it failed silently, and has done so since the initial
> checkin it seems. The real question is what the original idea is behind the
> _runId, and is it something that requires fixing ?
> 
> I've pasted part of the commit, sql and stacktrace below.
> 
> Cheers,
> 
> Funs
> 
> ===
> mysql> select * from mshost;
> +++---+-+---+++--
> +-+-+-+
> | id | msid   | runid | name| state | version| 
> service_ip |
> service_port | last_update | removed | alert_count |
> +++---+-+---+++--
> +-+-+-+
> |  1 | 90520734207775 | 1404924979461 | cs-mgmt | Up| 4.5.0-
> SNAPSHOT | 127.0.0.1  | 9090 | 2014-07-09 16:58:07 | NULL|
>0 |
> +++---+-+---+++--
> +-+-+-+
> 1 row in set (0.00 sec)
> 
> ===
> commit a600d8408ea86782318139c17cf346c8497943d0
> Author: Santhosh Edukulla  2014-07-02
> 10:38:16
> Committer: Santhosh Edukulla  2014-07-04
> 12:47:58
> 
> Fixed Resource Leaks, null dereferences, few other issues reported by
> coverity
> 
> -
> framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoI
> mpl.java
> diff --git
> a/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDa
> oImpl.java
> b/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDa
> oImpl.java
> index 3d0c3f5..89d7d27 100644
> ---
> a/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDa
> oImpl.java
> +++
> b/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDa
> oImpl.java
> @@ -53,15 +53,14 @@
>  @Override
>  public void invalidateRunSession(long id, long runid) {
>  TransactionLegacy txn = TransactionLegacy.currentTxn();
> -PreparedStatement pstmt = null;
> -try {
> -pstmt = txn.prepareAutoCloseStatement("update mshost set runid=0,
> state='Down' where id=? and runid=?");
> -pstmt.setLong(1, id);
> -pstmt.setLong(2, runid);
> -
> -pstmt.executeUpdate();
> +try (PreparedStatement pstmt = txn.prepareStatement("update mshost
> set runid=0, state='Down' where id=? and runid=?");){
> +if(pstmt != null) {
> +pstmt.setLong(1, id);
> +pstmt.setLong(2, runid);
> +pstmt.executeUpdate();
> +}
>  } catch (SQLException e) {
> -throw new CloudRuntimeException("DB exception on " +
> pstmt.toString(), e);
> +throw new
> CloudRuntimeException("invalidateRunSession:Exception:"+ e.getMessage(),
> e);
>  }
>  }
> 
> ===
> 2014-07-09 18:45:06,541 WARN  [c.c.c.d.ManagementServerHostDaoImpl]
> (Cluster-Heartbeat-1:ctx-5f2f8ad5) update:Exception:Invalid cluster session
> detected
> com.cloud.utils.exception.CloudRuntimeException: Invalid cluster session
> detected
> at
> com.cloud.cluster.dao.ManagementServerHostDaoImpl.update(Management
> ServerHostDaoImpl.java:147)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
> va:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
> orImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at

RE: "Bug" introduced by part of commit a600d8408ea86782318139c17cf346c8497943d0

2014-07-10 Thread Likitha Shetty
Funs, Santhosh fixed this problem yesterday. 
https://issues.apache.org/jira/browse/CLOUDSTACK-7079 has more details.

Thanks,
Likitha

-Original Message-
From: Funs Kessen [mailto:fkes...@schubergphilis.com] 
Sent: Thursday, July 10, 2014 2:10 PM
To: dev@cloudstack.apache.org
Cc: Daan Hoogland
Subject: "Bug" introduced by part of commit 
a600d8408ea86782318139c17cf346c8497943d0

Hi Devs,

I recently noticed on master that after starting, stopping and starting the 
management server again I get stacktraces about every second.
After some digging with Daan we found that part of the 
a600d8408ea86782318139c17cf346c84979943d0 commit causes this. The problem is 
however deeper rooted, as the code is supposed to update the mshost table, but 
because another Session ID (actually _runId from ClusterManagerImpl.java from 
the previous run)  is already in there the update fails. The Session ID is 
based on time in milliseconds, and offcourse changes when you stop and start 
the management server again.
Prior to the commit it failed silently, and has done so since the initial 
checkin it seems. The real question is what the original idea is behind the 
_runId, and is it something that requires fixing ?

I've pasted part of the commit, sql and stacktrace below.

Cheers,

Funs

===
mysql> select * from mshost;
+++---+-+---+++--+-+-+-+
| id | msid   | runid | name| state | version| 
service_ip | service_port | last_update | removed | alert_count |
+++---+-+---+++--+-+-+-+
|  1 | 90520734207775 | 1404924979461 | cs-mgmt | Up| 4.5.0-SNAPSHOT | 
127.0.0.1  | 9090 | 2014-07-09 16:58:07 | NULL|   0 |
+++---+-+---+++--+-+-+-+
1 row in set (0.00 sec)

===
commit a600d8408ea86782318139c17cf346c8497943d0
Author: Santhosh Edukulla  2014-07-02 10:38:16
Committer: Santhosh Edukulla  2014-07-04 12:47:58

Fixed Resource Leaks, null dereferences, few other issues reported by coverity

- framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java 
diff --git 
a/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java 
b/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java
index 3d0c3f5..89d7d27 100644
--- 
a/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java
+++ 
b/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java
@@ -53,15 +53,14 @@
 @Override
 public void invalidateRunSession(long id, long runid) {
 TransactionLegacy txn = TransactionLegacy.currentTxn();
-PreparedStatement pstmt = null;
-try {
-pstmt = txn.prepareAutoCloseStatement("update mshost set runid=0, 
state='Down' where id=? and runid=?");
-pstmt.setLong(1, id);
-pstmt.setLong(2, runid);
-
-pstmt.executeUpdate();
+try (PreparedStatement pstmt = txn.prepareStatement("update mshost set 
runid=0, state='Down' where id=? and runid=?");){
+if(pstmt != null) {
+pstmt.setLong(1, id);
+pstmt.setLong(2, runid);
+pstmt.executeUpdate();
+}
 } catch (SQLException e) {
-throw new CloudRuntimeException("DB exception on " + 
pstmt.toString(), e);
+throw new CloudRuntimeException("invalidateRunSession:Exception:"+ 
e.getMessage(), e);
 }
 }

===
2014-07-09 18:45:06,541 WARN  [c.c.c.d.ManagementServerHostDaoImpl] 
(Cluster-Heartbeat-1:ctx-5f2f8ad5) update:Exception:Invalid cluster session 
detected
com.cloud.utils.exception.CloudRuntimeException: Invalid cluster session 
detected
at 
com.cloud.cluster.dao.ManagementServerHostDaoImpl.update(ManagementServerHostDaoImpl.java:147)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at 
com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation

"Bug" introduced by part of commit a600d8408ea86782318139c17cf346c8497943d0

2014-07-10 Thread Funs Kessen
Hi Devs,

I recently noticed on master that after starting, stopping and starting the 
management server again I get stacktraces about every second.
After some digging with Daan we found that part of the 
a600d8408ea86782318139c17cf346c84979943d0 commit causes this. The problem is 
however deeper rooted, as the code is supposed to update the mshost table, but 
because another Session ID (actually _runId from ClusterManagerImpl.java from 
the previous run)  is already in there the update fails. The Session ID is 
based on time in milliseconds, and offcourse changes when you stop and start 
the management server again.
Prior to the commit it failed silently, and has done so since the initial 
checkin it seems. The real question is what the original idea is behind the 
_runId, and is it something that requires fixing ?

I've pasted part of the commit, sql and stacktrace below.

Cheers,

Funs

===
mysql> select * from mshost;
+++---+-+---+++--+-+-+-+
| id | msid   | runid | name| state | version| 
service_ip | service_port | last_update | removed | alert_count |
+++---+-+---+++--+-+-+-+
|  1 | 90520734207775 | 1404924979461 | cs-mgmt | Up| 4.5.0-SNAPSHOT | 
127.0.0.1  | 9090 | 2014-07-09 16:58:07 | NULL|   0 |
+++---+-+---+++--+-+-+-+
1 row in set (0.00 sec)

===
commit a600d8408ea86782318139c17cf346c8497943d0
Author: Santhosh Edukulla  2014-07-02 10:38:16
Committer: Santhosh Edukulla  2014-07-04 12:47:58

Fixed Resource Leaks, null dereferences, few other issues reported by coverity

- framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java 
diff --git 
a/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java 
b/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java
index 3d0c3f5..89d7d27 100644
--- 
a/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java
+++ 
b/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java
@@ -53,15 +53,14 @@
 @Override
 public void invalidateRunSession(long id, long runid) {
 TransactionLegacy txn = TransactionLegacy.currentTxn();
-PreparedStatement pstmt = null;
-try {
-pstmt = txn.prepareAutoCloseStatement("update mshost set runid=0, 
state='Down' where id=? and runid=?");
-pstmt.setLong(1, id);
-pstmt.setLong(2, runid);
-
-pstmt.executeUpdate();
+try (PreparedStatement pstmt = txn.prepareStatement("update mshost set 
runid=0, state='Down' where id=? and runid=?");){
+if(pstmt != null) {
+pstmt.setLong(1, id);
+pstmt.setLong(2, runid);
+pstmt.executeUpdate();
+}
 } catch (SQLException e) {
-throw new CloudRuntimeException("DB exception on " + 
pstmt.toString(), e);
+throw new CloudRuntimeException("invalidateRunSession:Exception:"+ 
e.getMessage(), e);
 }
 }

===
2014-07-09 18:45:06,541 WARN  [c.c.c.d.ManagementServerHostDaoImpl] 
(Cluster-Heartbeat-1:ctx-5f2f8ad5) update:Exception:Invalid cluster session 
detected
com.cloud.utils.exception.CloudRuntimeException: Invalid cluster session 
detected
at 
com.cloud.cluster.dao.ManagementServerHostDaoImpl.update(ManagementServerHostDaoImpl.java:147)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at 
com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy158.update

Re: [DISCUSS][PROPOSAL] git workflow

2014-07-10 Thread Abhinandan Prateek

On 01/07/14 3:39 am, "Sebastien Goasguen"  wrote:

>I would like to re-start this discussion.
>
>Rajani made some good points and someone mentioned Gitflow:
>
>http://nvie.com/posts/a-successful-git-branching-model/
>
>Thinking about our release procedure, we clearly need more tests and a
>CI. However it looks like this is going to take some time.

At Citrix we are able to run CI with BVTs. The system of classification of
tests has enabled us to run around 70% of the BVTs on simulator. A single
cycle takes less than 3 hours to run. This can be further optimised. These
70% of the simulated tests can be run in dev environment[1]. There are two
things that community can do:

1. In short run for any feature commit, mandate that at least the
developers have run the simulator based tests before the merge request.
2. Get the required hardware and have a self service interface available
where devs can run the test on their feature branch.
3. Contribute test cases; now simulator also provides a way to check
failure scenarios [2]


[1] 
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Validating+check-ins
+for+your+local+changes%2C+using+Simulator
[2] 
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Writing+tests+levera
ging+the+simulator+enhancements

-abhi

>
>In the meantime I think there is nothing preventing us from agreeing to
>'git practices', we don't need tests or new infra, we just need to agree
>on the git workflow.
>
>Right now Master is really a development branch, we should make it a
>stable branch for production with very few commits.
>This does not mean that we would release less, in contrary this would
>ensure that a commit to master means it's a production release.
>
>In addition gitflow [1] does not do cherry-picks (gets back to Rajani's
>point) everything is based on merges.
>
>I am of the opinion that git flow provides a nice process. It basically
>freezes master. Development happens in a 'develop' branch, releases
>branches are branched off of that and merged into master and back into
>developŠ.etc
>
>Please read [1] it's a good read.
>
>And let's discuss,
>
>[1] http://nvie.com/posts/a-successful-git-branching-model/
>
>-Sebastien
>
>On Jun 2, 2014, at 11:58 PM, Rajani Karuturi 
>wrote:
>
>> There is also the problem of cherry-picking.
>> As a contributor, I always endup creating multiple patches for each
>>branch as they don¹t cleanly apply on the upward branches. which means
>>distinct commits for each branch and I don¹t easily know which all
>>branches my commit exists unless I do grep.
>> if we follow merging strategy properly, apart from the first merge of
>>the branch, everything else on top of it should be a painless merge.
>> 
>> 
>> 
>> ~Rajani
>> 
>> 
>> 
>> On 02-Jun-2014, at 10:51 pm, Marcus  wrote:
>> 
>>> I think many of the bullet points are what we are currently doing
>>> (guidelines for commit comments, feature branches need to stay in sync
>>>with
>>> master, no back-merging). I also think that much of what we do now is
>>>done
>>> the way it is simply because there *are* vast changes between versions.
>>> Classes are getting shuffled around and changed all the time. If its
>>> feasible to merge branch fixes to master, that's fine, but some quick
>>>tests
>>> seem to indicate that this will be messy getting started.
>>> 
>>> That leaves us with how we do releases. I'm fine with having single
>>> branches for major releases(4.3) and tagging the commits where each
>>> incremental release (4.3.x) is done. I'm trying to remember why we went
>>> with the -forward, I'm sure it's in the mailing list somewhere, but
>>>one of
>>> the nice things it provides is the ability for the release manager to
>>> control what changes are made during code freeze while giving people a
>>> place to stage fixes (though admittedly this is not always followed).
>>> Without -forward, would the flow be for each dev to have their own
>>>repo and
>>> issue pull requests for bugfixes?
>>> 
>>> 
>>> On Mon, Jun 2, 2014 at 3:17 AM, Rajani Karuturi
>>>
>>> wrote:
>>> 
 Any other suggestions/objections/comments??
 Can we discuss this in detail and agree to a process??
 
 
 ~Rajani
 
 
 
 On 02-Jun-2014, at 9:32 am, Rajani Karuturi

 wrote:
 
> Yes as mike said, if its a one-off case we can do a empty
>merge(merge -s
 ours) for it and git will assume its merged but will not bring in any
 changes.
> 
> If the branches diverged a lot, for example after a major rewrite, we
 could stop merging to that branch and above and make the fix manually.
> 
> 
> ~Rajani
> 
> 
> 
> On 30-May-2014, at 11:26 pm, Mike Tutkowski <
 mike.tutkow...@solidfire.com> wrote:
> 
>> Yep, that's what I was referring to in that a particular fix for an
>>old
>> release may not apply to newer versions. That does happen.
>> 
>> We used to mark those as "don't need to merge to branch x" in SVN
>>a