You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Tomoe Sugihara <to...@midokura.com> on 2012/07/10 01:52:25 UTC

[PATCH] Add trust="yes" option to ssh tasks

ant r* targets would error out if you haven't added a host entry
for devcloud. This fixes the problem by trusting it.

Signed-off-by: Tomoe Sugihara <to...@midokura.com>
---
 build/build-devcloud.xml |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/build/build-devcloud.xml b/build/build-devcloud.xml
index b65e9e4..a001dc2 100644
--- a/build/build-devcloud.xml
+++ b/build/build-devcloud.xml
@@ -35,7 +35,7 @@
 
   <target name="rdeploydb">
     <echo message="ant rdeploydb"/>
-    <sshexec host="${host}" port="${port}" username="root" password="password" command="echo $CATALINA_HOME; export CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;killall java;service cloud-management stop;cd /opt/cloudstack/incubator-cloudstack;ant deploycddb -Drhost=${host}"/>
+    <sshexec trust="yes" host="${host}" port="${port}" username="root" password="password" command="echo $CATALINA_HOME; export CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;killall java;service cloud-management stop;cd /opt/cloudstack/incubator-cloudstack;ant deploycddb -Drhost=${host}"/>
   </target>
 
   <target name="deploycddb" description="deploy specific db configuration for clouddev" depends="deploydb">
@@ -50,10 +50,10 @@
     <echo message="ant debug-suspend"/>
     <sshexec host="${host}" port="${port}" username="root" password="password" command="killall java;service cloud-management stop;sleep 1;echo $CATALINA_HOME; export CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;cd /opt/cloudstack/incubator-cloudstack;ant deploy-server;ant debug-suspend"/>
   </target>
-  
+
   <target name="rdebug">
     <echo message="ant debug"/>
-    <sshexec host="${host}" port="${port}" username="root" password="password" command="killall java;service cloud-management stop;sleep 1;export CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;cd /opt/cloudstack/incubator-cloudstack;ant deploy-server; ant debug "/>
+    <sshexec trust="yes" host="${host}" port="${port}" username="root" password="password" command="killall java;service cloud-management stop;sleep 1;export CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;cd /opt/cloudstack/incubator-cloudstack;ant deploy-server; ant debug "/>
   </target>
 
 
@@ -61,38 +61,38 @@
     <condition property="zip.uptodate">
       <available file="${deploy.work.dir}/client.zip" type="file"/>
     </condition>
-    
+
 
 
     <echo message="copying build folder to remote"/>
-    <scp trust="yes" port="${port}" todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/build">   
+    <scp trust="yes" port="${port}" todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/build">
       <fileset dir="build">
       </fileset>
     </scp>
 
-    <scp trust="yes" port="${port}" file="build.xml" todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/">   
+    <scp trust="yes" port="${port}" file="build.xml" todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/">
     </scp>
 
     <echo message="copying deps folder to remote"/>
-    <scp trust="yes" port="${port}" todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/deps">   
+    <scp trust="yes" port="${port}" todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/deps">
       <fileset dir="deps">
       </fileset>
     </scp>
 
     <echo message="copying target folder to remote"/>
-    <scp trust="yes" port="${port}" todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/target">   
+    <scp trust="yes" port="${port}" todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/target">
       <fileset dir="target">
       </fileset>
     </scp>
 
     <echo message="copying dist folder to remote"/>
-    <scp trust="yes" port="${port}" todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/dist">   
+    <scp trust="yes" port="${port}" todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/dist">
       <fileset dir="dist">
       </fileset>
     </scp>
-   
-    <sshexec host="${host}" port="${port}" username="root" password="password" command="echo $CATALINA_HOME; export CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;cd /opt/cloudstack/incubator-cloudstack;ant deploy-server"/>
+
+    <sshexec trust="yes" host="${host}" port="${port}" username="root" password="password" command="echo $CATALINA_HOME; export CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;cd /opt/cloudstack/incubator-cloudstack;ant deploy-server"/>
 
   </target>
-  
+
 </project>
-- 
1.7.9.5


Re: [PATCH] Add trust="yes" option to ssh tasks

Posted by Tomoe Sugihara <to...@midokura.com>.
On Wed, Jul 11, 2012 at 3:17 AM, Edison Su <Ed...@citrix.com> wrote:
> Hi Tomoe,
>    Seems I can't apply your patch, it says "malformed patch". Could you please use the apache review board, reviews.apache.org?
>    Sorry for the inconvenient.

NP. I just did it.

BTW, I tried post-review command to post the patch, but I couldn't get
past the authentication.
Is web API disabled?

Thanks,
Tomoe

>
>> -----Original Message-----
>> From: Tomoe Sugihara [mailto:tomoe@midokura.jp] On Behalf Of Tomoe
>> Sugihara
>> Sent: Monday, July 09, 2012 4:52 PM
>> To: cloudstack-dev@incubator.apache.org
>> Cc: Tomoe Sugihara
>> Subject: [PATCH] Add trust="yes" option to ssh tasks
>>
>> ant r* targets would error out if you haven't added a host entry
>> for devcloud. This fixes the problem by trusting it.
>>
>> Signed-off-by: Tomoe Sugihara <to...@midokura.com>
>> ---
>>  build/build-devcloud.xml |   24 ++++++++++++------------
>>  1 file changed, 12 insertions(+), 12 deletions(-)
>>
>> diff --git a/build/build-devcloud.xml b/build/build-devcloud.xml
>> index b65e9e4..a001dc2 100644
>> --- a/build/build-devcloud.xml
>> +++ b/build/build-devcloud.xml
>> @@ -35,7 +35,7 @@
>>
>>    <target name="rdeploydb">
>>      <echo message="ant rdeploydb"/>
>> -    <sshexec host="${host}" port="${port}" username="root"
>> password="password" command="echo $CATALINA_HOME; export
>> CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;killall java;service
>> cloud-management stop;cd /opt/cloudstack/incubator-cloudstack;ant
>> deploycddb -Drhost=${host}"/>
>> +    <sshexec trust="yes" host="${host}" port="${port}" username="root"
>> password="password" command="echo $CATALINA_HOME; export
>> CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;killall java;service
>> cloud-management stop;cd /opt/cloudstack/incubator-cloudstack;ant
>> deploycddb -Drhost=${host}"/>
>>    </target>
>>
>>    <target name="deploycddb" description="deploy specific db
>> configuration for clouddev" depends="deploydb">
>> @@ -50,10 +50,10 @@
>>      <echo message="ant debug-suspend"/>
>>      <sshexec host="${host}" port="${port}" username="root"
>> password="password" command="killall java;service cloud-management
>> stop;sleep 1;echo $CATALINA_HOME; export
>> CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;cd
>> /opt/cloudstack/incubator-cloudstack;ant deploy-server;ant debug-
>> suspend"/>
>>    </target>
>> -
>> +
>>    <target name="rdebug">
>>      <echo message="ant debug"/>
>> -    <sshexec host="${host}" port="${port}" username="root"
>> password="password" command="killall java;service cloud-management
>> stop;sleep 1;export CATALINA_HOME=/opt/cloudstack/apache-tomcat-
>> 6.0.32;cd /opt/cloudstack/incubator-cloudstack;ant deploy-server; ant
>> debug "/>
>> +    <sshexec trust="yes" host="${host}" port="${port}" username="root"
>> password="password" command="killall java;service cloud-management
>> stop;sleep 1;export CATALINA_HOME=/opt/cloudstack/apache-tomcat-
>> 6.0.32;cd /opt/cloudstack/incubator-cloudstack;ant deploy-server; ant
>> debug "/>
>>    </target>
>>
>>
>> @@ -61,38 +61,38 @@
>>      <condition property="zip.uptodate">
>>        <available file="${deploy.work.dir}/client.zip" type="file"/>
>>      </condition>
>> -
>> +
>>
>>
>>      <echo message="copying build folder to remote"/>
>> -    <scp trust="yes" port="${port}"
>> todir="root:password@${host}:/opt/cloudstack/incubator-
>> cloudstack/build">
>> +    <scp trust="yes" port="${port}"
>> todir="root:password@${host}:/opt/cloudstack/incubator-
>> cloudstack/build">
>>        <fileset dir="build">
>>        </fileset>
>>      </scp>
>>
>> -    <scp trust="yes" port="${port}" file="build.xml"
>> todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/">
>> +    <scp trust="yes" port="${port}" file="build.xml"
>> todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/">
>>      </scp>
>>
>>      <echo message="copying deps folder to remote"/>
>> -    <scp trust="yes" port="${port}"
>> todir="root:password@${host}:/opt/cloudstack/incubator-
>> cloudstack/deps">
>> +    <scp trust="yes" port="${port}"
>> todir="root:password@${host}:/opt/cloudstack/incubator-
>> cloudstack/deps">
>>        <fileset dir="deps">
>>        </fileset>
>>      </scp>
>>
>>      <echo message="copying target folder to remote"/>
>> -    <scp trust="yes" port="${port}"
>> todir="root:password@${host}:/opt/cloudstack/incubator-
>> cloudstack/target">
>> +    <scp trust="yes" port="${port}"
>> todir="root:password@${host}:/opt/cloudstack/incubator-
>> cloudstack/target">
>>        <fileset dir="target">
>>        </fileset>
>>      </scp>
>>
>>      <echo message="copying dist folder to remote"/>
>> -    <scp trust="yes" port="${port}"
>> todir="root:password@${host}:/opt/cloudstack/incubator-
>> cloudstack/dist">
>> +    <scp trust="yes" port="${port}"
>> todir="root:password@${host}:/opt/cloudstack/incubator-
>> cloudstack/dist">
>>        <fileset dir="dist">
>>        </fileset>
>>      </scp>
>> -
>> -    <sshexec host="${host}" port="${port}" username="root"
>> password="password" command="echo $CATALINA_HOME; export
>> CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;cd
>> /opt/cloudstack/incubator-cloudstack;ant deploy-server"/>
>> +
>> +    <sshexec trust="yes" host="${host}" port="${port}" username="root"
>> password="password" command="echo $CATALINA_HOME; export
>> CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;cd
>> /opt/cloudstack/incubator-cloudstack;ant deploy-server"/>
>>
>>    </target>
>> -
>> +
>>  </project>
>> --
>> 1.7.9.5
>

RE: [PATCH] Add trust="yes" option to ssh tasks

Posted by Edison Su <Ed...@citrix.com>.
Hi Tomoe, 
   Seems I can't apply your patch, it says "malformed patch". Could you please use the apache review board, reviews.apache.org?
   Sorry for the inconvenient. 

> -----Original Message-----
> From: Tomoe Sugihara [mailto:tomoe@midokura.jp] On Behalf Of Tomoe
> Sugihara
> Sent: Monday, July 09, 2012 4:52 PM
> To: cloudstack-dev@incubator.apache.org
> Cc: Tomoe Sugihara
> Subject: [PATCH] Add trust="yes" option to ssh tasks
> 
> ant r* targets would error out if you haven't added a host entry
> for devcloud. This fixes the problem by trusting it.
> 
> Signed-off-by: Tomoe Sugihara <to...@midokura.com>
> ---
>  build/build-devcloud.xml |   24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/build/build-devcloud.xml b/build/build-devcloud.xml
> index b65e9e4..a001dc2 100644
> --- a/build/build-devcloud.xml
> +++ b/build/build-devcloud.xml
> @@ -35,7 +35,7 @@
> 
>    <target name="rdeploydb">
>      <echo message="ant rdeploydb"/>
> -    <sshexec host="${host}" port="${port}" username="root"
> password="password" command="echo $CATALINA_HOME; export
> CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;killall java;service
> cloud-management stop;cd /opt/cloudstack/incubator-cloudstack;ant
> deploycddb -Drhost=${host}"/>
> +    <sshexec trust="yes" host="${host}" port="${port}" username="root"
> password="password" command="echo $CATALINA_HOME; export
> CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;killall java;service
> cloud-management stop;cd /opt/cloudstack/incubator-cloudstack;ant
> deploycddb -Drhost=${host}"/>
>    </target>
> 
>    <target name="deploycddb" description="deploy specific db
> configuration for clouddev" depends="deploydb">
> @@ -50,10 +50,10 @@
>      <echo message="ant debug-suspend"/>
>      <sshexec host="${host}" port="${port}" username="root"
> password="password" command="killall java;service cloud-management
> stop;sleep 1;echo $CATALINA_HOME; export
> CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;cd
> /opt/cloudstack/incubator-cloudstack;ant deploy-server;ant debug-
> suspend"/>
>    </target>
> -
> +
>    <target name="rdebug">
>      <echo message="ant debug"/>
> -    <sshexec host="${host}" port="${port}" username="root"
> password="password" command="killall java;service cloud-management
> stop;sleep 1;export CATALINA_HOME=/opt/cloudstack/apache-tomcat-
> 6.0.32;cd /opt/cloudstack/incubator-cloudstack;ant deploy-server; ant
> debug "/>
> +    <sshexec trust="yes" host="${host}" port="${port}" username="root"
> password="password" command="killall java;service cloud-management
> stop;sleep 1;export CATALINA_HOME=/opt/cloudstack/apache-tomcat-
> 6.0.32;cd /opt/cloudstack/incubator-cloudstack;ant deploy-server; ant
> debug "/>
>    </target>
> 
> 
> @@ -61,38 +61,38 @@
>      <condition property="zip.uptodate">
>        <available file="${deploy.work.dir}/client.zip" type="file"/>
>      </condition>
> -
> +
> 
> 
>      <echo message="copying build folder to remote"/>
> -    <scp trust="yes" port="${port}"
> todir="root:password@${host}:/opt/cloudstack/incubator-
> cloudstack/build">
> +    <scp trust="yes" port="${port}"
> todir="root:password@${host}:/opt/cloudstack/incubator-
> cloudstack/build">
>        <fileset dir="build">
>        </fileset>
>      </scp>
> 
> -    <scp trust="yes" port="${port}" file="build.xml"
> todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/">
> +    <scp trust="yes" port="${port}" file="build.xml"
> todir="root:password@${host}:/opt/cloudstack/incubator-cloudstack/">
>      </scp>
> 
>      <echo message="copying deps folder to remote"/>
> -    <scp trust="yes" port="${port}"
> todir="root:password@${host}:/opt/cloudstack/incubator-
> cloudstack/deps">
> +    <scp trust="yes" port="${port}"
> todir="root:password@${host}:/opt/cloudstack/incubator-
> cloudstack/deps">
>        <fileset dir="deps">
>        </fileset>
>      </scp>
> 
>      <echo message="copying target folder to remote"/>
> -    <scp trust="yes" port="${port}"
> todir="root:password@${host}:/opt/cloudstack/incubator-
> cloudstack/target">
> +    <scp trust="yes" port="${port}"
> todir="root:password@${host}:/opt/cloudstack/incubator-
> cloudstack/target">
>        <fileset dir="target">
>        </fileset>
>      </scp>
> 
>      <echo message="copying dist folder to remote"/>
> -    <scp trust="yes" port="${port}"
> todir="root:password@${host}:/opt/cloudstack/incubator-
> cloudstack/dist">
> +    <scp trust="yes" port="${port}"
> todir="root:password@${host}:/opt/cloudstack/incubator-
> cloudstack/dist">
>        <fileset dir="dist">
>        </fileset>
>      </scp>
> -
> -    <sshexec host="${host}" port="${port}" username="root"
> password="password" command="echo $CATALINA_HOME; export
> CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;cd
> /opt/cloudstack/incubator-cloudstack;ant deploy-server"/>
> +
> +    <sshexec trust="yes" host="${host}" port="${port}" username="root"
> password="password" command="echo $CATALINA_HOME; export
> CATALINA_HOME=/opt/cloudstack/apache-tomcat-6.0.32;cd
> /opt/cloudstack/incubator-cloudstack;ant deploy-server"/>
> 
>    </target>
> -
> +
>  </project>
> --
> 1.7.9.5