[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277676#comment-15277676
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r62616838
  
--- Diff: 
utils/src/main/java/org/apache/cloudstack/utils/process/ProcessResult.java ---
@@ -0,0 +1,46 @@
+// 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.utils.process;
+
+public class ProcessResult {
--- End diff --

Not making this nested inside ProcessRunner, ProcessResult is used in oobm 
driver. The constructor is the only way to initialize the inner items, which 
are final. The class if final now.


> Out-of-band Management for CloudStack
> -
>
> Key: CLOUDSTACK-9299
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9299
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Rohit Yadav
>Assignee: Rohit Yadav
> Fix For: 4.9.0, Future
>
>
> Support access to a host’s out-of-band management interface (e.g. IPMI, iLO, 
> DRAC, etc.) to manage host power operations (on/off etc.) and querying 
> current power state.
> FS: 
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out-of-band+Management+for+CloudStack



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277675#comment-15277675
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r62616710
  
--- Diff: 
utils/src/main/java/org/apache/cloudstack/utils/process/ProcessRunner.java ---
@@ -0,0 +1,112 @@
+//
+// 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.utils.process;
+
+import com.cloud.utils.concurrency.NamedThreadFactory;
+import com.google.common.base.Preconditions;
+import com.google.common.base.Strings;
+import org.apache.log4j.Logger;
+import org.joda.time.Duration;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+public class ProcessRunner {
+public static final Logger LOG = Logger.getLogger(ProcessRunner.class);
+
+private static final ExecutorService processExecutor = 
Executors.newCachedThreadPool(new NamedThreadFactory("ProcessRunner"));
+
+private static String readStream(final InputStream inputStream) {
+String text = null;
+try {
+final BufferedReader bufferedReader = new BufferedReader(new 
InputStreamReader(inputStream));
+String line;
+while ((line = bufferedReader.readLine()) != null) {
+if (Strings.isNullOrEmpty(text)) {
+text = line;
+} else {
+text = text + "\n" + line;
+}
+}
+} catch (IOException e) {
+if (LOG.isTraceEnabled()) {
+LOG.trace("ProcessRunner::readStream failed due to: " + 
e.getMessage());
+}
+}
+return text;
+}
+
+public static ProcessResult executeCommands(final List 
commands, final Duration timeOut) {
+Preconditions.checkArgument(commands != null && timeOut != null);
+
+int retVal = -2;
+String stdOutput = null;
+String stdError = null;
+
+try {
+final Process process = new 
ProcessBuilder().command(commands).start();
+if (timeOut.getStandardSeconds() > 0) {
+final Future processFuture = 
processExecutor.submit(new Callable() {
+@Override
+public Integer call() throws Exception {
+return process.waitFor();
+}
+});
+try {
+retVal = 
processFuture.get(timeOut.getStandardSeconds(), TimeUnit.SECONDS);
+} catch (ExecutionException | TimeoutException e) {
--- End diff --

Fixed


> Out-of-band Management for CloudStack
> -
>
> Key: CLOUDSTACK-9299
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9299
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Rohit Yadav
>Assignee: Rohit Yadav
> Fix For: 4.9.0, Future
>
>
> Support access to a host’s out-of-band management interface (e.g. IPMI, iLO, 
> DRAC, etc.) to manage host power operations (on/off etc.) and querying 
> current power state.
> FS: 
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out

[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277674#comment-15277674
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r62616616
  
--- Diff: 
utils/src/main/java/org/apache/cloudstack/utils/process/ProcessRunner.java ---
@@ -0,0 +1,112 @@
+//
+// 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.utils.process;
+
+import com.cloud.utils.concurrency.NamedThreadFactory;
+import com.google.common.base.Preconditions;
+import com.google.common.base.Strings;
+import org.apache.log4j.Logger;
+import org.joda.time.Duration;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+public class ProcessRunner {
+public static final Logger LOG = Logger.getLogger(ProcessRunner.class);
+
+private static final ExecutorService processExecutor = 
Executors.newCachedThreadPool(new NamedThreadFactory("ProcessRunner"));
+
+private static String readStream(final InputStream inputStream) {
+String text = null;
+try {
+final BufferedReader bufferedReader = new BufferedReader(new 
InputStreamReader(inputStream));
+String line;
+while ((line = bufferedReader.readLine()) != null) {
+if (Strings.isNullOrEmpty(text)) {
+text = line;
+} else {
+text = text + "\n" + line;
+}
+}
+} catch (IOException e) {
--- End diff --

Thrown


> Out-of-band Management for CloudStack
> -
>
> Key: CLOUDSTACK-9299
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9299
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Rohit Yadav
>Assignee: Rohit Yadav
> Fix For: 4.9.0, Future
>
>
> Support access to a host’s out-of-band management interface (e.g. IPMI, iLO, 
> DRAC, etc.) to manage host power operations (on/off etc.) and querying 
> current power state.
> FS: 
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out-of-band+Management+for+CloudStack



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277673#comment-15277673
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r62616608
  
--- Diff: 
utils/src/main/java/org/apache/cloudstack/utils/process/ProcessRunner.java ---
@@ -0,0 +1,112 @@
+//
+// 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.utils.process;
+
+import com.cloud.utils.concurrency.NamedThreadFactory;
+import com.google.common.base.Preconditions;
+import com.google.common.base.Strings;
+import org.apache.log4j.Logger;
+import org.joda.time.Duration;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+public class ProcessRunner {
+public static final Logger LOG = Logger.getLogger(ProcessRunner.class);
+
+private static final ExecutorService processExecutor = 
Executors.newCachedThreadPool(new NamedThreadFactory("ProcessRunner"));
+
+private static String readStream(final InputStream inputStream) {
+String text = null;
+try {
+final BufferedReader bufferedReader = new BufferedReader(new 
InputStreamReader(inputStream));
+String line;
--- End diff --

Fixed


> Out-of-band Management for CloudStack
> -
>
> Key: CLOUDSTACK-9299
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9299
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Rohit Yadav
>Assignee: Rohit Yadav
> Fix For: 4.9.0, Future
>
>
> Support access to a host’s out-of-band management interface (e.g. IPMI, iLO, 
> DRAC, etc.) to manage host power operations (on/off etc.) and querying 
> current power state.
> FS: 
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out-of-band+Management+for+CloudStack



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277624#comment-15277624
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user rhtyd commented on the pull request:

https://github.com/apache/cloudstack/pull/1502#issuecomment-218059135
  
@jburwell as mentioned in comments above, due to a bug in ipmitool itself 
(https://bugzilla.redhat.com/show_bug.cgi?id=1286035) some executions may fail. 
I'll add code to skip/workaround that known bug for the specific failing test, 
I had already added some code to skip test when the specific ipmitool bug was 
hit.


> Out-of-band Management for CloudStack
> -
>
> Key: CLOUDSTACK-9299
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9299
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Rohit Yadav
>Assignee: Rohit Yadav
> Fix For: 4.9.0, Future
>
>
> Support access to a host’s out-of-band management interface (e.g. IPMI, iLO, 
> DRAC, etc.) to manage host power operations (on/off etc.) and querying 
> current power state.
> FS: 
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out-of-band+Management+for+CloudStack



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277623#comment-15277623
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r62612293
  
--- Diff: 
utils/src/main/java/org/apache/cloudstack/utils/process/ProcessRunner.java ---
@@ -0,0 +1,112 @@
+//
+// 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.utils.process;
+
+import com.cloud.utils.concurrency.NamedThreadFactory;
+import com.google.common.base.Preconditions;
+import com.google.common.base.Strings;
+import org.apache.log4j.Logger;
+import org.joda.time.Duration;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+public class ProcessRunner {
+public static final Logger LOG = Logger.getLogger(ProcessRunner.class);
+
+private static final ExecutorService processExecutor = 
Executors.newCachedThreadPool(new NamedThreadFactory("ProcessRunner"));
+
+private static String readStream(final InputStream inputStream) {
+String text = null;
+try {
+final BufferedReader bufferedReader = new BufferedReader(new 
InputStreamReader(inputStream));
+String line;
+while ((line = bufferedReader.readLine()) != null) {
+if (Strings.isNullOrEmpty(text)) {
+text = line;
+} else {
+text = text + "\n" + line;
+}
+}
+} catch (IOException e) {
+if (LOG.isTraceEnabled()) {
+LOG.trace("ProcessRunner::readStream failed due to: " + 
e.getMessage());
+}
+}
+return text;
+}
+
+public static ProcessResult executeCommands(final List 
commands, final Duration timeOut) {
+Preconditions.checkArgument(commands != null && timeOut != null);
+
+int retVal = -2;
+String stdOutput = null;
+String stdError = null;
+
+try {
+final Process process = new 
ProcessBuilder().command(commands).start();
+if (timeOut.getStandardSeconds() > 0) {
+final Future processFuture = 
processExecutor.submit(new Callable() {
+@Override
+public Integer call() throws Exception {
+return process.waitFor();
+}
+});
+try {
+retVal = 
processFuture.get(timeOut.getStandardSeconds(), TimeUnit.SECONDS);
+} catch (ExecutionException | TimeoutException e) {
+retVal = -1;
+stdError = "Operation timed out, aborted";
+if (LOG.isTraceEnabled()) {
+LOG.trace("Failed to complete the requested 
command within timeout: " + e.getMessage());
+}
+} finally {
+if (Strings.isNullOrEmpty(stdError)) {
+stdOutput = readStream(process.getInputStream());
+stdError = readStream(process.getErrorStream());
+}
+}
+} else {
+retVal = process.waitFor();
+stdOutput = readStream(process.getInput

[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277622#comment-15277622
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r62612254
  
--- Diff: 
utils/src/main/java/org/apache/cloudstack/utils/process/ProcessResult.java ---
@@ -0,0 +1,46 @@
+// 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.utils.process;
+
+public class ProcessResult {
--- End diff --

Will fix that.


> Out-of-band Management for CloudStack
> -
>
> Key: CLOUDSTACK-9299
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9299
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Rohit Yadav
>Assignee: Rohit Yadav
> Fix For: 4.9.0, Future
>
>
> Support access to a host’s out-of-band management interface (e.g. IPMI, iLO, 
> DRAC, etc.) to manage host power operations (on/off etc.) and querying 
> current power state.
> FS: 
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out-of-band+Management+for+CloudStack



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277620#comment-15277620
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r62612221
  
--- Diff: 
utils/src/main/java/org/apache/cloudstack/utils/process/ProcessRunner.java ---
@@ -0,0 +1,112 @@
+//
+// 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.utils.process;
+
+import com.cloud.utils.concurrency.NamedThreadFactory;
+import com.google.common.base.Preconditions;
+import com.google.common.base.Strings;
+import org.apache.log4j.Logger;
+import org.joda.time.Duration;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+public class ProcessRunner {
+public static final Logger LOG = Logger.getLogger(ProcessRunner.class);
+
+private static final ExecutorService processExecutor = 
Executors.newCachedThreadPool(new NamedThreadFactory("ProcessRunner"));
--- End diff --

This is a general utility, so it won't be possible to configure the 
executor service pool size here without passing a global setting variable on 
initialization. The cached pool ensures to reuse threads and still a better way 
than spawning separate threads on each run. Wrt oobm, for each issue command 
only one thread is spawned that execs an ipmitool process, a maximum of 250 (or 
size specified in db.properties which forces the size of max. no of concurrent 
async jobs) ipmitool processes can be spawned at any given time.


> Out-of-band Management for CloudStack
> -
>
> Key: CLOUDSTACK-9299
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9299
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Rohit Yadav
>Assignee: Rohit Yadav
> Fix For: 4.9.0, Future
>
>
> Support access to a host’s out-of-band management interface (e.g. IPMI, iLO, 
> DRAC, etc.) to manage host power operations (on/off etc.) and querying 
> current power state.
> FS: 
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out-of-band+Management+for+CloudStack



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277618#comment-15277618
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r62612076
  
--- Diff: 
utils/src/main/java/org/apache/cloudstack/utils/process/ProcessRunner.java ---
@@ -0,0 +1,112 @@
+//
+// 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.utils.process;
+
+import com.cloud.utils.concurrency.NamedThreadFactory;
+import com.google.common.base.Preconditions;
+import com.google.common.base.Strings;
+import org.apache.log4j.Logger;
+import org.joda.time.Duration;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+public class ProcessRunner {
+public static final Logger LOG = Logger.getLogger(ProcessRunner.class);
+
+private static final ExecutorService processExecutor = 
Executors.newCachedThreadPool(new NamedThreadFactory("ProcessRunner"));
+
+private static String readStream(final InputStream inputStream) {
+String text = null;
+try {
+final BufferedReader bufferedReader = new BufferedReader(new 
InputStreamReader(inputStream));
+String line;
+while ((line = bufferedReader.readLine()) != null) {
+if (Strings.isNullOrEmpty(text)) {
+text = line;
+} else {
+text = text + "\n" + line;
+}
+}
+} catch (IOException e) {
+if (LOG.isTraceEnabled()) {
+LOG.trace("ProcessRunner::readStream failed due to: " + 
e.getMessage());
+}
+}
+return text;
+}
+
+public static ProcessResult executeCommands(final List 
commands, final Duration timeOut) {
+Preconditions.checkArgument(commands != null && timeOut != null);
+
+int retVal = -2;
+String stdOutput = null;
+String stdError = null;
+
+try {
+final Process process = new 
ProcessBuilder().command(commands).start();
+if (timeOut.getStandardSeconds() > 0) {
+final Future processFuture = 
processExecutor.submit(new Callable() {
+@Override
+public Integer call() throws Exception {
+return process.waitFor();
+}
+});
+try {
+retVal = 
processFuture.get(timeOut.getStandardSeconds(), TimeUnit.SECONDS);
+} catch (ExecutionException | TimeoutException e) {
--- End diff --

Will split the catch cases separately.


> Out-of-band Management for CloudStack
> -
>
> Key: CLOUDSTACK-9299
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9299
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Rohit Yadav
>Assignee: Rohit Yadav
> Fix For: 4.9.0, Future
>
>
> Support access to a host’s out-of-band management interface (e.g. IPMI, iLO, 
> DRAC, etc.) to manage host power operations (on/off etc.) and querying 
> current power state.
> FS: 
> https://cwiki.apache.org/

[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277615#comment-15277615
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user rhtyd commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r62612035
  
--- Diff: 
utils/src/main/java/org/apache/cloudstack/utils/process/ProcessRunner.java ---
@@ -0,0 +1,112 @@
+//
+// 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.utils.process;
+
+import com.cloud.utils.concurrency.NamedThreadFactory;
+import com.google.common.base.Preconditions;
+import com.google.common.base.Strings;
+import org.apache.log4j.Logger;
+import org.joda.time.Duration;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+public class ProcessRunner {
+public static final Logger LOG = Logger.getLogger(ProcessRunner.class);
+
+private static final ExecutorService processExecutor = 
Executors.newCachedThreadPool(new NamedThreadFactory("ProcessRunner"));
+
+private static String readStream(final InputStream inputStream) {
+String text = null;
+try {
+final BufferedReader bufferedReader = new BufferedReader(new 
InputStreamReader(inputStream));
+String line;
+while ((line = bufferedReader.readLine()) != null) {
+if (Strings.isNullOrEmpty(text)) {
+text = line;
+} else {
+text = text + "\n" + line;
+}
+}
+} catch (IOException e) {
+if (LOG.isTraceEnabled()) {
+LOG.trace("ProcessRunner::readStream failed due to: " + 
e.getMessage());
+}
+}
+return text;
+}
+
+public static ProcessResult executeCommands(final List 
commands, final Duration timeOut) {
+Preconditions.checkArgument(commands != null && timeOut != null);
+
+int retVal = -2;
+String stdOutput = null;
+String stdError = null;
+
+try {
+final Process process = new 
ProcessBuilder().command(commands).start();
+if (timeOut.getStandardSeconds() > 0) {
--- End diff --

Yes, in case of initialization where we are checking the version etc a 
timeout may not be specified (0 = wait until process returns/exits). Also, this 
is a general utility not specifically tied to oobm.


> Out-of-band Management for CloudStack
> -
>
> Key: CLOUDSTACK-9299
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9299
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Rohit Yadav
>Assignee: Rohit Yadav
> Fix For: 4.9.0, Future
>
>
> Support access to a host’s out-of-band management interface (e.g. IPMI, iLO, 
> DRAC, etc.) to manage host power operations (on/off etc.) and querying 
> current power state.
> FS: 
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out-of-band+Management+for+CloudStack



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-8970) Centos 6.{1,2,3,4,5} guest OS mapping for vmware is not available

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277608#comment-15277608
 ] 

ASF GitHub Bot commented on CLOUDSTACK-8970:


Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/956#issuecomment-218057646
  
Thanks @SudharmaJain.  I will get someone to look into this.  @DaanHoogland 
do you or @pdion891 have access to this box to clean up the disk space so it is 
functional again?  I am not sure who had access to these boxes...


> Centos 6.{1,2,3,4,5} guest OS mapping for vmware is not available
> -
>
> Key: CLOUDSTACK-8970
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8970
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: sudharma jain
>
> "Dynamically Scale" fails everytime because the setting of the guest OS in 
> VMware is not correctly set. When we set the OS Type of a 
> VM(account1-centos1) to "CentOS 6.5 (64-bit)". Then the value of the guest OS 
> in VMware is set to "Other (64-bit) and memory size is displayed by a grayed 
> out.
> If the OS type of VM is "CentOS 6.4 (64-bit)" , "CentOS 6.3 (64-bit)" 
> ,"CentOS 6.2 (64-bit)" or "CentOS 6.1 (64-bit)", the same issue happen.
> However, for "CentOS 6.0 (64-bit)", the value of the guest OS in VMware is 
> set to "Linux CentOS4/5/6/7(64-bit)" and memory size is not displayed by a 
> grayed out, we were able to "Dynamically Scale" the VM.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9350) Local storage hosts get HA tasks, cause issues

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277591#comment-15277591
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9350:


Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1496#issuecomment-218056068
  
Thanks for confirming @koushik-das.  👍  It is the middle of the night right 
now, so I am fading fast.  


> Local storage hosts get HA tasks, cause issues
> ---
>
> Key: CLOUDSTACK-9350
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9350
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.5.1
>Reporter: Abhinandan Prateek
>Assignee: Abhinandan Prateek
>
> When a host hits its ping time out, for whatever reason, the investigators 
> are triggered. The KVMInvestigator sends a CheckOnHostCommand to the target 
> host, and then to all the remaining neighbor hosts in the cluster. The 
> CheckOnHostCommand (and also FenceCommand, the code is nearly identical) is 
> processed by the KVM agent and simply scans through all NFS primary storage 
> looking for the host's heartbeat in the KVMHA directory. If no heartbeat file 
> is found, it fails the check. In the case of clusters that are local-only, 
> these hosts will always fail the check, whether it be the target host or a 
> neighbor checking on the target. This triggers a host 'down' event, which 
> triggers HA tasks. The HA tasks will attempt to stop any VMs on the host, and 
> then if the VM's offering is HA-enabled it will try to restart the VM.
> Our recent issue was that a management server took extraordinarily long to 
> rotate its logs and was slow to process some host pings. The 
> CheckOnHostCommand was sent to a suspect host, which failed because it had no 
> primary NFS. The neighbor checks also failed to check the suspect host's 
> heartbeat for the same reason. Then the host was marked as down and all VMs 
> were stopped. Multiply this by a few dozen hosts.
> The immediate fix, provided in the example, is a patch to KVMInvestigator 
> which will only attempt investigation if the host's cluster has NFS storage, 
> which is a requirement for the host to run the check, as described above. If 
> there is none, the host state is determined to be disconnected rather than 
> down. This means that the host will still end up in alert state and need 
> manual investigation, but there will be no attempt to stop or HA the VMs.
> Additionally, the patch catches scenarios where a cluster might have both NFS 
> and local storage and a host ends up in 'down' state. In this case, when the 
> HA tasks are being created, if a VM is using local storage then the HA task 
> generation is skipped. This VM can't be started anywhere else.
> We could also make the agent side more robust, in KVMHAChecker we may not 
> want it to return 'false' if there were zero pools passed to check for HA 
> heartbeat. Then again, maybe we do. We decided initially to patch just the 
> server side, because it is easier to deploy.
> In the long run, I'd hope that the current HA work would supercede the 
> current KVMInvestigator and take the cluster's ability to pass any defined 
> checks into account before checking.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-8970) Centos 6.{1,2,3,4,5} guest OS mapping for vmware is not available

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277590#comment-15277590
 ] 

ASF GitHub Bot commented on CLOUDSTACK-8970:


Github user SudharmaJain commented on the pull request:

https://github.com/apache/cloudstack/pull/956#issuecomment-218056032
  
@swill I force pushed again and still it is failing. In logs I see 
following error.

fatal: write error: No space left on device


> Centos 6.{1,2,3,4,5} guest OS mapping for vmware is not available
> -
>
> Key: CLOUDSTACK-8970
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8970
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: sudharma jain
>
> "Dynamically Scale" fails everytime because the setting of the guest OS in 
> VMware is not correctly set. When we set the OS Type of a 
> VM(account1-centos1) to "CentOS 6.5 (64-bit)". Then the value of the guest OS 
> in VMware is set to "Other (64-bit) and memory size is displayed by a grayed 
> out.
> If the OS type of VM is "CentOS 6.4 (64-bit)" , "CentOS 6.3 (64-bit)" 
> ,"CentOS 6.2 (64-bit)" or "CentOS 6.1 (64-bit)", the same issue happen.
> However, for "CentOS 6.0 (64-bit)", the value of the guest OS in VMware is 
> set to "Linux CentOS4/5/6/7(64-bit)" and memory size is not displayed by a 
> grayed out, we were able to "Dynamically Scale" the VM.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9351) Add ids parameter to resource listing API calls

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277584#comment-15277584
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9351:


Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1497#issuecomment-218055176
  
Sorry, apparently I am not getting enough sleep now days.  I looked at your 
code after you updated it to add the tags, which is why I was confused why the 
tests were not run in my case.  I thought I had checked that they had tags when 
I added them to my tests, but I blame on that on being tired too.  :)

This one is ready to merge.  Thanks guys...


> Add ids parameter to resource listing API calls
> ---
>
> Key: CLOUDSTACK-9351
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9351
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: API
>Affects Versions: 4.9.0
>Reporter: Nicolas Vazquez
> Fix For: 4.9.0
>
>
> h2. General behaviour
> A new parameter is added in each method, its type a list of IDs of the 
> entity, it will be mutually exclusive with id. (Similar to {{id}} and {{ids}} 
> parameters in {{listVirtualMachines}} method)
> h3. API Methods affected
> * +{{listTemplates}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVolumes}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listSnapshots}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVMSnapshots}}+: new parameter *{{vmsnapshotids}}*, mutually 
> exclusive with {{vmsnapshotid}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-6928) IOPS throttling setting isn't applied to a dinamically attached volume

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-6928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277578#comment-15277578
 ] 

ASF GitHub Bot commented on CLOUDSTACK-6928:


Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1410#issuecomment-218054092
  
The CI is coming back clean for a general run.  We still need code 
reviews...


> IOPS throttling setting isn't applied to a dinamically attached volume
> --
>
> Key: CLOUDSTACK-6928
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-6928
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: KVM
>Affects Versions: 4.4.0, Future
> Environment: CloudStack 4.4-forward w/ KVM deployment
> Ubuntu Server 14.04
>Reporter: Yoshikazu Nojima
>Assignee: Wei Zhou
>Priority: Critical
>  Labels: KVM
>
> IOPS throttling setting is NOT applied to a volume attached while VM is 
> running.
> I confirmed the setting is applied to a volume attached while VM is stopped.
> attach volume agent log:
> 2014-06-17 19:07:22,356 DEBUG [cloud.agent.Agent] 
> (agentRequest-Handler-3:null) Processing command: 
> org.apache.cloudstack.storage.command.AttachCommand
> 2014-06-17 19:07:22,401 DEBUG [kvm.storage.KVMStorageProcessor] 
> (agentRequest-Handler-3:null) Attaching device:  type='file'>
> 
>  file='/mnt/ec7a4ea0-a11f-3ab6-89f5-6c2702e3fcf8/e01df6a7-f832-4616-a151-8ad8bcd4cf64'/>
> 
> 
> start instance agent log:
> 2014-06-17 19:10:47,984 DEBUG [kvm.resource.LibvirtComputingResource] 
> (agentRequest-Handler-1:null) starting i-2-3-VM: 
> i-2-3-VM
> 8fad689b-d63d-4802-81d9-d11acf91b879
> CentOS 5.5 (64-bit)
> 
> 
> 
> 
> 
> 
> 
> 
> /usr/bin/kvm-spice
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  passwd='987a62e28e4358d8'/>
> 
> 
>  file='/mnt/e70b1e09-b7e8-3f14-8779-cfb75b651119/b1967fe4-6100-4777-8804-26a349ef06ea'/>
> 
> 
> 
> 
>  file='/mnt/ec7a4ea0-a11f-3ab6-89f5-6c2702e3fcf8/92920d85-1190-43ce-af03-5d2f6a6e1004'/>
> 
> 
> 200
> 200
> 
> 
> 
> 
>  file='/mnt/ec7a4ea0-a11f-3ab6-89f5-6c2702e3fcf8/e01df6a7-f832-4616-a151-8ad8bcd4cf64'/>
> 
> 
> 200
> 200
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 1048576
> 
> 
> 
> 1
> 
> hvm
> 
> 
> 
> 
> 1000
> 
> restart
> destroy
> destroy
> 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-6928) IOPS throttling setting isn't applied to a dinamically attached volume

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-6928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277573#comment-15277573
 ] 

ASF GitHub Bot commented on CLOUDSTACK-6928:


Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1410#issuecomment-218053964
  


### CI RESULTS

```
Tests Run: 85
  Skipped: 0
   Failed: 0
   Errors: 0
 Duration: 8h 41m 18s
```



**Associated Uploads**

**`/tmp/MarvinLogs/DeployDataCenter__May_09_2016_06_51_48_5423HJ:`**
* 
[dc_entries.obj](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1410/tmp/MarvinLogs/DeployDataCenter__May_09_2016_06_51_48_5423HJ/dc_entries.obj)
* 
[failed_plus_exceptions.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1410/tmp/MarvinLogs/DeployDataCenter__May_09_2016_06_51_48_5423HJ/failed_plus_exceptions.txt)
* 
[runinfo.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1410/tmp/MarvinLogs/DeployDataCenter__May_09_2016_06_51_48_5423HJ/runinfo.txt)

**`/tmp/MarvinLogs/test_network_G4PI03:`**
* 
[failed_plus_exceptions.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1410/tmp/MarvinLogs/test_network_G4PI03/failed_plus_exceptions.txt)
* 
[results.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1410/tmp/MarvinLogs/test_network_G4PI03/results.txt)
* 
[runinfo.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1410/tmp/MarvinLogs/test_network_G4PI03/runinfo.txt)

**`/tmp/MarvinLogs/test_vpc_routers_IL209Q:`**
* 
[failed_plus_exceptions.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1410/tmp/MarvinLogs/test_vpc_routers_IL209Q/failed_plus_exceptions.txt)
* 
[results.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1410/tmp/MarvinLogs/test_vpc_routers_IL209Q/results.txt)
* 
[runinfo.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1410/tmp/MarvinLogs/test_vpc_routers_IL209Q/runinfo.txt)


Uploads will be available until `2016-07-10 02:00:00 +0200 CEST`

*Comment created by [`upr comment`](https://github.com/cloudops/upr).*



> IOPS throttling setting isn't applied to a dinamically attached volume
> --
>
> Key: CLOUDSTACK-6928
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-6928
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: KVM
>Affects Versions: 4.4.0, Future
> Environment: CloudStack 4.4-forward w/ KVM deployment
> Ubuntu Server 14.04
>Reporter: Yoshikazu Nojima
>Assignee: Wei Zhou
>Priority: Critical
>  Labels: KVM
>
> IOPS throttling setting is NOT applied to a volume attached while VM is 
> running.
> I confirmed the setting is applied to a volume attached while VM is stopped.
> attach volume agent log:
> 2014-06-17 19:07:22,356 DEBUG [cloud.agent.Agent] 
> (agentRequest-Handler-3:null) Processing command: 
> org.apache.cloudstack.storage.command.AttachCommand
> 2014-06-17 19:07:22,401 DEBUG [kvm.storage.KVMStorageProcessor] 
> (agentRequest-Handler-3:null) Attaching device:  type='file'>
> 
>  file='/mnt/ec7a4ea0-a11f-3ab6-89f5-6c2702e3fcf8/e01df6a7-f832-4616-a151-8ad8bcd4cf64'/>
> 
> 
> start instance agent log:
> 2014-06-17 19:10:47,984 DEBUG [kvm.resource.LibvirtComputingResource] 
> (agentRequest-Handler-1:null) starting i-2-3-VM: 
> i-2-3-VM
> 8fad689b-d63d-4802-81d9-d11acf91b879
> CentOS 5.5 (64-bit)
> 
> 
> 
> 
> 
> 
> 
> 
> /usr/bin/kvm-spice
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  passwd='987a62e28e4358d8'/>
> 
> 
>  file='/mnt/e70b1e09-b7e8-3f14-8779-cfb75b651119/b1967fe4-6100-4777-8804-26a349ef06ea'/>
> 
> 
> 
> 
>  file='/mnt/ec7a4ea0-a11f-3ab6-89f5-6c2702e3fcf8/92920d85-1190-43ce-af03-5d2f6a6e1004'/>
> 
> 
> 200
> 200
> 
> 
> 
> 
>  file='/mnt/ec7a4ea0-a11f-3ab6-89f5-6c2702e3fcf8/e01df6a7-f832-4616-a151-8ad8bcd4cf64'/>
> 
> 
> 200
> 200
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 1048576
> 
> 
> 
> 1
> 
> hvm
> 
> 
> 
> 
> 1000
> 
> restart
> destroy
> destroy
> 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9368) Fix for Support configurable NFS version for Secondary Storage mounts

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277562#comment-15277562
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9368:


Github user serg38 commented on the pull request:

https://github.com/apache/cloudstack/pull/1518#issuecomment-218052341
  
@koushik-das  Will you be able to review this PR? It has been waiting for 
2d LGTM for a while now.


> Fix for Support configurable NFS version for Secondary Storage mounts
> -
>
> Key: CLOUDSTACK-9368
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9368
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: VMware
>Affects Versions: 4.9.0
>Reporter: Nicolas Vazquez
> Fix For: 4.9.0
>
>
> This issue address a problem introduced in 
> [CLOUDSTACK-9252|https://issues.apache.org/jira/browse/CLOUDSTACK-9252] in 
> which NFS version couldn't be changed after hosts resources were configured 
> on startup (for hosts using `VmwareResource`), and as host parameters didn't 
> include `nfs.version` key, it was set `null`.
> h4. Proposed solution
> In this proposed solution `nfsVersion` would be passed in `NfsTO` through 
> `CopyCommand` to `VmwareResource`, who will check if NFS version is still 
> configured or not. If not, it will use the one sent in the command and will 
> set it to its storage processor and storage handler. After those setups, it 
> will proceed executing command.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9351) Add ids parameter to resource listing API calls

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277547#comment-15277547
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9351:


Github user koushik-das commented on the pull request:

https://github.com/apache/cloudstack/pull/1497#issuecomment-218051058
  
LGTM, ran the new tests.

Test listing Volumes using 'ids' parameter ... === TestName: 
test_01_list_volumes | Status : SUCCESS ===
ok
Test listing Templates using 'ids' parameter ... === TestName: 
test_02_list_templates | Status : SUCCESS ===
ok
Test listing Snapshots using 'ids' parameter ... === TestName: 
test_03_list_snapshots | Status : SUCCESS ===
ok

--
Ran 3 tests in 148.845s

OK


> Add ids parameter to resource listing API calls
> ---
>
> Key: CLOUDSTACK-9351
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9351
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: API
>Affects Versions: 4.9.0
>Reporter: Nicolas Vazquez
> Fix For: 4.9.0
>
>
> h2. General behaviour
> A new parameter is added in each method, its type a list of IDs of the 
> entity, it will be mutually exclusive with id. (Similar to {{id}} and {{ids}} 
> parameters in {{listVirtualMachines}} method)
> h3. API Methods affected
> * +{{listTemplates}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVolumes}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listSnapshots}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVMSnapshots}}+: new parameter *{{vmsnapshotids}}*, mutually 
> exclusive with {{vmsnapshotid}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9351) Add ids parameter to resource listing API calls

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277537#comment-15277537
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9351:


Github user nvazquez commented on the pull request:

https://github.com/apache/cloudstack/pull/1497#issuecomment-218048949
  
No problem ;)


> Add ids parameter to resource listing API calls
> ---
>
> Key: CLOUDSTACK-9351
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9351
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: API
>Affects Versions: 4.9.0
>Reporter: Nicolas Vazquez
> Fix For: 4.9.0
>
>
> h2. General behaviour
> A new parameter is added in each method, its type a list of IDs of the 
> entity, it will be mutually exclusive with id. (Similar to {{id}} and {{ids}} 
> parameters in {{listVirtualMachines}} method)
> h3. API Methods affected
> * +{{listTemplates}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVolumes}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listSnapshots}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVMSnapshots}}+: new parameter *{{vmsnapshotids}}*, mutually 
> exclusive with {{vmsnapshotid}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9351) Add ids parameter to resource listing API calls

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277535#comment-15277535
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9351:


Github user koushik-das commented on the pull request:

https://github.com/apache/cloudstack/pull/1497#issuecomment-218048625
  
@nvazquez My bad, didn't look at the changes. Thanks for the fixing the 
tests.


> Add ids parameter to resource listing API calls
> ---
>
> Key: CLOUDSTACK-9351
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9351
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: API
>Affects Versions: 4.9.0
>Reporter: Nicolas Vazquez
> Fix For: 4.9.0
>
>
> h2. General behaviour
> A new parameter is added in each method, its type a list of IDs of the 
> entity, it will be mutually exclusive with id. (Similar to {{id}} and {{ids}} 
> parameters in {{listVirtualMachines}} method)
> h3. API Methods affected
> * +{{listTemplates}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVolumes}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listSnapshots}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVMSnapshots}}+: new parameter *{{vmsnapshotids}}*, mutually 
> exclusive with {{vmsnapshotid}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9350) Local storage hosts get HA tasks, cause issues

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277533#comment-15277533
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9350:


Github user koushik-das commented on the pull request:

https://github.com/apache/cloudstack/pull/1496#issuecomment-218048251
  
@swill The failures doesn't look related to this PR. This can be merged.


> Local storage hosts get HA tasks, cause issues
> ---
>
> Key: CLOUDSTACK-9350
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9350
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.5.1
>Reporter: Abhinandan Prateek
>Assignee: Abhinandan Prateek
>
> When a host hits its ping time out, for whatever reason, the investigators 
> are triggered. The KVMInvestigator sends a CheckOnHostCommand to the target 
> host, and then to all the remaining neighbor hosts in the cluster. The 
> CheckOnHostCommand (and also FenceCommand, the code is nearly identical) is 
> processed by the KVM agent and simply scans through all NFS primary storage 
> looking for the host's heartbeat in the KVMHA directory. If no heartbeat file 
> is found, it fails the check. In the case of clusters that are local-only, 
> these hosts will always fail the check, whether it be the target host or a 
> neighbor checking on the target. This triggers a host 'down' event, which 
> triggers HA tasks. The HA tasks will attempt to stop any VMs on the host, and 
> then if the VM's offering is HA-enabled it will try to restart the VM.
> Our recent issue was that a management server took extraordinarily long to 
> rotate its logs and was slow to process some host pings. The 
> CheckOnHostCommand was sent to a suspect host, which failed because it had no 
> primary NFS. The neighbor checks also failed to check the suspect host's 
> heartbeat for the same reason. Then the host was marked as down and all VMs 
> were stopped. Multiply this by a few dozen hosts.
> The immediate fix, provided in the example, is a patch to KVMInvestigator 
> which will only attempt investigation if the host's cluster has NFS storage, 
> which is a requirement for the host to run the check, as described above. If 
> there is none, the host state is determined to be disconnected rather than 
> down. This means that the host will still end up in alert state and need 
> manual investigation, but there will be no attempt to stop or HA the VMs.
> Additionally, the patch catches scenarios where a cluster might have both NFS 
> and local storage and a host ends up in 'down' state. In this case, when the 
> HA tasks are being created, if a VM is using local storage then the HA task 
> generation is skipped. This VM can't be started anywhere else.
> We could also make the agent side more robust, in KVMHAChecker we may not 
> want it to return 'false' if there were zero pools passed to check for HA 
> heartbeat. Then again, maybe we do. We decided initially to patch just the 
> server side, because it is easier to deploy.
> In the long run, I'd hope that the current HA work would supercede the 
> current KVMInvestigator and take the cluster's ability to pass any defined 
> checks into account before checking.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9351) Add ids parameter to resource listing API calls

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277528#comment-15277528
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9351:


Github user nvazquez commented on the pull request:

https://github.com/apache/cloudstack/pull/1497#issuecomment-218047917
  
@koushik-das actually I've added tags, removed time.sleep and commented out 
test_04


> Add ids parameter to resource listing API calls
> ---
>
> Key: CLOUDSTACK-9351
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9351
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: API
>Affects Versions: 4.9.0
>Reporter: Nicolas Vazquez
> Fix For: 4.9.0
>
>
> h2. General behaviour
> A new parameter is added in each method, its type a list of IDs of the 
> entity, it will be mutually exclusive with id. (Similar to {{id}} and {{ids}} 
> parameters in {{listVirtualMachines}} method)
> h3. API Methods affected
> * +{{listTemplates}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVolumes}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listSnapshots}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVMSnapshots}}+: new parameter *{{vmsnapshotids}}*, mutually 
> exclusive with {{vmsnapshotid}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9351) Add ids parameter to resource listing API calls

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277526#comment-15277526
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9351:


Github user koushik-das commented on the pull request:

https://github.com/apache/cloudstack/pull/1497#issuecomment-218047244
  
@swill As I had mentioned in my last comment, newly added tests are not 
tagged. The command you used to run these tests has tags, don't pass any tags 
in order to run them.
@nvazquez Please tag the tests appropriately, something like 
@attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", 
"sg"], required_hardware="false")


> Add ids parameter to resource listing API calls
> ---
>
> Key: CLOUDSTACK-9351
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9351
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: API
>Affects Versions: 4.9.0
>Reporter: Nicolas Vazquez
> Fix For: 4.9.0
>
>
> h2. General behaviour
> A new parameter is added in each method, its type a list of IDs of the 
> entity, it will be mutually exclusive with id. (Similar to {{id}} and {{ids}} 
> parameters in {{listVirtualMachines}} method)
> h3. API Methods affected
> * +{{listTemplates}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVolumes}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listSnapshots}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVMSnapshots}}+: new parameter *{{vmsnapshotids}}*, mutually 
> exclusive with {{vmsnapshotid}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9340) General DB Optimization

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277497#comment-15277497
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9340:


Github user nvazquez commented on the pull request:

https://github.com/apache/cloudstack/pull/1466#issuecomment-218043423
  
Thanks @koushik-das, @swill now that there are 2 LGTM can we have this 
merged?


> General DB Optimization
> ---
>
> Key: CLOUDSTACK-9340
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9340
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.9.0
>Reporter: Nicolas Vazquez
>  Labels: database
> Fix For: 4.9.0
>
>
> h2. General DB Optimization
> In some production environments there were being experimented delays in most 
> of the jobs. A search for DB optimization was taken and some deficiencies 
> were discovered, we can group them in 4 groups:
> * Incorrect PRIMARY key
> * Duplicate PRIMARY KEY
> * Missing indexes (Add indexes to avoid full table scans)
> * Some views query (Change view to improve account retrieval speed)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9375) Cloudstack Management Memory Leak on org.apache.coyote.RequestInfo

2016-05-09 Thread Carles Figuerola (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277443#comment-15277443
 ] 

Carles Figuerola commented on CLOUDSTACK-9375:
--

Just for completeness, we ended up going with the officially updated for 
centos6 tomcat6-6.0.24-94.el6_7 from updates which fixes this specific bug: 
https://bugzilla.redhat.com/show_bug.cgi?id=1268352

> Cloudstack Management Memory Leak on org.apache.coyote.RequestInfo
> --
>
> Key: CLOUDSTACK-9375
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9375
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Management Server
>Affects Versions: 4.5.2
> Environment: CentOS release 6.7 (Final)
>Reporter: Carles Figuerola
>
> After deploying ACS (cloudstack-management-4.5.2-1.el6.x86_64), using a 4 
> management cluster, the management pid keeps crashing with out of memory 
> errors. Eclipse Memory Analyzer points to this class 
> (org.apache.coyote.RequestInfo) as the culpable one:
> {code}
> 66,923 instances of "org.apache.coyote.RequestInfo", loaded by 
> "org.apache.catalina.loader.StandardClassLoader @ 0x600026b98" occupy 
> 6,227,824,472 (94.91%) bytes. These instances are referenced from one 
> instance of "java.lang.Object[]", loaded by ""
> {code}
> Strangely, this is not affecting a smaller installation (2 management,  90 
> hosts, ~2000 VMs) that is running ACS 4.5.2 over CentOS 6.7 or a clone of the 
> broken one (4 management, 300 hosts, ~4000 VMs) running ACS 4.5.2 over Ubuntu 
> 12.04.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9351) Add ids parameter to resource listing API calls

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277431#comment-15277431
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9351:


Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1497#issuecomment-218033521
  
I am a bit confused why the attributes tag of `advanced` did not work in my 
test and zero tests ran. I will look at that quickly tomorrow to see if there 
is something different about these tests from the others I am running this way. 
I think this one is in pretty good shape now. Will verify everything when I am 
back at a computer. 


> Add ids parameter to resource listing API calls
> ---
>
> Key: CLOUDSTACK-9351
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9351
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: API
>Affects Versions: 4.9.0
>Reporter: Nicolas Vazquez
> Fix For: 4.9.0
>
>
> h2. General behaviour
> A new parameter is added in each method, its type a list of IDs of the 
> entity, it will be mutually exclusive with id. (Similar to {{id}} and {{ids}} 
> parameters in {{listVirtualMachines}} method)
> h3. API Methods affected
> * +{{listTemplates}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVolumes}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listSnapshots}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVMSnapshots}}+: new parameter *{{vmsnapshotids}}*, mutually 
> exclusive with {{vmsnapshotid}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9351) Add ids parameter to resource listing API calls

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277422#comment-15277422
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9351:


Github user nvazquez commented on the pull request:

https://github.com/apache/cloudstack/pull/1497#issuecomment-218031267
  
Sure @swill I pushed again. I also ran again tests in my environment:


[root@ussarlabcsmgt41 cloudstack]# nosetests --with-marvin 
--marvin-config=setup/dev/advanced.cfg 
test/integration/smoke/test_list_ids_parameter.py

 Marvin Init Started 

=== Marvin Parse Config Successful ===

=== Marvin Setting TestData Successful===

 Log Folder Path: /tmp//MarvinLogs//May_09_2016_17_39_25_ETC1VH. All 
logs will be available here 

=== Marvin Init Logging Successful===

 Marvin Init Successful 
===final results are now copied to: 
/tmp//MarvinLogs/test_list_ids_parameter_A7VS1H===
[root@ussarlabcsmgt41 cloudstack]# cat 
/tmp//MarvinLogs/test_list_ids_parameter_A7VS1H/results.txt
Test listing Volumes using 'ids' parameter ... === TestName: 
test_01_list_volumes | Status : SUCCESS ===
ok
Test listing Templates using 'ids' parameter ... === TestName: 
test_02_list_templates | Status : SUCCESS ===
ok
Test listing Snapshots using 'ids' parameter ... === TestName: 
test_03_list_snapshots | Status : SUCCESS ===
ok

--
Ran 3 tests in 446.512s

OK



> Add ids parameter to resource listing API calls
> ---
>
> Key: CLOUDSTACK-9351
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9351
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: API
>Affects Versions: 4.9.0
>Reporter: Nicolas Vazquez
> Fix For: 4.9.0
>
>
> h2. General behaviour
> A new parameter is added in each method, its type a list of IDs of the 
> entity, it will be mutually exclusive with id. (Similar to {{id}} and {{ids}} 
> parameters in {{listVirtualMachines}} method)
> h3. API Methods affected
> * +{{listTemplates}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVolumes}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listSnapshots}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVMSnapshots}}+: new parameter *{{vmsnapshotids}}*, mutually 
> exclusive with {{vmsnapshotid}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9351) Add ids parameter to resource listing API calls

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277189#comment-15277189
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9351:


Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1497#issuecomment-218007214
  
@nvazquez: strange, this did not run any tests.  Any ideas on that one?

```
nosetests --with-marvin --marvin-config=${marvinCfg} -s -a tags=advanced 
smoke/test_list_ids_parameter.py
```


> Add ids parameter to resource listing API calls
> ---
>
> Key: CLOUDSTACK-9351
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9351
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: API
>Affects Versions: 4.9.0
>Reporter: Nicolas Vazquez
> Fix For: 4.9.0
>
>
> h2. General behaviour
> A new parameter is added in each method, its type a list of IDs of the 
> entity, it will be mutually exclusive with id. (Similar to {{id}} and {{ids}} 
> parameters in {{listVirtualMachines}} method)
> h3. API Methods affected
> * +{{listTemplates}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVolumes}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listSnapshots}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVMSnapshots}}+: new parameter *{{vmsnapshotids}}*, mutually 
> exclusive with {{vmsnapshotid}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9351) Add ids parameter to resource listing API calls

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277182#comment-15277182
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9351:


Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1497#issuecomment-218006600
  
I am missing one code review for this one.  @nvazquez can you re-push to 
kick off Travis again?  Thx...


> Add ids parameter to resource listing API calls
> ---
>
> Key: CLOUDSTACK-9351
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9351
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: API
>Affects Versions: 4.9.0
>Reporter: Nicolas Vazquez
> Fix For: 4.9.0
>
>
> h2. General behaviour
> A new parameter is added in each method, its type a list of IDs of the 
> entity, it will be mutually exclusive with id. (Similar to {{id}} and {{ids}} 
> parameters in {{listVirtualMachines}} method)
> h3. API Methods affected
> * +{{listTemplates}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVolumes}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listSnapshots}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVMSnapshots}}+: new parameter *{{vmsnapshotids}}*, mutually 
> exclusive with {{vmsnapshotid}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9351) Add ids parameter to resource listing API calls

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277165#comment-15277165
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9351:


Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1497#issuecomment-218005270
  


### CI RESULTS

```
Tests Run: 85
  Skipped: 0
   Failed: 0
   Errors: 0
 Duration: 4h 38m 35s
```



**Associated Uploads**

**`/tmp/MarvinLogs/DeployDataCenter__May_09_2016_07_17_28_RFHUY6:`**
* 
[dc_entries.obj](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1497/tmp/MarvinLogs/DeployDataCenter__May_09_2016_07_17_28_RFHUY6/dc_entries.obj)
* 
[failed_plus_exceptions.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1497/tmp/MarvinLogs/DeployDataCenter__May_09_2016_07_17_28_RFHUY6/failed_plus_exceptions.txt)
* 
[runinfo.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1497/tmp/MarvinLogs/DeployDataCenter__May_09_2016_07_17_28_RFHUY6/runinfo.txt)

**`/tmp/MarvinLogs/test_network_DL9JLX:`**
* 
[failed_plus_exceptions.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1497/tmp/MarvinLogs/test_network_DL9JLX/failed_plus_exceptions.txt)
* 
[results.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1497/tmp/MarvinLogs/test_network_DL9JLX/results.txt)
* 
[runinfo.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1497/tmp/MarvinLogs/test_network_DL9JLX/runinfo.txt)

**`/tmp/MarvinLogs/test_suite_9BKAZW:`**
* 
[failed_plus_exceptions.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1497/tmp/MarvinLogs/test_suite_9BKAZW/failed_plus_exceptions.txt)
* 
[results.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1497/tmp/MarvinLogs/test_suite_9BKAZW/results.txt)
* 
[runinfo.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1497/tmp/MarvinLogs/test_suite_9BKAZW/runinfo.txt)

**`/tmp/MarvinLogs/test_vpc_routers_MX5M6P:`**
* 
[failed_plus_exceptions.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1497/tmp/MarvinLogs/test_vpc_routers_MX5M6P/failed_plus_exceptions.txt)
* 
[results.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1497/tmp/MarvinLogs/test_vpc_routers_MX5M6P/results.txt)
* 
[runinfo.txt](https://objects-east.cloud.ca/v1/e465abe2f9ae4478b9fff416eab61bd9/PR1497/tmp/MarvinLogs/test_vpc_routers_MX5M6P/runinfo.txt)


Uploads will be available until `2016-07-09 02:00:00 +0200 CEST`

*Comment created by [`upr comment`](https://github.com/cloudops/upr).*



> Add ids parameter to resource listing API calls
> ---
>
> Key: CLOUDSTACK-9351
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9351
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: API
>Affects Versions: 4.9.0
>Reporter: Nicolas Vazquez
> Fix For: 4.9.0
>
>
> h2. General behaviour
> A new parameter is added in each method, its type a list of IDs of the 
> entity, it will be mutually exclusive with id. (Similar to {{id}} and {{ids}} 
> parameters in {{listVirtualMachines}} method)
> h3. API Methods affected
> * +{{listTemplates}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVolumes}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listSnapshots}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVMSnapshots}}+: new parameter *{{vmsnapshotids}}*, mutually 
> exclusive with {{vmsnapshotid}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-8901) PrepareTemplate job thread hard-coded to max 8 threads

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277154#comment-15277154
 ] 

ASF GitHub Bot commented on CLOUDSTACK-8901:


Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/880#issuecomment-218004558
  
Thanks @koushik-das.  I will run this through CI just to be sure everything 
is good...  Thx.


> PrepareTemplate job thread hard-coded to max 8 threads
> --
>
> Key: CLOUDSTACK-8901
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8901
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: sudharma jain
>
>  The thread pool is hardcoded to use 8 threads,
> com.cloud.template.TemplateManagerImpl.configure(String, Map):
> _preloadExecutor = Executors.newFixedThreadPool(8, new 
> NamedThreadFactory("Template-Preloader"));
> Need to make it configurable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9365) updateVirtualMachine with userdata should not error when a VM is attached to multiple networks from which one or more doesn't support userdata

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277148#comment-15277148
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9365:


Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1523#issuecomment-218004078
  
I will get this one into my CI queue.  Thx...


> updateVirtualMachine with userdata should not error when a VM is attached to 
> multiple networks from which one or more doesn't support userdata
> --
>
> Key: CLOUDSTACK-9365
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9365
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Nick Livens
>Assignee: Nick Livens
>
> Steps to reproduce :
> 1. Create 2 networks in ACS, one with userdata service enabled, one without
> 2. Deploy virtual machine, use the network which supports userdata as default
> 3. Update the userdata of the virtualmachine
> The following exception is thrown :
> {noformat:title=Exception for network which doesn't support userdata}
> 2016-04-22 00:42:14,864 DEBUG [c.c.n.NetworkModelImpl] 
> (catalina-exec-25:ctx-b6778596 ctx-707ee023 ctx-a7e4c59b) (logid:a93c19d7) 
> Service SecurityGroup is not supported in the network id=263
> 2016-04-22 00:42:14,865 DEBUG [o.s.b.f.s.DefaultListableBeanFactory] 
> (catalina-exec-25:ctx-b6778596 ctx-707ee023 ctx-a7e4c59b) (logid:a93c19d7) 
> Returning cached instance of singleton bean 'messageBus'
> 2016-04-22 00:42:14,885 ERROR [c.c.a.ApiServer] 
> (catalina-exec-25:ctx-b6778596 ctx-707ee023 ctx-a7e4c59b) (logid:a93c19d7) 
> unhandled exception executing api command: [Ljava.lang.String;@2babc2e4
> com.cloud.exception.UnsupportedServiceException: Service UserData is not 
> supported in the network id=263
> at 
> com.cloud.network.dao.NetworkServiceMapDaoImpl.getProviderForServiceInNetwork(NetworkServiceMapDaoImpl.java:126)
> at sun.reflect.GeneratedMethodAccessor622.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
> at 
> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
> at 
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
> at 
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
> at com.sun.proxy.$Proxy40.getProviderForServiceInNetwork(Unknown 
> Source)
> at 
> com.cloud.network.NetworkModelImpl.getUserDataUpdateProvider(NetworkModelImpl.java:888)
> at 
> com.cloud.vm.UserVmManagerImpl.updateUserDataInternal(UserVmManagerImpl.java:2501)
> at 
> com.cloud.vm.UserVmManagerImpl.updateVirtualMachine(UserVmManagerImpl.java:2474)
> at 
> com.cloud.vm.UserVmManagerImpl.updateVirtualMachine(UserVmManagerImpl.java:2340)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9296) ipsec doesn't get started when enabling client VPN gateway

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277039#comment-15277039
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9296:


Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1423#issuecomment-217990022
  
Thanks @syed.  I will get CI run against this.  I see we have the required 
code review, so I just need to get CI run.  Thx...


> ipsec doesn't get started when enabling client VPN gateway
> --
>
> Key: CLOUDSTACK-9296
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9296
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.8.0, Future
>Reporter: Syed Ahmed
>
> The recent move to use python to configure the VR breaks VPN gateway because 
> it doesn't start the IPSEC daemon. 
> Need to fix this



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277016#comment-15277016
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r62570929
  
--- Diff: 
utils/src/main/java/org/apache/cloudstack/utils/process/ProcessRunner.java ---
@@ -0,0 +1,112 @@
+//
+// 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.utils.process;
+
+import com.cloud.utils.concurrency.NamedThreadFactory;
+import com.google.common.base.Preconditions;
+import com.google.common.base.Strings;
+import org.apache.log4j.Logger;
+import org.joda.time.Duration;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+public class ProcessRunner {
+public static final Logger LOG = Logger.getLogger(ProcessRunner.class);
+
+private static final ExecutorService processExecutor = 
Executors.newCachedThreadPool(new NamedThreadFactory("ProcessRunner"));
+
+private static String readStream(final InputStream inputStream) {
+String text = null;
+try {
+final BufferedReader bufferedReader = new BufferedReader(new 
InputStreamReader(inputStream));
+String line;
+while ((line = bufferedReader.readLine()) != null) {
+if (Strings.isNullOrEmpty(text)) {
+text = line;
+} else {
+text = text + "\n" + line;
+}
+}
+} catch (IOException e) {
+if (LOG.isTraceEnabled()) {
+LOG.trace("ProcessRunner::readStream failed due to: " + 
e.getMessage());
+}
+}
+return text;
+}
+
+public static ProcessResult executeCommands(final List 
commands, final Duration timeOut) {
+Preconditions.checkArgument(commands != null && timeOut != null);
+
+int retVal = -2;
+String stdOutput = null;
+String stdError = null;
+
+try {
+final Process process = new 
ProcessBuilder().command(commands).start();
+if (timeOut.getStandardSeconds() > 0) {
+final Future processFuture = 
processExecutor.submit(new Callable() {
+@Override
+public Integer call() throws Exception {
+return process.waitFor();
+}
+});
+try {
+retVal = 
processFuture.get(timeOut.getStandardSeconds(), TimeUnit.SECONDS);
+} catch (ExecutionException | TimeoutException e) {
+retVal = -1;
+stdError = "Operation timed out, aborted";
+if (LOG.isTraceEnabled()) {
+LOG.trace("Failed to complete the requested 
command within timeout: " + e.getMessage());
+}
+} finally {
+if (Strings.isNullOrEmpty(stdError)) {
+stdOutput = readStream(process.getInputStream());
+stdError = readStream(process.getErrorStream());
+}
+}
+} else {
+retVal = process.waitFor();
+stdOutput = readStream(process.getIn

[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277012#comment-15277012
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r62570751
  
--- Diff: 
utils/src/main/java/org/apache/cloudstack/utils/process/ProcessResult.java ---
@@ -0,0 +1,46 @@
+// 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.utils.process;
+
+public class ProcessResult {
--- End diff --

Could this class be collapsed as a ``static final`` class in 
``ProcessRunner``?  Also, the class should be ``final`` and the constructor to 
should either be default (standalone class) or ``private`` (static inner class).


> Out-of-band Management for CloudStack
> -
>
> Key: CLOUDSTACK-9299
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9299
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Rohit Yadav
>Assignee: Rohit Yadav
> Fix For: 4.9.0, Future
>
>
> Support access to a host’s out-of-band management interface (e.g. IPMI, iLO, 
> DRAC, etc.) to manage host power operations (on/off etc.) and querying 
> current power state.
> FS: 
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out-of-band+Management+for+CloudStack



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277010#comment-15277010
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r62570445
  
--- Diff: 
utils/src/main/java/org/apache/cloudstack/utils/process/ProcessRunner.java ---
@@ -0,0 +1,112 @@
+//
+// 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.utils.process;
+
+import com.cloud.utils.concurrency.NamedThreadFactory;
+import com.google.common.base.Preconditions;
+import com.google.common.base.Strings;
+import org.apache.log4j.Logger;
+import org.joda.time.Duration;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+public class ProcessRunner {
+public static final Logger LOG = Logger.getLogger(ProcessRunner.class);
+
+private static final ExecutorService processExecutor = 
Executors.newCachedThreadPool(new NamedThreadFactory("ProcessRunner"));
--- End diff --

A cached thread pool is unbounded.  Should we consider the use of a bounded 
thread pool to prevent shell processes from overwhelming the management server?


> Out-of-band Management for CloudStack
> -
>
> Key: CLOUDSTACK-9299
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9299
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Rohit Yadav
>Assignee: Rohit Yadav
> Fix For: 4.9.0, Future
>
>
> Support access to a host’s out-of-band management interface (e.g. IPMI, iLO, 
> DRAC, etc.) to manage host power operations (on/off etc.) and querying 
> current power state.
> FS: 
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out-of-band+Management+for+CloudStack



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277004#comment-15277004
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r62569864
  
--- Diff: 
utils/src/main/java/org/apache/cloudstack/utils/process/ProcessRunner.java ---
@@ -0,0 +1,112 @@
+//
+// 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.utils.process;
+
+import com.cloud.utils.concurrency.NamedThreadFactory;
+import com.google.common.base.Preconditions;
+import com.google.common.base.Strings;
+import org.apache.log4j.Logger;
+import org.joda.time.Duration;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+public class ProcessRunner {
+public static final Logger LOG = Logger.getLogger(ProcessRunner.class);
+
+private static final ExecutorService processExecutor = 
Executors.newCachedThreadPool(new NamedThreadFactory("ProcessRunner"));
+
+private static String readStream(final InputStream inputStream) {
+String text = null;
+try {
+final BufferedReader bufferedReader = new BufferedReader(new 
InputStreamReader(inputStream));
+String line;
+while ((line = bufferedReader.readLine()) != null) {
+if (Strings.isNullOrEmpty(text)) {
+text = line;
+} else {
+text = text + "\n" + line;
+}
+}
+} catch (IOException e) {
+if (LOG.isTraceEnabled()) {
+LOG.trace("ProcessRunner::readStream failed due to: " + 
e.getMessage());
+}
+}
+return text;
+}
+
+public static ProcessResult executeCommands(final List 
commands, final Duration timeOut) {
+Preconditions.checkArgument(commands != null && timeOut != null);
+
+int retVal = -2;
+String stdOutput = null;
+String stdError = null;
+
+try {
+final Process process = new 
ProcessBuilder().command(commands).start();
+if (timeOut.getStandardSeconds() > 0) {
+final Future processFuture = 
processExecutor.submit(new Callable() {
+@Override
+public Integer call() throws Exception {
+return process.waitFor();
+}
+});
+try {
+retVal = 
processFuture.get(timeOut.getStandardSeconds(), TimeUnit.SECONDS);
+} catch (ExecutionException | TimeoutException e) {
--- End diff --

Why are signaling a failure with a return value instead of an exception?


> Out-of-band Management for CloudStack
> -
>
> Key: CLOUDSTACK-9299
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9299
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Rohit Yadav
>Assignee: Rohit Yadav
> Fix For: 4.9.0, Future
>
>
> Support access to a host’s out-of-band management interface (e.g. IPMI, iLO, 
> DRAC, etc.) to manage host power operations (on/off etc.) and querying 
> current power stat

[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15277001#comment-15277001
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r62569447
  
--- Diff: 
utils/src/main/java/org/apache/cloudstack/utils/process/ProcessRunner.java ---
@@ -0,0 +1,112 @@
+//
+// 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.utils.process;
+
+import com.cloud.utils.concurrency.NamedThreadFactory;
+import com.google.common.base.Preconditions;
+import com.google.common.base.Strings;
+import org.apache.log4j.Logger;
+import org.joda.time.Duration;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+public class ProcessRunner {
+public static final Logger LOG = Logger.getLogger(ProcessRunner.class);
+
+private static final ExecutorService processExecutor = 
Executors.newCachedThreadPool(new NamedThreadFactory("ProcessRunner"));
+
+private static String readStream(final InputStream inputStream) {
+String text = null;
+try {
+final BufferedReader bufferedReader = new BufferedReader(new 
InputStreamReader(inputStream));
+String line;
+while ((line = bufferedReader.readLine()) != null) {
+if (Strings.isNullOrEmpty(text)) {
+text = line;
+} else {
+text = text + "\n" + line;
+}
+}
+} catch (IOException e) {
--- End diff --

Why don't we re-throw this exception as an unchecked exception?  Failing to 
read the standard out and error streams seems like it would represent a failure 
of the operation.  


> Out-of-band Management for CloudStack
> -
>
> Key: CLOUDSTACK-9299
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9299
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Rohit Yadav
>Assignee: Rohit Yadav
> Fix For: 4.9.0, Future
>
>
> Support access to a host’s out-of-band management interface (e.g. IPMI, iLO, 
> DRAC, etc.) to manage host power operations (on/off etc.) and querying 
> current power state.
> FS: 
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out-of-band+Management+for+CloudStack



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276997#comment-15276997
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r62569193
  
--- Diff: 
utils/src/main/java/org/apache/cloudstack/utils/process/ProcessRunner.java ---
@@ -0,0 +1,112 @@
+//
+// 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.utils.process;
+
+import com.cloud.utils.concurrency.NamedThreadFactory;
+import com.google.common.base.Preconditions;
+import com.google.common.base.Strings;
+import org.apache.log4j.Logger;
+import org.joda.time.Duration;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+public class ProcessRunner {
+public static final Logger LOG = Logger.getLogger(ProcessRunner.class);
+
+private static final ExecutorService processExecutor = 
Executors.newCachedThreadPool(new NamedThreadFactory("ProcessRunner"));
+
+private static String readStream(final InputStream inputStream) {
+String text = null;
+try {
+final BufferedReader bufferedReader = new BufferedReader(new 
InputStreamReader(inputStream));
+String line;
--- End diff --

Convert to a ``StringBuilder`` to avoid unnecessary String re-allocation.


> Out-of-band Management for CloudStack
> -
>
> Key: CLOUDSTACK-9299
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9299
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Rohit Yadav
>Assignee: Rohit Yadav
> Fix For: 4.9.0, Future
>
>
> Support access to a host’s out-of-band management interface (e.g. IPMI, iLO, 
> DRAC, etc.) to manage host power operations (on/off etc.) and querying 
> current power state.
> FS: 
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out-of-band+Management+for+CloudStack



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276990#comment-15276990
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user jburwell commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1502#discussion_r62568855
  
--- Diff: 
utils/src/main/java/org/apache/cloudstack/utils/process/ProcessRunner.java ---
@@ -0,0 +1,112 @@
+//
+// 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.utils.process;
+
+import com.cloud.utils.concurrency.NamedThreadFactory;
+import com.google.common.base.Preconditions;
+import com.google.common.base.Strings;
+import org.apache.log4j.Logger;
+import org.joda.time.Duration;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+public class ProcessRunner {
+public static final Logger LOG = Logger.getLogger(ProcessRunner.class);
+
+private static final ExecutorService processExecutor = 
Executors.newCachedThreadPool(new NamedThreadFactory("ProcessRunner"));
+
+private static String readStream(final InputStream inputStream) {
+String text = null;
+try {
+final BufferedReader bufferedReader = new BufferedReader(new 
InputStreamReader(inputStream));
+String line;
+while ((line = bufferedReader.readLine()) != null) {
+if (Strings.isNullOrEmpty(text)) {
+text = line;
+} else {
+text = text + "\n" + line;
+}
+}
+} catch (IOException e) {
+if (LOG.isTraceEnabled()) {
+LOG.trace("ProcessRunner::readStream failed due to: " + 
e.getMessage());
+}
+}
+return text;
+}
+
+public static ProcessResult executeCommands(final List 
commands, final Duration timeOut) {
+Preconditions.checkArgument(commands != null && timeOut != null);
+
+int retVal = -2;
+String stdOutput = null;
+String stdError = null;
+
+try {
+final Process process = new 
ProcessBuilder().command(commands).start();
+if (timeOut.getStandardSeconds() > 0) {
--- End diff --

Should a command without a timeout be accepted? 


> Out-of-band Management for CloudStack
> -
>
> Key: CLOUDSTACK-9299
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9299
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Rohit Yadav
>Assignee: Rohit Yadav
> Fix For: 4.9.0, Future
>
>
> Support access to a host’s out-of-band management interface (e.g. IPMI, iLO, 
> DRAC, etc.) to manage host power operations (on/off etc.) and querying 
> current power state.
> FS: 
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out-of-band+Management+for+CloudStack



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9296) ipsec doesn't get started when enabling client VPN gateway

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276925#comment-15276925
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9296:


Github user syed commented on the pull request:

https://github.com/apache/cloudstack/pull/1423#issuecomment-217972968
  
@swill Sqashed. I believe this is good to go. 


> ipsec doesn't get started when enabling client VPN gateway
> --
>
> Key: CLOUDSTACK-9296
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9296
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.8.0, Future
>Reporter: Syed Ahmed
>
> The recent move to use python to configure the VR breaks VPN gateway because 
> it doesn't start the IPSEC daemon. 
> Need to fix this



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-8973) Unusual response when creating a template from a snapshot with Swift as secondary storage

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276918#comment-15276918
 ] 

ASF GitHub Bot commented on CLOUDSTACK-8973:


Github user syed commented on the pull request:

https://github.com/apache/cloudstack/pull/1424#issuecomment-217972386
  
@rhtyd Squashed. It is pending a LGTM. If you can have a quick look at this 
one, it would be awesome!


> Unusual response when creating a template from a snapshot with Swift as 
> secondary storage
> -
>
> Key: CLOUDSTACK-8973
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8973
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.4.4
>Reporter: Franz-Philippe Garcia
>Priority: Minor
>
> I am not getting this issue with NFS. When I create a template from a 
> snapshot, I get the following response:
> {noformat}
> {  
>"queryasyncjobresultresponse":{  
>   "accountid":"fd8ecd27-b6d6-4086-8644-783f769f68c1",
>   "userid":"f9ce0c4a-36c6-4e7e-a49c-d77ecda227b6",
>   
> "cmd":"org.apache.cloudstack.api.command.user.template.CreateTemplateCmd",
>   "jobstatus":1,
>   "jobprocstatus":0,
>   "jobresultcode":0,
>   "jobresulttype":"object",
>   "jobresult":{  
>  "null":{  
> "ispublic":false,
> "isready":false,
> "isfeatured":false,
> "crossZones":false,
> "tags":[  
> ]
>  }
>   },
>   "created":"2015-10-20T11:58:07-0400",
>   "jobid":"4549d467-d0e0-4ce9-bfdd-c20c174c8ad0"
>}
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9299) Out-of-band Management for CloudStack

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276742#comment-15276742
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9299:


Github user jburwell commented on the pull request:

https://github.com/apache/cloudstack/pull/1502#issuecomment-217944726
  
@rhtyd it looks like one of the OOBM smoke tests failed on the Travis 
build.  Could you please investigate?


> Out-of-band Management for CloudStack
> -
>
> Key: CLOUDSTACK-9299
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9299
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Rohit Yadav
>Assignee: Rohit Yadav
> Fix For: 4.9.0, Future
>
>
> Support access to a host’s out-of-band management interface (e.g. IPMI, iLO, 
> DRAC, etc.) to manage host power operations (on/off etc.) and querying 
> current power state.
> FS: 
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Out-of-band+Management+for+CloudStack



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (CLOUDSTACK-9375) Cloudstack Management Memory Leak on org.apache.coyote.RequestInfo

2016-05-09 Thread Carles Figuerola (JIRA)

 [ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9375?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carles Figuerola resolved CLOUDSTACK-9375.
--
Resolution: Workaround

> Cloudstack Management Memory Leak on org.apache.coyote.RequestInfo
> --
>
> Key: CLOUDSTACK-9375
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9375
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Management Server
>Affects Versions: 4.5.2
> Environment: CentOS release 6.7 (Final)
>Reporter: Carles Figuerola
>
> After deploying ACS (cloudstack-management-4.5.2-1.el6.x86_64), using a 4 
> management cluster, the management pid keeps crashing with out of memory 
> errors. Eclipse Memory Analyzer points to this class 
> (org.apache.coyote.RequestInfo) as the culpable one:
> {code}
> 66,923 instances of "org.apache.coyote.RequestInfo", loaded by 
> "org.apache.catalina.loader.StandardClassLoader @ 0x600026b98" occupy 
> 6,227,824,472 (94.91%) bytes. These instances are referenced from one 
> instance of "java.lang.Object[]", loaded by ""
> {code}
> Strangely, this is not affecting a smaller installation (2 management,  90 
> hosts, ~2000 VMs) that is running ACS 4.5.2 over CentOS 6.7 or a clone of the 
> broken one (4 management, 300 hosts, ~4000 VMs) running ACS 4.5.2 over Ubuntu 
> 12.04.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9375) Cloudstack Management Memory Leak on org.apache.coyote.RequestInfo

2016-05-09 Thread Carles Figuerola (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276490#comment-15276490
 ] 

Carles Figuerola commented on CLOUDSTACK-9375:
--

Well, these graphs seem to prove everyone's theories:

tomcat6-6.0.24-90.el6.x86_64 -> http://i.imgur.com/IZU25ji.png
tomcat6-6.0.43-62.el6 -> http://i.imgur.com/mbxKfEp.png
tomcat6-6.0.24-80.el6 -> http://i.imgur.com/qaJm3e7.png

It seems the right course of action is to just upgrade the tomcat version, but 
at least we could prove that this was the exact reason.

Thanks to all, I'll close this.

> Cloudstack Management Memory Leak on org.apache.coyote.RequestInfo
> --
>
> Key: CLOUDSTACK-9375
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9375
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Management Server
>Affects Versions: 4.5.2
> Environment: CentOS release 6.7 (Final)
>Reporter: Carles Figuerola
>
> After deploying ACS (cloudstack-management-4.5.2-1.el6.x86_64), using a 4 
> management cluster, the management pid keeps crashing with out of memory 
> errors. Eclipse Memory Analyzer points to this class 
> (org.apache.coyote.RequestInfo) as the culpable one:
> {code}
> 66,923 instances of "org.apache.coyote.RequestInfo", loaded by 
> "org.apache.catalina.loader.StandardClassLoader @ 0x600026b98" occupy 
> 6,227,824,472 (94.91%) bytes. These instances are referenced from one 
> instance of "java.lang.Object[]", loaded by ""
> {code}
> Strangely, this is not affecting a smaller installation (2 management,  90 
> hosts, ~2000 VMs) that is running ACS 4.5.2 over CentOS 6.7 or a clone of the 
> broken one (4 management, 300 hosts, ~4000 VMs) running ACS 4.5.2 over Ubuntu 
> 12.04.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9300) MySQL HA feature StaticStrategy throws exception

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276457#comment-15276457
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9300:


Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1428#issuecomment-217887345
  
I think this one is ready.  The failures are things that periodically fail 
in my environment and are unrelated to this code.  Thanks...


> MySQL HA feature StaticStrategy throws exception
> 
>
> Key: CLOUDSTACK-9300
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9300
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.7.0, 4.7.1, 4.8.0, Future
> Environment: Centos 7
>Reporter: Simon Weller
>Assignee: Simon Weller
>Priority: Minor
> Fix For: 4.9.0
>
>
> 2016-03-03 12:00:13,204 INFO  [c.c.u.d.T.Transaction] 
> (localhost-startStop-1:null) (logid:) Is Data Base High Availiability 
> enabled? Ans : true
> 2016-03-03 12:00:13,239 INFO  [c.c.u.d.T.Transaction] 
> (localhost-startStop-1:null) (logid:) The slaves configured for Cloud Data 
> base is/are : localhost,localhost
> 2016-03-03 12:00:13,303 ERROR [c.c.u.d.Merovingian2] 
> (localhost-startStop-1:null) (logid:) Unable to get a new db connection
> java.sql.SQLException: Invalid load balancing strategy 
> 'com.cloud.utils.db.StaticStrategy'.
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:924)
> at com.mysql.jdbc.Util.loadExtensions(Util.java:602)
> at 
> com.mysql.jdbc.LoadBalancingConnectionProxy.(LoadBalancingConnectionProxy.java:280)
> at 
> com.mysql.jdbc.FailoverConnectionProxy.(FailoverConnectionProxy.java:67)
> at 
> com.mysql.jdbc.NonRegisteringDriver.connectFailover(NonRegisteringDriver.java:433)
> at 
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
> at java.sql.DriverManager.getConnection(DriverManager.java:571)
> at java.sql.DriverManager.getConnection(DriverManager.java:215)
> at 
> org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:75)
> at 
> org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
> at 
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188)
> at 
> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
> at 
> com.cloud.utils.db.TransactionLegacy.getStandaloneConnectionWithException(TransactionLegacy.java:202)
> at com.cloud.utils.db.Merovingian2.(Merovingian2.java:68)
> at 
> com.cloud.utils.db.Merovingian2.createLockMaster(Merovingian2.java:88)
> at 
> com.cloud.server.LockMasterListener.(LockMasterListener.java:33)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
> Method)
> at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> at 
> org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
> at 
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:121)
> at 
> org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:277)
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1077)
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:981)
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:487)
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
> at 
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
> at 
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
> at 
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
> at 
> org.springframework.beans.factory.

[jira] [Commented] (CLOUDSTACK-9350) Local storage hosts get HA tasks, cause issues

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276441#comment-15276441
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9350:


Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1496#issuecomment-217884184
  
The two failures are not ones I am used to seeing in my environment, but I 
did a quick once through of the code and I don't think they problem is related 
to this PR.

I think this PR is ready to merge.  Can I get one other person to review 
this quickly to make sure I am not missing anything and these failures could 
actually be related to this PR?

@rhtyd, @jburwell, @koushik-das : CCing you guys because you guys did code 
review so hopefully one of you can quickly confirm that the issues I got in my 
CI run are not relevant.  Thx...


> Local storage hosts get HA tasks, cause issues
> ---
>
> Key: CLOUDSTACK-9350
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9350
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.5.1
>Reporter: Abhinandan Prateek
>Assignee: Abhinandan Prateek
>
> When a host hits its ping time out, for whatever reason, the investigators 
> are triggered. The KVMInvestigator sends a CheckOnHostCommand to the target 
> host, and then to all the remaining neighbor hosts in the cluster. The 
> CheckOnHostCommand (and also FenceCommand, the code is nearly identical) is 
> processed by the KVM agent and simply scans through all NFS primary storage 
> looking for the host's heartbeat in the KVMHA directory. If no heartbeat file 
> is found, it fails the check. In the case of clusters that are local-only, 
> these hosts will always fail the check, whether it be the target host or a 
> neighbor checking on the target. This triggers a host 'down' event, which 
> triggers HA tasks. The HA tasks will attempt to stop any VMs on the host, and 
> then if the VM's offering is HA-enabled it will try to restart the VM.
> Our recent issue was that a management server took extraordinarily long to 
> rotate its logs and was slow to process some host pings. The 
> CheckOnHostCommand was sent to a suspect host, which failed because it had no 
> primary NFS. The neighbor checks also failed to check the suspect host's 
> heartbeat for the same reason. Then the host was marked as down and all VMs 
> were stopped. Multiply this by a few dozen hosts.
> The immediate fix, provided in the example, is a patch to KVMInvestigator 
> which will only attempt investigation if the host's cluster has NFS storage, 
> which is a requirement for the host to run the check, as described above. If 
> there is none, the host state is determined to be disconnected rather than 
> down. This means that the host will still end up in alert state and need 
> manual investigation, but there will be no attempt to stop or HA the VMs.
> Additionally, the patch catches scenarios where a cluster might have both NFS 
> and local storage and a host ends up in 'down' state. In this case, when the 
> HA tasks are being created, if a VM is using local storage then the HA task 
> generation is skipped. This VM can't be started anywhere else.
> We could also make the agent side more robust, in KVMHAChecker we may not 
> want it to return 'false' if there were zero pools passed to check for HA 
> heartbeat. Then again, maybe we do. We decided initially to patch just the 
> server side, because it is easier to deploy.
> In the long run, I'd hope that the current HA work would supercede the 
> current KVMInvestigator and take the cluster's ability to pass any defined 
> checks into account before checking.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9351) Add ids parameter to resource listing API calls

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276427#comment-15276427
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9351:


Github user nvazquez commented on the pull request:

https://github.com/apache/cloudstack/pull/1497#issuecomment-217880689
  
Hi @koushik-das thanks for reviewing! Actually it took so long due to 
setUpClass method, after that, test are really simple and quick. I 
included 12 minutes sleep as you noticed due to vm snapshots bug, remaining 
time was (vm, templates, snapshots and vmsnapshots) creation


> Add ids parameter to resource listing API calls
> ---
>
> Key: CLOUDSTACK-9351
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9351
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: API
>Affects Versions: 4.9.0
>Reporter: Nicolas Vazquez
> Fix For: 4.9.0
>
>
> h2. General behaviour
> A new parameter is added in each method, its type a list of IDs of the 
> entity, it will be mutually exclusive with id. (Similar to {{id}} and {{ids}} 
> parameters in {{listVirtualMachines}} method)
> h3. API Methods affected
> * +{{listTemplates}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVolumes}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listSnapshots}}+: new parameter *{{ids}}*, mutually exclusive with {{id}}
> * +{{listVMSnapshots}}+: new parameter *{{vmsnapshotids}}*, mutually 
> exclusive with {{vmsnapshotid}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9165) unable to use reserved IP range in a network for external VMs

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276405#comment-15276405
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9165:


Github user nlivens commented on the pull request:

https://github.com/apache/cloudstack/pull/1246#issuecomment-217875751
  
@SudharmaJain, I've added a few comments


> unable to use reserved IP range in a network for external VMs
> -
>
> Key: CLOUDSTACK-9165
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9165
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: sudharma jain
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9165) unable to use reserved IP range in a network for external VMs

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276403#comment-15276403
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9165:


Github user nlivens commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1246#discussion_r62503852
  
--- Diff: 
server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java ---
@@ -1588,6 +1588,16 @@ protected StringBuilder 
createGuestBootLoadArgs(final NicProfile guestNic, final
 return buf;
 }
 
+/**
+ * Return a string representing network Cidr for the specifeid network
+ * @param guestNetwork
+ * @return valid network Cidr for the specified network
+ */
+protected String getValidNetworkCidr(Network guestNetwork){
--- End diff --

I think you should extract this method to another common class (e.g. 
NetworkModel) since this method can be reused over the different classes.


> unable to use reserved IP range in a network for external VMs
> -
>
> Key: CLOUDSTACK-9165
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9165
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: sudharma jain
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9165) unable to use reserved IP range in a network for external VMs

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276400#comment-15276400
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9165:


Github user nlivens commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1246#discussion_r62503776
  
--- Diff: server/src/com/cloud/network/guru/GuestNetworkGuru.java ---
@@ -396,6 +396,16 @@ public NicProfile allocate(final Network network, 
NicProfile nic, final VirtualM
 return nic;
 }
 
+/**
+ * Return a string representing network Cidr for the specifeid network
+ * @param guestNetwork
+ * @return valid network Cidr for the specified network
+ */
+protected String getValidNetworkCidr(Network guestNetwork){
--- End diff --

I think you should extract this method to another common class (e.g. 
NetworkModel) since this method can be reused over the different classes.


> unable to use reserved IP range in a network for external VMs
> -
>
> Key: CLOUDSTACK-9165
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9165
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: sudharma jain
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9165) unable to use reserved IP range in a network for external VMs

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276402#comment-15276402
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9165:


Github user nlivens commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1246#discussion_r62503830
  
--- Diff: server/src/com/cloud/network/router/NetworkHelperImpl.java ---
@@ -755,6 +755,16 @@ protected HypervisorType 
getClusterToStartDomainRouterForOvm(final long podId) {
 return networks;
 }
 
+/**
+ * Return a string representing network Cidr for the specifeid network
+ * @param guestNetwork
+ * @return valid network Cidr for the specified network
+ */
+protected String getValidNetworkCidr(Network guestNetwork){
--- End diff --

I think you should extract this method to another common class (e.g. 
NetworkModel) since this method can be reused over the different classes.


> unable to use reserved IP range in a network for external VMs
> -
>
> Key: CLOUDSTACK-9165
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9165
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: sudharma jain
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9365) updateVirtualMachine with userdata should not error when a VM is attached to multiple networks from which one or more doesn't support userdata

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276332#comment-15276332
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9365:


Github user nlivens commented on the pull request:

https://github.com/apache/cloudstack/pull/1523#issuecomment-217858039
  
@DaanHoogland, the file has been renamed to make use of the python naming 
standards


> updateVirtualMachine with userdata should not error when a VM is attached to 
> multiple networks from which one or more doesn't support userdata
> --
>
> Key: CLOUDSTACK-9365
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9365
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Nick Livens
>Assignee: Nick Livens
>
> Steps to reproduce :
> 1. Create 2 networks in ACS, one with userdata service enabled, one without
> 2. Deploy virtual machine, use the network which supports userdata as default
> 3. Update the userdata of the virtualmachine
> The following exception is thrown :
> {noformat:title=Exception for network which doesn't support userdata}
> 2016-04-22 00:42:14,864 DEBUG [c.c.n.NetworkModelImpl] 
> (catalina-exec-25:ctx-b6778596 ctx-707ee023 ctx-a7e4c59b) (logid:a93c19d7) 
> Service SecurityGroup is not supported in the network id=263
> 2016-04-22 00:42:14,865 DEBUG [o.s.b.f.s.DefaultListableBeanFactory] 
> (catalina-exec-25:ctx-b6778596 ctx-707ee023 ctx-a7e4c59b) (logid:a93c19d7) 
> Returning cached instance of singleton bean 'messageBus'
> 2016-04-22 00:42:14,885 ERROR [c.c.a.ApiServer] 
> (catalina-exec-25:ctx-b6778596 ctx-707ee023 ctx-a7e4c59b) (logid:a93c19d7) 
> unhandled exception executing api command: [Ljava.lang.String;@2babc2e4
> com.cloud.exception.UnsupportedServiceException: Service UserData is not 
> supported in the network id=263
> at 
> com.cloud.network.dao.NetworkServiceMapDaoImpl.getProviderForServiceInNetwork(NetworkServiceMapDaoImpl.java:126)
> at sun.reflect.GeneratedMethodAccessor622.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
> at 
> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
> at 
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
> at 
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
> at com.sun.proxy.$Proxy40.getProviderForServiceInNetwork(Unknown 
> Source)
> at 
> com.cloud.network.NetworkModelImpl.getUserDataUpdateProvider(NetworkModelImpl.java:888)
> at 
> com.cloud.vm.UserVmManagerImpl.updateUserDataInternal(UserVmManagerImpl.java:2501)
> at 
> com.cloud.vm.UserVmManagerImpl.updateVirtualMachine(UserVmManagerImpl.java:2474)
> at 
> com.cloud.vm.UserVmManagerImpl.updateVirtualMachine(UserVmManagerImpl.java:2340)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9203) [API] extend updateVirtualMachine to support updating security groups

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276331#comment-15276331
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9203:


Github user NuxRo commented on the pull request:

https://github.com/apache/cloudstack/pull/1297#issuecomment-217857669
  
Same here.

Is this XenServer specific, can anyone with an XS test bed help? 


> [API] extend updateVirtualMachine to support updating security groups
> -
>
> Key: CLOUDSTACK-9203
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9203
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: API
>Reporter: René Moser
>Assignee: Daan Hoogland
>Priority: Minor
> Fix For: Future
>
>
> There is currently no way to change security groups on exisitng VMs.
> {{updateVirtualMachine}} should be extended in a similar way as 
> {{deployVirtualMachine}} which should allow passing a list of IDs or names to 
> update the security groups as passed:
> {{securitygroupids}} parameter
> comma separated list of security groups id that going to be applied to the 
> virtual machine. Should be passed only when vm is created from a zone with 
> Basic Network support. Mutually exclusive with securitygroupnames parameter, 
> default: false
> {{securitygroupnames}} parameter
> comma separated list of security groups names that going to be applied to the 
> virtual machine. Should be passed only when vm is created from a zone with 
> Basic Network support. Mutually exclusive with securitygroupids parameter. 
> default: false
> Exoscale did already some work in their branch which we are 
> [allowed|https://twitter.com/resmo79/status/681428989018267648] to use, see 
> [https://github.com/exoscale/cloudstack/pull/6/]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9203) [API] extend updateVirtualMachine to support updating security groups

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276323#comment-15276323
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9203:


Github user DaanHoogland commented on the pull request:

https://github.com/apache/cloudstack/pull/1297#issuecomment-217856052
  
@ don't thank me, I just started to check but my infra is based on KVM and 
it doesn't support scalevm, so I cannot investigate further


> [API] extend updateVirtualMachine to support updating security groups
> -
>
> Key: CLOUDSTACK-9203
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9203
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: API
>Reporter: René Moser
>Assignee: Daan Hoogland
>Priority: Minor
> Fix For: Future
>
>
> There is currently no way to change security groups on exisitng VMs.
> {{updateVirtualMachine}} should be extended in a similar way as 
> {{deployVirtualMachine}} which should allow passing a list of IDs or names to 
> update the security groups as passed:
> {{securitygroupids}} parameter
> comma separated list of security groups id that going to be applied to the 
> virtual machine. Should be passed only when vm is created from a zone with 
> Basic Network support. Mutually exclusive with securitygroupnames parameter, 
> default: false
> {{securitygroupnames}} parameter
> comma separated list of security groups names that going to be applied to the 
> virtual machine. Should be passed only when vm is created from a zone with 
> Basic Network support. Mutually exclusive with securitygroupids parameter. 
> default: false
> Exoscale did already some work in their branch which we are 
> [allowed|https://twitter.com/resmo79/status/681428989018267648] to use, see 
> [https://github.com/exoscale/cloudstack/pull/6/]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-8562) User Definable Roles

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276321#comment-15276321
 ] 

ASF GitHub Bot commented on CLOUDSTACK-8562:


Github user swill commented on the pull request:

https://github.com/apache/cloudstack/pull/1489#issuecomment-217855833
  
We have the required code reviews and CI results.  I will add this to merge 
queue.  Thx...


> User Definable Roles
> 
>
> Key: CLOUDSTACK-8562
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8562
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Management Server
>Reporter: Paul Angus
>Assignee: Rohit Yadav
>
> Static command.properties moved to database and made user definable



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9203) [API] extend updateVirtualMachine to support updating security groups

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276310#comment-15276310
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9203:


Github user NuxRo commented on the pull request:

https://github.com/apache/cloudstack/pull/1297#issuecomment-217853178
  
Thanks Daan


> [API] extend updateVirtualMachine to support updating security groups
> -
>
> Key: CLOUDSTACK-9203
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9203
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: API
>Reporter: René Moser
>Assignee: Daan Hoogland
>Priority: Minor
> Fix For: Future
>
>
> There is currently no way to change security groups on exisitng VMs.
> {{updateVirtualMachine}} should be extended in a similar way as 
> {{deployVirtualMachine}} which should allow passing a list of IDs or names to 
> update the security groups as passed:
> {{securitygroupids}} parameter
> comma separated list of security groups id that going to be applied to the 
> virtual machine. Should be passed only when vm is created from a zone with 
> Basic Network support. Mutually exclusive with securitygroupnames parameter, 
> default: false
> {{securitygroupnames}} parameter
> comma separated list of security groups names that going to be applied to the 
> virtual machine. Should be passed only when vm is created from a zone with 
> Basic Network support. Mutually exclusive with securitygroupids parameter. 
> default: false
> Exoscale did already some work in their branch which we are 
> [allowed|https://twitter.com/resmo79/status/681428989018267648] to use, see 
> [https://github.com/exoscale/cloudstack/pull/6/]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9199) deployVirtualMachine API does not throw an error when cpunumber is specified for static compute offering

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276250#comment-15276250
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9199:


Github user alexandrelimassantana commented on the pull request:

https://github.com/apache/cloudstack/pull/1280#issuecomment-217842674
  
as @pedro-martins stated, it seems to be fitting that this method is 
extracted to a class to be documented/tested. The code looks good but if the 
exception is to be launched I see no room for backward compatibility. If that's 
an issue, this needs to be rethinked as the raised exception would have to be 
treated and at that point we would have to think if raising the exception was 
really necessary. Overall the code looks good, simple and justified.


> deployVirtualMachine API does not throw an error when cpunumber is specified 
> for static compute offering
> 
>
> Key: CLOUDSTACK-9199
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9199
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Anshul Gangwar
>Assignee: Anshul Gangwar
>
> When a dynamic compute offering is chosen, deployVirtualMachine API requires 
> details[0].cpuSpeed, details[0].cpuNumber and details[0]memory parameters to 
> deploy a VM.
> But when a static compute offering is chosen and these parameters are 
> provided, then the API should throw an error as there is conflict.
> ACTUAL BEHAVIOR :
> VM is getting deployed with static compute offering's parameters
> http://10.220.135.6/client/api?command=deployVirtualMachine&name=olotwo&response=&zoneid=ab6e4154-62a3-42a8-9627-3cbdc66bcbb6&templateid=3ce6-91b4-11e5-b6fc-e26c2aa1d1d0&hypervisor=XenServer&serviceofferingid=39643075-4b45-489d-afac-88f09d536bdd&details[0].cpuNumber=1&details[0].cpuSpeed=1000&details[0].memory=1000&securitygroupids=60844698-91b4-11e5-b6fc-e26c2aa1d1d0&_=1448277187743



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-8958) add dedicated ips to domain

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276238#comment-15276238
 ] 

ASF GitHub Bot commented on CLOUDSTACK-8958:


Github user alexandrelimassantana commented on the pull request:

https://github.com/apache/cloudstack/pull/1357#issuecomment-217840055
  
Is there a test already to check if the ip ranges release method is called? 
If there is none, I think it should be added


> add dedicated ips to domain
> ---
>
> Key: CLOUDSTACK-8958
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8958
> Project: CloudStack
>  Issue Type: Improvement
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Wei Zhou
>Assignee: Wei Zhou
>
> add dedicated ips to domain 
> ips are dedicated to Account for now, so other customers and projects in the 
> same domain will use the system ip. this is not what we need.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9203) [API] extend updateVirtualMachine to support updating security groups

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276235#comment-15276235
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9203:


Github user DaanHoogland commented on the pull request:

https://github.com/apache/cloudstack/pull/1297#issuecomment-217839619
  
@nuxro I have rebased but did not get to testing. I don't trust the scalevm 
problem. It might be in the test, in the test environment or in the actual 
code. Looking at it is in (the back of) my queue.


> [API] extend updateVirtualMachine to support updating security groups
> -
>
> Key: CLOUDSTACK-9203
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9203
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: API
>Reporter: René Moser
>Assignee: Daan Hoogland
>Priority: Minor
> Fix For: Future
>
>
> There is currently no way to change security groups on exisitng VMs.
> {{updateVirtualMachine}} should be extended in a similar way as 
> {{deployVirtualMachine}} which should allow passing a list of IDs or names to 
> update the security groups as passed:
> {{securitygroupids}} parameter
> comma separated list of security groups id that going to be applied to the 
> virtual machine. Should be passed only when vm is created from a zone with 
> Basic Network support. Mutually exclusive with securitygroupnames parameter, 
> default: false
> {{securitygroupnames}} parameter
> comma separated list of security groups names that going to be applied to the 
> virtual machine. Should be passed only when vm is created from a zone with 
> Basic Network support. Mutually exclusive with securitygroupids parameter. 
> default: false
> Exoscale did already some work in their branch which we are 
> [allowed|https://twitter.com/resmo79/status/681428989018267648] to use, see 
> [https://github.com/exoscale/cloudstack/pull/6/]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9365) updateVirtualMachine with userdata should not error when a VM is attached to multiple networks from which one or more doesn't support userdata

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276233#comment-15276233
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9365:


Github user DaanHoogland commented on the pull request:

https://github.com/apache/cloudstack/pull/1523#issuecomment-217839187
  
@nlivens thanks for the extra test effort you put into this. Can you rename 
the marvin test to adhere to python naming standards (i.e. no camal case 
underscores mix) For marvin in this case test_deploy_vm_userdata_multinic.py or 
test_deploy_vm_userdata_multi_nic.py would both be fine I guess. otherwise LGTM
@swill, can you schedule this one?




> updateVirtualMachine with userdata should not error when a VM is attached to 
> multiple networks from which one or more doesn't support userdata
> --
>
> Key: CLOUDSTACK-9365
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9365
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Nick Livens
>Assignee: Nick Livens
>
> Steps to reproduce :
> 1. Create 2 networks in ACS, one with userdata service enabled, one without
> 2. Deploy virtual machine, use the network which supports userdata as default
> 3. Update the userdata of the virtualmachine
> The following exception is thrown :
> {noformat:title=Exception for network which doesn't support userdata}
> 2016-04-22 00:42:14,864 DEBUG [c.c.n.NetworkModelImpl] 
> (catalina-exec-25:ctx-b6778596 ctx-707ee023 ctx-a7e4c59b) (logid:a93c19d7) 
> Service SecurityGroup is not supported in the network id=263
> 2016-04-22 00:42:14,865 DEBUG [o.s.b.f.s.DefaultListableBeanFactory] 
> (catalina-exec-25:ctx-b6778596 ctx-707ee023 ctx-a7e4c59b) (logid:a93c19d7) 
> Returning cached instance of singleton bean 'messageBus'
> 2016-04-22 00:42:14,885 ERROR [c.c.a.ApiServer] 
> (catalina-exec-25:ctx-b6778596 ctx-707ee023 ctx-a7e4c59b) (logid:a93c19d7) 
> unhandled exception executing api command: [Ljava.lang.String;@2babc2e4
> com.cloud.exception.UnsupportedServiceException: Service UserData is not 
> supported in the network id=263
> at 
> com.cloud.network.dao.NetworkServiceMapDaoImpl.getProviderForServiceInNetwork(NetworkServiceMapDaoImpl.java:126)
> at sun.reflect.GeneratedMethodAccessor622.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
> at 
> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
> at 
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
> at 
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
> at com.sun.proxy.$Proxy40.getProviderForServiceInNetwork(Unknown 
> Source)
> at 
> com.cloud.network.NetworkModelImpl.getUserDataUpdateProvider(NetworkModelImpl.java:888)
> at 
> com.cloud.vm.UserVmManagerImpl.updateUserDataInternal(UserVmManagerImpl.java:2501)
> at 
> com.cloud.vm.UserVmManagerImpl.updateVirtualMachine(UserVmManagerImpl.java:2474)
> at 
> com.cloud.vm.UserVmManagerImpl.updateVirtualMachine(UserVmManagerImpl.java:2340)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-8584) Management Server does not start - "cluster node IP should be valid local address"

2016-05-09 Thread Grant Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276206#comment-15276206
 ] 

Grant Williams commented on CLOUDSTACK-8584:


I have setup a new cluster in our test lab and have experienced the same error 
on CloudStack 4.7.1. Here is an example of what my configuration looks like:

--

Management Server 1:

~# cat /etc/hosts
127.0.0.1   localhost.localdomain   localhost
192.168.0.85cloud1.lab.za.net   cloud1
192.168.0.86cloud2.lab.za.net   cloud2

~# ip addr show cloudbr0 | grep 'inet ' | awk '{print $2}' | sed -e 's,/.*,,'
192.168.0.85

~# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags   MSS Window  irtt Iface
0.0.0.0 192.168.0.810.0.0.0 UG0 0  0 
cloudbr0
192.168.0.800.0.0.0 255.255.255.240 U 0 0  0 
cloudbr0

~# grep cluster /etc/cloudstack/management/db.properties 
# management server clustering parameters, change cluster.node.IP to the 
machine IP address
cluster.node.IP=192.168.0.85
cluster.servlet.port=9090

~# netstat -tapln | grep 9090
tcp6   0  0 :::9090 :::*LISTEN  
7253/jsvc.exec  

~# mysql -hlocalhost -ucloud -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 355
Server version: 5.5.49-0ubuntu0.14.04.1-log (Ubuntu)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> quit;
Bye

~# service cloudstack-management status
 * CloudStack-specific Tomcat servlet engine is running with pid 7253

--

Management Server 2:

~# cat /etc/hosts
127.0.0.1   localhost.localdomain   localhost
192.168.0.85cloud1.lab.za.net   cloud1
192.168.0.86cloud2.lab.za.net   cloud2

~# ip addr show cloudbr0 | grep 'inet ' | awk '{print $2}' | sed -e 's,/.*,,'
192.168.0.86

~# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags   MSS Window  irtt Iface
0.0.0.0 192.168.0.810.0.0.0 UG0 0  0 
cloudbr0
192.168.0.800.0.0.0 255.255.255.240 U 0 0  0 
cloudbr0

~# grep cluster /etc/cloudstack/management/db.properties 
# management server clustering parameters, change cluster.node.IP to the 
machine IP address
cluster.node.IP=192.168.0.85
cluster.servlet.port=9090

~# telnet 192.168.0.85 9090
Trying 192.168.0.85...
Connected to 192.168.0.85.
Escape character is '^]'.
^C
Connection closed by foreign host.

~# mysql -h192.168.0.85 -ucloud -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 356
Server version: 5.5.49-0ubuntu0.14.04.1-log (Ubuntu)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> quit;
Bye

~# cloudstack-setup-management
Starting to configure CloudStack Management Server:
Configure Firewall ...[OK]
Configure CloudStack Management Server ...[OK]
CloudStack Management Server setup is Done!

~# tail -f /var/log/cloudstack/management/management-server.log

2016-05-09 11:54:30,346 INFO  [c.c.c.ClusterManagerImpl] (main:null) (logid:) 
Start configuring cluster manager : ClusterManagerImpl
2016-05-09 11:54:30,346 INFO  [c.c.c.ClusterManagerImpl] (main:null) (logid:) 
Cluster node IP : 192.168.0.85
2016-05-09 11:54:30,351 ERROR [o.a.c.s.l.CloudStackExtendedLifeCycle] 
(main:null) (logid:) Failed to configure ClusterManagerImpl
javax.naming.ConfigurationException: cluster node IP should be valid local 
address where the server is running, please check your configuration
at 
com.cloud.cluster.ClusterManagerImpl.configure(ClusterManagerImpl.java:1054)
^C

~# service cloudstack-management status
 * CloudStack-specific Tomcat servlet engine is running with pid 6849

--

Is there any further information related to this concern that could assist in 
resolving this issue?


> Management Server does not start - "cluster node IP should be valid local 
> address"
> --
>
> Key: CLOUDSTACK-8584
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8584
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: P

[jira] [Commented] (CLOUDSTACK-8901) PrepareTemplate job thread hard-coded to max 8 threads

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276125#comment-15276125
 ] 

ASF GitHub Bot commented on CLOUDSTACK-8901:


Github user koushik-das commented on the pull request:

https://github.com/apache/cloudstack/pull/880#issuecomment-217809810
  
@swill This has the required LGTMs.


> PrepareTemplate job thread hard-coded to max 8 threads
> --
>
> Key: CLOUDSTACK-8901
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8901
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: sudharma jain
>
>  The thread pool is hardcoded to use 8 threads,
> com.cloud.template.TemplateManagerImpl.configure(String, Map):
> _preloadExecutor = Executors.newFixedThreadPool(8, new 
> NamedThreadFactory("Template-Preloader"));
> Need to make it configurable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-8800) Improve the listVirtualMachines API call to include memory utilization information for a VM

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276065#comment-15276065
 ] 

ASF GitHub Bot commented on CLOUDSTACK-8800:


Github user koushik-das commented on the pull request:

https://github.com/apache/cloudstack/pull/1444#issuecomment-217798010
  
Thanks @rafaelweingartner for the updated PR.
LGTM based on code review and verification of PR on simulator.


> Improve the listVirtualMachines API call to include memory utilization 
> information for a VM
> ---
>
> Key: CLOUDSTACK-8800
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8800
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Affects Versions: 4.5.2
>Reporter: Maneesha
>Assignee: Maneesha
> Fix For: Future
>
>
> Currently the feature of memory utilization is not available via API call 
> (listVirtualMachines).
> https://cloudstack.apache.org/api/apidocs-4.5/root_admin/listVirtualMachines.html
>  
> The listVirtualMachine get its values from the "user_vm_view" table in the 
> database. Currently it shows the CPU utilization of the VM's.
> The only way to find out the memory utilization of VM's running on XenServer, 
> is to run the "xentop" command on the pool master of the cluster.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9203) [API] extend updateVirtualMachine to support updating security groups

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276054#comment-15276054
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9203:


Github user NuxRo commented on the pull request:

https://github.com/apache/cloudstack/pull/1297#issuecomment-217795687
  
Sorry to be a pain, but any updates on this? 


> [API] extend updateVirtualMachine to support updating security groups
> -
>
> Key: CLOUDSTACK-9203
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9203
> Project: CloudStack
>  Issue Type: New Feature
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: API
>Reporter: René Moser
>Assignee: Daan Hoogland
>Priority: Minor
> Fix For: Future
>
>
> There is currently no way to change security groups on exisitng VMs.
> {{updateVirtualMachine}} should be extended in a similar way as 
> {{deployVirtualMachine}} which should allow passing a list of IDs or names to 
> update the security groups as passed:
> {{securitygroupids}} parameter
> comma separated list of security groups id that going to be applied to the 
> virtual machine. Should be passed only when vm is created from a zone with 
> Basic Network support. Mutually exclusive with securitygroupnames parameter, 
> default: false
> {{securitygroupnames}} parameter
> comma separated list of security groups names that going to be applied to the 
> virtual machine. Should be passed only when vm is created from a zone with 
> Basic Network support. Mutually exclusive with securitygroupids parameter. 
> default: false
> Exoscale did already some work in their branch which we are 
> [allowed|https://twitter.com/resmo79/status/681428989018267648] to use, see 
> [https://github.com/exoscale/cloudstack/pull/6/]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9365) updateVirtualMachine with userdata should not error when a VM is attached to multiple networks from which one or more doesn't support userdata

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276041#comment-15276041
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9365:


Github user nlivens commented on the pull request:

https://github.com/apache/cloudstack/pull/1523#issuecomment-217791958
  
@DaanHoogland, @alexandrelimassantana, could you review the PR once again 
please?


> updateVirtualMachine with userdata should not error when a VM is attached to 
> multiple networks from which one or more doesn't support userdata
> --
>
> Key: CLOUDSTACK-9365
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9365
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Nick Livens
>Assignee: Nick Livens
>
> Steps to reproduce :
> 1. Create 2 networks in ACS, one with userdata service enabled, one without
> 2. Deploy virtual machine, use the network which supports userdata as default
> 3. Update the userdata of the virtualmachine
> The following exception is thrown :
> {noformat:title=Exception for network which doesn't support userdata}
> 2016-04-22 00:42:14,864 DEBUG [c.c.n.NetworkModelImpl] 
> (catalina-exec-25:ctx-b6778596 ctx-707ee023 ctx-a7e4c59b) (logid:a93c19d7) 
> Service SecurityGroup is not supported in the network id=263
> 2016-04-22 00:42:14,865 DEBUG [o.s.b.f.s.DefaultListableBeanFactory] 
> (catalina-exec-25:ctx-b6778596 ctx-707ee023 ctx-a7e4c59b) (logid:a93c19d7) 
> Returning cached instance of singleton bean 'messageBus'
> 2016-04-22 00:42:14,885 ERROR [c.c.a.ApiServer] 
> (catalina-exec-25:ctx-b6778596 ctx-707ee023 ctx-a7e4c59b) (logid:a93c19d7) 
> unhandled exception executing api command: [Ljava.lang.String;@2babc2e4
> com.cloud.exception.UnsupportedServiceException: Service UserData is not 
> supported in the network id=263
> at 
> com.cloud.network.dao.NetworkServiceMapDaoImpl.getProviderForServiceInNetwork(NetworkServiceMapDaoImpl.java:126)
> at sun.reflect.GeneratedMethodAccessor622.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
> at 
> com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
> at 
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
> at 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
> at 
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
> at com.sun.proxy.$Proxy40.getProviderForServiceInNetwork(Unknown 
> Source)
> at 
> com.cloud.network.NetworkModelImpl.getUserDataUpdateProvider(NetworkModelImpl.java:888)
> at 
> com.cloud.vm.UserVmManagerImpl.updateUserDataInternal(UserVmManagerImpl.java:2501)
> at 
> com.cloud.vm.UserVmManagerImpl.updateVirtualMachine(UserVmManagerImpl.java:2474)
> at 
> com.cloud.vm.UserVmManagerImpl.updateVirtualMachine(UserVmManagerImpl.java:2340)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-9351) Add ids parameter to resource listing API calls

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276031#comment-15276031
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9351:


Github user koushik-das commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1497#discussion_r62456186
  
--- Diff: test/integration/smoke/test_list_ids_parameter.py ---
@@ -0,0 +1,293 @@
+# 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.
+""" Tests for API listing methods using 'ids' parameter
+"""
+#Import Local Modules
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (cleanup_resources,
+  validateList)
+from marvin.lib.base import (Account,
+ Volume,
+ DiskOffering,
+ Template,
+ ServiceOffering,
+ Snapshot,
+ VmSnapshot,
+ VirtualMachine)
+from marvin.lib.common import (get_domain,
+get_zone, get_template)
+from marvin.codes import FAILED, PASS
+from nose.plugins.attrib import attr
+#Import System modules
+import time
+
+_multiprocess_shared_ = True
+class TestListIdsParams(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestListIdsParams, cls).getClsTestClient()
+cls.apiclient = testClient.getApiClient()
+cls.services = testClient.getParsedTestDataConfig()
+cls.hypervisor = testClient.getHypervisorInfo()
+
+cls.domain = get_domain(cls.apiclient)
+cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
+
+cls.disk_offering = DiskOffering.create(
+cls.apiclient,
+cls.services["disk_offering"]
+)
+
+cls.account = Account.create(
+cls.apiclient,
+cls.services["account"],
+domainid=cls.domain.id
+)
+cls.service_offering = ServiceOffering.create(
+cls.apiclient,
+
cls.services["service_offerings"]["tiny"]
+)
+
+template = get_template(
+cls.apiclient,
+cls.zone.id,
+cls.services["ostype"]
+)
+if template == FAILED:
+assert False, "get_template() failed to return template with 
description %s" % cls.services["ostype"]
+
+cls.services["template"]["ostypeid"] = template.ostypeid
+cls.services["template_2"]["ostypeid"] = template.ostypeid
+cls.services["ostypeid"] = template.ostypeid
+cls.services["virtual_machine"]["zoneid"] = cls.zone.id
+cls.services["mode"] = cls.zone.networktype
+
+#Create 3 VMs
+cls.virtual_machine_1 = VirtualMachine.create(
+cls.apiclient,
+cls.services["virtual_machine"],
+templateid=template.id,
+accountid=cls.account.name,
+domainid=cls.account.domainid,
+serviceofferingid=cls.service_offering.id,
+mode=cls.services["mode"]
+)
+cls.virtual_machine_2 = VirtualMachine.create(
+cls.apiclient,
+cls.ser

[jira] [Commented] (CLOUDSTACK-9351) Add ids parameter to resource listing API calls

2016-05-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276030#comment-15276030
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9351:


Github user koushik-das commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1497#discussion_r62456142
  
--- Diff: test/integration/smoke/test_list_ids_parameter.py ---
@@ -0,0 +1,293 @@
+# 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.
+""" Tests for API listing methods using 'ids' parameter
+"""
+#Import Local Modules
+from marvin.cloudstackTestCase import cloudstackTestCase
+from marvin.lib.utils import (cleanup_resources,
+  validateList)
+from marvin.lib.base import (Account,
+ Volume,
+ DiskOffering,
+ Template,
+ ServiceOffering,
+ Snapshot,
+ VmSnapshot,
+ VirtualMachine)
+from marvin.lib.common import (get_domain,
+get_zone, get_template)
+from marvin.codes import FAILED, PASS
+from nose.plugins.attrib import attr
+#Import System modules
+import time
+
+_multiprocess_shared_ = True
+class TestListIdsParams(cloudstackTestCase):
+
+@classmethod
+def setUpClass(cls):
+testClient = super(TestListIdsParams, cls).getClsTestClient()
+cls.apiclient = testClient.getApiClient()
+cls.services = testClient.getParsedTestDataConfig()
+cls.hypervisor = testClient.getHypervisorInfo()
+
+cls.domain = get_domain(cls.apiclient)
+cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
+
+cls.disk_offering = DiskOffering.create(
+cls.apiclient,
+cls.services["disk_offering"]
+)
+
+cls.account = Account.create(
+cls.apiclient,
+cls.services["account"],
+domainid=cls.domain.id
+)
+cls.service_offering = ServiceOffering.create(
+cls.apiclient,
+
cls.services["service_offerings"]["tiny"]
+)
+
+template = get_template(
+cls.apiclient,
+cls.zone.id,
+cls.services["ostype"]
+)
+if template == FAILED:
+assert False, "get_template() failed to return template with 
description %s" % cls.services["ostype"]
+
+cls.services["template"]["ostypeid"] = template.ostypeid
+cls.services["template_2"]["ostypeid"] = template.ostypeid
+cls.services["ostypeid"] = template.ostypeid
+cls.services["virtual_machine"]["zoneid"] = cls.zone.id
+cls.services["mode"] = cls.zone.networktype
+
+#Create 3 VMs
+cls.virtual_machine_1 = VirtualMachine.create(
+cls.apiclient,
+cls.services["virtual_machine"],
+templateid=template.id,
+accountid=cls.account.name,
+domainid=cls.account.domainid,
+serviceofferingid=cls.service_offering.id,
+mode=cls.services["mode"]
+)
+cls.virtual_machine_2 = VirtualMachine.create(
+cls.apiclient,
+cls.ser