Merge lp:~alekibango/nova/lp691044 into lp:~hudson-openstack/nova/trunk

Proposed by David Pravec
Status: Merged
Approved by: Jay Pipes
Approved revision: 475
Merged at revision: 492
Proposed branch: lp:~alekibango/nova/lp691044
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 75 lines (+8/-2)
6 files modified
Authors (+1/-0)
contrib/nova.sh (+1/-1)
contrib/puppet/files/production/nova-iptables (+2/-0)
nova/cloudpipe/bootscript.template (+1/-0)
tools/clean-vlans (+2/-0)
tools/setup_iptables.sh (+1/-1)
To merge this branch: bzr merge lp:~alekibango/nova/lp691044
Reviewer Review Type Date Requested Status
Jay Pipes (community) Approve
Review via email: mp+43884@code.launchpad.net

Description of the change

    Make nova work even when user has LANG or LC_ALL configured

    Some commands are having different results when used in another language environment.
    For example ifconfig output parsing fails in my language.
    Also unittest using cat failed, as it didnt expect czech language in the error message.

    This small patch makes it work.
    Also adding myself to 'Authors' file

To post a comment you must log in.
Revision history for this message
Jay Pipes (jaypipes) wrote :

lgtm.

review: Approve
Revision history for this message
Jay Pipes (jaypipes) wrote :

Approving to get stuff merged... this is a straightforward and easy fix.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Attempt to merge into lp:nova failed due to conflicts:

contents conflict in nova/tests/process_unittest.py

lp:~alekibango/nova/lp691044 updated
474. By David Pravec

merged trunk, resolved conflict

someone deleted process_unittest.py in trunk, so the problem in that one is gone now.

475. By David Pravec

merged trunk, resolved trivial conflict

Revision history for this message
Jay Pipes (jaypipes) wrote :

cool, looks good :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Authors'
2--- Authors 2010-12-23 02:03:39 +0000
3+++ Authors 2010-12-24 01:31:50 +0000
4@@ -4,6 +4,7 @@
5 Armando Migliaccio <Armando.Migliaccio@eu.citrix.com>
6 Chris Behrens <cbehrens@codestud.com>
7 Chmouel Boudjnah <chmouel@chmouel.com>
8+David Pravec <David.Pravec@danix.org>
9 Dean Troyer <dtroyer@gmail.com>
10 Devin Carlen <devin.carlen@gmail.com>
11 Ed Leafe <ed@leafe.com>
12
13=== modified file 'contrib/nova.sh'
14--- contrib/nova.sh 2010-12-15 07:48:51 +0000
15+++ contrib/nova.sh 2010-12-24 01:31:50 +0000
16@@ -15,7 +15,7 @@
17 # NOTE(vish): This will just get the first ip in the list, so if you
18 # have more than one eth device set up, this will fail, and
19 # you should explicitly set HOST_IP in your environment
20- HOST_IP=`ifconfig | grep -m 1 'inet addr:'| cut -d: -f2 | awk '{print $1}'`
21+ HOST_IP=`LC_ALL=C ifconfig | grep -m 1 'inet addr:'| cut -d: -f2 | awk '{print $1}'`
22 fi
23
24 USE_MYSQL=${USE_MYSQL:-0}
25
26=== modified file 'contrib/puppet/files/production/nova-iptables'
27--- contrib/puppet/files/production/nova-iptables 2010-11-12 19:07:46 +0000
28+++ contrib/puppet/files/production/nova-iptables 2010-12-24 01:31:50 +0000
29@@ -30,6 +30,8 @@
30 . /etc/default/nova-iptables
31 fi
32
33+export LC_ALL=C
34+
35 API_PORT=${API_PORT:-"8773"}
36
37 if [ ! -n "$IP" ]; then
38
39=== modified file 'nova/cloudpipe/bootscript.template'
40--- nova/cloudpipe/bootscript.template 2010-11-06 00:02:36 +0000
41+++ nova/cloudpipe/bootscript.template 2010-12-24 01:31:50 +0000
42@@ -19,6 +19,7 @@
43
44 # This gets zipped and run on the cloudpipe-managed OpenVPN server
45
46+export LC_ALL=C
47 export VPN_IP=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{print $$1}'`
48 export BROADCAST=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f3 | awk '{print $$1}'`
49 export DHCP_MASK=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f4 | awk '{print $$1}'`
50
51=== modified file 'tools/clean-vlans'
52--- tools/clean-vlans 2010-07-15 15:52:11 +0000
53+++ tools/clean-vlans 2010-12-24 01:31:50 +0000
54@@ -17,6 +17,8 @@
55 # License for the specific language governing permissions and limitations
56 # under the License.
57
58+export LC_ALL=C
59+
60 sudo ifconfig -a | grep br | grep -v bridge | cut -f1 -d" " | xargs -n1 -ifoo ifconfig foo down
61 sudo ifconfig -a | grep br | grep -v bridge | cut -f1 -d" " | xargs -n1 -ifoo brctl delbr foo
62 sudo ifconfig -a | grep vlan | grep -v vlan124 | grep -v vlan5 | cut -f1 -d" " | xargs -n1 -ifoo ifconfig foo down
63
64=== modified file 'tools/setup_iptables.sh'
65--- tools/setup_iptables.sh 2010-09-29 00:41:57 +0000
66+++ tools/setup_iptables.sh 2010-12-24 01:31:50 +0000
67@@ -36,7 +36,7 @@
68 # NOTE(vish): This will just get the first ip in the list, so if you
69 # have more than one eth device set up, this will fail, and
70 # you should explicitly pass in the ip of the instance
71- IP=`ifconfig | grep -m 1 'inet addr:'| cut -d: -f2 | awk '{print $1}'`
72+ IP=`LC_ALL=C ifconfig | grep -m 1 'inet addr:'| cut -d: -f2 | awk '{print $1}'`
73 fi
74
75 if [ -n "$3" ]; then