Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C27DC10154 for ; Fri, 21 Nov 2014 13:02:28 +0000 (UTC) Received: (qmail 73657 invoked by uid 500); 21 Nov 2014 13:02:28 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 73623 invoked by uid 500); 21 Nov 2014 13:02:28 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 73606 invoked by uid 99); 21 Nov 2014 13:02:28 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Nov 2014 13:02:28 +0000 Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id A94951A03BB; Fri, 21 Nov 2014 13:02:23 +0000 (UTC) Received: by mail-wg0-f42.google.com with SMTP id z12so6533850wgg.15 for ; Fri, 21 Nov 2014 05:02:25 -0800 (PST) X-Received: by 10.180.78.73 with SMTP id z9mr25054959wiw.52.1416574945190; Fri, 21 Nov 2014 05:02:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.27.11.210 with HTTP; Fri, 21 Nov 2014 05:02:04 -0800 (PST) In-Reply-To: <1da6bc78351646c8bdc41c402c55a36b@git.apache.org> References: <1da6bc78351646c8bdc41c402c55a36b@git.apache.org> From: Rohit Yadav Date: Fri, 21 Nov 2014 18:32:04 +0530 Message-ID: Subject: Re: git commit: updated refs/heads/4.5 to 50d756e To: "dev@cloudstack.apache.org" , Edison Su Cc: commits@cloudstack.apache.org Content-Type: multipart/alternative; boundary=f46d0438903b67ed6905085e0e80 --f46d0438903b67ed6905085e0e80 Content-Type: text/plain; charset=ISO-8859-1 Hi Edison, On Fri, Nov 21, 2014 at 12:30 AM, wrote: > Repository: cloudstack > Updated Branches: > refs/heads/4.5 1d6ca5eac -> 50d756e87 > > > Occasionally the while loop can exit with no data (Probably recieving an > EOF) before receiveing CMDline data from the certial port. Continue looping > until cmdline is populated > Should we port/cherry-pick/merge this to master as well? > > Signed-off-by: Edison Su > > > Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo > Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/50d756e8 > Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/50d756e8 > Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/50d756e8 > > Branch: refs/heads/4.5 > Commit: 50d756e87d26f0ac86e7897505ad2747735c4d5c > Parents: 1d6ca5e > Author: David Bierce > Authored: Fri Sep 12 10:52:29 2014 -0500 > Committer: Edison Su > Committed: Thu Nov 20 10:58:35 2014 -0800 > > ---------------------------------------------------------------------- > .../debian/config/etc/init.d/cloud-early-config | 22 +++++++++++--------- > 1 file changed, 12 insertions(+), 10 deletions(-) > ---------------------------------------------------------------------- > > > > http://git-wip-us.apache.org/repos/asf/cloudstack/blob/50d756e8/systemvm/patches/debian/config/etc/init.d/cloud-early-config > ---------------------------------------------------------------------- > diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config > b/systemvm/patches/debian/config/etc/init.d/cloud-early-config > index 11d0612..294ae5f 100755 > --- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config > +++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config > @@ -117,16 +117,18 @@ get_boot_params() { > if [ ! -e /dev/vport0p1 ]; then > log_it "/dev/vport0p1 not loaded, perhaps guest kernel is too > old." && exit 2 > fi > - while read line; do > - if [[ $line == cmdline:* ]]; then > - cmd=${line//cmdline:/} > - echo $cmd > /var/cache/cloud/cmdline > - elif [[ $line == pubkey:* ]]; then > - pubkey=${line//pubkey:/} > - echo $pubkey > /var/cache/cloud/authorized_keys > - echo $pubkey > /root/.ssh/authorized_keys > - fi > - done < /dev/vport0p1 > + while [$cmd -eq ""]; do > + while read line; do > + if [[ $line == cmdline:* ]]; then > + cmd=${line//cmdline:/} > + echo $cmd > /var/cache/cloud/cmdline > + elif [[ $line == pubkey:* ]]; then > + pubkey=${line//pubkey:/} > + echo $pubkey > /var/cache/cloud/authorized_keys > + echo $pubkey > /root/.ssh/authorized_keys > + fi > + done < /dev/vport0p1 > + done > chmod go-rwx /root/.ssh/authorized_keys > ;; > vmware) > > --f46d0438903b67ed6905085e0e80 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Edison,

On Fri, Nov 21, 2014 at 12:30 AM, <edison@apache.org> wrote:
Repository: cloudstack
Updated Branches:
=A0 refs/heads/4.5 1d6ca5eac -> 50d756e87


Occasionally the while loop can exit with no data (Probably recieving an EO= F) before receiveing CMDline data from the certial port. Continue looping u= ntil cmdline is populated

Should we por= t/cherry-pick/merge this to master as well?
=A0

Signed-off-by: Edison Su <sudison@g= mail.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit:
http://git-wip-us.apache.org/repos/asf/cloudst= ack/commit/50d756e8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/= tree/50d756e8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/= diff/50d756e8

Branch: refs/heads/4.5
Commit: 50d756e87d26f0ac86e7897505ad2747735c4d5c
Parents: 1d6ca5e
Author: David Bierce <david.= bierce@appcore.com>
Authored: Fri Sep 12 10:52:29 2014 -0500
Committer: Edison Su <sudison@gmail= .com>
Committed: Thu Nov 20 10:58:35 2014 -0800

----------------------------------------------------------------------
=A0.../debian/config/etc/init.d/cloud-early-config | 22 +++++++++++--------= -
=A01 file changed, 12 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/50d756e8/system= vm/patches/debian/config/etc/init.d/cloud-early-config
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b= /systemvm/patches/debian/config/etc/init.d/cloud-early-config
index 11d0612..294ae5f 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config
+++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
@@ -117,16 +117,18 @@ get_boot_params() {
=A0 =A0 =A0 =A0 =A0 =A0if [ ! -e /dev/vport0p1 ]; then
=A0 =A0 =A0 =A0 =A0 =A0 =A0log_it "/dev/vport0p1 not loaded, perhaps g= uest kernel is too old." && exit 2
=A0 =A0 =A0 =A0 =A0 =A0fi
-=A0 =A0 =A0 =A0 =A0 while read line; do
-=A0 =A0 =A0 =A0 =A0 =A0 if [[ $line =3D=3D cmdline:* ]]; then
-=A0 =A0 =A0 =A0 =A0 =A0 =A0 cmd=3D${line//cmdline:/}
-=A0 =A0 =A0 =A0 =A0 =A0 =A0 echo $cmd > /var/cache/cloud/cmdline
-=A0 =A0 =A0 =A0 =A0 =A0 elif [[ $line =3D=3D pubkey:* ]]; then
-=A0 =A0 =A0 =A0 =A0 =A0 =A0 pubkey=3D${line//pubkey:/}
-=A0 =A0 =A0 =A0 =A0 =A0 =A0 echo $pubkey > /var/cache/cloud/authorized_= keys
-=A0 =A0 =A0 =A0 =A0 =A0 =A0 echo $pubkey > /root/.ssh/authorized_keys -=A0 =A0 =A0 =A0 =A0 =A0 fi
-=A0 =A0 =A0 =A0 =A0 done < /dev/vport0p1
+=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0while [$cmd -eq ""]; do
+=A0 =A0 =A0 =A0 =A0 =A0 while read line; do
+=A0 =A0 =A0 =A0 =A0 =A0 =A0 if [[ $line =3D=3D cmdline:* ]]; then
+=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 cmd=3D${line//cmdline:/}
+=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 echo $cmd > /var/cache/cloud/cmdline +=A0 =A0 =A0 =A0 =A0 =A0 =A0 elif [[ $line =3D=3D pubkey:* ]]; then
+=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 pubkey=3D${line//pubkey:/}
+=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 echo $pubkey > /var/cache/cloud/authori= zed_keys
+=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 echo $pubkey > /root/.ssh/authorized_ke= ys
+=A0 =A0 =A0 =A0 =A0 =A0 =A0 fi
+=A0 =A0 =A0 =A0 =A0 =A0 done < /dev/vport0p1
+=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0done
=A0 =A0 =A0 =A0 =A0 =A0chmod go-rwx /root/.ssh/authorized_keys
=A0 =A0 =A0 =A0 =A0 =A0;;
=A0 =A0 =A0 vmware)


--f46d0438903b67ed6905085e0e80--