Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/openstack-guest-agents-unix/files: patches-1.39.0-20140621.patch openstack-guest-agents-unix-1.39.0-python2.patch
Date: Sun, 22 Jun 2014 02:07:04
Message-Id: 20140622020659.EADC020051@flycatcher.gentoo.org
1 robbat2 14/06/22 02:06:59
2
3 Added: patches-1.39.0-20140621.patch
4 openstack-guest-agents-unix-1.39.0-python2.patch
5 Log:
6 New packages for infra use, in package.mask because not fully baked yet, upstream does QA-horrible things like copy parts of system /lib to a subdir. Initial ebuild from alunduil's overlay
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, unsigned Manifest commit)
9
10 Revision Changes Path
11 1.1 app-emulation/openstack-guest-agents-unix/files/patches-1.39.0-20140621.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/openstack-guest-agents-unix/files/patches-1.39.0-20140621.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/openstack-guest-agents-unix/files/patches-1.39.0-20140621.patch?rev=1.1&content-type=text/plain
15
16 Index: patches-1.39.0-20140621.patch
17 ===================================================================
18 commit fc8c9fe076e321ff98cc6717abbb21ee57808c52
19 Merge: eaaae09 1ecec49
20 Author: teran-mckinney <teran.mckinney@×××××××××.com>
21 Date: Wed Apr 30 15:33:43 2014 +0000
22
23 Merge pull request #43 from gtmanfred/master
24
25 sbindir changes to exec_prefix
26
27 commit eaaae09c27a33998374a8d63702c75b04ab3e5c2
28 Merge: 773e431 1505a5a
29 Author: teran-mckinney <teran.mckinney@×××××××××.com>
30 Date: Tue Apr 29 18:21:27 2014 +0000
31
32 Merge pull request #45 from leader716/master
33
34 Added addditional logic to deterine if the hardware address for and inte...
35
36 commit 1505a5a8e180910c3307bf04ccfc4eed09c0f40a
37 Author: John Ward <john.ward@×××××××××.com>
38 Date: Tue Apr 29 14:28:34 2014 +0000
39
40 Added addditional logic to deterine if the hardware address for and interface is 0x0 if so go to the next interface.
41 I put this into place to handle tun adapters that have a hardware address of 0x0 which was causing the agent to
42 segfault when it encounterd this type of adapter.
43
44 commit 1ecec499d5bea73980a8aec992b394339acc83c7
45 Author: Daniel Wallace <danielwallace@×××××××××.com>
46 Date: Fri Apr 25 20:38:35 2014 -0500
47
48 sbindir changes to exec_prefix
49
50 Systemd requires a full path for the start of the command, and there
51 isn't one that isn't a nice way to change this.
52
53 commit 773e431997a6612cbda9f11ec9d57f5685a29eea
54 Merge: 1ca2056 12c0294
55 Author: teran-mckinney <teran.mckinney@×××××××××.com>
56 Date: Fri Apr 25 18:41:56 2014 +0000
57
58 Merge pull request #39 from Camisa/master
59
60 nova-agent should replace the Slice or Image ID rather than append
61
62 commit 1ca2056a455f8075ed951f0a82b92820c0b33b54
63 Merge: 1b05c75 f9a365e
64 Author: teran-mckinney <teran.mckinney@×××××××××.com>
65 Date: Fri Apr 25 18:40:29 2014 +0000
66
67 Merge pull request #42 from gtmanfred/master
68
69 Do not add static routes that are the default route, if a default gateway already exists.
70
71 Courtesy of gtmanfred. Thank you!
72
73 commit f9a365e7a9543d407ca9d75164688faa0ff53528
74 Author: Daniel Wallace <danielwallace@×××××××××.com>
75 Date: Fri Apr 25 10:54:29 2014 -0500
76
77 remove extra and from debian network.py
78
79 commit 387d4e77695598a07be9e4593c5b236b81a1aeea
80 Author: Daniel Wallace <danielwallace@×××××××××.com>
81 Date: Fri Apr 25 09:31:15 2014 -0500
82
83 Do not add static routes that are the default route
84
85 commit 1b05c75530c8b4cbf5347e84815e275ee0bbacd4
86 Author: teran-mckinney <teran.mckinney@×××××××××.com>
87 Date: Thu Feb 13 19:26:36 2014 +0000
88
89 Fix nova-agent not starting on some systems
90
91 data/host existing could cause a fault on xs_handle.mkdir(self.request_path) if request_path (data/host) already existed. Wrap it in a try/except clause to ignore the fault as if the directory already exists, there's no reason to throw an exception while trying to create it.
92
93 Workaround without this patch is to xenstore-rm data/host from affected VMs, or to do it from dom0 with the full path.
94
95 commit 12c02941ef02dc6645e6d4700e8a028decbf0c19
96 Author: Christopher J. Camisa <cjc@××××××××.host>
97 Date: Thu Jan 30 03:11:51 2014 -0600
98
99 nova-agent should replace the Slice or Image ID rather than append
100
101 commit ce388bf600136736fdb790edef58a57aad8adfc1
102 Author: AbhishekKr <abhikumar163@×××××.com>
103 Date: Tue Jan 21 17:22:23 2014 +0530
104
105 shebang fixed for installer.sh and bintar script; gitignore updated
106
107 commit 91fe7d0262fe8ad685a287df291b504250b1184c
108 Author: AbhishekKr <abhikumar163@×××××.com>
109 Date: Fri Jan 3 16:51:54 2014 +0530
110
111 FreeBSD changed ports, so bintar creation script need to
112 diff --git a/.gitignore b/.gitignore
113 index ae1ae1b..6bdeda8 100644
114 --- a/.gitignore
115 +++ b/.gitignore
116 @@ -55,3 +55,4 @@ unix/scripts/generic/nova-agent
117 unix/scripts/gentoo/nova-agent
118 unix/scripts/freebsd/nova-agent
119 .idea/*
120 +**/.venv
121 diff --git a/commands/arch/network.py b/commands/arch/network.py
122 index 1d698ca..2bc0aff 100644
123 --- a/commands/arch/network.py
124 +++ b/commands/arch/network.py
125 @@ -373,6 +373,11 @@ def _update_rc_conf_legacy(infile, interfaces):
126 ifaces.append((ifname.replace(':', '_'), ' '.join(line)))
127
128 for i, route in enumerate(interface['routes']):
129 + if route['network'] == '0.0.0.0' and \
130 + route['netmask'] == '0.0.0.0' and \
131 + route['gateway'] == gateway4:
132 + continue
133 +
134 line = "-net %(network)s netmask %(netmask)s gw %(gateway)s" % \
135 route
136
137 @@ -499,7 +504,10 @@ def _get_file_data_netctl(ifname, interface):
138 print >>outfile, 'Gateway6=%s' % gateway6
139
140 routes = ['%(network)s/%(netmask)s via %(gateway)s' % route
141 - for route in interface['routes']]
142 + for route in interface['routes'] if not
143 + route['network'] == '0.0.0.0' and not
144 + route['netmask'] == '0.0.0.0' and not
145 + route['gateway'] == gateway4]
146
147 if routes:
148 print >>outfile, 'Routes=(\'%s\')' % '\' \''.join(routes)
149 @@ -552,7 +560,10 @@ def _get_file_data_netcfg(ifname, interface):
150 print >>outfile, 'GATEWAY6="%s"' % gateway6
151
152 routes = ['"%(network)s/%(netmask)s via %(gateway)s"' % route
153 - for route in interface['routes']]
154 + for route in interface['routes'] if not
155 + route['network'] == '0.0.0.0' and not
156 + route['netmask'] == '0.0.0.0' and not
157 + route['gateway'] == gateway4]
158
159 if routes:
160 print >>outfile, 'ROUTES=(%s)' % ' '.join(routes)
161 diff --git a/commands/debian/network.py b/commands/debian/network.py
162 index d91d602..3b82d97 100644
163 --- a/commands/debian/network.py
164 +++ b/commands/debian/network.py
165 @@ -234,6 +234,11 @@ def _get_file_data(interfaces):
166 ifname_suffix_num += 1
167
168 for route in interface['routes']:
169 + if route['network'] == '0.0.0.0' \
170 + and route['netmask'] == '0.0.0.0'\
171 + and 'gateway4' in interface \
172 + and route['gateway'] == interface['gateway4']:
173 + continue
174 file_data += " post-up route add -net %(network)s " \
175 "netmask %(netmask)s gw %(gateway)s || true\n" % route
176 file_data += " pre-down route del -net %(network)s " \
177 diff --git a/commands/freebsd/network.py b/commands/freebsd/network.py
178 index 2d5d7f1..87e5e9e 100644
179 --- a/commands/freebsd/network.py
180 +++ b/commands/freebsd/network.py
181 @@ -211,6 +211,10 @@ def _create_rcconf_file(infile, interfaces, hostname):
182 ifname_suffix_num += 1
183
184 for route in interface['routes']:
185 + if route['network'] == '0.0.0.0' and \
186 + route['netmask'] == '0.0.0.0' and \
187 + route['gateway'] == gateway4:
188 + continue
189 if ':' in route['network']:
190 # ipv6
191 fmt = '-net %(network)s/%(netmask)s %(gateway)s'
192 diff --git a/commands/gentoo/network.py b/commands/gentoo/network.py
193 index f3ceff5..f3e5251 100644
194 --- a/commands/gentoo/network.py
195 +++ b/commands/gentoo/network.py
196 @@ -199,7 +199,11 @@ def _confd_net_file(interfaces):
197 lines.extend([ " {0}/{1} via {2}".format(route['network'],
198 commands.network.NETMASK_TO_PREFIXLEN[route['netmask']],
199 route['gateway']
200 - ) for route in interface['routes'] ])
201 + ) for route in interface['routes'] if not
202 + route['network'] == '0.0.0.0' and not
203 + route['netmask'] == '0.0.0.0' and
204 + 'gateway4' in interface and not
205 + route['gateway'] == interface['gateway4']])
206 if 'gateway4' in interface and interface['gateway4']:
207 lines.append(" default via {0}".format(interface['gateway4']))
208 if 'gateway6' in interface and interface['gateway6']:
209 @@ -247,7 +251,11 @@ def _confd_net_file_legacy(interfaces):
210 lines.append("routes_{0}=(".format(name))
211 lines.extend([ " \"{0} netmask {1} gw {2}\"".format(
212 route['network'], route['netmask'], route['gateway']
213 - ) for route in interface['routes'] ])
214 + ) for route in interface['routes'] if not
215 + route['network'] == '0.0.0.0' and not
216 + route['netmask'] == '0.0.0.0' and
217 + 'gateway4' in interface and not
218 + route['gateway'] == interface['gateway4'] ])
219 if 'gateway4' in interface and interface['gateway4']:
220 lines.append(" \"default via {0}\"".format(interface['gateway4']))
221 if 'gateway6' in interface and interface['gateway6']:
222 diff --git a/commands/redhat/network.py b/commands/redhat/network.py
223 index a85ed6b..e853fbd 100644
224 --- a/commands/redhat/network.py
225 +++ b/commands/redhat/network.py
226 @@ -202,6 +202,11 @@ def _get_file_data(ifname_prefix, interface):
227
228 route_data = ''
229 for i, route in enumerate(interface['routes']):
230 + if route['network'] == '0.0.0.0' and \
231 + route['netmask'] == '0.0.0.0' and \
232 + 'gateway4' in interface and \
233 + route['gateway'] == interface['gateway4']:
234 + continue
235 route_data += "ADDRESS%d=%s\n" % (i, route['network'])
236 route_data += "NETMASK%d=%s\n" % (i, route['netmask'])
237 route_data += "GATEWAY%d=%s\n" % (i, route['gateway'])
238 diff --git a/commands/suse/network.py b/commands/suse/network.py
239 index 2947974..baad7b2 100644
240 --- a/commands/suse/network.py
241 +++ b/commands/suse/network.py
242 @@ -191,6 +191,10 @@ def _get_file_data(ifname, interface):
243
244 route_data = ''
245 for route in interface['routes']:
246 + if route['network'] == '0.0.0.0' and \
247 + route['netmask'] == '0.0.0.0' and \
248 + route['gateway'] == gateway4:
249 + continue
250 network = route['network']
251 netmask = route['netmask']
252 gateway = route['gateway']
253 diff --git a/lib/agentlib.c b/lib/agentlib.c
254 index ccba6e3..cced430 100644
255 --- a/lib/agentlib.c
256 +++ b/lib/agentlib.c
257 @@ -73,7 +73,10 @@ static PyObject *_agentlib_get_interfaces(PyObject *self, PyObject *args)
258 goto next;
259
260 #if defined(__linux__)
261 - if (ifa->ifa_addr->sa_family != PF_PACKET)
262 + if (ifa->ifa_addr == NULL)
263 + goto next;
264 +
265 + if (ifa->ifa_addr->sa_family != PF_PACKET)
266 goto next;
267
268 struct sockaddr_ll *sll = (struct sockaddr_ll *)ifa->ifa_addr;
269 diff --git a/plugins/xscomm.py b/plugins/xscomm.py
270 index e3faa2e..9b8a33b 100644
271 --- a/plugins/xscomm.py
272 +++ b/plugins/xscomm.py
273 @@ -41,7 +41,11 @@ class XSComm(object):
274 XENSTORE_RESPONSE_PATH)
275
276 self.xs_handle = pyxenstore.Handle()
277 - self.xs_handle.mkdir(self.request_path)
278 + try:
279 + self.xs_handle.mkdir(self.request_path)
280 + except:
281 + pass
282 +
283 self.requests = []
284
285 def _check_handle(self):
286 diff --git a/scripts/gentoo/nova-agent.in b/scripts/gentoo/nova-agent.in
287 index a043394..7f2687e 100755
288 --- a/scripts/gentoo/nova-agent.in
289 +++ b/scripts/gentoo/nova-agent.in
290 @@ -59,7 +59,7 @@ start() {
291 /usr/bin/xenstore write data/host/system-init '{"name":"resetnetwork","value":""}'
292 /usr/bin/xenstore watch -n 1 data/guest/system-init >/dev/null
293 [ "$(/usr/bin/xenstore read data/guest/system-init | wc -l)" -gt "0" ] || eend 1
294 - echo "UUID=\"$(/usr/bin/xenstore read name)\"" >> /etc/conf.d/nova-agent
295 + echo "UUID=\"$(/usr/bin/xenstore read name)\"" > /etc/conf.d/nova-agent
296 fi
297
298 eend $RET
299 diff --git a/scripts/installer.sh.in b/scripts/installer.sh.in
300 index 8ef793d..3fbf352 100755
301 --- a/scripts/installer.sh.in
302 +++ b/scripts/installer.sh.in
303 @@ -1,4 +1,4 @@
304 -#!/bin/bash
305 +#!/usr/bin/env bash
306
307 # vim: tabstop=4 shiftwidth=4 softtabstop=4
308 #
309 diff --git a/scripts/systemd/nova-agent.service.in b/scripts/systemd/nova-agent.service.in
310 index 9d8a4a7..b73ebbe 100644
311 --- a/scripts/systemd/nova-agent.service.in
312 +++ b/scripts/systemd/nova-agent.service.in
313 @@ -4,7 +4,7 @@ Description=nova-agent service
314 [Service]
315 Environment=LD_LIBRARY_PATH=@prefix@/share/@PACKAGE@/@PACKAGE_VERSION@/lib
316 EnvironmentFile=-/etc/nova-agent.env
317 -ExecStart=@sbindir@/nova-agent -n -l info @prefix@/share/@PACKAGE@/nova-agent.py
318 +ExecStart=@prefix@/sbin/nova-agent -n -l info @prefix@/share/@PACKAGE@/nova-agent.py
319
320
321 [Install]
322 diff --git a/tools/nova-agent-builder.sh b/tools/nova-agent-builder.sh
323 index 1823639..fcaa7c7 100755
324 --- a/tools/nova-agent-builder.sh
325 +++ b/tools/nova-agent-builder.sh
326 @@ -1,4 +1,4 @@
327 -#!/bin/bash
328 +#!/usr/bin/env bash
329 ##### NOVA AGENT BUILDER
330 ##### how_to:$ sh nova-agent-builder.sh help
331 ##### W.I.P. works fine for most of cases,
332 @@ -202,7 +202,7 @@ install_pre_requisite_freebsd(){
333 export INSTALL_D=""
334 uname -a
335
336 - pkg_add -r git autogen automake wget bash
337 + pkg_add -r git autogen automake wget bash libtool
338 pkg_add -r py27-unittest2 py27-cryptkit py27-pycrypto py27-mox
339
340 # re-install xen-tool :: required for pyxenstore install
341
342
343
344 1.1 app-emulation/openstack-guest-agents-unix/files/openstack-guest-agents-unix-1.39.0-python2.patch
345
346 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/openstack-guest-agents-unix/files/openstack-guest-agents-unix-1.39.0-python2.patch?rev=1.1&view=markup
347 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/openstack-guest-agents-unix/files/openstack-guest-agents-unix-1.39.0-python2.patch?rev=1.1&content-type=text/plain
348
349 Index: openstack-guest-agents-unix-1.39.0-python2.patch
350 ===================================================================
351 diff -Nuar openstack-guest-agents-unix-1.39.0.orig/scripts/gentoo/nova-agent.in openstack-guest-agents-unix-1.39.0/scripts/gentoo/nova-agent.in
352 --- openstack-guest-agents-unix-1.39.0.orig/scripts/gentoo/nova-agent.in 2013-12-31 02:02:57.000000000 -0800
353 +++ openstack-guest-agents-unix-1.39.0/scripts/gentoo/nova-agent.in 2014-06-21 17:20:01.527148493 -0700
354 @@ -35,8 +35,9 @@
355 NOVA_PYTHONPATH="${reallibdir}/${NOVA_PYTHONPATH}"
356 NOVA_PYTHONPATH="${NOVA_PYTHONPATH}:${NOVA_PYTHONPATH}/site-packages"
357
358 -if [ `which python > /dev/null 2>&1 ; echo $?` -eq 0 ]; then
359 - PYTHONPATH="$(python -c 'import sys; print ":".join(sys.path)')"
360 +PYTHON=python2
361 +if [ `which $PYTHON > /dev/null 2>&1 ; echo $?` -eq 0 ]; then
362 + PYTHONPATH="$($PYTHON -c 'import sys; print ":".join(sys.path)')"
363 fi
364 export PYTHONPATH="$NOVA_PYTHONPATH:$PYTHONPATH"
365 export PYTHONHOME="$NOVA_PYTHONPATH:$PYTHONPATH"