You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Vijayendra Bhamidipati <vi...@citrix.com> on 2012/06/19 02:54:39 UTC

Patch for review and merge into Apache master: Bug CS-15241

Hi Team,

Please find attached the ASF master git patch for Bug CS-15241  (http://bugs.cloudstack.org/browse/CS-15241 ). Also, pasting the contents of the patch below for quicker review.

Please note that this is not the fix for the bug's root cause but a fix for one of the issues found during investigation of the bug.

Regards,
Vijay


>From b63e7d31a7e9372f0de5ada01cdf2396ef2daacb Mon Sep 17 00:00:00 2001
From: Vijayendra Bhamidipati <vi...@citrix.com>
Date: Mon, 18 Jun 2012 17:50:07 -0700
Subject: [PATCH] CS-15241: static NAT is not working when provider is set to
 Juniper SRX

Description:

        Checking in fix for the exception seen due to the absence of
        the AsyncCommandQueued exception in the map of CSExceptionErrorCode
        which is used to look up the error code corresponding to a
        cloudstack exception. Also printing the stack trace in case
        an exception is not found in the map.
---
 .../utils/exception/CSExceptionErrorCode.java      |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java b/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
index 03565bb..74e42a6 100755
--- a/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
+++ b/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
@@ -92,13 +92,15 @@ public class CSExceptionErrorCode {
                        ExceptionErrorCodeMap.put("com.cloud.exception.ResourceUnavailableException", 4520);
                        ExceptionErrorCodeMap.put("com.cloud.exception.StorageUnavailableException", 4525);
                        ExceptionErrorCodeMap.put("com.cloud.exception.UnsupportedServiceException", 4530);
-                       ExceptionErrorCodeMap.put("com.cloud.exception.VirtualMachineMigrationException", 4535);
+                       ExceptionErrorCodeMap.put("com.cloud.exception.VirtualMachineMigrationException", 4535);
+                       ExceptionErrorCodeMap.put("com.cloud.async.AsyncCommandQueued", 4540);

                        // Have a special error code for ServerApiException when it is
                        // thrown in a standalone manner when failing to detect any of the above
                        // standard exceptions.
                        ExceptionErrorCodeMap.put("com.cloud.api.ServerApiException", 9999);
                } catch (Exception e) {
+                       e.printStackTrace();
                        throw new ExceptionInInitializerError(e);
                }
        }
--
1.7.5.1

RE: Patch for review and merge into Apache master: Bug CS-15241

Posted by Vijayendra Bhamidipati <vi...@citrix.com>.
Didn't realize attachments were filtered out in the apache mailing lists - I've attached the patch (0001-CS-15241-static-NAT-is-not-working-when-provider-is-.patch) to the bug. Please do the needful.

Regards,
Vijay

-----Original Message-----
From: Vijayendra Bhamidipati [mailto:vijayendra.bhamidipati@citrix.com] 
Sent: Monday, June 18, 2012 5:55 PM
To: cloudstack-dev@incubator.apache.org
Cc: Chiradeep Vittal; Kelven Yang; Sheng Yang; Alena Prokharchyk
Subject: Patch for review and merge into Apache master: Bug CS-15241

Hi Team,

Please find attached the ASF master git patch for Bug CS-15241  (http://bugs.cloudstack.org/browse/CS-15241 ). Also, pasting the contents of the patch below for quicker review.

Please note that this is not the fix for the bug's root cause but a fix for one of the issues found during investigation of the bug.

Regards,
Vijay


>From b63e7d31a7e9372f0de5ada01cdf2396ef2daacb Mon Sep 17 00:00:00 2001
From: Vijayendra Bhamidipati <vi...@citrix.com>
Date: Mon, 18 Jun 2012 17:50:07 -0700
Subject: [PATCH] CS-15241: static NAT is not working when provider is set to  Juniper SRX

Description:

        Checking in fix for the exception seen due to the absence of
        the AsyncCommandQueued exception in the map of CSExceptionErrorCode
        which is used to look up the error code corresponding to a
        cloudstack exception. Also printing the stack trace in case
        an exception is not found in the map.
---
 .../utils/exception/CSExceptionErrorCode.java      |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java b/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
index 03565bb..74e42a6 100755
--- a/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
+++ b/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
@@ -92,13 +92,15 @@ public class CSExceptionErrorCode {
                        ExceptionErrorCodeMap.put("com.cloud.exception.ResourceUnavailableException", 4520);
                        ExceptionErrorCodeMap.put("com.cloud.exception.StorageUnavailableException", 4525);
                        ExceptionErrorCodeMap.put("com.cloud.exception.UnsupportedServiceException", 4530);
-                       ExceptionErrorCodeMap.put("com.cloud.exception.VirtualMachineMigrationException", 4535);
+                       ExceptionErrorCodeMap.put("com.cloud.exception.VirtualMachineMigrationException", 4535);
+                       
+ ExceptionErrorCodeMap.put("com.cloud.async.AsyncCommandQueued", 4540);

                        // Have a special error code for ServerApiException when it is
                        // thrown in a standalone manner when failing to detect any of the above
                        // standard exceptions.
                        ExceptionErrorCodeMap.put("com.cloud.api.ServerApiException", 9999);
                } catch (Exception e) {
+                       e.printStackTrace();
                        throw new ExceptionInInitializerError(e);
                }
        }
--
1.7.5.1

RE: Patch for review and merge into Apache master: Bug CS-15241

Posted by Vijayendra Bhamidipati <vi...@citrix.com>.
Hi Sheng!

I used the reviewboard tool to resend the patch - hopefully that should fix the corruption issue. Please let me know how it goes.

Regards,
Vijay

-----Original Message-----
From: Sheng Yang [mailto:sheng@yasker.org] 
Sent: Tuesday, June 19, 2012 11:48 AM
To: cloudstack-dev@incubator.apache.org
Cc: Chiradeep Vittal; Kelven Yang; Sheng Yang; Alena Prokharchyk
Subject: Re: Patch for review and merge into Apache master: Bug CS-15241

Hi Vijay,

Apache mailing system didn't accept attachment, and your patch had been corrupted by Exchange server. I've grabbed your attached patch from my Citrix mailbox. But you may need to upload your patch to some external website and provide an url here to apply.


There are works in progress to try to make the patch submitting more convenience. Sorry for the trouble currently...

--Sheng

On Tue, Jun 19, 2012 at 11:33 AM, Sheng Yang <sh...@yasker.org> wrote:
> Applied. Thanks.
>
> --Sheng
>
> On Mon, Jun 18, 2012 at 5:54 PM, Vijayendra Bhamidipati 
> <vi...@citrix.com> wrote:
>> Hi Team,
>>
>> Please find attached the ASF master git patch for Bug CS-15241  (http://bugs.cloudstack.org/browse/CS-15241 ). Also, pasting the contents of the patch below for quicker review.
>>
>> Please note that this is not the fix for the bug's root cause but a fix for one of the issues found during investigation of the bug.
>>
>> Regards,
>> Vijay
>>
>>
>> From b63e7d31a7e9372f0de5ada01cdf2396ef2daacb Mon Sep 17 00:00:00 
>> 2001
>> From: Vijayendra Bhamidipati <vi...@citrix.com>
>> Date: Mon, 18 Jun 2012 17:50:07 -0700
>> Subject: [PATCH] CS-15241: static NAT is not working when provider is 
>> set to
>>  Juniper SRX
>>
>> Description:
>>
>>        Checking in fix for the exception seen due to the absence of
>>        the AsyncCommandQueued exception in the map of 
>> CSExceptionErrorCode
>>        which is used to look up the error code corresponding to a
>>        cloudstack exception. Also printing the stack trace in case
>>        an exception is not found in the map.
>> ---
>>  .../utils/exception/CSExceptionErrorCode.java      |    4 +++-
>>  1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git 
>> a/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java 
>> b/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
>> index 03565bb..74e42a6 100755
>> --- a/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
>> +++ b/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
>> @@ -92,13 +92,15 @@ public class CSExceptionErrorCode {
>>                        
>> ExceptionErrorCodeMap.put("com.cloud.exception.ResourceUnavailableExc
>> eption", 4520);
>>                        
>> ExceptionErrorCodeMap.put("com.cloud.exception.StorageUnavailableExce
>> ption", 4525);
>>                        
>> ExceptionErrorCodeMap.put("com.cloud.exception.UnsupportedServiceExce
>> ption", 4530);
>> -                       
>> ExceptionErrorCodeMap.put("com.cloud.exception.VirtualMachineMigratio
>> nException", 4535);
>> +                       
>> + ExceptionErrorCodeMap.put("com.cloud.exception.VirtualMachineMigrat
>> + ionException", 4535);
>> +                       
>> + ExceptionErrorCodeMap.put("com.cloud.async.AsyncCommandQueued", 
>> + 4540);
>>
>>                        // Have a special error code for 
>> ServerApiException when it is
>>                        // thrown in a standalone manner when failing 
>> to detect any of the above
>>                        // standard exceptions.
>>                        
>> ExceptionErrorCodeMap.put("com.cloud.api.ServerApiException", 9999);
>>                } catch (Exception e) {
>> +                       e.printStackTrace();
>>                        throw new ExceptionInInitializerError(e);
>>                }
>>        }
>> --
>> 1.7.5.1

Re: Patch for review and merge into Apache master: Bug CS-15241

Posted by Sheng Yang <sh...@yasker.org>.
Hi Vijay,

Apache mailing system didn't accept attachment, and your patch had
been corrupted by Exchange server. I've grabbed your attached patch
from my Citrix mailbox. But you may need to upload your patch to some
external website and provide an url here to apply.

There are works in progress to try to make the patch submitting more
convenience. Sorry for the trouble currently...

--Sheng

On Tue, Jun 19, 2012 at 11:33 AM, Sheng Yang <sh...@yasker.org> wrote:
> Applied. Thanks.
>
> --Sheng
>
> On Mon, Jun 18, 2012 at 5:54 PM, Vijayendra Bhamidipati
> <vi...@citrix.com> wrote:
>> Hi Team,
>>
>> Please find attached the ASF master git patch for Bug CS-15241  (http://bugs.cloudstack.org/browse/CS-15241 ). Also, pasting the contents of the patch below for quicker review.
>>
>> Please note that this is not the fix for the bug's root cause but a fix for one of the issues found during investigation of the bug.
>>
>> Regards,
>> Vijay
>>
>>
>> From b63e7d31a7e9372f0de5ada01cdf2396ef2daacb Mon Sep 17 00:00:00 2001
>> From: Vijayendra Bhamidipati <vi...@citrix.com>
>> Date: Mon, 18 Jun 2012 17:50:07 -0700
>> Subject: [PATCH] CS-15241: static NAT is not working when provider is set to
>>  Juniper SRX
>>
>> Description:
>>
>>        Checking in fix for the exception seen due to the absence of
>>        the AsyncCommandQueued exception in the map of CSExceptionErrorCode
>>        which is used to look up the error code corresponding to a
>>        cloudstack exception. Also printing the stack trace in case
>>        an exception is not found in the map.
>> ---
>>  .../utils/exception/CSExceptionErrorCode.java      |    4 +++-
>>  1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java b/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
>> index 03565bb..74e42a6 100755
>> --- a/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
>> +++ b/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
>> @@ -92,13 +92,15 @@ public class CSExceptionErrorCode {
>>                        ExceptionErrorCodeMap.put("com.cloud.exception.ResourceUnavailableException", 4520);
>>                        ExceptionErrorCodeMap.put("com.cloud.exception.StorageUnavailableException", 4525);
>>                        ExceptionErrorCodeMap.put("com.cloud.exception.UnsupportedServiceException", 4530);
>> -                       ExceptionErrorCodeMap.put("com.cloud.exception.VirtualMachineMigrationException", 4535);
>> +                       ExceptionErrorCodeMap.put("com.cloud.exception.VirtualMachineMigrationException", 4535);
>> +                       ExceptionErrorCodeMap.put("com.cloud.async.AsyncCommandQueued", 4540);
>>
>>                        // Have a special error code for ServerApiException when it is
>>                        // thrown in a standalone manner when failing to detect any of the above
>>                        // standard exceptions.
>>                        ExceptionErrorCodeMap.put("com.cloud.api.ServerApiException", 9999);
>>                } catch (Exception e) {
>> +                       e.printStackTrace();
>>                        throw new ExceptionInInitializerError(e);
>>                }
>>        }
>> --
>> 1.7.5.1

Re: Patch for review and merge into Apache master: Bug CS-15241

Posted by Sheng Yang <sh...@yasker.org>.
Applied. Thanks.

--Sheng

On Mon, Jun 18, 2012 at 5:54 PM, Vijayendra Bhamidipati
<vi...@citrix.com> wrote:
> Hi Team,
>
> Please find attached the ASF master git patch for Bug CS-15241  (http://bugs.cloudstack.org/browse/CS-15241 ). Also, pasting the contents of the patch below for quicker review.
>
> Please note that this is not the fix for the bug's root cause but a fix for one of the issues found during investigation of the bug.
>
> Regards,
> Vijay
>
>
> From b63e7d31a7e9372f0de5ada01cdf2396ef2daacb Mon Sep 17 00:00:00 2001
> From: Vijayendra Bhamidipati <vi...@citrix.com>
> Date: Mon, 18 Jun 2012 17:50:07 -0700
> Subject: [PATCH] CS-15241: static NAT is not working when provider is set to
>  Juniper SRX
>
> Description:
>
>        Checking in fix for the exception seen due to the absence of
>        the AsyncCommandQueued exception in the map of CSExceptionErrorCode
>        which is used to look up the error code corresponding to a
>        cloudstack exception. Also printing the stack trace in case
>        an exception is not found in the map.
> ---
>  .../utils/exception/CSExceptionErrorCode.java      |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java b/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
> index 03565bb..74e42a6 100755
> --- a/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
> +++ b/utils/src/com/cloud/utils/exception/CSExceptionErrorCode.java
> @@ -92,13 +92,15 @@ public class CSExceptionErrorCode {
>                        ExceptionErrorCodeMap.put("com.cloud.exception.ResourceUnavailableException", 4520);
>                        ExceptionErrorCodeMap.put("com.cloud.exception.StorageUnavailableException", 4525);
>                        ExceptionErrorCodeMap.put("com.cloud.exception.UnsupportedServiceException", 4530);
> -                       ExceptionErrorCodeMap.put("com.cloud.exception.VirtualMachineMigrationException", 4535);
> +                       ExceptionErrorCodeMap.put("com.cloud.exception.VirtualMachineMigrationException", 4535);
> +                       ExceptionErrorCodeMap.put("com.cloud.async.AsyncCommandQueued", 4540);
>
>                        // Have a special error code for ServerApiException when it is
>                        // thrown in a standalone manner when failing to detect any of the above
>                        // standard exceptions.
>                        ExceptionErrorCodeMap.put("com.cloud.api.ServerApiException", 9999);
>                } catch (Exception e) {
> +                       e.printStackTrace();
>                        throw new ExceptionInInitializerError(e);
>                }
>        }
> --
> 1.7.5.1