[GitHub] cloudstack pull request: CLOUDSTACK-9199: Fixed deployVirtualMachi...
Github user anshul1886 commented on the pull request: https://github.com/apache/cloudstack/pull/1280#issuecomment-218381704 I don't find much value here in adding documentation as code seems to be self explanatory. Regrading backward compatibility I have already answered in my previous comment. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Remove extraneous log directory and add c...
Github user rhtyd commented on the pull request: https://github.com/apache/cloudstack/pull/1537#issuecomment-218398335 LGTM --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
RE: Test failure on master?
I don't have OSX, but it seems to be working on Travis and Linux env in general. I'll send a PR that relaxes malicious client attacks, and ask you to review in your env -- Koushik and Mike. Regards, Rohit Yadav rohit.ya...@shapeblue.com www.shapeblue.com 53 Chandos Place, Covent Garden, London WC2N 4HSUK @shapeblue -Original Message- From: Koushik Das [mailto:koushik@accelerite.com] Sent: Wednesday, May 11, 2016 12:22 PM To: dev@cloudstack.apache.org Subject: Re: Test failure on master? I am also seeing the same failure happening randomly. OS X El Capitan 10.11.4. Results : Tests in error: NioTest.testConnection:152 > TestTimedOut test timed out after 6 milliseco... Tests run: 200, Failures: 0, Errors: 1, Skipped: 13 From: Tutkowski, Mike Sent: Tuesday, May 10, 2016 6:31:23 PM To: dev@cloudstack.apache.org Subject: Re: Test failure on master? Oh, and it's the OS of my MacBook Pro. > On May 10, 2016, at 6:59 AM, Tutkowski, Mike > wrote: > > Hi, > > The environment is Mac OS X El Capitan 10.11.4. > > Thanks! > Mike > >> On May 10, 2016, at 5:51 AM, Will Stevens wrote: >> >> I think I can verify that this is still happening on master for him >> because you changed the timeout (and the number of tests run, etc) >> when you pushed the fix in #1534. So by looking at the timeout of >> 6, we can verify that it is the latest code from master being run. >> >> I do think we need to revisit this to make sure we don't have >> intermittent issues with this test. >> >> Thx guys... >> >> *Will STEVENS* >> Lead Developer >> >> *CloudOps* *| *Cloud Solutions Experts >> 420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 w cloudops.com *|* tw >> @CloudOps_ >> >> On Tue, May 10, 2016 at 7:41 AM, Rohit Yadav >> >> wrote: >> >>> Mike, >>> >>> Can you comment if you're using latest master. Can you also share >>> the environment where you're running this (in a VM, automated by >>> Jenkins, Java version etc)? >>> >>> Will - I think the issue should be fixed on latest master, but if >>> Mike and others are getting failures I can further relax the test. >>> In virtualized environments, there may be threading/scheduling issues. >>> >>> Regards, >>> Rohit Yadav >>> >>> >>> Regards, >>> >>> Rohit Yadav >>> >>> rohit.ya...@shapeblue.com >>> www.shapeblue.com >>> 53 Chandos Place, Covent Garden, London WC2N 4HSUK @shapeblue On >>> May 10 2016, at 3:20 am, Will Stevens wrote: >>> >>> Rohit, can you look into this. >>> >>> It was first introduced in: >>> https://github.com/apache/cloudstack/pull/1493 >>> >>> I thought the problem was fixed with this: >>> https://github.com/apache/cloudstack/pull/1534 >>> >>> Apparently we still have a problem. This is intermittently emitting >>> false negatives from what I can tell... >>> >>> *Will STEVENS* >>> Lead Developer >>> >>> *CloudOps* *| *Cloud Solutions Experts >>> 420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 w cloudops.com *|* >>> tw @CloudOps_ >>> >>> On Mon, May 9, 2016 at 5:34 PM, Tutkowski, Mike >>> >> wrote: >>> ?Hi, I've seen this a couple times today. Is this a known issue? Results : Tests in error: NioTest.testConnection:152 > TestTimedOut test timed out after 6 milliseco... Tests run: 200, Failures: 0, Errors: 1, Skipped: 13 [INFO] --- - [INFO] Reactor Summary: [INFO] [INFO] Apache CloudStack Developer Tools - Checkstyle Configuration SUCCESS [ 1.259 s] [INFO] Apache CloudStack .. SUCCESS [ 1.858 s] [INFO] Apache CloudStack Maven Conventions Parent . SUCCESS [ 1.528 s] [INFO] Apache CloudStack Framework - Managed Context .. SUCCESS [ 4.882 s] [INFO] Apache CloudStack Utils FAILURE >>> [01:20 min]?? Thanks, Mike >>> DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Accelerite, a Persistent Systems business. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Accelerite, a Persistent Systems business does not accept any liability for virus infected mails.
[GitHub] cloudstack pull request: CLOUDSTACK-9265 cleanup around httpclient...
GitHub user DaanHoogland reopened a pull request: https://github.com/apache/cloudstack/pull/1385 CLOUDSTACK-9265 cleanup around httpclient versions some cleanup done - replaced HttpStatus from org.apache.commons.httpclient with that from org.apache.http - removed unthrown HttpException - left auto reformat in place You can merge this pull request into a Git repository by running: $ git pull https://github.com/DaanHoogland/cloudstack CLOUDSTACK-9265 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/1385.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1385 commit cb85b7e8beeedd338676fedead3249f27759fa40 Author: Daan Hoogland Date: 2016-01-29T23:15:24Z CLOUDSTACK-9265 cleanup around httpclient versions --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: NioTest: relax test counts to pass under ...
GitHub user rhtyd opened a pull request: https://github.com/apache/cloudstack/pull/1538 NioTest: relax test counts to pass under timeout Relaxes test count to pass under fixed test timeout (60s). With these settings, malicious clients can thereotically block main IO loop for a maximum of 30s only. Given environment specific JVM thread scheduling, with a test timeout of 60s the test should pass. Practically, the test should pass under 2-3 seconds on most platforms. cc @mike-tutkowski @koushik-das @swill -- can you guys test this on OSX and see if this works for you. Also, can you comment if you're OSX firewall settings that may be blocking the NioServer which runs in the test as OSX by default would block all listening processes. To build and just run this test: mvn clean install -pl utils -Dtest=NioTest You can merge this pull request into a Git repository by running: $ git pull https://github.com/shapeblue/cloudstack nio-test-timeoutfix Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/1538.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1538 commit 5858bb9f797778add0b335d716f7f57e0df78183 Author: Rohit Yadav Date: 2016-05-11T09:31:11Z NioTest: relax test counts to pass under timeout Relaxes test count to pass under fixed test timeout (60s). With these settings, malicious clients can thereotically block main IO loop for a maximum of 30s only. Given environment specific JVM thread scheduling, with a test timeout of 60s the test should pass. Practically, the test should pass under 2-3 seconds on most platforms. Signed-off-by: Rohit Yadav --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
RE: Test failure on master?
Please follow up on PR #1538 and comment if that fixes the issue on OSX. Regards. Regards, Rohit Yadav rohit.ya...@shapeblue.com www.shapeblue.com 53 Chandos Place, Covent Garden, London WC2N 4HSUK @shapeblue -Original Message- From: Rohit Yadav [mailto:rohit.ya...@shapeblue.com] Sent: Wednesday, May 11, 2016 2:49 PM To: dev@cloudstack.apache.org Subject: RE: Test failure on master? I don't have OSX, but it seems to be working on Travis and Linux env in general. I'll send a PR that relaxes malicious client attacks, and ask you to review in your env -- Koushik and Mike. Regards, Rohit Yadav rohit.ya...@shapeblue.com www.shapeblue.com 53 Chandos Place, Covent Garden, London WC2N 4HSUK @shapeblue -Original Message- From: Koushik Das [mailto:koushik@accelerite.com] Sent: Wednesday, May 11, 2016 12:22 PM To: dev@cloudstack.apache.org Subject: Re: Test failure on master? I am also seeing the same failure happening randomly. OS X El Capitan 10.11.4. Results : Tests in error: NioTest.testConnection:152 > TestTimedOut test timed out after 6 milliseco... Tests run: 200, Failures: 0, Errors: 1, Skipped: 13 From: Tutkowski, Mike Sent: Tuesday, May 10, 2016 6:31:23 PM To: dev@cloudstack.apache.org Subject: Re: Test failure on master? Oh, and it's the OS of my MacBook Pro. > On May 10, 2016, at 6:59 AM, Tutkowski, Mike > wrote: > > Hi, > > The environment is Mac OS X El Capitan 10.11.4. > > Thanks! > Mike > >> On May 10, 2016, at 5:51 AM, Will Stevens wrote: >> >> I think I can verify that this is still happening on master for him >> because you changed the timeout (and the number of tests run, etc) >> when you pushed the fix in #1534. So by looking at the timeout of >> 6, we can verify that it is the latest code from master being run. >> >> I do think we need to revisit this to make sure we don't have >> intermittent issues with this test. >> >> Thx guys... >> >> *Will STEVENS* >> Lead Developer >> >> *CloudOps* *| *Cloud Solutions Experts >> 420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 w cloudops.com *|* tw >> @CloudOps_ >> >> On Tue, May 10, 2016 at 7:41 AM, Rohit Yadav >> >> wrote: >> >>> Mike, >>> >>> Can you comment if you're using latest master. Can you also share >>> the environment where you're running this (in a VM, automated by >>> Jenkins, Java version etc)? >>> >>> Will - I think the issue should be fixed on latest master, but if >>> Mike and others are getting failures I can further relax the test. >>> In virtualized environments, there may be threading/scheduling issues. >>> >>> Regards, >>> Rohit Yadav >>> >>> >>> Regards, >>> >>> Rohit Yadav >>> >>> rohit.ya...@shapeblue.com >>> www.shapeblue.com >>> 53 Chandos Place, Covent Garden, London WC2N 4HSUK @shapeblue On >>> May 10 2016, at 3:20 am, Will Stevens wrote: >>> >>> Rohit, can you look into this. >>> >>> It was first introduced in: >>> https://github.com/apache/cloudstack/pull/1493 >>> >>> I thought the problem was fixed with this: >>> https://github.com/apache/cloudstack/pull/1534 >>> >>> Apparently we still have a problem. This is intermittently emitting >>> false negatives from what I can tell... >>> >>> *Will STEVENS* >>> Lead Developer >>> >>> *CloudOps* *| *Cloud Solutions Experts >>> 420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 w cloudops.com *|* >>> tw @CloudOps_ >>> >>> On Mon, May 9, 2016 at 5:34 PM, Tutkowski, Mike >>> >> wrote: >>> ?Hi, I've seen this a couple times today. Is this a known issue? Results : Tests in error: NioTest.testConnection:152 > TestTimedOut test timed out after 6 milliseco... Tests run: 200, Failures: 0, Errors: 1, Skipped: 13 [INFO] --- - [INFO] Reactor Summary: [INFO] [INFO] Apache CloudStack Developer Tools - Checkstyle Configuration SUCCESS [ 1.259 s] [INFO] Apache CloudStack .. SUCCESS [ 1.858 s] [INFO] Apache CloudStack Maven Conventions Parent . SUCCESS [ 1.528 s] [INFO] Apache CloudStack Framework - Managed Context .. SUCCESS [ 4.882 s] [INFO] Apache CloudStack Utils FAILURE >>> [01:20 min]?? Thanks, Mike >>> DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Accelerite, a Persistent Systems business. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Acce
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user abhinandanprateek commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62819386 --- Diff: api/src/org/apache/cloudstack/api/command/admin/vpc/VPCOSPFConfigUpdateCmd.java --- @@ -0,0 +1,207 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package org.apache.cloudstack.api.command.admin.vpc; + +import java.util.Map; + +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.VPCOSPFConfigResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + +import com.cloud.network.vpc.OSPFZoneConfig; +import com.cloud.network.vpc.VpcProvisioningService; +import com.cloud.user.Account; +import com.cloud.utils.net.cidr.BadCIDRException; + +@APICommand(name = "vpcOSPFConfigUpdate", description = "Captures config informaton for ospf zone level params", responseObject = VPCOSPFConfigResponse.class, since = "4.9.0", requestHasSensitiveInfo = true) +public class VPCOSPFConfigUpdateCmd extends BaseCmd { +public static final Logger s_logger = Logger.getLogger(VPCOSPFConfigUpdateCmd.class); +private static final String s_name = "vpcospfconfigresponse"; + +/ + API parameters / +/ + +@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the ID of the Zone") +private Long zoneid; + +@Parameter(name = OSPFZoneConfig.s_protocol, type = CommandType.STRING, required = false, description = "the password used to secure inter ospf communication(default ospf)") +private String protocol; + +@Parameter(name = OSPFZoneConfig.s_area, type = CommandType.STRING, required = false, description = "Specify the OSPF Area ID") +private String area; + +@Parameter(name = OSPFZoneConfig.s_helloInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for HelloInterval timer value.(default 10)") +private Short helloInterval; + +@Parameter(name = OSPFZoneConfig.s_deadInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for RouterDeadInterval timer value used for Wait Timer and Inactivity Timer.(default 40)") +private Short deadInterval; + +@Parameter(name = OSPFZoneConfig.s_retransmitInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for RxmtInterval timer value.(default 5)") +private Short retransmitInterval; + +@Parameter(name = OSPFZoneConfig.s_transitDelay, type = CommandType.SHORT, required = false, description = "Set number of seconds for InfTransDelay value.(default 1)") --- End diff -- There is no default value in Parameter annotation. How will that work, like if in request a field is empty fill it with default value if given ? I think it may not be very useful. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user abhinandanprateek commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62819265 --- Diff: api/src/org/apache/cloudstack/api/command/admin/vpc/VPCOSPFConfigUpdateCmd.java --- @@ -0,0 +1,207 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package org.apache.cloudstack.api.command.admin.vpc; + +import java.util.Map; + +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.VPCOSPFConfigResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + +import com.cloud.network.vpc.OSPFZoneConfig; +import com.cloud.network.vpc.VpcProvisioningService; +import com.cloud.user.Account; +import com.cloud.utils.net.cidr.BadCIDRException; + +@APICommand(name = "vpcOSPFConfigUpdate", description = "Captures config informaton for ospf zone level params", responseObject = VPCOSPFConfigResponse.class, since = "4.9.0", requestHasSensitiveInfo = true) +public class VPCOSPFConfigUpdateCmd extends BaseCmd { +public static final Logger s_logger = Logger.getLogger(VPCOSPFConfigUpdateCmd.class); +private static final String s_name = "vpcospfconfigresponse"; + +/ + API parameters / +/ + +@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the ID of the Zone") +private Long zoneid; + +@Parameter(name = OSPFZoneConfig.s_protocol, type = CommandType.STRING, required = false, description = "the password used to secure inter ospf communication(default ospf)") +private String protocol; + +@Parameter(name = OSPFZoneConfig.s_area, type = CommandType.STRING, required = false, description = "Specify the OSPF Area ID") +private String area; + +@Parameter(name = OSPFZoneConfig.s_helloInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for HelloInterval timer value.(default 10)") +private Short helloInterval; + +@Parameter(name = OSPFZoneConfig.s_deadInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for RouterDeadInterval timer value used for Wait Timer and Inactivity Timer.(default 40)") --- End diff -- There is no default value in Parameter annotation. How will that work, like if in request a field is empty fill it with default value if given ? I think it may not be very useful. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user abhinandanprateek commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62819354 --- Diff: api/src/org/apache/cloudstack/api/command/admin/vpc/VPCOSPFConfigUpdateCmd.java --- @@ -0,0 +1,207 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package org.apache.cloudstack.api.command.admin.vpc; + +import java.util.Map; + +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.VPCOSPFConfigResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + +import com.cloud.network.vpc.OSPFZoneConfig; +import com.cloud.network.vpc.VpcProvisioningService; +import com.cloud.user.Account; +import com.cloud.utils.net.cidr.BadCIDRException; + +@APICommand(name = "vpcOSPFConfigUpdate", description = "Captures config informaton for ospf zone level params", responseObject = VPCOSPFConfigResponse.class, since = "4.9.0", requestHasSensitiveInfo = true) +public class VPCOSPFConfigUpdateCmd extends BaseCmd { +public static final Logger s_logger = Logger.getLogger(VPCOSPFConfigUpdateCmd.class); +private static final String s_name = "vpcospfconfigresponse"; + +/ + API parameters / +/ + +@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the ID of the Zone") +private Long zoneid; + +@Parameter(name = OSPFZoneConfig.s_protocol, type = CommandType.STRING, required = false, description = "the password used to secure inter ospf communication(default ospf)") +private String protocol; + +@Parameter(name = OSPFZoneConfig.s_area, type = CommandType.STRING, required = false, description = "Specify the OSPF Area ID") +private String area; + +@Parameter(name = OSPFZoneConfig.s_helloInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for HelloInterval timer value.(default 10)") --- End diff -- There is no default value in Parameter annotation. How will that work, like if in request a field is empty fill it with default value if given ? I think it may not be very useful. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user abhinandanprateek commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62819397 --- Diff: api/src/org/apache/cloudstack/api/command/admin/vpc/VPCOSPFConfigUpdateCmd.java --- @@ -0,0 +1,207 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package org.apache.cloudstack.api.command.admin.vpc; + +import java.util.Map; + +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.VPCOSPFConfigResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + +import com.cloud.network.vpc.OSPFZoneConfig; +import com.cloud.network.vpc.VpcProvisioningService; +import com.cloud.user.Account; +import com.cloud.utils.net.cidr.BadCIDRException; + +@APICommand(name = "vpcOSPFConfigUpdate", description = "Captures config informaton for ospf zone level params", responseObject = VPCOSPFConfigResponse.class, since = "4.9.0", requestHasSensitiveInfo = true) +public class VPCOSPFConfigUpdateCmd extends BaseCmd { +public static final Logger s_logger = Logger.getLogger(VPCOSPFConfigUpdateCmd.class); +private static final String s_name = "vpcospfconfigresponse"; + +/ + API parameters / +/ + +@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the ID of the Zone") +private Long zoneid; + +@Parameter(name = OSPFZoneConfig.s_protocol, type = CommandType.STRING, required = false, description = "the password used to secure inter ospf communication(default ospf)") +private String protocol; + +@Parameter(name = OSPFZoneConfig.s_area, type = CommandType.STRING, required = false, description = "Specify the OSPF Area ID") +private String area; + +@Parameter(name = OSPFZoneConfig.s_helloInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for HelloInterval timer value.(default 10)") +private Short helloInterval; + +@Parameter(name = OSPFZoneConfig.s_deadInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for RouterDeadInterval timer value used for Wait Timer and Inactivity Timer.(default 40)") +private Short deadInterval; + +@Parameter(name = OSPFZoneConfig.s_retransmitInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for RxmtInterval timer value.(default 5)") +private Short retransmitInterval; + +@Parameter(name = OSPFZoneConfig.s_transitDelay, type = CommandType.SHORT, required = false, description = "Set number of seconds for InfTransDelay value.(default 1)") +private Short transitDelay; + +@Parameter(name = OSPFZoneConfig.s_authentication, type = CommandType.STRING, required = false, description = "Md5 or PlainText (default MD5)") --- End diff -- There is no default value in Parameter annotation. How will that work, like if in request a field is empty fill it with default value if given ? I think it may not be very useful. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user abhinandanprateek commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62819375 --- Diff: api/src/org/apache/cloudstack/api/command/admin/vpc/VPCOSPFConfigUpdateCmd.java --- @@ -0,0 +1,207 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package org.apache.cloudstack.api.command.admin.vpc; + +import java.util.Map; + +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.VPCOSPFConfigResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + +import com.cloud.network.vpc.OSPFZoneConfig; +import com.cloud.network.vpc.VpcProvisioningService; +import com.cloud.user.Account; +import com.cloud.utils.net.cidr.BadCIDRException; + +@APICommand(name = "vpcOSPFConfigUpdate", description = "Captures config informaton for ospf zone level params", responseObject = VPCOSPFConfigResponse.class, since = "4.9.0", requestHasSensitiveInfo = true) +public class VPCOSPFConfigUpdateCmd extends BaseCmd { +public static final Logger s_logger = Logger.getLogger(VPCOSPFConfigUpdateCmd.class); +private static final String s_name = "vpcospfconfigresponse"; + +/ + API parameters / +/ + +@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the ID of the Zone") +private Long zoneid; + +@Parameter(name = OSPFZoneConfig.s_protocol, type = CommandType.STRING, required = false, description = "the password used to secure inter ospf communication(default ospf)") +private String protocol; + +@Parameter(name = OSPFZoneConfig.s_area, type = CommandType.STRING, required = false, description = "Specify the OSPF Area ID") +private String area; + +@Parameter(name = OSPFZoneConfig.s_helloInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for HelloInterval timer value.(default 10)") +private Short helloInterval; + +@Parameter(name = OSPFZoneConfig.s_deadInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for RouterDeadInterval timer value used for Wait Timer and Inactivity Timer.(default 40)") +private Short deadInterval; + +@Parameter(name = OSPFZoneConfig.s_retransmitInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for RxmtInterval timer value.(default 5)") --- End diff -- There is no default value in Parameter annotation. How will that work, like if in request a field is empty fill it with default value if given ? I think it may not be very useful. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: 4.9/master bountycastle changes
Github user rhtyd commented on the pull request: https://github.com/apache/cloudstack/pull/1511#issuecomment-218411583 I've rebased against latest master and pushed -f --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user abhinandanprateek commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62819412 --- Diff: api/src/org/apache/cloudstack/api/command/admin/vpc/VPCOSPFConfigUpdateCmd.java --- @@ -0,0 +1,207 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package org.apache.cloudstack.api.command.admin.vpc; + +import java.util.Map; + +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.VPCOSPFConfigResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + +import com.cloud.network.vpc.OSPFZoneConfig; +import com.cloud.network.vpc.VpcProvisioningService; +import com.cloud.user.Account; +import com.cloud.utils.net.cidr.BadCIDRException; + +@APICommand(name = "vpcOSPFConfigUpdate", description = "Captures config informaton for ospf zone level params", responseObject = VPCOSPFConfigResponse.class, since = "4.9.0", requestHasSensitiveInfo = true) +public class VPCOSPFConfigUpdateCmd extends BaseCmd { +public static final Logger s_logger = Logger.getLogger(VPCOSPFConfigUpdateCmd.class); +private static final String s_name = "vpcospfconfigresponse"; + +/ + API parameters / +/ + +@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the ID of the Zone") +private Long zoneid; + +@Parameter(name = OSPFZoneConfig.s_protocol, type = CommandType.STRING, required = false, description = "the password used to secure inter ospf communication(default ospf)") --- End diff -- There is no default value in Parameter annotation. How will that work, like if in request a field is empty fill it with default value if given ? I think it may not be very useful. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user abhinandanprateek commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62819537 --- Diff: api/src/org/apache/cloudstack/api/command/admin/vpc/VPCOSPFConfigUpdateCmd.java --- @@ -0,0 +1,207 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package org.apache.cloudstack.api.command.admin.vpc; + +import java.util.Map; + +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.VPCOSPFConfigResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + +import com.cloud.network.vpc.OSPFZoneConfig; +import com.cloud.network.vpc.VpcProvisioningService; +import com.cloud.user.Account; +import com.cloud.utils.net.cidr.BadCIDRException; + +@APICommand(name = "vpcOSPFConfigUpdate", description = "Captures config informaton for ospf zone level params", responseObject = VPCOSPFConfigResponse.class, since = "4.9.0", requestHasSensitiveInfo = true) +public class VPCOSPFConfigUpdateCmd extends BaseCmd { +public static final Logger s_logger = Logger.getLogger(VPCOSPFConfigUpdateCmd.class); +private static final String s_name = "vpcospfconfigresponse"; + +/ + API parameters / +/ + +@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the ID of the Zone") +private Long zoneid; + +@Parameter(name = OSPFZoneConfig.s_protocol, type = CommandType.STRING, required = false, description = "the password used to secure inter ospf communication(default ospf)") +private String protocol; + +@Parameter(name = OSPFZoneConfig.s_area, type = CommandType.STRING, required = false, description = "Specify the OSPF Area ID") --- End diff -- yes, in case the ospf is enabled. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user abhinandanprateek commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62819651 --- Diff: api/src/org/apache/cloudstack/api/command/admin/vpc/VPCOSPFConfigUpdateCmd.java --- @@ -0,0 +1,207 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package org.apache.cloudstack.api.command.admin.vpc; + +import java.util.Map; + +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.VPCOSPFConfigResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + +import com.cloud.network.vpc.OSPFZoneConfig; +import com.cloud.network.vpc.VpcProvisioningService; +import com.cloud.user.Account; +import com.cloud.utils.net.cidr.BadCIDRException; + +@APICommand(name = "vpcOSPFConfigUpdate", description = "Captures config informaton for ospf zone level params", responseObject = VPCOSPFConfigResponse.class, since = "4.9.0", requestHasSensitiveInfo = true) +public class VPCOSPFConfigUpdateCmd extends BaseCmd { +public static final Logger s_logger = Logger.getLogger(VPCOSPFConfigUpdateCmd.class); +private static final String s_name = "vpcospfconfigresponse"; + +/ + API parameters / +/ + +@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the ID of the Zone") +private Long zoneid; + +@Parameter(name = OSPFZoneConfig.s_protocol, type = CommandType.STRING, required = false, description = "the password used to secure inter ospf communication(default ospf)") +private String protocol; + +@Parameter(name = OSPFZoneConfig.s_area, type = CommandType.STRING, required = false, description = "Specify the OSPF Area ID") +private String area; + +@Parameter(name = OSPFZoneConfig.s_helloInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for HelloInterval timer value.(default 10)") +private Short helloInterval; + +@Parameter(name = OSPFZoneConfig.s_deadInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for RouterDeadInterval timer value used for Wait Timer and Inactivity Timer.(default 40)") +private Short deadInterval; + +@Parameter(name = OSPFZoneConfig.s_retransmitInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for RxmtInterval timer value.(default 5)") +private Short retransmitInterval; + +@Parameter(name = OSPFZoneConfig.s_transitDelay, type = CommandType.SHORT, required = false, description = "Set number of seconds for InfTransDelay value.(default 1)") +private Short transitDelay; + +@Parameter(name = OSPFZoneConfig.s_authentication, type = CommandType.STRING, required = false, description = "Md5 or PlainText (default MD5)") +private String authentication; + +@Parameter(name = OSPFZoneConfig.s_password, type = CommandType.STRING, required = false, description = "The password used to secure inter quagga communication") +private String password; + +@Parameter(name = OSPFZoneConfig.s_superCIDR, type = CommandType.STRING, required = false, description = "The super zone level CIDR for ospf enabled VPCs") +private String superCIDR; + +@Parameter(name = OSPFZoneConfig.s_enabled, type = CommandType.BOOLEAN, required = false, description = "The flag to enable or disable ospf for this zone") --- End diff --
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user abhinandanprateek commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62819915 --- Diff: api/src/com/cloud/network/vpc/OSPFZoneConfig.java --- @@ -0,0 +1,329 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package com.cloud.network.vpc; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang.StringUtils; + +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.utils.net.NetUtils; +import com.cloud.utils.net.cidr.BadCIDRException; +import com.cloud.utils.net.cidr.CIDR; + +public class OSPFZoneConfig { + +private long zoneId; +private Protocol protocol; +private String ospfArea; +private Short helloInterval; +private Short deadInterval; +private Short retransmitInterval; +private Short transitDelay; +private Authentication authentication; +private String password; +private CIDR[] superCIDRList; +private Boolean enabled; + +public static final String s_protocol = "protocol"; +public static final String s_area = "area"; +public static final String s_helloInterval = "hellointerval"; +public static final String s_deadInterval = "deadinterval"; +public static final String s_retransmitInterval = "retransmitinterval"; +public static final String s_transitDelay = "transitdelay"; +public static final String s_authentication = "authentication"; +public static final String s_superCIDR = "supercidr"; +public static final String s_password = "password"; +public static final String s_enabled = "enabled"; + +public Protocol getProtocol() { +return protocol; +} + +public void setProtocol(Protocol protocol) { +this.protocol = protocol; +} + +public String getOspfArea() { +return ospfArea; +} + +public void setOspfArea(String ospfArea) { +this.ospfArea = ospfArea; +} + +public Short getHelloInterval() { +return helloInterval; +} + +public void setHelloInterval(Short helloInterval) { +this.helloInterval = helloInterval; +} + +public Short getDeadInterval() { +return deadInterval; +} + +public void setDeadInterval(Short deadInterval) { +this.deadInterval = deadInterval; +} + +public Short getRetransmitInterval() { +return retransmitInterval; +} + +public void setRetransmitInterval(Short retransmitInterval) { +this.retransmitInterval = retransmitInterval; +} + +public Short getTransitDelay() { +return transitDelay; +} + +public void setTransitDelay(Short transitDelay) { +this.transitDelay = transitDelay; +} + +public Authentication getAuthentication() { +return authentication; +} + +public void setAuthentication(Authentication authentication) { +this.authentication = authentication; +} + +public String getPassword() { +return password; +} + +public void setPassword(String password) { +this.password = password; +} + +public CIDR[] getSuperCIDR() { +return superCIDRList; +} + +public void setSuperCIDR(CIDR[] superCIDR) { +this.superCIDRList = superCIDR; +} + +public Boolean getEnabled() { +return enabled; +} + +public void setEnabled(Boolean enabled) { +this.enabled = enabled; +} + +public enum Params { +PROTOCOL, AREA, HELLO_INTERVAL, DEAD_INTERVAL, RETRANSMIT_INTERVAL, TRANSIT_DELAY, AUTHENTICATION, SUPER_CIDR, PASSWORD, E
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user rhtyd commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62820395 --- Diff: api/src/org/apache/cloudstack/api/command/admin/vpc/VPCOSPFConfigUpdateCmd.java --- @@ -0,0 +1,207 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package org.apache.cloudstack.api.command.admin.vpc; + +import java.util.Map; + +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.VPCOSPFConfigResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + +import com.cloud.network.vpc.OSPFZoneConfig; +import com.cloud.network.vpc.VpcProvisioningService; +import com.cloud.user.Account; +import com.cloud.utils.net.cidr.BadCIDRException; + +@APICommand(name = "vpcOSPFConfigUpdate", description = "Captures config informaton for ospf zone level params", responseObject = VPCOSPFConfigResponse.class, since = "4.9.0", requestHasSensitiveInfo = true) +public class VPCOSPFConfigUpdateCmd extends BaseCmd { +public static final Logger s_logger = Logger.getLogger(VPCOSPFConfigUpdateCmd.class); +private static final String s_name = "vpcospfconfigresponse"; + +/ + API parameters / +/ + +@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the ID of the Zone") +private Long zoneid; + +@Parameter(name = OSPFZoneConfig.s_protocol, type = CommandType.STRING, required = false, description = "the password used to secure inter ospf communication(default ospf)") +private String protocol; + +@Parameter(name = OSPFZoneConfig.s_area, type = CommandType.STRING, required = false, description = "Specify the OSPF Area ID") +private String area; + +@Parameter(name = OSPFZoneConfig.s_helloInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for HelloInterval timer value.(default 10)") +private Short helloInterval; + +@Parameter(name = OSPFZoneConfig.s_deadInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for RouterDeadInterval timer value used for Wait Timer and Inactivity Timer.(default 40)") +private Short deadInterval; + +@Parameter(name = OSPFZoneConfig.s_retransmitInterval, type = CommandType.SHORT, required = false, description = "Set number of seconds for RxmtInterval timer value.(default 5)") --- End diff -- I'm not sure how a default value is applicable here; but in general if an API author wants to enforce a default value, it's doable either from the getter() or set the default value to the field like `private Short retransmitInterval = 10;`. If the API user sends us the value, that value will overwrite the default value of this field, alternatively we can do a conditional check in the getter(). --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
Re: Virtual router failed to start on KVM + Linux Bridges
Hi Will, I am hitting an issue similar to CLOUDSTACK-9013 on master (4.9.0). Here are the management server error logs: 2016-05-10 08:24:03,109 ERROR [c.c.n.r.VirtualNetworkApplianceManagerImpl] (Work-Job-Executor-3:ctx-5069ea04 job-247/job-250 ctx-48a763a9) (logid:2735b868) VR config: execution failed: "/opt/cloud/bin/update_config.py ip_associations.json", check /var/log/cloud.log in VR for details 2016-05-10 08:24:03,109 WARN [c.c.n.r.VirtualNetworkApplianceManagerImpl] (Work-Job-Executor-3:ctx-5069ea04 job-247/job-250 ctx-48a763a9) (logid:2735b868) Command: com.cloud.agent.api.Command failed while starting virtual router 2016-05-10 08:24:03,109 INFO [c.c.v.VirtualMachineManagerImpl] (Work-Job-Executor-3:ctx-5069ea04 job-247/job-250 ctx-48a763a9) (logid:2735b868) The guru did not like the answers so stopping VM[DomainRouter|r-30-VM] Response: 2016-05-10 08:24:03,067 DEBUG [c.c.a.t.Request] (AgentManager-Handler-10:null) (logid:) Seq 1-4347381015296081926: Processing: { Ans: , MgmtId: 275619426932736, via: 1, Ver: v1, Flags: 10, [{"com.cloud.agent.api.StartAnswer":{"vm":{"id":30,"name":"r-30-VM","type":"DomainRouter","cpus":1,"minSpeed":500,"maxSpeed":500,"minRam":268435456,"maxRam":268435456,"arch":"x86_64","os":"Debian GNU/Linux 5.0 (64-bit)","platformEmulator":"Debian GNU/Linux 5","bootArgs":" template=domP name=r-30-VM eth2ip=10.100.100.117 eth2mask=255.255.255.0 gateway=10.100.100.1 eth0ip=10.10.1.1 eth0mask=255.255.255.0 domain=cs2cloud.internal cidrsize=24 dhcprange=10.10.1.1 eth1ip=169.254.2.130 eth1mask=255.255.0.0 type=router disable_rp_filter=true dns1=128.251.10.29 dns2=4.4.4.4 baremetalnotificationsecuritykey=ODFTmygvs7oVAHVFZMmv7RpvsNNsawY9tf6sfeMvkUJlmEhWXGli5sO_oWAr52vrF18Z5xMgzjclu9P7G_w9Fg baremetalnotificationapikey=pguqxBGrlU2ItCuTHa7xb6pmjrpl9KbVMEE7o6TKrJ-mjDoaRayL_Nj21VkqrKvbtc10L8BxPqaYIhnGJkeHfw host=10.30.36.11 port=8080","enableHA":true,"limitCpuUse":false,"enableDynamicallyScaleVm":false,"vncPassword":"Pj8GDPW2vqLfkdOMoCOogg","vncAddr":"10.100.100.11","params":{},"uuid":"f406776f-3b4c-4d23-917e-715ceaea0a7a","disks":[{"data":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"f44bbb4e-a788-4034-9389-dc1fa47dce70","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"63a122cd-ac74-3cc1-85b0-e3ad105234dc","id":1,"poolType":"NetworkFilesystem","host":" andcvtb05.be.alcatel-lucent.com ","path":"/andcvtb05/storage","port":2049,"url":"NetworkFilesystem:// andcvtb05.be.alcatel-lucent.com/andcvtb05/storage/?ROLE=Primary&STOREUUID=63a122cd-ac74-3cc1-85b0-e3ad105234dc "}},"name":"ROOT-30","size":304774144,"path":"f44bbb4e-a788-4034-9389-dc1fa47dce70","volumeId":30,"vmName":"r-30-VM","accountId":2,"format":"QCOW2","provisioningType":"THIN","id":30,"deviceId":0,"hypervisorType":"KVM"}},"diskSeq":0,"path":"f44bbb4e-a788-4034-9389-dc1fa47dce70","type":"ROOT","_details":{"managed":"false","storagePort":"2049","storageHost":" andcvtb05.be.alcatel-lucent.com","volumeSize":"304774144"}}],"nics":[{"deviceId":2,"networkRateMbps":200,"defaultNic":true,"pxeDisable":true,"nicUuid":"697871c5-d76f-405d-952c-c2d598ae09ae","uuid":"db6e7bae-8dbf-4b31-813f-dba0cad7a817","ip":"10.100.100.117","netmask":"255.255.255.0","gateway":"10.100.100.1","mac":"06:4f:3c:00:00:8f","dns1":"128.251.10.29","dns2":"4.4.4.4","broadcastType":"Vlan","type":"Public","broadcastUri":"vlan://untagged","isolationUri":"vlan://untagged","isSecurityGroupEnabled":false,"name":"cloudbr0"},{"deviceId":0,"networkRateMbps":200,"defaultNic":false,"pxeDisable":true,"nicUuid":"c08c5f3b-8725-4006-9660-551ecdc492fe","uuid":"e118f6ac-d812-403c-b948-99a510f7fd93","ip":"10.10.1.1","netmask":"255.255.255.0","mac":"02:00:6b:7b:00:02","dns1":"128.251.10.29","dns2":"4.4.4.4","broadcastType":"Vlan","type":"Guest","broadcastUri":"vlan://300","isolationUri":"vlan://300","isSecurityGroupEnabled":false,"name":"cloudbr1"},{"deviceId":1,"networkRateMbps":-1,"defaultNic":false,"pxeDisable":true,"nicUuid":"fe94aabc-705f-47e3-9981-0139acf1af3d","uuid":"6f1abde1-d0cb-4411-9e9b-9db1fdd5f7ab","ip":"169.254.2.130","netmask":"255.255.0.0","gateway":"169.254.0.1","mac":"0e:00:a9:fe:02:82","broadcastType":"LinkLocal","type":"Control","isSecurityGroupEnabled":false}]},"result":true,"wait":0}},{"com.cloud.agent.api.check.CheckSshAnswer":{"result":true,"wait":0}},{"com.cloud.agent.api.GetDomRVersionAnswer":{"templateVersion":"Cloudstack Release 4.4.0 Wed Mar 26 23:26:41 UTC 2014","scriptsVersion":"e54d6a03fe7d28ff66432d33c8897934\n","result":true,"details":"Cloudstack Release 4.4.0 Wed Mar 26 23:26:41 UTC 2014&e54d6a03fe7d28ff66432d33c8897934\n","wait":0}},{"com.cloud.agent.api.NetworkUsageAnswer":{"routerName":"r-30-VM","bytesSent":0,"bytesReceived":0,"result":true,"wait":0}},{"com.cloud.agent.api.Answer":{"result":true,"details":"Command aggregation started","wait":0}},{"com.cloud.agent.api.Answer":{"result":true,"wait":0}},{"com.cloud.agent.api.Answer":{"result":true,"wait":0}},{"com.cloud.agent.api.Answer":{
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user abhinandanprateek commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62824571 --- Diff: core/src/com/cloud/agent/api/routing/QuaggaConfigCommand.java --- @@ -0,0 +1,86 @@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// + +package com.cloud.agent.api.routing; + +import com.cloud.network.vpc.OSPFZoneConfig; +import com.cloud.utils.net.cidr.CIDR; + +public class QuaggaConfigCommand extends NetworkElementCommand { + +private String routerPublicIp; +private String routerName; +private String vpnCidr; +private CIDR[] tierCidrs; +private OSPFZoneConfig zoneConfig; + +public QuaggaConfigCommand(final String routerPublicIp, final String routerName, final String vpnCidr, final CIDR[] tierCidrs, final OSPFZoneConfig qzc) { --- End diff -- The tier cidrs are provided by the user. I think it would have mode more sense if they were being generated automatically from a given cidr. So a method that breaks a given cidr using a netmask into tiers would be a good application of what you are suggesting. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9299: Out-of-band Management f...
Github user rhtyd commented on the pull request: https://github.com/apache/cloudstack/pull/1502#issuecomment-218421442 @nvazquez can you check why test_03_list_snapshots failed in the Travis run, with tearDown exception. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user abhinandanprateek commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62826214 --- Diff: core/src/com/cloud/agent/resource/virtualnetwork/facade/QuaggaConfigItem.java --- @@ -0,0 +1,93 @@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// + +package com.cloud.agent.resource.virtualnetwork.facade; + +import java.util.List; + +import com.cloud.agent.api.routing.NetworkElementCommand; +import com.cloud.agent.api.routing.QuaggaConfigCommand; +import com.cloud.agent.resource.virtualnetwork.ConfigItem; +import com.cloud.agent.resource.virtualnetwork.VRScripts; +import com.cloud.agent.resource.virtualnetwork.model.ConfigBase; +import com.cloud.agent.resource.virtualnetwork.model.QuaggaRule; +import com.cloud.network.vpc.OSPFZoneConfig; +import com.cloud.utils.net.cidr.CIDR; + +public class QuaggaConfigItem extends AbstractConfigItemFacade { + +@Override +public List generateConfig(final NetworkElementCommand cmd) { +final QuaggaConfigCommand command = (QuaggaConfigCommand)cmd; + +final String vrIp = command.getRouterPublicIp(); +final String vrName = command.getRouterName(); +final CIDR[] cidrs = command.getTierCidrs(); +final OSPFZoneConfig qzc = command.getZoneConfig(); + +StringBuilder zebra = new StringBuilder(); +zebra.append("hostname " + vrName).append(","); +zebra.append("interface eth1").append(","); +zebra.append(" description link to area 0").append(","); +zebra.append(" ip address " + vrIp + "/24").append(","); --- End diff -- No, it is ipv4 specific. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user abhinandanprateek commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62826751 --- Diff: core/src/com/cloud/agent/resource/virtualnetwork/facade/QuaggaConfigItem.java --- @@ -0,0 +1,93 @@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// + +package com.cloud.agent.resource.virtualnetwork.facade; + +import java.util.List; + +import com.cloud.agent.api.routing.NetworkElementCommand; +import com.cloud.agent.api.routing.QuaggaConfigCommand; +import com.cloud.agent.resource.virtualnetwork.ConfigItem; +import com.cloud.agent.resource.virtualnetwork.VRScripts; +import com.cloud.agent.resource.virtualnetwork.model.ConfigBase; +import com.cloud.agent.resource.virtualnetwork.model.QuaggaRule; +import com.cloud.network.vpc.OSPFZoneConfig; +import com.cloud.utils.net.cidr.CIDR; + +public class QuaggaConfigItem extends AbstractConfigItemFacade { + +@Override +public List generateConfig(final NetworkElementCommand cmd) { +final QuaggaConfigCommand command = (QuaggaConfigCommand)cmd; + +final String vrIp = command.getRouterPublicIp(); +final String vrName = command.getRouterName(); +final CIDR[] cidrs = command.getTierCidrs(); +final OSPFZoneConfig qzc = command.getZoneConfig(); + +StringBuilder zebra = new StringBuilder(); +zebra.append("hostname " + vrName).append(","); +zebra.append("interface eth1").append(","); +zebra.append(" description link to area 0").append(","); +zebra.append(" ip address " + vrIp + "/24").append(","); +zebra.append(" link-detect").append(","); +zebra.append("log file /var/log/quagga/zebra.log").append(","); + +StringBuilder ospfd = new StringBuilder(); +ospfd.append("hostname " + vrName).append(","); +ospfd.append("interface eth1").append(","); +ospfd.append(" ip ospf hello-interval ").append(qzc.getHelloInterval()).append(","); +ospfd.append(" ip ospf dead-interval ").append(qzc.getDeadInterval()).append(","); +ospfd.append(" ip ospf retransmit-interval ").append(qzc.getRetransmitInterval()).append(","); +ospfd.append(" ip ospf transmit-delay ").append(qzc.getTransitDelay()).append(","); +if (qzc.getAuthentication().equals(OSPFZoneConfig.Authentication.MD5) && qzc.getPassword().length() > 3){ +ospfd.append(" ip ospf authentication message-digest").append(","); +ospfd.append(" ip ospf message-digest-key 1 md5 ").append(qzc.getPassword()).append(","); +} +ospfd.append("router ospf").append(","); +ospfd.append(" ospf router-id " + vrIp).append(","); +ospfd.append(" redistribute connected").append(","); +ospfd.append(" no passive-interface eth1").append(","); +ospfd.append(" network " + vrIp + "/24 area ").append(qzc.getOspfArea()).append(","); --- End diff -- No, it is ipv4 specific. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user abhinandanprateek commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62827143 --- Diff: core/src/com/cloud/agent/resource/virtualnetwork/facade/QuaggaConfigItem.java --- @@ -0,0 +1,93 @@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// + +package com.cloud.agent.resource.virtualnetwork.facade; + +import java.util.List; + +import com.cloud.agent.api.routing.NetworkElementCommand; +import com.cloud.agent.api.routing.QuaggaConfigCommand; +import com.cloud.agent.resource.virtualnetwork.ConfigItem; +import com.cloud.agent.resource.virtualnetwork.VRScripts; +import com.cloud.agent.resource.virtualnetwork.model.ConfigBase; +import com.cloud.agent.resource.virtualnetwork.model.QuaggaRule; +import com.cloud.network.vpc.OSPFZoneConfig; +import com.cloud.utils.net.cidr.CIDR; + +public class QuaggaConfigItem extends AbstractConfigItemFacade { + +@Override +public List generateConfig(final NetworkElementCommand cmd) { +final QuaggaConfigCommand command = (QuaggaConfigCommand)cmd; + +final String vrIp = command.getRouterPublicIp(); +final String vrName = command.getRouterName(); +final CIDR[] cidrs = command.getTierCidrs(); +final OSPFZoneConfig qzc = command.getZoneConfig(); + +StringBuilder zebra = new StringBuilder(); +zebra.append("hostname " + vrName).append(","); +zebra.append("interface eth1").append(","); +zebra.append(" description link to area 0").append(","); +zebra.append(" ip address " + vrIp + "/24").append(","); +zebra.append(" link-detect").append(","); +zebra.append("log file /var/log/quagga/zebra.log").append(","); + +StringBuilder ospfd = new StringBuilder(); +ospfd.append("hostname " + vrName).append(","); +ospfd.append("interface eth1").append(","); +ospfd.append(" ip ospf hello-interval ").append(qzc.getHelloInterval()).append(","); +ospfd.append(" ip ospf dead-interval ").append(qzc.getDeadInterval()).append(","); +ospfd.append(" ip ospf retransmit-interval ").append(qzc.getRetransmitInterval()).append(","); +ospfd.append(" ip ospf transmit-delay ").append(qzc.getTransitDelay()).append(","); +if (qzc.getAuthentication().equals(OSPFZoneConfig.Authentication.MD5) && qzc.getPassword().length() > 3){ +ospfd.append(" ip ospf authentication message-digest").append(","); +ospfd.append(" ip ospf message-digest-key 1 md5 ").append(qzc.getPassword()).append(","); +} +ospfd.append("router ospf").append(","); +ospfd.append(" ospf router-id " + vrIp).append(","); +ospfd.append(" redistribute connected").append(","); +ospfd.append(" no passive-interface eth1").append(","); --- End diff -- First 2 nics on VR are for specific purpose to CS. If there are more network service there will be more nics. If there are multiple public networks there will be more public nics. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user abhinandanprateek commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62827236 --- Diff: core/src/com/cloud/agent/resource/virtualnetwork/facade/QuaggaConfigItem.java --- @@ -0,0 +1,93 @@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// + +package com.cloud.agent.resource.virtualnetwork.facade; + +import java.util.List; + +import com.cloud.agent.api.routing.NetworkElementCommand; +import com.cloud.agent.api.routing.QuaggaConfigCommand; +import com.cloud.agent.resource.virtualnetwork.ConfigItem; +import com.cloud.agent.resource.virtualnetwork.VRScripts; +import com.cloud.agent.resource.virtualnetwork.model.ConfigBase; +import com.cloud.agent.resource.virtualnetwork.model.QuaggaRule; +import com.cloud.network.vpc.OSPFZoneConfig; +import com.cloud.utils.net.cidr.CIDR; + +public class QuaggaConfigItem extends AbstractConfigItemFacade { + +@Override +public List generateConfig(final NetworkElementCommand cmd) { +final QuaggaConfigCommand command = (QuaggaConfigCommand)cmd; + +final String vrIp = command.getRouterPublicIp(); --- End diff -- Can be done, but it will be a bigger restructuring exercise as router ip touches almost all networking code. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
Re: Virtual router failed to start on KVM + Linux Bridges
Prashanth, it looks you still use the systemvm template 4.4.0. Please upload the new systemvm template and test it again. you can follow http://docs.cloudstack.apache.org/projects/cloudstack-release-notes/en/4.8.0/upgrade/upgrade-4.5.html . -Wei 2016-05-11 12:06 GMT+02:00 Prashanth Manthena < prashanth.manth...@nuagenetworks.net>: > Hi Will, > > I am hitting an issue similar to CLOUDSTACK-9013 on master (4.9.0). Here > are the management server error logs: > > 2016-05-10 08:24:03,109 ERROR [c.c.n.r.VirtualNetworkApplianceManagerImpl] > (Work-Job-Executor-3:ctx-5069ea04 job-247/job-250 ctx-48a763a9) > (logid:2735b868) VR config: execution failed: > "/opt/cloud/bin/update_config.py ip_associations.json", check > /var/log/cloud.log in VR for details > > 2016-05-10 08:24:03,109 WARN [c.c.n.r.VirtualNetworkApplianceManagerImpl] > (Work-Job-Executor-3:ctx-5069ea04 job-247/job-250 ctx-48a763a9) > (logid:2735b868) Command: com.cloud.agent.api.Command failed while starting > virtual router > > 2016-05-10 08:24:03,109 INFO [c.c.v.VirtualMachineManagerImpl] > (Work-Job-Executor-3:ctx-5069ea04 job-247/job-250 ctx-48a763a9) > (logid:2735b868) The guru did not like the answers so stopping > VM[DomainRouter|r-30-VM] > > Response: > > 2016-05-10 08:24:03,067 DEBUG [c.c.a.t.Request] > (AgentManager-Handler-10:null) (logid:) Seq 1-4347381015296081926: > Processing: { Ans: , MgmtId: 275619426932736, via: 1, Ver: v1, Flags: 10, > > [{"com.cloud.agent.api.StartAnswer":{"vm":{"id":30,"name":"r-30-VM","type":"DomainRouter","cpus":1,"minSpeed":500,"maxSpeed":500,"minRam":268435456,"maxRam":268435456,"arch":"x86_64","os":"Debian > GNU/Linux 5.0 (64-bit)","platformEmulator":"Debian GNU/Linux > 5","bootArgs":" template=domP name=r-30-VM eth2ip=10.100.100.117 > eth2mask=255.255.255.0 gateway=10.100.100.1 eth0ip=10.10.1.1 > eth0mask=255.255.255.0 domain=cs2cloud.internal cidrsize=24 > dhcprange=10.10.1.1 eth1ip=169.254.2.130 eth1mask=255.255.0.0 type=router > disable_rp_filter=true dns1=128.251.10.29 dns2=4.4.4.4 > > baremetalnotificationsecuritykey=ODFTmygvs7oVAHVFZMmv7RpvsNNsawY9tf6sfeMvkUJlmEhWXGli5sO_oWAr52vrF18Z5xMgzjclu9P7G_w9Fg > > baremetalnotificationapikey=pguqxBGrlU2ItCuTHa7xb6pmjrpl9KbVMEE7o6TKrJ-mjDoaRayL_Nj21VkqrKvbtc10L8BxPqaYIhnGJkeHfw > host=10.30.36.11 > > port=8080","enableHA":true,"limitCpuUse":false,"enableDynamicallyScaleVm":false,"vncPassword":"Pj8GDPW2vqLfkdOMoCOogg","vncAddr":"10.100.100.11","params":{},"uuid":"f406776f-3b4c-4d23-917e-715ceaea0a7a","disks":[{"data":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"f44bbb4e-a788-4034-9389-dc1fa47dce70","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"63a122cd-ac74-3cc1-85b0-e3ad105234dc","id":1,"poolType":"NetworkFilesystem","host":" > andcvtb05.be.alcatel-lucent.com > ","path":"/andcvtb05/storage","port":2049,"url":"NetworkFilesystem:// > > andcvtb05.be.alcatel-lucent.com/andcvtb05/storage/?ROLE=Primary&STOREUUID=63a122cd-ac74-3cc1-85b0-e3ad105234dc > > "}},"name":"ROOT-30","size":304774144,"path":"f44bbb4e-a788-4034-9389-dc1fa47dce70","volumeId":30,"vmName":"r-30-VM","accountId":2,"format":"QCOW2","provisioningType":"THIN","id":30,"deviceId":0,"hypervisorType":"KVM"}},"diskSeq":0,"path":"f44bbb4e-a788-4034-9389-dc1fa47dce70","type":"ROOT","_details":{"managed":"false","storagePort":"2049","storageHost":" > andcvtb05.be.alcatel-lucent.com > ","volumeSize":"304774144"}}],"nics":[{"deviceId":2,"networkRateMbps":200,"defaultNic":true,"pxeDisable":true,"nicUuid":"697871c5-d76f-405d-952c-c2d598ae09ae","uuid":"db6e7bae-8dbf-4b31-813f-dba0cad7a817","ip":"10.100.100.117","netmask":"255.255.255.0","gateway":"10.100.100.1","mac":"06:4f:3c:00:00:8f","dns1":"128.251.10.29","dns2":"4.4.4.4","broadcastType":"Vlan","type":"Public","broadcastUri":"vlan://untagged","isolationUri":"vlan://untagged","isSecurityGroupEnabled":false,"name":"cloudbr0"},{"deviceId":0,"networkRateMbps":200,"defaultNic":false,"pxeDisable":true,"nicUuid":"c08c5f3b-8725-4006-9660-551ecdc492fe","uuid":"e118f6ac-d812-403c-b948-99a510f7fd93","ip":"10.10.1.1","netmask":"255.255.255.0","mac":"02:00:6b:7b:00:02","dns1":"128.251.10.29","dns2":"4.4.4.4","broadcastType":"Vlan","type":"Guest","broadcastUri":"vlan://300","isolationUri":"vlan://300","isSecurityGroupEnabled":false,"name":"cloudbr1"},{"deviceId":1,"networkRateMbps":-1,"defaultNic":false,"pxeDisable":true,"nicUuid":"fe94aabc-705f-47e3-9981-0139acf1af3d","uuid":"6f1abde1-d0cb-4411-9e9b-9db1fdd5f7ab","ip":"169.254.2.130","netmask":"255.255.0.0","gateway":"169.254.0.1","mac":"0e:00:a9:fe:02:82","broadcastType":"LinkLocal","type":"Control","isSecurityGroupEnabled":false}]},"result":true,"wait":0}},{"com.cloud.agent.api.check.CheckSshAnswer":{"result":true,"wait":0}},{"com.cloud.agent.api.GetDomRVersionAnswer":{"templateVersion":"Cloudstack > Release 4.4.0 Wed Mar 26 23:26:41 UTC > > 2014","scriptsVersion":"e54d6a03fe7d28ff66432d33c8897934\n","result":true,"details":"Cloudstack > Release 4.4.0
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user abhinandanprateek commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62831265 --- Diff: engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java --- @@ -1445,28 +1466,31 @@ public void prepareAllNicsForMigration(final VirtualMachineProfile vm, final Dep Long guestNetworkId = null; for (final NicVO nic : nics) { final NetworkVO network = _networksDao.findById(nic.getNetworkId()); -if(network.getTrafficType().equals(TrafficType.Guest) && network.getGuestType().equals(GuestType.Isolated)){ +if (network.getTrafficType().equals(TrafficType.Guest) && network.getGuestType().equals(GuestType.Isolated)) { + guestNetworkId = network.getId(); } final Integer networkRate = _networkModel.getNetworkRate(network.getId(), vm.getId()); final NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName()); final NicProfile profile = new NicProfile(nic, network, nic.getBroadcastUri(), nic.getIsolationUri(), networkRate, _networkModel.isSecurityGroupSupportedInNetwork(network), _networkModel.getNetworkTag(vm.getHypervisorType(), network)); -if(guru instanceof NetworkMigrationResponder){ -if(!((NetworkMigrationResponder) guru).prepareMigration(profile, network, vm, dest, context)){ -s_logger.error("NetworkGuru "+guru+" prepareForMigration failed."); // XXX: Transaction error +if (guru instanceof NetworkMigrationResponder) { --- End diff -- I think it is some formatting change as there are no ospf related changes in this part of the code. Guru is a implementation for network. Though there is always a possibility for it to go null, it will not happen as cloudstack ships with default implementations. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
Re: Virtual router failed to start on KVM + Linux Bridges
Hi Will, I was able to put a break-point and debug the actual issue in the VR (system VM template), it's a Python import error of the package "netaddr", which can be fixed by updating the system template with the "netaddr" package installed in it. Hopefully, it fixes this issue. Here is the error in VR's /var/log/cloud.log: Wed May 11 10:29:37 UTC 2016 : VR config: configuation format version 1.0 Wed May 11 10:29:37 UTC 2016 : VR config: creating file: /var/cache/cloud/ip_asss ociations.json Wed May 11 10:29:37 UTC 2016 : VR config: create file success Wed May 11 10:29:37 UTC 2016 : VR config: executing: /opt/cloud/bin/update_confii g.py ip_associations.json Traceback (most recent call last): File "/opt/cloud/bin/update_config.py", line 20, in from merge import QueueFile File "/opt/cloud/bin/merge.py", line 23, in import cs_ip File "/opt/cloud/bin/cs_ip.py", line 19, in from netaddr import * ImportError: No module named netaddr Wed May 11 10:29:37 UTC 2016 : VR config: executing failed: /opt/cloud/bin/updatt e_config.py ip_associations.json With regards, Prashanth On Wed, May 11, 2016 at 12:06 PM, Prashanth Manthena < prashanth.manth...@nuagenetworks.net> wrote: > Hi Will, > > I am hitting an issue similar to CLOUDSTACK-9013 on master (4.9.0). Here > are the management server error logs: > > 2016-05-10 08:24:03,109 ERROR [c.c.n.r.VirtualNetworkApplianceManagerImpl] > (Work-Job-Executor-3:ctx-5069ea04 job-247/job-250 ctx-48a763a9) > (logid:2735b868) VR config: execution failed: > "/opt/cloud/bin/update_config.py ip_associations.json", check > /var/log/cloud.log in VR for details > > 2016-05-10 08:24:03,109 WARN [c.c.n.r.VirtualNetworkApplianceManagerImpl] > (Work-Job-Executor-3:ctx-5069ea04 job-247/job-250 ctx-48a763a9) > (logid:2735b868) Command: com.cloud.agent.api.Command failed while starting > virtual router > > 2016-05-10 08:24:03,109 INFO [c.c.v.VirtualMachineManagerImpl] > (Work-Job-Executor-3:ctx-5069ea04 job-247/job-250 ctx-48a763a9) > (logid:2735b868) The guru did not like the answers so stopping > VM[DomainRouter|r-30-VM] > > Response: > > 2016-05-10 08:24:03,067 DEBUG [c.c.a.t.Request] > (AgentManager-Handler-10:null) (logid:) Seq 1-4347381015296081926: > Processing: { Ans: , MgmtId: 275619426932736, via: 1, Ver: v1, Flags: 10, > [{"com.cloud.agent.api.StartAnswer":{"vm":{"id":30,"name":"r-30-VM","type":"DomainRouter","cpus":1,"minSpeed":500,"maxSpeed":500,"minRam":268435456,"maxRam":268435456,"arch":"x86_64","os":"Debian > GNU/Linux 5.0 (64-bit)","platformEmulator":"Debian GNU/Linux > 5","bootArgs":" template=domP name=r-30-VM eth2ip=10.100.100.117 > eth2mask=255.255.255.0 gateway=10.100.100.1 eth0ip=10.10.1.1 > eth0mask=255.255.255.0 domain=cs2cloud.internal cidrsize=24 > dhcprange=10.10.1.1 eth1ip=169.254.2.130 eth1mask=255.255.0.0 type=router > disable_rp_filter=true dns1=128.251.10.29 dns2=4.4.4.4 > baremetalnotificationsecuritykey=ODFTmygvs7oVAHVFZMmv7RpvsNNsawY9tf6sfeMvkUJlmEhWXGli5sO_oWAr52vrF18Z5xMgzjclu9P7G_w9Fg > baremetalnotificationapikey=pguqxBGrlU2ItCuTHa7xb6pmjrpl9KbVMEE7o6TKrJ-mjDoaRayL_Nj21VkqrKvbtc10L8BxPqaYIhnGJkeHfw > host=10.30.36.11 > port=8080","enableHA":true,"limitCpuUse":false,"enableDynamicallyScaleVm":false,"vncPassword":"Pj8GDPW2vqLfkdOMoCOogg","vncAddr":"10.100.100.11","params":{},"uuid":"f406776f-3b4c-4d23-917e-715ceaea0a7a","disks":[{"data":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"f44bbb4e-a788-4034-9389-dc1fa47dce70","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"63a122cd-ac74-3cc1-85b0-e3ad105234dc","id":1,"poolType":"NetworkFilesystem","host":" > andcvtb05.be.alcatel-lucent.com > ","path":"/andcvtb05/storage","port":2049,"url":"NetworkFilesystem:// > andcvtb05.be.alcatel-lucent.com/andcvtb05/storage/?ROLE=Primary&STOREUUID=63a122cd-ac74-3cc1-85b0-e3ad105234dc > "}},"name":"ROOT-30","size":304774144,"path":"f44bbb4e-a788-4034-9389-dc1fa47dce70","volumeId":30,"vmName":"r-30-VM","accountId":2,"format":"QCOW2","provisioningType":"THIN","id":30,"deviceId":0,"hypervisorType":"KVM"}},"diskSeq":0,"path":"f44bbb4e-a788-4034-9389-dc1fa47dce70","type":"ROOT","_details":{"managed":"false","storagePort":"2049","storageHost":" > andcvtb05.be.alcatel-lucent.com","volumeSize":"304774144"}}],"nics":[{"deviceId":2,"networkRateMbps":200,"defaultNic":true,"pxeDisable":true,"nicUuid":"697871c5-d76f-405d-952c-c2d598ae09ae","uuid":"db6e7bae-8dbf-4b31-813f-dba0cad7a817","ip":"10.100.100.117","netmask":"255.255.255.0","gateway":"10.100.100.1","mac":"06:4f:3c:00:00:8f","dns1":"128.251.10.29","dns2":"4.4.4.4","broadcastType":"Vlan","type":"Public","broadcastUri":"vlan://untagged","isolationUri":"vlan://untagged","isSecurityGroupEnabled":false,"name":"cloudbr0"},{"deviceId":0,"networkRateMbps":200,"defaultNic":false,"pxeDisable":true,"nicUuid":"c08c5f3b-8725-4006-9660-551ecdc492fe","uuid":"e118f6ac-d812-403c-b948-99a510f7fd93","ip":"10.10.1.1","netmask":"255.255.255.0","mac":"02:00:6b:7b:00
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user abhinandanprateek commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62835972 --- Diff: engine/schema/src/com/cloud/network/vpc/dao/VpcServiceMapDaoImpl.java --- @@ -62,7 +62,31 @@ protected VpcServiceMapDaoImpl() { @Override public boolean areServicesSupportedInVpc(long vpcId, Service... services) { -// TODO Auto-generated method stub +SearchCriteria sc = MultipleServicesSearch.create(); +sc.setParameters("vpcId", vpcId); + +if (services != null) { +String[] servicesStr = new String[services.length]; + +int i = 0; +for (Service service : services) { +servicesStr[i] = service.getName(); +i++; +} + +sc.setParameters("service", (Object[])servicesStr); +} + +List vpcServices = listBy(sc); + +if (services != null) { +if (vpcServices.size() == services.length) { --- End diff -- listBy is going to query the services that are send to the function. So if all the services queried for are present the dao should return that many rows. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
Re: Virtual router failed to start on KVM + Linux Bridges
Hi Prashanth, As Wei suggested, when you use CloudStack 4.6/4.7/4.8/4.9 you also need the systemvm template with version 4.6.0. This does include the needed Python modules. The 4.4 template you used won't fly. You will run into other missing packages and changes as well. Regards, Remi Sent from my iPhone > On 11 May 2016, at 13:50, Prashanth Manthena > wrote: > > Hi Will, > > I was able to put a break-point and debug the actual issue in the VR > (system VM template), it's a Python import error of the package "netaddr", > which can be fixed by updating the system template with the "netaddr" > package installed in it. Hopefully, it fixes this issue. > > Here is the error in VR's /var/log/cloud.log: > > Wed May 11 10:29:37 UTC 2016 : VR config: configuation format version 1.0 > Wed May 11 10:29:37 UTC 2016 : VR config: creating file: > /var/cache/cloud/ip_asss > ociations.json > Wed May 11 10:29:37 UTC 2016 : VR config: create file success > Wed May 11 10:29:37 UTC 2016 : VR config: executing: > /opt/cloud/bin/update_confii > g.py ip_associations.json > Traceback (most recent call last): > File "/opt/cloud/bin/update_config.py", line 20, in >from merge import QueueFile > File "/opt/cloud/bin/merge.py", line 23, in >import cs_ip > File "/opt/cloud/bin/cs_ip.py", line 19, in >from netaddr import * > ImportError: No module named netaddr > Wed May 11 10:29:37 UTC 2016 : VR config: executing failed: > /opt/cloud/bin/updatt > e_config.py ip_associations.json > > With regards, > Prashanth > > On Wed, May 11, 2016 at 12:06 PM, Prashanth Manthena < > prashanth.manth...@nuagenetworks.net> wrote: > >> Hi Will, >> >> I am hitting an issue similar to CLOUDSTACK-9013 on master (4.9.0). Here >> are the management server error logs: >> >> 2016-05-10 08:24:03,109 ERROR [c.c.n.r.VirtualNetworkApplianceManagerImpl] >> (Work-Job-Executor-3:ctx-5069ea04 job-247/job-250 ctx-48a763a9) >> (logid:2735b868) VR config: execution failed: >> "/opt/cloud/bin/update_config.py ip_associations.json", check >> /var/log/cloud.log in VR for details >> >> 2016-05-10 08:24:03,109 WARN [c.c.n.r.VirtualNetworkApplianceManagerImpl] >> (Work-Job-Executor-3:ctx-5069ea04 job-247/job-250 ctx-48a763a9) >> (logid:2735b868) Command: com.cloud.agent.api.Command failed while starting >> virtual router >> >> 2016-05-10 08:24:03,109 INFO [c.c.v.VirtualMachineManagerImpl] >> (Work-Job-Executor-3:ctx-5069ea04 job-247/job-250 ctx-48a763a9) >> (logid:2735b868) The guru did not like the answers so stopping >> VM[DomainRouter|r-30-VM] >> >> Response: >> >> 2016-05-10 08:24:03,067 DEBUG [c.c.a.t.Request] >> (AgentManager-Handler-10:null) (logid:) Seq 1-4347381015296081926: >> Processing: { Ans: , MgmtId: 275619426932736, via: 1, Ver: v1, Flags: 10, >> [{"com.cloud.agent.api.StartAnswer":{"vm":{"id":30,"name":"r-30-VM","type":"DomainRouter","cpus":1,"minSpeed":500,"maxSpeed":500,"minRam":268435456,"maxRam":268435456,"arch":"x86_64","os":"Debian >> GNU/Linux 5.0 (64-bit)","platformEmulator":"Debian GNU/Linux >> 5","bootArgs":" template=domP name=r-30-VM eth2ip=10.100.100.117 >> eth2mask=255.255.255.0 gateway=10.100.100.1 eth0ip=10.10.1.1 >> eth0mask=255.255.255.0 domain=cs2cloud.internal cidrsize=24 >> dhcprange=10.10.1.1 eth1ip=169.254.2.130 eth1mask=255.255.0.0 type=router >> disable_rp_filter=true dns1=128.251.10.29 dns2=4.4.4.4 >> baremetalnotificationsecuritykey=ODFTmygvs7oVAHVFZMmv7RpvsNNsawY9tf6sfeMvkUJlmEhWXGli5sO_oWAr52vrF18Z5xMgzjclu9P7G_w9Fg >> baremetalnotificationapikey=pguqxBGrlU2ItCuTHa7xb6pmjrpl9KbVMEE7o6TKrJ-mjDoaRayL_Nj21VkqrKvbtc10L8BxPqaYIhnGJkeHfw >> host=10.30.36.11 >> port=8080","enableHA":true,"limitCpuUse":false,"enableDynamicallyScaleVm":false,"vncPassword":"Pj8GDPW2vqLfkdOMoCOogg","vncAddr":"10.100.100.11","params":{},"uuid":"f406776f-3b4c-4d23-917e-715ceaea0a7a","disks":[{"data":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"f44bbb4e-a788-4034-9389-dc1fa47dce70","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"63a122cd-ac74-3cc1-85b0-e3ad105234dc","id":1,"poolType":"NetworkFilesystem","host":" >> andcvtb05.be.alcatel-lucent.com >> ","path":"/andcvtb05/storage","port":2049,"url":"NetworkFilesystem:// >> andcvtb05.be.alcatel-lucent.com/andcvtb05/storage/?ROLE=Primary&STOREUUID=63a122cd-ac74-3cc1-85b0-e3ad105234dc >> "}},"name":"ROOT-30","size":304774144,"path":"f44bbb4e-a788-4034-9389-dc1fa47dce70","volumeId":30,"vmName":"r-30-VM","accountId":2,"format":"QCOW2","provisioningType":"THIN","id":30,"deviceId":0,"hypervisorType":"KVM"}},"diskSeq":0,"path":"f44bbb4e-a788-4034-9389-dc1fa47dce70","type":"ROOT","_details":{"managed":"false","storagePort":"2049","storageHost":" >> andcvtb05.be.alcatel-lucent.com","volumeSize":"304774144"}}],"nics":[{"deviceId":2,"networkRateMbps":200,"defaultNic":true,"pxeDisable":true,"nicUuid":"697871c5-d76f-405d-952c-c2d598ae09ae","uuid":"db6e7bae-8dbf-4b31-813f-dba0cad7a817","ip":"10.100.100.117","netmask":"255.2
[GitHub] cloudstack pull request: OSPF: adding dynamically routing capabili...
Github user abhinandanprateek commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1371#discussion_r62837384 --- Diff: server/src/com/cloud/network/router/CommandSetupHelper.java --- @@ -1048,4 +1052,33 @@ protected String getGuestDhcpRange(final NicProfile guestNic, final Network gues } return dhcpRange; } + +// this command goes as part of the VPC start command +public void createQuaggaConfigCommand(final VirtualRouter router, final Long vpcId, final Commands cmds) throws BadCIDRException { +final Vpc vpc = _vpcDao.findById(vpcId); +final DataCenterVO dc = _dcDao.findById(vpc.getZoneId()); +_dcDao.loadDetails(dc); +final OSPFZoneConfig qzc = new OSPFZoneConfig(); +qzc.setValues(dc.getDetails()); +// vpc is dynamic if control comes here +ArrayList tier_cidr = new ArrayList(); +// get all dynamic tiers cidr for this vpc +final List vpc_tiers = _networkDao.listByVpc(vpcId); +for (NetworkVO tier : vpc_tiers) { +// network tier supports dynamic routing +if (_networkModel.areServicesSupportedByNetworkOffering(tier.getNetworkOfferingId(), Service.VPCDynamicRouting)) { +tier_cidr.add(CIDRFactory.getCIDR(tier.getCidr())); +} +} +final String publicIp = router.getPublicIpAddress(); +//String routerIp, String routerName, String vpnCidr, String[] tierCidrs +final QuaggaConfigCommand cmd = new QuaggaConfigCommand(publicIp, router.getInstanceName(), vpc.getCidr(), tier_cidr.toArray(new CIDR[tier_cidr.size()]), qzc); +cmd.setAccessDetail(NetworkElementCommand.ROUTER_IP, _routerControlHelper.getRouterControlIp(router.getId())); +cmd.setAccessDetail(NetworkElementCommand.ROUTER_NAME, router.getInstanceName()); +final DataCenterVO dcVo = _dcDao.findById(router.getDataCenterId()); +cmd.setAccessDetail(NetworkElementCommand.ZONE_NETWORK_TYPE, dcVo.getNetworkType().toString()); + +cmds.addCommand(cmd); --- End diff -- Caller is depending on the fact that the method adds commands to the ref he has passed. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Make the generated json files unique to p...
Github user kiwiflyer commented on the pull request: https://github.com/apache/cloudstack/pull/1470#issuecomment-218446038 Remi, I'm seeing some issues with this PR, related to the way the VR scripts utilize the argv file name for other uses. We spent a fair bit of time trying to run down a problem with static routes not being hot plugged. The odd thing was, a failover to the backup, or a restart of the network brought up the static routes fine (after applying your static route failover PR - thanks for that!). I think the problem is in the way /opt/cloud/bin/update_config.py calls out to configure.main, that in turn calls the individual process classes: def finish_config(): # Converge returncode = configure.main(sys.argv) sys.exit(returncode) sys.argv here, happens in this PRs case to be static_routes.json.[GUID]. In configure.py, def main(argv) relies on the argv to be the actual json file payload from /etc/cloudstack/, or in the case where you want to configure every service, you just specify cmd_line.json. In our case, what we see is that /etc/cloudstack/static_routes.json gets correctly replaced with the valid data, but the configure method never calls out to CsStaticRoutes here: if process_file in ["cmd_line.json", "static_routes.json"]: logging.debug("Configuring static routes") static_routes = CsStaticRoutes("staticroutes", config) static_routes.process() I took a look at this in Cosmic last night and I didn't see any additional code within the systemvm scripts to handle this differently, so this may also be an issue in Cosmic. I would suspect, this pretty much affects the hot-plugging of any new configuration. I've learnt a lot about how horrible the VR scripts are in this adventure and honestly I think the community needs to work on not just cleaning these up, but making them more bulletproof in general. I hope this points you in the right direction. - Si --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: DAO: Hit the cache for entity flagged as ...
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1532#issuecomment-218456049 Thank you sir. Unfortunately travis failed this time. Would you mind trying it again. Thanks... --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Notify listeners when a host has been add...
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/816#issuecomment-218456885 @mike-tutkowski unfortunately it failed again. :( --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: 4.9/master bountycastle changes
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1511#issuecomment-218458113 the travis logs seem to indicate that something is not working... --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9199: Fixed deployVirtualMachi...
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1280#issuecomment-218462063 @anshul1886 I think the ask is that it get extracted as a method and a test be written for it. @pedro-martins and @alexandrelimassantana, I feel that this might be a bit overkill. Can you explain what the test would be validating? As for the backwards compatibility issue, I am not entirely sure I understand the concern. Can someone help me understand what that concern is? Thx... --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Notify listeners when a host has been add...
Github user mike-tutkowski commented on the pull request: https://github.com/apache/cloudstack/pull/816#issuecomment-218463825 @swill Is this claiming there's a license problem? I can rebase and push again. [INFO] Rat check: Summary of files. Unapproved: 1 unknown: 1 generated: 0 approved: 7204 licence. [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 10.258 s [INFO] Finished at: 2016-05-11T06:53:07+00:00 [INFO] Final Memory: 47M/366M [INFO] [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.10:check (default-cli) on project cloudstack: Too many files with unapproved license: 1 See RAT report in: /home/jenkins/jenkins-slave/workspace/cloudstack-pr-analysis/target/rat.txt -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Notify listeners when a host has been add...
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/816#issuecomment-218465085 I have seen this happen periodically and it does not seem to be consistently telling us the truth. This happens sometimes when only a single line of code changes, so I am not sure what the deal is here. Just re-push and lets see what happens. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Handle private gateways more reliably
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1474#issuecomment-218465795 ### CI RESULTS ``` Tests Run: 85 Skipped: 0 Failed: 0 Errors: 0 Duration: 4h 32m 05s ``` **Associated Uploads** **`/tmp/MarvinLogs/DeployDataCenter__May_11_2016_06_54_42_3CPRW6:`** * [dc_entries.obj](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1474/tmp/MarvinLogs/DeployDataCenter__May_11_2016_06_54_42_3CPRW6/dc_entries.obj) * [failed_plus_exceptions.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1474/tmp/MarvinLogs/DeployDataCenter__May_11_2016_06_54_42_3CPRW6/failed_plus_exceptions.txt) * [runinfo.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1474/tmp/MarvinLogs/DeployDataCenter__May_11_2016_06_54_42_3CPRW6/runinfo.txt) **`/tmp/MarvinLogs/test_network_TS9WMA:`** * [failed_plus_exceptions.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1474/tmp/MarvinLogs/test_network_TS9WMA/failed_plus_exceptions.txt) * [results.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1474/tmp/MarvinLogs/test_network_TS9WMA/results.txt) * [runinfo.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1474/tmp/MarvinLogs/test_network_TS9WMA/runinfo.txt) **`/tmp/MarvinLogs/test_vpc_routers_M1AWH1:`** * [failed_plus_exceptions.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1474/tmp/MarvinLogs/test_vpc_routers_M1AWH1/failed_plus_exceptions.txt) * [results.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1474/tmp/MarvinLogs/test_vpc_routers_M1AWH1/results.txt) * [runinfo.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1474/tmp/MarvinLogs/test_vpc_routers_M1AWH1/runinfo.txt) Uploads will be available until `2016-07-11 02:00:00 +0200 CEST` *Comment created by [`upr comment`](https://github.com/cloudops/upr).* --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Handle private gateways more reliably
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1474#issuecomment-218466093 I need one more code review and this one should be ready to merge. @kiwiflyer did you have a chance to review this one? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9351: Add ids parameter to res...
Github user serg38 commented on the pull request: https://github.com/apache/cloudstack/pull/1497#issuecomment-218466672 @swill Last Travis run for this PR was a success for test_list_ids_parameter. Which PR gives an issue? Marvin Init Successful === TestName: test_01_list_volumes | Status : SUCCESS === === TestName: test_02_list_templates | Status : SUCCESS === === TestName: test_03_list_snapshots | Status : SUCCESS === ===final results are now copied to: /tmp//MarvinLogs/test_list_ids_parameter_IPS7T4=== --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9351: Add ids parameter to res...
Github user nvazquez commented on the pull request: https://github.com/apache/cloudstack/pull/1497#issuecomment-218467920 @swill it's strange, as @serg38 says it succeeds for us and for @koushik-das, I'll investigate. Is there any log of the failure? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9299: Out-of-band Management f...
Github user nvazquez commented on the pull request: https://github.com/apache/cloudstack/pull/1502#issuecomment-218468571 @rhtyd sure, I'll examine this. This tests are introduced in #1497, I'll work on this --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9351: Add ids parameter to res...
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1497#issuecomment-218464050 @nvazquez this seems to have broken travis for everyone. We have this issue showing up in pretty much all travis runs right now `ContextSuite context=TestListIdsParams>:teardown`. Can you investigate? Thanks... --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9351: Add ids parameter to res...
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1497#issuecomment-218469220 @serg38 I had a bunch of people re-push PRs last night and this morning to get everything green and 3 or 4 are failing with this. Here are a couple off the top of my head: #1502, #1376 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9265 cleanup around httpclient...
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1385#issuecomment-218467871 @swill I closed and reopened. It started building anew but is now stuck in the archiving phase for quite some time. ``` [INFO] [INFO] BUILD SUCCESS [INFO] [INFO] Total time: 40:46 min [INFO] Finished at: 2016-05-11T10:07:41+00:00 [INFO] Final Memory: 181M/1862M [INFO] [CHECKSTYLE] Collecting checkstyle analysis files... [CHECKSTYLE] Finding all files that match the pattern **/checkstyle-result.xml [CHECKSTYLE] Parsing 96 files in /home/jenkins/jenkins-slave/workspace/cloudstack-pr-analysis ``` I am trying to find where it got stuck. At least aftyer duplicate code analysis...:| --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Remove extraneous log directory and add c...
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1537#issuecomment-218470411 LGTM, @swill, I am being very formal but can you queue this for integration tests? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: DAO: Hit the cache for entity flagged as ...
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1532#issuecomment-218472093 @marcaurele instead of force push you can close and reopen after a few seconds. This usually works as well and seves you switching windows browser->terminal->browser ;) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
Re: Virtual router failed to start on KVM + Linux Bridges
Thank you Wei & Remi !! I will start using the latest system VM templates. With regards, Prashanth On Wed, May 11, 2016 at 2:20 PM, Remi Bergsma wrote: > Hi Prashanth, > > As Wei suggested, when you use CloudStack 4.6/4.7/4.8/4.9 you also need > the systemvm template with version 4.6.0. This does include the needed > Python modules. The 4.4 template you used won't fly. You will run into > other missing packages and changes as well. > > Regards, Remi > > Sent from my iPhone > > > On 11 May 2016, at 13:50, Prashanth Manthena < > prashanth.manth...@nuagenetworks.net> wrote: > > > > Hi Will, > > > > I was able to put a break-point and debug the actual issue in the VR > > (system VM template), it's a Python import error of the package > "netaddr", > > which can be fixed by updating the system template with the "netaddr" > > package installed in it. Hopefully, it fixes this issue. > > > > Here is the error in VR's /var/log/cloud.log: > > > > Wed May 11 10:29:37 UTC 2016 : VR config: configuation format version 1.0 > > Wed May 11 10:29:37 UTC 2016 : VR config: creating file: > > /var/cache/cloud/ip_asss > > ociations.json > > Wed May 11 10:29:37 UTC 2016 : VR config: create file success > > Wed May 11 10:29:37 UTC 2016 : VR config: executing: > > /opt/cloud/bin/update_confii > > g.py ip_associations.json > > Traceback (most recent call last): > > File "/opt/cloud/bin/update_config.py", line 20, in > >from merge import QueueFile > > File "/opt/cloud/bin/merge.py", line 23, in > >import cs_ip > > File "/opt/cloud/bin/cs_ip.py", line 19, in > >from netaddr import * > > ImportError: No module named netaddr > > Wed May 11 10:29:37 UTC 2016 : VR config: executing failed: > > /opt/cloud/bin/updatt > > e_config.py ip_associations.json > > > > With regards, > > Prashanth > > > > On Wed, May 11, 2016 at 12:06 PM, Prashanth Manthena < > > prashanth.manth...@nuagenetworks.net> wrote: > > > >> Hi Will, > >> > >> I am hitting an issue similar to CLOUDSTACK-9013 on master (4.9.0). Here > >> are the management server error logs: > >> > >> 2016-05-10 08:24:03,109 ERROR > [c.c.n.r.VirtualNetworkApplianceManagerImpl] > >> (Work-Job-Executor-3:ctx-5069ea04 job-247/job-250 ctx-48a763a9) > >> (logid:2735b868) VR config: execution failed: > >> "/opt/cloud/bin/update_config.py ip_associations.json", check > >> /var/log/cloud.log in VR for details > >> > >> 2016-05-10 08:24:03,109 WARN > [c.c.n.r.VirtualNetworkApplianceManagerImpl] > >> (Work-Job-Executor-3:ctx-5069ea04 job-247/job-250 ctx-48a763a9) > >> (logid:2735b868) Command: com.cloud.agent.api.Command failed while > starting > >> virtual router > >> > >> 2016-05-10 08:24:03,109 INFO [c.c.v.VirtualMachineManagerImpl] > >> (Work-Job-Executor-3:ctx-5069ea04 job-247/job-250 ctx-48a763a9) > >> (logid:2735b868) The guru did not like the answers so stopping > >> VM[DomainRouter|r-30-VM] > >> > >> Response: > >> > >> 2016-05-10 08:24:03,067 DEBUG [c.c.a.t.Request] > >> (AgentManager-Handler-10:null) (logid:) Seq 1-4347381015296081926: > >> Processing: { Ans: , MgmtId: 275619426932736, via: 1, Ver: v1, Flags: > 10, > >> > [{"com.cloud.agent.api.StartAnswer":{"vm":{"id":30,"name":"r-30-VM","type":"DomainRouter","cpus":1,"minSpeed":500,"maxSpeed":500,"minRam":268435456,"maxRam":268435456,"arch":"x86_64","os":"Debian > >> GNU/Linux 5.0 (64-bit)","platformEmulator":"Debian GNU/Linux > >> 5","bootArgs":" template=domP name=r-30-VM eth2ip=10.100.100.117 > >> eth2mask=255.255.255.0 gateway=10.100.100.1 eth0ip=10.10.1.1 > >> eth0mask=255.255.255.0 domain=cs2cloud.internal cidrsize=24 > >> dhcprange=10.10.1.1 eth1ip=169.254.2.130 eth1mask=255.255.0.0 > type=router > >> disable_rp_filter=true dns1=128.251.10.29 dns2=4.4.4.4 > >> > baremetalnotificationsecuritykey=ODFTmygvs7oVAHVFZMmv7RpvsNNsawY9tf6sfeMvkUJlmEhWXGli5sO_oWAr52vrF18Z5xMgzjclu9P7G_w9Fg > >> > baremetalnotificationapikey=pguqxBGrlU2ItCuTHa7xb6pmjrpl9KbVMEE7o6TKrJ-mjDoaRayL_Nj21VkqrKvbtc10L8BxPqaYIhnGJkeHfw > >> host=10.30.36.11 > >> > port=8080","enableHA":true,"limitCpuUse":false,"enableDynamicallyScaleVm":false,"vncPassword":"Pj8GDPW2vqLfkdOMoCOogg","vncAddr":"10.100.100.11","params":{},"uuid":"f406776f-3b4c-4d23-917e-715ceaea0a7a","disks":[{"data":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"f44bbb4e-a788-4034-9389-dc1fa47dce70","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"63a122cd-ac74-3cc1-85b0-e3ad105234dc","id":1,"poolType":"NetworkFilesystem","host":" > >> andcvtb05.be.alcatel-lucent.com > >> ","path":"/andcvtb05/storage","port":2049,"url":"NetworkFilesystem:// > >> > andcvtb05.be.alcatel-lucent.com/andcvtb05/storage/?ROLE=Primary&STOREUUID=63a122cd-ac74-3cc1-85b0-e3ad105234dc > >> > "}},"name":"ROOT-30","size":304774144,"path":"f44bbb4e-a788-4034-9389-dc1fa47dce70","volumeId":30,"vmName":"r-30-VM","accountId":2,"format":"QCOW2","provisioningType":"THIN","id":30,"deviceId":0,"hypervisorType":"KVM"}},"diskSeq":0,"path":"f44bbb4e-a788-4034-938
Re: Test failure on master?
Rohit, I have seen quite a few issues with this feature so far. The change you made in #1538 does not change the actual code at all, it just reduces the number of tests, so you are less likely to run into the problem, but the problem still exists. I am CCing in Simon Weller as well. I was talking to him this morning and he had this to say (unprompted). Will, We're still seeing odd issues with that NIO SSL concurrency patch > (1493), even after pulling in the additional PR 1534. The latest problem > we've seen is 100% cpu on the agents for no apparent reason. I reverted > both patches from our QA lab this morning and the problem has gone away. I pulled it into a second lab where we have haproxy setup to load balance > and the same behaviour occurs top - 08:18:15 up 1 day, 17:08, 5 users, load average: 1.92, 2.22, 2.09 > Tasks: 223 total, 1 running, 222 sleeping, 0 stopped, 0 zombie > %Cpu(s): 22.2 us, 11.9 sy, 0.0 ni, 65.8 id, 0.0 wa, 0.0 hi, 0.1 si, > 0.0 st > KiB Mem : 32673608 total, 28312176 free, 3512104 used, 849328 buff/cache > KiB Swap: 4194300 total, 4194300 free,0 used. 28757568 avail Mem > > PID USER PR NIVIRTRESSHR S %CPU %MEM TIME+ > COMMAND > > 17985 root 20 0 6937720 162816 22196 S 100.3 0.5 3:24.84 > /usr/lib/jvm/jre/bin/java -Xms256m -Xmx2048m -cp > /usr/share/cloudstack-agent/lib/activatio+ > 15587 root 20 0 1733288 375976 12164 S 100.0 1.2 10:42.36 > /usr/libexec/qemu-kvm -name v-46-VM -S -machine > pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 1+ > 4480 root 20 0 909604 305292 12264 S 0.7 0.9 1:10.21 > /usr/libexec/qemu-kvm -name r-44-VM -S -machine > pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 2+ > 5188 root 20 0 957548 323420 12216 S 0.7 1.0 1:07.35 > /usr/libexec/qemu-kvm -name r-45-VM -S -machine > pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 2+ > 18336 root 20 0 157840 2392 1556 R 0.7 0.0 0:00.14 top > > > 19023 root 20 0 1002156 449720 12372 S 0.7 1.4 10:57.69 > /usr/libexec/qemu-kvm -name r-32-VM -S -machine > pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 2+ I am considering reverting this feature (both PRs) until we can understand what is causing this and we can stabilize this code so it does not cause us problems. With this type of behavior, I am not confident with this code in production right now... *Will STEVENS* Lead Developer *CloudOps* *| *Cloud Solutions Experts 420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 w cloudops.com *|* tw @CloudOps_ On Wed, May 11, 2016 at 5:36 AM, Rohit Yadav wrote: > Please follow up on PR #1538 and comment if that fixes the issue on OSX. > > Regards. > > Regards, > > Rohit Yadav > > rohit.ya...@shapeblue.com > www.shapeblue.com > 53 Chandos Place, Covent Garden, London WC2N 4HSUK > @shapeblue > > -Original Message- > From: Rohit Yadav [mailto:rohit.ya...@shapeblue.com] > Sent: Wednesday, May 11, 2016 2:49 PM > To: dev@cloudstack.apache.org > Subject: RE: Test failure on master? > > I don't have OSX, but it seems to be working on Travis and Linux env in > general. > I'll send a PR that relaxes malicious client attacks, and ask you to > review in your env -- Koushik and Mike. > > Regards, > > Rohit Yadav > > rohit.ya...@shapeblue.com > www.shapeblue.com > 53 Chandos Place, Covent Garden, London WC2N 4HSUK @shapeblue > > -Original Message- > From: Koushik Das [mailto:koushik@accelerite.com] > Sent: Wednesday, May 11, 2016 12:22 PM > To: dev@cloudstack.apache.org > Subject: Re: Test failure on master? > > I am also seeing the same failure happening randomly. OS X El Capitan > 10.11.4. > > Results : > > Tests in error: > NioTest.testConnection:152 > TestTimedOut test timed out after 6 > milliseco... > > Tests run: 200, Failures: 0, Errors: 1, Skipped: 13 > > > > From: Tutkowski, Mike > Sent: Tuesday, May 10, 2016 6:31:23 PM > To: dev@cloudstack.apache.org > Subject: Re: Test failure on master? > > Oh, and it's the OS of my MacBook Pro. > > > On May 10, 2016, at 6:59 AM, Tutkowski, Mike > wrote: > > > > Hi, > > > > The environment is Mac OS X El Capitan 10.11.4. > > > > Thanks! > > Mike > > > >> On May 10, 2016, at 5:51 AM, Will Stevens > wrote: > >> > >> I think I can verify that this is still happening on master for him > >> because you changed the timeout (and the number of tests run, etc) > >> when you pushed the fix in #1534. So by looking at the timeout of > >> 6, we can verify that it is the latest code from master being run. > >> > >> I do think we need to revisit this to make sure we don't have > >> intermittent issues with this test. > >> > >> Thx guys... > >> > >> *Will STEVENS* > >> Lead Developer > >> > >> *CloudOps* *| *Cloud Solutions Experts > >> 420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 w cloudops.com *|* tw > >> @CloudOps_ > >> > >> On Tue, May 10, 2016 at 7:41 AM, Rohit Yadav > >> > >> wrote: > >> > >>> Mike, > >>> > >>
[GitHub] cloudstack pull request: DAO: Hit the cache for entity flagged as ...
Github user marcaurele closed the pull request at: https://github.com/apache/cloudstack/pull/1532 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: 4.9/master bountycastle changes
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1511#issuecomment-218473575 a timeout @swill. in travis that is not a good indication of not working. I wouldn't know where to look. @rhtyd can you close and reopen? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9348: Use non-blocking SSL han...
Github user kiwiflyer commented on the pull request: https://github.com/apache/cloudstack/pull/1493#issuecomment-218473922  --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9348: Use non-blocking SSL han...
Github user kiwiflyer commented on the pull request: https://github.com/apache/cloudstack/pull/1493#issuecomment-218473890 @rhtyd We're still seeing some odd behaviour related to the agent with this PR (and PR1534) applied to 2 of our hardware labs. What we're seeing is 100% cpu on the agent (KVM). There's nothing obvious in the debug logs indicating a problem. I've tried it both behind haproxy and directly to the management server and we see the same symptoms. Let me know what we can provide to help in terms of debugging. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
Re: Test failure on master?
I can't point to this PR for this, but I have noticed an increase in random failures in my CI runs since this code has gone in. I have not tracked it down to this, but resources are tight in those environments, so if we are getting CPU maxing out, that could potentially account for the higher failure rates in my CI environments... *Will STEVENS* Lead Developer *CloudOps* *| *Cloud Solutions Experts 420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 w cloudops.com *|* tw @CloudOps_ On Wed, May 11, 2016 at 10:17 AM, Will Stevens wrote: > Rohit, I have seen quite a few issues with this feature so far. The > change you made in #1538 does not change the actual code at all, it just > reduces the number of tests, so you are less likely to run into the > problem, but the problem still exists. > > I am CCing in Simon Weller as well. I was talking to him this morning and > he had this to say (unprompted). > > Will, We're still seeing odd issues with that NIO SSL concurrency patch >> (1493), even after pulling in the additional PR 1534. The latest problem >> we've seen is 100% cpu on the agents for no apparent reason. I reverted >> both patches from our QA lab this morning and the problem has gone away. > > > I pulled it into a second lab where we have haproxy setup to load balance >> and the same behaviour occurs > > > top - 08:18:15 up 1 day, 17:08, 5 users, load average: 1.92, 2.22, 2.09 >> Tasks: 223 total, 1 running, 222 sleeping, 0 stopped, 0 zombie >> %Cpu(s): 22.2 us, 11.9 sy, 0.0 ni, 65.8 id, 0.0 wa, 0.0 hi, 0.1 si, >> 0.0 st >> KiB Mem : 32673608 total, 28312176 free, 3512104 used, 849328 >> buff/cache >> KiB Swap: 4194300 total, 4194300 free,0 used. 28757568 avail Mem >> >> PID USER PR NIVIRTRESSHR S %CPU %MEM TIME+ >> COMMAND >> >> 17985 root 20 0 6937720 162816 22196 S 100.3 0.5 3:24.84 >> /usr/lib/jvm/jre/bin/java -Xms256m -Xmx2048m -cp >> /usr/share/cloudstack-agent/lib/activatio+ >> 15587 root 20 0 1733288 375976 12164 S 100.0 1.2 10:42.36 >> /usr/libexec/qemu-kvm -name v-46-VM -S -machine >> pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 1+ >> 4480 root 20 0 909604 305292 12264 S 0.7 0.9 1:10.21 >> /usr/libexec/qemu-kvm -name r-44-VM -S -machine >> pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 2+ >> 5188 root 20 0 957548 323420 12216 S 0.7 1.0 1:07.35 >> /usr/libexec/qemu-kvm -name r-45-VM -S -machine >> pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 2+ >> 18336 root 20 0 157840 2392 1556 R 0.7 0.0 0:00.14 top >> >> >> 19023 root 20 0 1002156 449720 12372 S 0.7 1.4 10:57.69 >> /usr/libexec/qemu-kvm -name r-32-VM -S -machine >> pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 2+ > > > I am considering reverting this feature (both PRs) until we can > understand what is causing this and we can stabilize this code so it does > not cause us problems. With this type of behavior, I am not confident with > this code in production right now... > > *Will STEVENS* > Lead Developer > > *CloudOps* *| *Cloud Solutions Experts > 420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 > w cloudops.com *|* tw @CloudOps_ > > On Wed, May 11, 2016 at 5:36 AM, Rohit Yadav > wrote: > >> Please follow up on PR #1538 and comment if that fixes the issue on OSX. >> >> Regards. >> >> Regards, >> >> Rohit Yadav >> >> rohit.ya...@shapeblue.com >> www.shapeblue.com >> 53 Chandos Place, Covent Garden, London WC2N 4HSUK >> @shapeblue >> >> -Original Message- >> From: Rohit Yadav [mailto:rohit.ya...@shapeblue.com] >> Sent: Wednesday, May 11, 2016 2:49 PM >> To: dev@cloudstack.apache.org >> Subject: RE: Test failure on master? >> >> I don't have OSX, but it seems to be working on Travis and Linux env in >> general. >> I'll send a PR that relaxes malicious client attacks, and ask you to >> review in your env -- Koushik and Mike. >> >> Regards, >> >> Rohit Yadav >> >> rohit.ya...@shapeblue.com >> www.shapeblue.com >> 53 Chandos Place, Covent Garden, London WC2N 4HSUK @shapeblue >> >> -Original Message- >> From: Koushik Das [mailto:koushik@accelerite.com] >> Sent: Wednesday, May 11, 2016 12:22 PM >> To: dev@cloudstack.apache.org >> Subject: Re: Test failure on master? >> >> I am also seeing the same failure happening randomly. OS X El Capitan >> 10.11.4. >> >> Results : >> >> Tests in error: >> NioTest.testConnection:152 > TestTimedOut test timed out after 6 >> milliseco... >> >> Tests run: 200, Failures: 0, Errors: 1, Skipped: 13 >> >> >> >> From: Tutkowski, Mike >> Sent: Tuesday, May 10, 2016 6:31:23 PM >> To: dev@cloudstack.apache.org >> Subject: Re: Test failure on master? >> >> Oh, and it's the OS of my MacBook Pro. >> >> > On May 10, 2016, at 6:59 AM, Tutkowski, Mike >> wrote: >> > >> > Hi, >> > >> > The environment is Mac OS X El Capitan 10.11.4. >> > >> > Thanks! >> > Mike >> > >> >> On May 10, 2016, at 5:51 AM, Will Stevens >> wrote: >> >> >> >> I think
[GitHub] cloudstack pull request: DAO: Hit the cache for entity flagged as ...
GitHub user marcaurele reopened a pull request: https://github.com/apache/cloudstack/pull/1532 DAO: Hit the cache for entity flagged as removed too I came along this part of the code and I don't see any reason why the cache should not be used when fetching with the "removed" ones. It will help decrease the number of DB queries. *It can be merged in many CS versions* You can merge this pull request into a Git repository by running: $ git pull https://github.com/exoscale/cloudstack fix/db-cache-miss Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/1532.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1532 commit 696440a6754a60888fce7a82e8022ca7278b9be5 Author: Marc-Aurèle Brothier Date: 2016-05-04T12:28:44Z dao: Hit the cache for entity flagged as removed too since they are put in cache afterwards. commit 56fe0ec53dbc1331f1f4875f6f9e9bea62760c38 Author: Marc-Aurèle Brothier Date: 2016-05-09T09:39:04Z Rewrite the change for method findByIdIncludingRemoved(ID id) and also change the sibling method findById(final ID id) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Notify listeners when a host has been add...
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/816#issuecomment-218480720 That is the rat test. it is usually right. I didn't see a new file without license though. May one of the to with a license starting with an empty comment line were the problem. Otherwise the job may be the problem in the sense of not cleaning the workspace properly. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
Question: commands.properties.in deprecated
Hi, I see in afcbd27 that we've deprecated commands.properties.in. Is there documentation on the new way that we specify permissions for a given API these days? Thanks! Mike
[GitHub] cloudstack pull request: CLOUDSTACK-9351: Add ids parameter to res...
Github user serg38 commented on the pull request: https://github.com/apache/cloudstack/pull/1497#issuecomment-218480013 The issue that it couldn't find a snaphsot because it is already cleaned by account cleanup. +cls._cleanup = [ +cls.disk_offering, +cls.account, +cls.service_offering, +cls.snapshot_1, +cls.snapshot_2, +cls.snapshot_3 +] + Snapshot cleanup can be safely removed since account cleanup will remove them automatically. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: [CLOUDSTACK-9207] Test to verify restarti...
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1304#issuecomment-218483641 ### CI RESULTS ``` Tests Run: 7 Skipped: 0 Failed: 4 Errors: 0 Duration: 0h 37m 50s ``` **Summary of the problem(s):** ``` FAIL: Test restart network with cleanup -- Traceback (most recent call last): File "/data/git/cs2/cloudstack/test/integration/component/test_vpc_network.py", line 2851, in test_restart_network_with_cleanup self.validateResult(result) File "/data/git/cs2/cloudstack/test/integration/component/test_vpc_network.py", line 2749, in validateResult self.fail("IP is missing from vpcVR") AssertionError: IP is missing from vpcVR -- Additional details in: /tmp/MarvinLogs/test_vpc_network_14GQ49/results.txt ``` ``` FAIL: Test network rules after starting a VpcVr that -- Traceback (most recent call last): File "/data/git/cs2/cloudstack/test/integration/component/test_vpc_network.py", line 2465, in test_02_start_vm_network_gc "Ping to outside world from VM should be successful" AssertionError: Ping to outside world from VM should be successful -- Additional details in: /tmp/MarvinLogs/test_vpc_network_14GQ49/results.txt ``` ``` FAIL: Test Stop all the Vms that are part of the a Network -- Traceback (most recent call last): File "/data/git/cs2/cloudstack/test/integration/component/test_vpc_network.py", line 2557, in test_03_restart_vpcvr (self.public_ip_1.ipaddress.ipaddress, e)) AssertionError: Failed to SSH into VM - 192.168.23.54, SSH connection has Failed. Waited 600s. Error is SSH Connection Failed -- Additional details in: /tmp/MarvinLogs/test_vpc_network_14GQ49/results.txt ``` ``` FAIL: Test update Network that is part of a VPC to a network -- Traceback (most recent call last): File "/data/git/cs2/cloudstack/test/integration/component/test_vpc_network.py", line 1910, in test_01_network_services_upgrade "Ping to outside world from VM should be successful" AssertionError: Ping to outside world from VM should be successful -- Additional details in: /tmp/MarvinLogs/test_vpc_network_14GQ49/results.txt ``` **Associated Uploads** **`/tmp/MarvinLogs/DeployDataCenter__May_11_2016_08_32_17_9O5EIE:`** * [dc_entries.obj](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1304/tmp/MarvinLogs/DeployDataCenter__May_11_2016_08_32_17_9O5EIE/dc_entries.obj) * [failed_plus_exceptions.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1304/tmp/MarvinLogs/DeployDataCenter__May_11_2016_08_32_17_9O5EIE/failed_plus_exceptions.txt) * [runinfo.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1304/tmp/MarvinLogs/DeployDataCenter__May_11_2016_08_32_17_9O5EIE/runinfo.txt) **`/tmp/MarvinLogs/test_vpc_network_14GQ49:`** * [failed_plus_exceptions.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1304/tmp/MarvinLogs/test_vpc_network_14GQ49/failed_plus_exceptions.txt) * [results.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1304/tmp/MarvinLogs/test_vpc_network_14GQ49/results.txt) * [runinfo.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1304/tmp/MarvinLogs/test_vpc_network_14GQ49/runinfo.txt) Uploads will be available until `2016-07-11 02:00:00 +0200 CEST` *Comment created by [`upr comment`](https://github.com/cloudops/upr).* --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: [CLOUDSTACK-9207] Test to verify restarti...
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1304#issuecomment-218483982 The added test fails, but lots of tests failed. I will rebuild my environment and test again to see if anything changes. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9351: Add ids parameter to res...
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1497#issuecomment-218489998 Can you create a new PR to fix this and we will get it tested right away. Thanks for being on top of this. ð --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Notify listeners when a host has been add...
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/816#issuecomment-218489553 I think we are definitely having issues with it not cleaning correctly. I have seen a couple cases where we get the "unable to update index" when it tries to do a git checkout because of problems with cleanup, so that is possible. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62867309 --- Diff: engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreInfo.java --- @@ -36,6 +36,7 @@ static final String CHAP_INITIATOR_SECRET = "chapInitiatorSecret"; static final String CHAP_TARGET_USERNAME = "chapTargetUsername"; static final String CHAP_TARGET_SECRET = "chapTargetSecret"; +static final String REMOVE_AFTER_COPY = "removeAfterCopy"; --- End diff -- not lethal but these strings seem to warrant an enum as well, do they? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62868269 --- Diff: engine/schema/src/com/cloud/dc/dao/ClusterDaoImpl.java --- @@ -260,4 +268,41 @@ public boolean remove(Long id) { sc.setParameters("dataCenterId", zoneId); return customSearch(sc, null); } + +@Override +public boolean computeClusterSupportsResign(long clusterId) { --- End diff -- sugested name change: computeWhetherClusterSupportsResign or even computeWhetherClusterSupportsResigning --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9351: Add ids parameter to res...
Github user nvazquez commented on the pull request: https://github.com/apache/cloudstack/pull/1497#issuecomment-218499768 Done @swill @serg38 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9378: Fix for #1497
GitHub user nvazquez opened a pull request: https://github.com/apache/cloudstack/pull/1539 CLOUDSTACK-9378: Fix for #1497 JIRA TICKET: https://issues.apache.org/jira/browse/CLOUDSTACK-9378 After #1497 was merged, test_list_ids_parameter.py failed on Travis. It was noticed that snapshots could be removed from cleaup You can merge this pull request into a Git repository by running: $ git pull https://github.com/nvazquez/cloudstack fix1497 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/1539.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1539 commit 19a26afdef01d091944f3d279030717075e6570f Author: nvazquez Date: 2016-05-11T15:40:10Z CLOUDSTACK-9378: Fix for #1497 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62872442 --- Diff: engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java --- @@ -172,78 +232,211 @@ private void validate(SnapshotInfo snapshotInfo) { } } -private Void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, TemplateInfo templateInfo, AsyncCompletionCallback callback) { +private boolean usingBackendSnapshotFor(SnapshotInfo snapshotInfo) { +String property = getProperty(snapshotInfo.getId(), "takeSnapshot"); + +return Boolean.parseBoolean(property); +} + +private void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, TemplateInfo templateInfo, AsyncCompletionCallback callback) { try { snapshotInfo.processEvent(Event.CopyingRequested); } catch (Exception ex) { throw new CloudRuntimeException("This snapshot is not currently in a state where it can be used to create a template."); } -HostVO hostVO = getHost(snapshotInfo.getDataStore().getId()); -DataStore srcDataStore = snapshotInfo.getDataStore(); - -String value = _configDao.getValue(Config.PrimaryStorageDownloadWait.toString()); -int primaryStorageDownloadWait = NumbersUtil.parseInt(value, Integer.parseInt(Config.PrimaryStorageDownloadWait.getDefaultValue())); -CopyCommand copyCommand = new CopyCommand(snapshotInfo.getTO(), templateInfo.getTO(), primaryStorageDownloadWait, VirtualMachineManager.ExecuteInSequence.value()); +HostVO hostVO = getHost(snapshotInfo); -String errMsg = null; +boolean usingBackendSnapshot = usingBackendSnapshotFor(snapshotInfo); +boolean computeClusterSupportsResign = computeClusterSupportsResign(hostVO.getClusterId()); -CopyCmdAnswer copyCmdAnswer = null; +if (usingBackendSnapshot && !computeClusterSupportsResign) { +throw new CloudRuntimeException("Unable to locate an applicable host with which to perform a resignature operation"); +} try { -_volumeService.grantAccess(snapshotInfo, hostVO, srcDataStore); +if (usingBackendSnapshot) { +createVolumeFromSnapshot(hostVO, snapshotInfo, true); +} -Map srcDetails = getSnapshotDetails(_storagePoolDao.findById(srcDataStore.getId()), snapshotInfo); +DataStore srcDataStore = snapshotInfo.getDataStore(); -copyCommand.setOptions(srcDetails); +String value = _configDao.getValue(Config.PrimaryStorageDownloadWait.toString()); +int primaryStorageDownloadWait = NumbersUtil.parseInt(value, Integer.parseInt(Config.PrimaryStorageDownloadWait.getDefaultValue())); +CopyCommand copyCommand = new CopyCommand(snapshotInfo.getTO(), templateInfo.getTO(), primaryStorageDownloadWait, VirtualMachineManager.ExecuteInSequence.value()); + +String errMsg = null; + +CopyCmdAnswer copyCmdAnswer = null; -copyCmdAnswer = (CopyCmdAnswer)_agentMgr.send(hostVO.getId(), copyCommand); -} -catch (Exception ex) { -throw new CloudRuntimeException(ex.getMessage()); -} -finally { try { --- End diff -- I can not see what Rafael means. I think the code has changed since he made the comment. I do see this method as growing out of proportion so some refactorring for readability and maintainability seems in order. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9351: Add ids parameter to res...
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1497#issuecomment-218500189 Thank you, I will merge it assuming Jenkins and Travis come back clean. Thx... ð --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
Re: Question: commands.properties.in deprecated
I think this is the extent of the documentation at this point. https://github.com/apache/cloudstack-docs-admin/pull/37/files Rohit, maybe you can shed some light on this from a developer's perspective and how we should be handling this going forward? Are there official docs which covered how to use 'commands.properties.in'? If so, we should update them to reflect this new feature... *Will STEVENS* Lead Developer *CloudOps* *| *Cloud Solutions Experts 420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 w cloudops.com *|* tw @CloudOps_ On Wed, May 11, 2016 at 10:40 AM, Tutkowski, Mike wrote: > Hi, > > > I see in afcbd27 that we've deprecated commands.properties.in. > > > Is there documentation on the new way that we specify permissions for a > given API these days? > > > Thanks! > > Mike >
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62874090 --- Diff: engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java --- @@ -172,78 +232,211 @@ private void validate(SnapshotInfo snapshotInfo) { } } -private Void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, TemplateInfo templateInfo, AsyncCompletionCallback callback) { +private boolean usingBackendSnapshotFor(SnapshotInfo snapshotInfo) { +String property = getProperty(snapshotInfo.getId(), "takeSnapshot"); + +return Boolean.parseBoolean(property); +} + +private void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, TemplateInfo templateInfo, AsyncCompletionCallback callback) { try { snapshotInfo.processEvent(Event.CopyingRequested); } catch (Exception ex) { throw new CloudRuntimeException("This snapshot is not currently in a state where it can be used to create a template."); } -HostVO hostVO = getHost(snapshotInfo.getDataStore().getId()); -DataStore srcDataStore = snapshotInfo.getDataStore(); - -String value = _configDao.getValue(Config.PrimaryStorageDownloadWait.toString()); -int primaryStorageDownloadWait = NumbersUtil.parseInt(value, Integer.parseInt(Config.PrimaryStorageDownloadWait.getDefaultValue())); -CopyCommand copyCommand = new CopyCommand(snapshotInfo.getTO(), templateInfo.getTO(), primaryStorageDownloadWait, VirtualMachineManager.ExecuteInSequence.value()); +HostVO hostVO = getHost(snapshotInfo); -String errMsg = null; +boolean usingBackendSnapshot = usingBackendSnapshotFor(snapshotInfo); +boolean computeClusterSupportsResign = computeClusterSupportsResign(hostVO.getClusterId()); -CopyCmdAnswer copyCmdAnswer = null; +if (usingBackendSnapshot && !computeClusterSupportsResign) { +throw new CloudRuntimeException("Unable to locate an applicable host with which to perform a resignature operation"); +} try { -_volumeService.grantAccess(snapshotInfo, hostVO, srcDataStore); +if (usingBackendSnapshot) { +createVolumeFromSnapshot(hostVO, snapshotInfo, true); +} -Map srcDetails = getSnapshotDetails(_storagePoolDao.findById(srcDataStore.getId()), snapshotInfo); +DataStore srcDataStore = snapshotInfo.getDataStore(); -copyCommand.setOptions(srcDetails); +String value = _configDao.getValue(Config.PrimaryStorageDownloadWait.toString()); +int primaryStorageDownloadWait = NumbersUtil.parseInt(value, Integer.parseInt(Config.PrimaryStorageDownloadWait.getDefaultValue())); +CopyCommand copyCommand = new CopyCommand(snapshotInfo.getTO(), templateInfo.getTO(), primaryStorageDownloadWait, VirtualMachineManager.ExecuteInSequence.value()); + +String errMsg = null; + +CopyCmdAnswer copyCmdAnswer = null; -copyCmdAnswer = (CopyCmdAnswer)_agentMgr.send(hostVO.getId(), copyCommand); -} -catch (Exception ex) { -throw new CloudRuntimeException(ex.getMessage()); -} -finally { try { -_volumeService.revokeAccess(snapshotInfo, hostVO, srcDataStore); +// If we are using a back-end snapshot, then we should still have access to it from the hosts in the cluster that hostVO is in +// (because we passed in true as the third parameter to createVolumeFromSnapshot above). +if (usingBackendSnapshot == false) { +_volumeService.grantAccess(snapshotInfo, hostVO, srcDataStore); +} + +Map srcDetails = getSnapshotDetails(snapshotInfo); + +copyCommand.setOptions(srcDetails); + +copyCmdAnswer = (CopyCmdAnswer)_agentMgr.send(hostVO.getId(), copyCommand); } catch (Exception ex) { -s_logger.debug(ex.getMessage(), ex); +throw new CloudRuntimeException(ex.getMessage()); } +finally { +try { +_volumeService.revokeAccess(snapshotInfo, hostVO, srcDataStore); +} +catch (Exception ex) { +s_logger.debug(ex.getMessage(), ex); +} -if (copyCmdAnswer == null || !copyCmdAnswer.getResult()
[GitHub] cloudstack pull request: 4.9/master bountycastle changes
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1511#issuecomment-218503116 @DaanHoogland well a timeout in combination with a connection is not being able to be established seems relevant since it is related to the code that has changed. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62875028 --- Diff: engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java --- @@ -172,78 +254,214 @@ private void validate(SnapshotInfo snapshotInfo) { } } -private Void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, TemplateInfo templateInfo, AsyncCompletionCallback callback) { +private boolean usingBackendSnapshotFor(SnapshotInfo snapshotInfo) { +String property = getProperty(snapshotInfo.getId(), "takeSnapshot"); + +return Boolean.parseBoolean(property); +} + +private void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, TemplateInfo templateInfo, AsyncCompletionCallback callback) { try { snapshotInfo.processEvent(Event.CopyingRequested); } catch (Exception ex) { throw new CloudRuntimeException("This snapshot is not currently in a state where it can be used to create a template."); } -HostVO hostVO = getHost(snapshotInfo.getDataStore().getId()); -DataStore srcDataStore = snapshotInfo.getDataStore(); +HostVO hostVO = getHost(snapshotInfo); -String value = _configDao.getValue(Config.PrimaryStorageDownloadWait.toString()); -int primaryStorageDownloadWait = NumbersUtil.parseInt(value, Integer.parseInt(Config.PrimaryStorageDownloadWait.getDefaultValue())); -CopyCommand copyCommand = new CopyCommand(snapshotInfo.getTO(), templateInfo.getTO(), primaryStorageDownloadWait, VirtualMachineManager.ExecuteInSequence.value()); - -String errMsg = null; +boolean usingBackendSnapshot = usingBackendSnapshotFor(snapshotInfo); +boolean computeClusterSupportsResign = _clusterDao.computeClusterSupportsResign(hostVO.getClusterId()); -CopyCmdAnswer copyCmdAnswer = null; +if (usingBackendSnapshot && !computeClusterSupportsResign) { +throw new CloudRuntimeException("Unable to locate an applicable host with which to perform a resignature operation"); +} try { -_volumeService.grantAccess(snapshotInfo, hostVO, srcDataStore); +if (usingBackendSnapshot) { +createVolumeFromSnapshot(hostVO, snapshotInfo, true); +} -Map srcDetails = getSnapshotDetails(_storagePoolDao.findById(srcDataStore.getId()), snapshotInfo); +DataStore srcDataStore = snapshotInfo.getDataStore(); -copyCommand.setOptions(srcDetails); +String value = _configDao.getValue(Config.PrimaryStorageDownloadWait.toString()); +int primaryStorageDownloadWait = NumbersUtil.parseInt(value, Integer.parseInt(Config.PrimaryStorageDownloadWait.getDefaultValue())); +CopyCommand copyCommand = new CopyCommand(snapshotInfo.getTO(), templateInfo.getTO(), primaryStorageDownloadWait, VirtualMachineManager.ExecuteInSequence.value()); + +String errMsg = null; + +CopyCmdAnswer copyCmdAnswer = null; -copyCmdAnswer = (CopyCmdAnswer)_agentMgr.send(hostVO.getId(), copyCommand); -} -catch (Exception ex) { -throw new CloudRuntimeException(ex.getMessage()); -} -finally { try { -_volumeService.revokeAccess(snapshotInfo, hostVO, srcDataStore); +// If we are using a back-end snapshot, then we should still have access to it from the hosts in the cluster that hostVO is in +// (because we passed in true as the third parameter to createVolumeFromSnapshot above). +if (usingBackendSnapshot == false) { +_volumeService.grantAccess(snapshotInfo, hostVO, srcDataStore); +} + +Map srcDetails = getSnapshotDetails(snapshotInfo); + +copyCommand.setOptions(srcDetails); + +copyCmdAnswer = (CopyCmdAnswer)_agentMgr.send(hostVO.getId(), copyCommand); } catch (Exception ex) { -s_logger.debug(ex.getMessage(), ex); +throw new CloudRuntimeException("Failed to create template from snapshot : " + ex.getMessage()); } +finally { +try { +_volumeService.revokeAccess(snapshotInfo, hostVO, srcDataStore); +} +catch (Exception ex) { +s_logger.warn(ex.getMessage(), ex); +} -
[GitHub] cloudstack pull request: Remove extraneous log directory and add c...
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1537#issuecomment-218503981 I am testing now... ð --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9265 cleanup around httpclient...
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1385#issuecomment-218505040 @DaanHoogland it finished!!! :P --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62875666 --- Diff: engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java --- @@ -255,99 +473,123 @@ private Void handleCreateVolumeFromSnapshotBothOnStorageSystem(SnapshotInfo snap VolumeApiResult result = future.get(); +if (volumeDetail != null) { +_volumeDetailsDao.remove(volumeDetail.getId()); +} + if (result.isFailed()) { -s_logger.debug("Failed to create a volume: " + result.getResult()); +s_logger.warn("Failed to create a volume: " + result.getResult()); throw new CloudRuntimeException(result.getResult()); } -} -catch (Exception ex) { -throw new CloudRuntimeException(ex.getMessage()); -} -volumeInfo = _volumeDataFactory.getVolume(volumeInfo.getId(), volumeInfo.getDataStore()); +volumeInfo = _volumeDataFactory.getVolume(volumeInfo.getId(), volumeInfo.getDataStore()); -volumeInfo.processEvent(Event.MigrationRequested); +volumeInfo.processEvent(Event.MigrationRequested); -volumeInfo = _volumeDataFactory.getVolume(volumeInfo.getId(), volumeInfo.getDataStore()); +volumeInfo = _volumeDataFactory.getVolume(volumeInfo.getId(), volumeInfo.getDataStore()); -HostVO hostVO = getHost(snapshotInfo.getDataStore().getId()); - -String value = _configDao.getValue(Config.PrimaryStorageDownloadWait.toString()); -int primaryStorageDownloadWait = NumbersUtil.parseInt(value, Integer.parseInt(Config.PrimaryStorageDownloadWait.getDefaultValue())); -CopyCommand copyCommand = new CopyCommand(snapshotInfo.getTO(), volumeInfo.getTO(), primaryStorageDownloadWait, VirtualMachineManager.ExecuteInSequence.value()); +if (useCloning) { +copyCmdAnswer = performResignature(volumeInfo, hostVO); +} +else { +// asking for a XenServer host here so we don't always prefer to use XenServer hosts that support resigning +// even when we don't need those hosts to do this kind of copy work +hostVO = getHost(snapshotInfo.getDataCenterId(), false); -CopyCmdAnswer copyCmdAnswer = null; +copyCmdAnswer = performCopyOfVdi(volumeInfo, snapshotInfo, hostVO); +} -try { -_volumeService.grantAccess(snapshotInfo, hostVO, snapshotInfo.getDataStore()); -_volumeService.grantAccess(volumeInfo, hostVO, volumeInfo.getDataStore()); +if (copyCmdAnswer == null || !copyCmdAnswer.getResult()) { +if (copyCmdAnswer != null && !StringUtils.isEmpty(copyCmdAnswer.getDetails())) { +errMsg = copyCmdAnswer.getDetails(); +} +else { +errMsg = "Unable to create volume from snapshot"; +} +} +} +catch (Exception ex) { +errMsg = ex.getMessage() != null ? ex.getMessage() : "Copy operation failed"; +} -Map srcDetails = getSnapshotDetails(_storagePoolDao.findById(snapshotInfo.getDataStore().getId()), snapshotInfo); +CopyCommandResult result = new CopyCommandResult(null, copyCmdAnswer); -copyCommand.setOptions(srcDetails); +result.setResult(errMsg); -Map destDetails = getVolumeDetails(volumeInfo); +callback.complete(result); +} -copyCommand.setOptions2(destDetails); +/** + * If the underlying storage system is making use of read-only snapshots, this gives the storage system the opportunity to + * create a volume from the snapshot so that we can copy the VHD file that should be inside of the snapshot to secondary storage. + * + * The resultant volume must be writable because we need to resign the SR and the VDI that should be inside of it before we copy + * the VHD file to secondary storage. + * + * If the storage system is using writable snapshots, then nothing need be done by that storage system here because we can just + * resign the SR and the VDI that should be inside of the snapshot before copying the VHD file to secondary storage. + */ +private void createVolumeFromSnapshot(HostVO hostVO, SnapshotInfo snapshotInfo, boolean keepGrantedAccess) { +SnapshotDetailsVO snapshotDetails = handleSnapshotDetails(snapshotIn
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62876040 --- Diff: engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java --- @@ -361,59 +608,225 @@ private String getProperty(long snapshotId, String property) { } private Map getVolumeDetails(VolumeInfo volumeInfo) { -Map sourceDetails = new HashMap(); +Map volumeDetails = new HashMap(); VolumeVO volumeVO = _volumeDao.findById(volumeInfo.getId()); long storagePoolId = volumeVO.getPoolId(); StoragePoolVO storagePoolVO = _storagePoolDao.findById(storagePoolId); -sourceDetails.put(DiskTO.STORAGE_HOST, storagePoolVO.getHostAddress()); -sourceDetails.put(DiskTO.STORAGE_PORT, String.valueOf(storagePoolVO.getPort())); -sourceDetails.put(DiskTO.IQN, volumeVO.get_iScsiName()); +volumeDetails.put(DiskTO.STORAGE_HOST, storagePoolVO.getHostAddress()); +volumeDetails.put(DiskTO.STORAGE_PORT, String.valueOf(storagePoolVO.getPort())); +volumeDetails.put(DiskTO.IQN, volumeVO.get_iScsiName()); ChapInfo chapInfo = _volumeService.getChapInfo(volumeInfo, volumeInfo.getDataStore()); if (chapInfo != null) { -sourceDetails.put(DiskTO.CHAP_INITIATOR_USERNAME, chapInfo.getInitiatorUsername()); -sourceDetails.put(DiskTO.CHAP_INITIATOR_SECRET, chapInfo.getInitiatorSecret()); -sourceDetails.put(DiskTO.CHAP_TARGET_USERNAME, chapInfo.getTargetUsername()); -sourceDetails.put(DiskTO.CHAP_TARGET_SECRET, chapInfo.getTargetSecret()); +volumeDetails.put(DiskTO.CHAP_INITIATOR_USERNAME, chapInfo.getInitiatorUsername()); +volumeDetails.put(DiskTO.CHAP_INITIATOR_SECRET, chapInfo.getInitiatorSecret()); +volumeDetails.put(DiskTO.CHAP_TARGET_USERNAME, chapInfo.getTargetUsername()); +volumeDetails.put(DiskTO.CHAP_TARGET_SECRET, chapInfo.getTargetSecret()); +} + +return volumeDetails; +} + +private Map getSnapshotDetails(SnapshotInfo snapshotInfo) { +Map snapshotDetails = new HashMap(); + +long storagePoolId = snapshotInfo.getDataStore().getId(); +StoragePoolVO storagePoolVO = _storagePoolDao.findById(storagePoolId); + +snapshotDetails.put(DiskTO.STORAGE_HOST, storagePoolVO.getHostAddress()); +snapshotDetails.put(DiskTO.STORAGE_PORT, String.valueOf(storagePoolVO.getPort())); + +long snapshotId = snapshotInfo.getId(); + +snapshotDetails.put(DiskTO.IQN, getProperty(snapshotId, DiskTO.IQN)); + +snapshotDetails.put(DiskTO.CHAP_INITIATOR_USERNAME, getProperty(snapshotId, DiskTO.CHAP_INITIATOR_USERNAME)); +snapshotDetails.put(DiskTO.CHAP_INITIATOR_SECRET, getProperty(snapshotId, DiskTO.CHAP_INITIATOR_SECRET)); +snapshotDetails.put(DiskTO.CHAP_TARGET_USERNAME, getProperty(snapshotId, DiskTO.CHAP_TARGET_USERNAME)); +snapshotDetails.put(DiskTO.CHAP_TARGET_SECRET, getProperty(snapshotId, DiskTO.CHAP_TARGET_SECRET)); + +return snapshotDetails; +} + +private HostVO getHost(SnapshotInfo snapshotInfo) { +HostVO hostVO = getHost(snapshotInfo.getDataCenterId(), true); + +if (hostVO == null) { +hostVO = getHost(snapshotInfo.getDataCenterId(), false); + +if (hostVO == null) { +throw new CloudRuntimeException("Unable to locate an applicable host"); +} } -return sourceDetails; +return hostVO; } -public HostVO getHost(long dataStoreId) { -StoragePoolVO storagePoolVO = _storagePoolDao.findById(dataStoreId); +private HostVO getHost(Long zoneId, boolean computeClusterMustSupportResign) { +if (zoneId == null) { +throw new CloudRuntimeException("Zone ID cannot be null."); +} -List clusters = _mgr.searchForClusters(storagePoolVO.getDataCenterId(), new Long(0), Long.MAX_VALUE, HypervisorType.XenServer.toString()); +List clusters = _mgr.searchForClusters(zoneId, new Long(0), Long.MAX_VALUE, HypervisorType.XenServer.toString()); if (clusters == null) { -throw new CloudRuntimeException("Unable to locate an applicable cluster"); +clusters = new ArrayList<>(); } +Collections.shuffle(clusters, new Random(System.nanoTime())); + +clusters: for (Cluster cluster : clusters) { if (cluster.getAllocationState() == Allocation
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62876182 --- Diff: engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java --- @@ -361,59 +603,221 @@ private String getProperty(long snapshotId, String property) { } private Map getVolumeDetails(VolumeInfo volumeInfo) { -Map sourceDetails = new HashMap(); +Map volumeDetails = new HashMap(); VolumeVO volumeVO = _volumeDao.findById(volumeInfo.getId()); long storagePoolId = volumeVO.getPoolId(); StoragePoolVO storagePoolVO = _storagePoolDao.findById(storagePoolId); -sourceDetails.put(DiskTO.STORAGE_HOST, storagePoolVO.getHostAddress()); -sourceDetails.put(DiskTO.STORAGE_PORT, String.valueOf(storagePoolVO.getPort())); -sourceDetails.put(DiskTO.IQN, volumeVO.get_iScsiName()); +volumeDetails.put(DiskTO.STORAGE_HOST, storagePoolVO.getHostAddress()); +volumeDetails.put(DiskTO.STORAGE_PORT, String.valueOf(storagePoolVO.getPort())); +volumeDetails.put(DiskTO.IQN, volumeVO.get_iScsiName()); ChapInfo chapInfo = _volumeService.getChapInfo(volumeInfo, volumeInfo.getDataStore()); if (chapInfo != null) { -sourceDetails.put(DiskTO.CHAP_INITIATOR_USERNAME, chapInfo.getInitiatorUsername()); -sourceDetails.put(DiskTO.CHAP_INITIATOR_SECRET, chapInfo.getInitiatorSecret()); -sourceDetails.put(DiskTO.CHAP_TARGET_USERNAME, chapInfo.getTargetUsername()); -sourceDetails.put(DiskTO.CHAP_TARGET_SECRET, chapInfo.getTargetSecret()); +volumeDetails.put(DiskTO.CHAP_INITIATOR_USERNAME, chapInfo.getInitiatorUsername()); +volumeDetails.put(DiskTO.CHAP_INITIATOR_SECRET, chapInfo.getInitiatorSecret()); +volumeDetails.put(DiskTO.CHAP_TARGET_USERNAME, chapInfo.getTargetUsername()); +volumeDetails.put(DiskTO.CHAP_TARGET_SECRET, chapInfo.getTargetSecret()); } -return sourceDetails; +return volumeDetails; +} + +private Map getSnapshotDetails(SnapshotInfo snapshotInfo) { +Map snapshotDetails = new HashMap(); + +long storagePoolId = snapshotInfo.getDataStore().getId(); +StoragePoolVO storagePoolVO = _storagePoolDao.findById(storagePoolId); + +snapshotDetails.put(DiskTO.STORAGE_HOST, storagePoolVO.getHostAddress()); +snapshotDetails.put(DiskTO.STORAGE_PORT, String.valueOf(storagePoolVO.getPort())); + +long snapshotId = snapshotInfo.getId(); + +snapshotDetails.put(DiskTO.IQN, getProperty(snapshotId, DiskTO.IQN)); + +snapshotDetails.put(DiskTO.CHAP_INITIATOR_USERNAME, getProperty(snapshotId, DiskTO.CHAP_INITIATOR_USERNAME)); +snapshotDetails.put(DiskTO.CHAP_INITIATOR_SECRET, getProperty(snapshotId, DiskTO.CHAP_INITIATOR_SECRET)); +snapshotDetails.put(DiskTO.CHAP_TARGET_USERNAME, getProperty(snapshotId, DiskTO.CHAP_TARGET_USERNAME)); +snapshotDetails.put(DiskTO.CHAP_TARGET_SECRET, getProperty(snapshotId, DiskTO.CHAP_TARGET_SECRET)); + +return snapshotDetails; } -public HostVO getHost(long dataStoreId) { -StoragePoolVO storagePoolVO = _storagePoolDao.findById(dataStoreId); +private HostVO getHost(SnapshotInfo snapshotInfo) { +HostVO hostVO = getHost(snapshotInfo.getDataCenterId(), true); -List clusters = _mgr.searchForClusters(storagePoolVO.getDataCenterId(), new Long(0), Long.MAX_VALUE, HypervisorType.XenServer.toString()); +if (hostVO == null) { +hostVO = getHost(snapshotInfo.getDataCenterId(), false); -if (clusters == null) { -throw new CloudRuntimeException("Unable to locate an applicable cluster"); +if (hostVO == null) { +throw new CloudRuntimeException("Unable to locate an applicable host in data center with ID = " + snapshotInfo.getDataCenterId()); +} } -for (Cluster cluster : clusters) { -if (cluster.getAllocationState() == AllocationState.Enabled) { -List hosts = _hostDao.findByClusterId(cluster.getId()); +return hostVO; +} -if (hosts != null) { -for (HostVO host : hosts) { -if (host.getResourceState() == ResourceState.Enabled) { -return host; -} -} +private HostVO getHost(Long zoneId, boolean computeClusterMustSupportResign) {
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62876283 --- Diff: engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java --- @@ -361,59 +603,221 @@ private String getProperty(long snapshotId, String property) { } private Map getVolumeDetails(VolumeInfo volumeInfo) { -Map sourceDetails = new HashMap(); +Map volumeDetails = new HashMap(); VolumeVO volumeVO = _volumeDao.findById(volumeInfo.getId()); long storagePoolId = volumeVO.getPoolId(); StoragePoolVO storagePoolVO = _storagePoolDao.findById(storagePoolId); -sourceDetails.put(DiskTO.STORAGE_HOST, storagePoolVO.getHostAddress()); -sourceDetails.put(DiskTO.STORAGE_PORT, String.valueOf(storagePoolVO.getPort())); -sourceDetails.put(DiskTO.IQN, volumeVO.get_iScsiName()); +volumeDetails.put(DiskTO.STORAGE_HOST, storagePoolVO.getHostAddress()); +volumeDetails.put(DiskTO.STORAGE_PORT, String.valueOf(storagePoolVO.getPort())); +volumeDetails.put(DiskTO.IQN, volumeVO.get_iScsiName()); ChapInfo chapInfo = _volumeService.getChapInfo(volumeInfo, volumeInfo.getDataStore()); if (chapInfo != null) { -sourceDetails.put(DiskTO.CHAP_INITIATOR_USERNAME, chapInfo.getInitiatorUsername()); -sourceDetails.put(DiskTO.CHAP_INITIATOR_SECRET, chapInfo.getInitiatorSecret()); -sourceDetails.put(DiskTO.CHAP_TARGET_USERNAME, chapInfo.getTargetUsername()); -sourceDetails.put(DiskTO.CHAP_TARGET_SECRET, chapInfo.getTargetSecret()); +volumeDetails.put(DiskTO.CHAP_INITIATOR_USERNAME, chapInfo.getInitiatorUsername()); +volumeDetails.put(DiskTO.CHAP_INITIATOR_SECRET, chapInfo.getInitiatorSecret()); +volumeDetails.put(DiskTO.CHAP_TARGET_USERNAME, chapInfo.getTargetUsername()); +volumeDetails.put(DiskTO.CHAP_TARGET_SECRET, chapInfo.getTargetSecret()); } -return sourceDetails; +return volumeDetails; +} + +private Map getSnapshotDetails(SnapshotInfo snapshotInfo) { +Map snapshotDetails = new HashMap(); + +long storagePoolId = snapshotInfo.getDataStore().getId(); +StoragePoolVO storagePoolVO = _storagePoolDao.findById(storagePoolId); + +snapshotDetails.put(DiskTO.STORAGE_HOST, storagePoolVO.getHostAddress()); +snapshotDetails.put(DiskTO.STORAGE_PORT, String.valueOf(storagePoolVO.getPort())); + +long snapshotId = snapshotInfo.getId(); + +snapshotDetails.put(DiskTO.IQN, getProperty(snapshotId, DiskTO.IQN)); + +snapshotDetails.put(DiskTO.CHAP_INITIATOR_USERNAME, getProperty(snapshotId, DiskTO.CHAP_INITIATOR_USERNAME)); +snapshotDetails.put(DiskTO.CHAP_INITIATOR_SECRET, getProperty(snapshotId, DiskTO.CHAP_INITIATOR_SECRET)); +snapshotDetails.put(DiskTO.CHAP_TARGET_USERNAME, getProperty(snapshotId, DiskTO.CHAP_TARGET_USERNAME)); +snapshotDetails.put(DiskTO.CHAP_TARGET_SECRET, getProperty(snapshotId, DiskTO.CHAP_TARGET_SECRET)); + +return snapshotDetails; } -public HostVO getHost(long dataStoreId) { -StoragePoolVO storagePoolVO = _storagePoolDao.findById(dataStoreId); +private HostVO getHost(SnapshotInfo snapshotInfo) { +HostVO hostVO = getHost(snapshotInfo.getDataCenterId(), true); -List clusters = _mgr.searchForClusters(storagePoolVO.getDataCenterId(), new Long(0), Long.MAX_VALUE, HypervisorType.XenServer.toString()); +if (hostVO == null) { +hostVO = getHost(snapshotInfo.getDataCenterId(), false); -if (clusters == null) { -throw new CloudRuntimeException("Unable to locate an applicable cluster"); +if (hostVO == null) { +throw new CloudRuntimeException("Unable to locate an applicable host in data center with ID = " + snapshotInfo.getDataCenterId()); +} } -for (Cluster cluster : clusters) { -if (cluster.getAllocationState() == AllocationState.Enabled) { -List hosts = _hostDao.findByClusterId(cluster.getId()); +return hostVO; +} -if (hosts != null) { -for (HostVO host : hosts) { -if (host.getResourceState() == ResourceState.Enabled) { -return host; -} -} +private HostVO getHost(Long zoneId, boolean computeClusterMustSupportResign) {
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62878912 --- Diff: engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/StorageSystemSnapshotStrategy.java --- @@ -72,8 +77,10 @@ private static final Logger s_logger = Logger.getLogger(StorageSystemSnapshotStrategy.class); @Inject private AgentManager _agentMgr; +@Inject private ClusterDao _clusterDao; @Inject private DataStoreManager _dataStoreMgr; @Inject private HostDao _hostDao; +@Inject private HostDetailsDao _hostDetailsDao; --- End diff -- warning for not used --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62879575 --- Diff: engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/StorageSystemSnapshotStrategy.java --- @@ -347,38 +395,87 @@ private String getProperty(long snapshotId, String property) { return null; } -private HostVO getHost(Long hostId, VolumeVO volumeVO) { -HostVO hostVO = _hostDao.findById(hostId); +private HostVO getHost(long volumeId) { +VolumeVO volumeVO = _volumeDao.findById(volumeId); + +Long vmInstanceId = volumeVO.getInstanceId(); +VMInstanceVO vmInstanceVO = _vmInstanceDao.findById(vmInstanceId); + +Long hostId = null; + +// if the volume to snapshot is associated with a VM +if (vmInstanceVO != null) { +hostId = vmInstanceVO.getHostId(); + +// if the VM is not associated with a host +if (hostId == null) { +hostId = vmInstanceVO.getLastHostId(); +} +} + +return getHost(volumeVO.getDataCenterId(), hostId); +} + +private HostVO getHost(long zoneId, Long hostId) { +HostVO hostVO = getHost(zoneId, true); if (hostVO != null) { return hostVO; } -// pick a host in any XenServer cluster that's in the applicable zone +hostVO = _hostDao.findById(hostId); -long zoneId = volumeVO.getDataCenterId(); +if (hostVO != null) { +return hostVO; +} + +hostVO = getHost(zoneId, false); -List clusters = _mgr.searchForClusters(zoneId, new Long(0), Long.MAX_VALUE, HypervisorType.XenServer.toString()); +if (hostVO != null) { +return hostVO; +} + +throw new CloudRuntimeException("Unable to locate an applicable host"); +} + +private HostVO getHost(long zoneId, boolean computeClusterMustSupportResign) { +List clusters = _mgr.searchForClusters(zoneId, 0L, Long.MAX_VALUE, HypervisorType.XenServer.toString()); if (clusters == null) { -throw new CloudRuntimeException("Unable to locate an applicable cluster"); +clusters = new ArrayList<>(); } +Collections.shuffle(clusters, new Random(System.nanoTime())); + +clusters: for (Cluster cluster : clusters) { if (cluster.getAllocationState() == AllocationState.Enabled) { List hosts = _hostDao.findByClusterId(cluster.getId()); if (hosts != null) { +Collections.shuffle(hosts, new Random(System.nanoTime())); + for (HostVO host : hosts) { if (host.getResourceState() == ResourceState.Enabled) { -return host; +if (computeClusterMustSupportResign) { +if (_clusterDao.computeClusterSupportsResign(cluster.getId())) { +return host; +} +else { +// no other host in the cluster in question should be able to satisfy our requirements here, so move on to the next cluster --- End diff -- a usefull comment! kudos, that rarely happens ;) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62880347 --- Diff: engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/StorageSystemSnapshotStrategy.java --- @@ -347,38 +395,87 @@ private String getProperty(long snapshotId, String property) { return null; } -private HostVO getHost(Long hostId, VolumeVO volumeVO) { -HostVO hostVO = _hostDao.findById(hostId); +private HostVO getHost(long volumeId) { +VolumeVO volumeVO = _volumeDao.findById(volumeId); + +Long vmInstanceId = volumeVO.getInstanceId(); +VMInstanceVO vmInstanceVO = _vmInstanceDao.findById(vmInstanceId); + +Long hostId = null; + +// if the volume to snapshot is associated with a VM +if (vmInstanceVO != null) { +hostId = vmInstanceVO.getHostId(); + +// if the VM is not associated with a host +if (hostId == null) { +hostId = vmInstanceVO.getLastHostId(); +} +} + +return getHost(volumeVO.getDataCenterId(), hostId); +} + +private HostVO getHost(long zoneId, Long hostId) { +HostVO hostVO = getHost(zoneId, true); if (hostVO != null) { return hostVO; } -// pick a host in any XenServer cluster that's in the applicable zone +hostVO = _hostDao.findById(hostId); -long zoneId = volumeVO.getDataCenterId(); +if (hostVO != null) { +return hostVO; +} + +hostVO = getHost(zoneId, false); -List clusters = _mgr.searchForClusters(zoneId, new Long(0), Long.MAX_VALUE, HypervisorType.XenServer.toString()); +if (hostVO != null) { +return hostVO; +} + +throw new CloudRuntimeException("Unable to locate an applicable host"); +} + +private HostVO getHost(long zoneId, boolean computeClusterMustSupportResign) { +List clusters = _mgr.searchForClusters(zoneId, 0L, Long.MAX_VALUE, HypervisorType.XenServer.toString()); if (clusters == null) { -throw new CloudRuntimeException("Unable to locate an applicable cluster"); +clusters = new ArrayList<>(); } +Collections.shuffle(clusters, new Random(System.nanoTime())); + +clusters: for (Cluster cluster : clusters) { if (cluster.getAllocationState() == AllocationState.Enabled) { List hosts = _hostDao.findByClusterId(cluster.getId()); if (hosts != null) { +Collections.shuffle(hosts, new Random(System.nanoTime())); + for (HostVO host : hosts) { if (host.getResourceState() == ResourceState.Enabled) { -return host; +if (computeClusterMustSupportResign) { +if (_clusterDao.computeClusterSupportsResign(cluster.getId())) { +return host; +} +else { +// no other host in the cluster in question should be able to satisfy our requirements here, so move on to the next cluster +continue clusters; +} +} +else { +return host; +} } } } } } -throw new CloudRuntimeException("Unable to locate an applicable cluster"); +return null; --- End diff -- me no like, maybe a local private checked exception to have it handled in the top getHost method? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62880464 --- Diff: engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java --- @@ -289,7 +291,7 @@ public boolean deleteSnapshot(Long snapshotId) { @Override public boolean revertSnapshot(SnapshotInfo snapshot) { if (canHandle(snapshot,SnapshotOperation.REVERT) == StrategyPriority.CANT_HANDLE) { -throw new UnsupportedOperationException("Reverting not supported. Create a template or volume based on the snapshot instead."); +throw new CloudRuntimeException("Reverting not supported. Create a template or volume based on the snapshot instead."); --- End diff -- why change the type of the exception? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62880956 --- Diff: engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java --- @@ -134,6 +146,14 @@ EndPointSelector _epSelector; @Inject HostDao _hostDao; +@Inject +private PrimaryDataStoreDao _storagePoolDao; --- End diff -- not used --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62880949 --- Diff: engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java --- @@ -134,6 +146,14 @@ EndPointSelector _epSelector; @Inject HostDao _hostDao; +@Inject +private PrimaryDataStoreDao _storagePoolDao; +@Inject +private HostDetailsDao _hostDetailsDao; --- End diff -- not used --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9348: Use non-blocking SSL han...
Github user nvazquez commented on the pull request: https://github.com/apache/cloudstack/pull/1493#issuecomment-218514854 @rhtyd @kiwiflyer @swill a PR for fixing the problem #1539 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62881152 --- Diff: engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java --- @@ -554,6 +574,51 @@ protected Void managedCopyBaseImageCallback(AsyncCallbackDispatcher callback, CreateVolumeContext context) { +CreateCmdResult result = callback.getResult(); +VolumeApiResult res = new VolumeApiResult(null); + +res.setResult(result.getResult()); + +AsyncCallFuture future = context.getFuture(); +DataObject templateOnPrimaryStoreObj = context.getVolume(); + +if (result.isSuccess()) { + ((TemplateObject)templateOnPrimaryStoreObj).setInstallPath(result.getPath()); + templateOnPrimaryStoreObj.processEvent(Event.OperationSuccessed, result.getAnswer()); +} +else { +templateOnPrimaryStoreObj.processEvent(Event.OperationFailed); +} + +future.complete(res); + +return null; --- End diff -- why Void and return null instead of void and return? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62881271 --- Diff: engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java --- @@ -554,6 +574,51 @@ protected Void managedCopyBaseImageCallback(AsyncCallbackDispatcher callback, CreateVolumeContext context) { +CreateCmdResult result = callback.getResult(); +VolumeApiResult res = new VolumeApiResult(null); + +res.setResult(result.getResult()); + +AsyncCallFuture future = context.getFuture(); +DataObject templateOnPrimaryStoreObj = context.getVolume(); + +if (result.isSuccess()) { + ((TemplateObject)templateOnPrimaryStoreObj).setInstallPath(result.getPath()); + templateOnPrimaryStoreObj.processEvent(Event.OperationSuccessed, result.getAnswer()); +} +else { +templateOnPrimaryStoreObj.processEvent(Event.OperationFailed); +} + +future.complete(res); + +return null; +} + +protected Void copyManagedTemplateCallback(AsyncCallbackDispatcher callback, CreateBaseImageContext context) { --- End diff -- same here, why Void and returning a null? returning null is a bad smell to me. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9348: Use non-blocking SSL han...
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1493#issuecomment-218519246 @nvazquez I don't think #1539 is related to this PR. I think this one has completely separate issues... --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9299: Out-of-band Management f...
Github user nvazquez commented on the pull request: https://github.com/apache/cloudstack/pull/1502#issuecomment-218520519 @rhtyd @kiwiflyer @swill a PR for fixing the problem #1539 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9348: Use non-blocking SSL han...
Github user nvazquez commented on the pull request: https://github.com/apache/cloudstack/pull/1493#issuecomment-218520703 Sorry, I confused PRs. Please ignore my last comment. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: CLOUDSTACK-9348: Use non-blocking SSL han...
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1493#issuecomment-218522071 No worries. ð I am really short on sleep, but I was pretty confident. :P --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62885313 --- Diff: plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java --- @@ -164,9 +165,12 @@ * */ public abstract class CitrixResourceBase implements ServerResource, HypervisorResource, VirtualRouterDeployer { - +/** + * RELVMOISCSI = used for resigning metadata (like SR UUID and VDI UUID when a + * particular storage manager is installed on a XenServer host (for back-end snapshots to work)) + */ --- End diff -- I would put the value javadoc on the value and describe only the whole enum here. (PR coming to that end on another enum, shortly) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62886063 --- Diff: plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java --- @@ -1792,10 +1796,26 @@ protected void fillHostInfo(final Connection conn, final StartupRoutingCommand c cmd.setPod(_pod); cmd.setVersion(CitrixResourceBase.class.getPackage().getImplementationVersion()); +try { +final String cmdLine = "xe sm-list | grep \"resigning of duplicates\""; + +final XenServerUtilitiesHelper xenServerUtilitiesHelper = getXenServerUtilitiesHelper(); + +Pair result = xenServerUtilitiesHelper.executeSshWrapper(_host.getIp(), 22, _username, null, getPwdFromQueue(), cmdLine); + +boolean supportsClonedVolumes = result != null && result.first() != null && result.first() && +result.second() != null && result.second().length() > 0; + +cmd.setSupportsClonedVolumes(supportsClonedVolumes); +} catch (Exception ex) { --- End diff -- no checked exceptions are being thrown, why a catch all? is there a specific exception that might threaten us? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62886608 --- Diff: plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java --- @@ -2351,17 +2376,52 @@ public SR getIscsiSR(final Connection conn, final String srNameLabel, final Stri throw new CloudRuntimeException(msg, e); } } + deviceConfig.put("SCSIid", scsiid); -final String result = SR.probe(conn, host, deviceConfig, type, smConfig); +String result = SR.probe(conn, host, deviceConfig, type, smConfig); + String pooluuid = null; + if (result.indexOf("") != -1) { pooluuid = result.substring(result.indexOf("") + 6, result.indexOf("")).trim(); } if (pooluuid == null || pooluuid.length() != 36) { sr = SR.create(conn, host, deviceConfig, new Long(0), srNameLabel, srNameLabel, type, "user", true, smConfig); -} else { +} +else { +if (resignature) { --- End diff -- maybe a method createIfResignable()? thsi file is a blob of blobs, let's get to reducing the problem called CitrixResourceBase --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62890766 --- Diff: plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidFirePrimaryDataStoreDriver.java --- @@ -665,22 +950,190 @@ private void updateSnapshotDetails(long csSnapshotId, long sfNewVolumeId, long s _snapshotDetailsDao.persist(snapshotDetail); } -// return null for no error message -private String deleteSnapshot(SnapshotInfo snapshotInfo, long storagePoolId) { -String errMsg = null; +private String createVolume(VolumeInfo volumeInfo, long storagePoolId) { +verifySufficientBytesForStoragePool(volumeInfo, storagePoolId); +verifySufficientIopsForStoragePool(volumeInfo.getMinIops() != null ? volumeInfo.getMinIops() : getDefaultMinIops(storagePoolId), storagePoolId); + +SolidFireUtil.SolidFireConnection sfConnection = SolidFireUtil.getSolidFireConnection(storagePoolId, _storagePoolDetailsDao); + +long sfAccountId = getCreateSolidFireAccountId(sfConnection, volumeInfo.getAccountId(), storagePoolId); + +long csSnapshotId = getCsIdForCloning(volumeInfo.getId(), "cloneOfSnapshot"); +long csTemplateId = getCsIdForCloning(volumeInfo.getId(), "cloneOfTemplate"); + +SolidFireUtil.SolidFireVolume sfVolume; + +if (csSnapshotId > 0) { +// We are supposed to create a clone of the underlying volume or snapshot that supports the CloudStack snapshot. +sfVolume = createClone(sfConnection, csSnapshotId, volumeInfo, sfAccountId, storagePoolId, DataObjectType.SNAPSHOT); +} else if (csTemplateId > 0) { +// Clone from template. +sfVolume = createClone(sfConnection, csTemplateId, volumeInfo, sfAccountId, storagePoolId, DataObjectType.TEMPLATE); + +long volumeSize = getDataObjectSizeIncludingHypervisorSnapshotReserve(volumeInfo, _storagePoolDao.findById(storagePoolId)); + +if (volumeSize > sfVolume.getTotalSize()) { +// Expand the volume to include HSR. +SolidFireUtil.modifySolidFireVolume(sfConnection, sfVolume.getId(), volumeSize, getVolumeAttributes(volumeInfo), +sfVolume.getMinIops(), sfVolume.getMaxIops(), sfVolume.getBurstIops()); + +// Get the SolidFire volume from the SAN again because we just updated its size. +sfVolume = SolidFireUtil.getSolidFireVolume(sfConnection, sfVolume.getId()); +} +} +else { +sfVolume = createSolidFireVolume(sfConnection, volumeInfo, sfAccountId); +} + +String iqn = sfVolume.getIqn(); + +VolumeVO volume = _volumeDao.findById(volumeInfo.getId()); + +volume.set_iScsiName(iqn); +volume.setFolder(String.valueOf(sfVolume.getId())); +volume.setPoolType(StoragePoolType.IscsiLUN); +volume.setPoolId(storagePoolId); + +_volumeDao.update(volume.getId(), volume); + +updateVolumeDetails(volume.getId(), sfVolume.getTotalSize()); + +StoragePoolVO storagePool = _storagePoolDao.findById(storagePoolId); + +long capacityBytes = storagePool.getCapacityBytes(); +// getUsedBytes(StoragePool) will include the bytes of the newly created volume because +// updateVolumeDetails(long, long) has already been called for this volume +long usedBytes = getUsedBytes(storagePool); + +storagePool.setUsedBytes(usedBytes > capacityBytes ? capacityBytes : usedBytes); + +_storagePoolDao.update(storagePoolId, storagePool); + +return iqn; +} + +private void createTempVolume(SnapshotInfo snapshotInfo, long storagePoolId) { +long csSnapshotId = snapshotInfo.getId(); + +SnapshotDetailsVO snapshotDetails = _snapshotDetailsDao.findDetail(csSnapshotId, SolidFireUtil.SNAPSHOT_ID); + +if (snapshotDetails == null || snapshotDetails.getValue() == null) { +throw new CloudRuntimeException("'createTempVolume(SnapshotInfo, long)' should not be invoked unless " + SolidFireUtil.SNAPSHOT_ID + " exists."); +} + +SolidFireUtil.SolidFireConnection sfConnection = SolidFireUtil.getSolidFireConnection(storagePoolId, _storagePoolDetailsDao); + +snapshotDetails = _snapshotDetailsDao.findDetail(csSnapshotId, "tempVolume"); + +if (snapshotDetails != null && snapshotDetails.getValue() != null && snapshotDetails.getValue().equalsIgnoreCase("create")) { +long sfAccountId = getCreateSolidFireAccountId(sfCo
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62890825 --- Diff: plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidFirePrimaryDataStoreDriver.java --- @@ -692,12 +1145,38 @@ private String deleteSnapshot(SnapshotInfo snapshotInfo, long storagePoolId) { _storagePoolDao.update(storagePoolId, storagePool); } catch (Exception ex) { -s_logger.debug(SolidFireUtil.LOG_PREFIX + "Failed to delete SolidFire volume. CloudStack snapshot ID: " + snapshotId, ex); +s_logger.debug(SolidFireUtil.LOG_PREFIX + "Issue in 'deleteSnapshot(SnapshotInfo, long)'. CloudStack snapshot ID: " + csSnapshotId, ex); -errMsg = ex.getMessage(); +throw ex; } +} + +private void deleteTemplate(TemplateInfo template, long storagePoolId) { +try { +SolidFireUtil.SolidFireConnection sfConnection = SolidFireUtil.getSolidFireConnection(storagePoolId, _storagePoolDetailsDao); + +long sfTemplateVolumeId = getVolumeIdFrom_iScsiPath(template.getInstallPath()); -return errMsg; +SolidFireUtil.deleteSolidFireVolume(sfConnection, sfTemplateVolumeId); + +VMTemplateStoragePoolVO templatePoolRef = _tmpltPoolDao.findByPoolTemplate(storagePoolId, template.getId()); + +_tmpltPoolDao.remove(templatePoolRef.getId()); + +StoragePoolVO storagePool = _storagePoolDao.findById(storagePoolId); + +// getUsedBytes(StoragePool) will not include the template to delete because the "template_spool_ref" table has already been updated by this point +long usedBytes = getUsedBytes(storagePool); + +storagePool.setUsedBytes(usedBytes < 0 ? 0 : usedBytes); + +_storagePoolDao.update(storagePoolId, storagePool); +} +catch (Exception ex) { --- End diff -- ??? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62891804 --- Diff: server/src/com/cloud/storage/StorageManagerImpl.java --- @@ -209,6 +211,8 @@ @Inject protected HostDao _hostDao; @Inject +private HostDetailsDao _hostDetailsDao; --- End diff -- unused --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user jburwell commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62892193 --- Diff: engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java --- @@ -172,78 +232,211 @@ private void validate(SnapshotInfo snapshotInfo) { } } -private Void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, TemplateInfo templateInfo, AsyncCompletionCallback callback) { +private boolean usingBackendSnapshotFor(SnapshotInfo snapshotInfo) { +String property = getProperty(snapshotInfo.getId(), "takeSnapshot"); + +return Boolean.parseBoolean(property); +} + +private void handleCreateTemplateFromSnapshot(SnapshotInfo snapshotInfo, TemplateInfo templateInfo, AsyncCompletionCallback callback) { try { snapshotInfo.processEvent(Event.CopyingRequested); } catch (Exception ex) { throw new CloudRuntimeException("This snapshot is not currently in a state where it can be used to create a template."); } -HostVO hostVO = getHost(snapshotInfo.getDataStore().getId()); -DataStore srcDataStore = snapshotInfo.getDataStore(); - -String value = _configDao.getValue(Config.PrimaryStorageDownloadWait.toString()); -int primaryStorageDownloadWait = NumbersUtil.parseInt(value, Integer.parseInt(Config.PrimaryStorageDownloadWait.getDefaultValue())); -CopyCommand copyCommand = new CopyCommand(snapshotInfo.getTO(), templateInfo.getTO(), primaryStorageDownloadWait, VirtualMachineManager.ExecuteInSequence.value()); +HostVO hostVO = getHost(snapshotInfo); -String errMsg = null; +boolean usingBackendSnapshot = usingBackendSnapshotFor(snapshotInfo); +boolean computeClusterSupportsResign = computeClusterSupportsResign(hostVO.getClusterId()); -CopyCmdAnswer copyCmdAnswer = null; +if (usingBackendSnapshot && !computeClusterSupportsResign) { +throw new CloudRuntimeException("Unable to locate an applicable host with which to perform a resignature operation"); +} try { -_volumeService.grantAccess(snapshotInfo, hostVO, srcDataStore); +if (usingBackendSnapshot) { +createVolumeFromSnapshot(hostVO, snapshotInfo, true); +} -Map srcDetails = getSnapshotDetails(_storagePoolDao.findById(srcDataStore.getId()), snapshotInfo); +DataStore srcDataStore = snapshotInfo.getDataStore(); -copyCommand.setOptions(srcDetails); +String value = _configDao.getValue(Config.PrimaryStorageDownloadWait.toString()); +int primaryStorageDownloadWait = NumbersUtil.parseInt(value, Integer.parseInt(Config.PrimaryStorageDownloadWait.getDefaultValue())); +CopyCommand copyCommand = new CopyCommand(snapshotInfo.getTO(), templateInfo.getTO(), primaryStorageDownloadWait, VirtualMachineManager.ExecuteInSequence.value()); + +String errMsg = null; + +CopyCmdAnswer copyCmdAnswer = null; -copyCmdAnswer = (CopyCmdAnswer)_agentMgr.send(hostVO.getId(), copyCommand); -} -catch (Exception ex) { -throw new CloudRuntimeException(ex.getMessage()); -} -finally { try { -_volumeService.revokeAccess(snapshotInfo, hostVO, srcDataStore); +// If we are using a back-end snapshot, then we should still have access to it from the hosts in the cluster that hostVO is in +// (because we passed in true as the third parameter to createVolumeFromSnapshot above). +if (usingBackendSnapshot == false) { +_volumeService.grantAccess(snapshotInfo, hostVO, srcDataStore); +} + +Map srcDetails = getSnapshotDetails(snapshotInfo); + +copyCommand.setOptions(srcDetails); + +copyCmdAnswer = (CopyCmdAnswer)_agentMgr.send(hostVO.getId(), copyCommand); } catch (Exception ex) { -s_logger.debug(ex.getMessage(), ex); +throw new CloudRuntimeException(ex.getMessage()); } +finally { +try { +_volumeService.revokeAccess(snapshotInfo, hostVO, srcDataStore); +} +catch (Exception ex) { +s_logger.debug(ex.getMessage(), ex); +} -if (copyCmdAnswer == null || !copyCmdAnswer.getResult()) {
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user jburwell commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62892410 --- Diff: core/src/com/cloud/agent/api/StartupRoutingCommand.java --- @@ -35,7 +35,7 @@ long memory; long dom0MinMemory; boolean poolSync; - +private boolean _supportsClonedVolumes; --- End diff -- +1 as well. Ridding of odd Hungarian notation and "_" would be a very things for the codebase. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] cloudstack pull request: Taking fast and efficient volume snapshot...
Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1403#discussion_r62892495 --- Diff: server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java --- @@ -144,6 +145,8 @@ @Inject SnapshotDataStoreDao _snapshotStoreDao; @Inject +private DataStoreManager _dataStoreMgr; --- End diff -- there is already a dataStoreMgr. why are two needed? (also underscore names are against naming convention) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---