* Network scripts start/stop
@ 2008-04-04 23:28 Christopher Thunes
2008-04-05 5:49 ` Christopher Thunes
2008-04-05 9:13 ` Keir Fraser
0 siblings, 2 replies; 4+ messages in thread
From: Christopher Thunes @ 2008-04-04 23:28 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/html, Size: 1015 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Network scripts start/stop
2008-04-04 23:28 Network scripts start/stop Christopher Thunes
@ 2008-04-05 5:49 ` Christopher Thunes
2008-04-05 9:13 ` Keir Fraser
1 sibling, 0 replies; 4+ messages in thread
From: Christopher Thunes @ 2008-04-05 5:49 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 19 bytes --]
Attached a patch.
[-- Attachment #2: net_start_stop.diff --]
[-- Type: text/plain, Size: 1770 bytes --]
diff -r 6341a28c8a45 tools/python/xen/xend/XendPIF.py
--- a/tools/python/xen/xend/XendPIF.py Mon Mar 31 18:08:17 2008 +0100
+++ b/tools/python/xen/xend/XendPIF.py Sat Apr 05 01:40:20 2008 -0400
@@ -24,16 +24,12 @@ from xen.xend.XendBase import XendBase
from xen.xend.XendBase import XendBase
from xen.xend.XendPIFMetrics import XendPIFMetrics
from xen.xend.XendError import *
-from xen.xend import Vifctl
log = logging.getLogger("xend.XendPIF")
log.setLevel(logging.TRACE)
MAC_RE = re.compile(':'.join(['[0-9a-f]{2}'] * 6))
IP_IFACE_RE = re.compile(r'^\d+: (\w+):.*mtu (\d+) .* link/\w+ ([0-9a-f:]+)')
-
-
-Vifctl.network('start')
def linux_phy_to_virt(pif_name):
return 'eth' + re.sub(r'^[a-z]+', '', pif_name)
diff -r 6341a28c8a45 tools/python/xen/xend/server/SrvServer.py
--- a/tools/python/xen/xend/server/SrvServer.py Mon Mar 31 18:08:17 2008 +0100
+++ b/tools/python/xen/xend/server/SrvServer.py Sat Apr 05 01:41:54 2008 -0400
@@ -53,6 +53,7 @@ from xen.xend.XendClient import XEN_API_
from xen.xend.XendClient import XEN_API_SOCKET
from xen.xend.XendDomain import instance as xenddomain
from xen.web.SrvDir import SrvDir
+from xen.xend import Vifctl
from SrvRoot import SrvRoot
from XMLRPCServer import XMLRPCServer
@@ -83,6 +84,7 @@ class XendServers:
# clean up domains for those that have on_xend_stop
if not reloading:
+ Vifctl.network('stop')
xenddomain().cleanup_domains()
self.running = False
@@ -104,6 +106,8 @@ class XendServers:
# and call each server's cleanup if possible
signal.signal(signal.SIGTERM, self.cleanup)
signal.signal(signal.SIGHUP, self.reloadConfig)
+
+ Vifctl.network('start')
while True:
threads = []
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Network scripts start/stop
2008-04-04 23:28 Network scripts start/stop Christopher Thunes
2008-04-05 5:49 ` Christopher Thunes
@ 2008-04-05 9:13 ` Keir Fraser
2008-04-05 16:00 ` Christopher Thunes
1 sibling, 1 reply; 4+ messages in thread
From: Keir Fraser @ 2008-04-05 9:13 UTC (permalink / raw)
To: Christopher Thunes, xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 1132 bytes --]
On 5/4/08 00:28, "Christopher Thunes" <c2thunes@brewtab.com> wrote:
> I was poking around with some network scripts for Xen today (3.2-testing)
> and noticed that regardless of whether xend start, xend restart, or xend stop
> was called a 'start' argument was passed on to the network script
> (network-bridge, network-route, etc.). I can't imagine this is normal behavior
> and it seems that the only place that these scripts are called is from a
> global function call in xend/XendPIF.py around line 35
> ("Vifctl.network('start')"). I commented this line out and added appropriate
> calls to Vifctl.network('start') and Vifctl.network('stop') in
> xend/server/SrvServer.py in the functions cleanup and start. If someone can
> let me know if this is standard behavior and if not, if there is a better way
> to fix the problem it would be much appreciated.
The established behaviour is that networking is brought up with xend, and
remains up even across xend stops and restarts. Possibly xend stop and
restart should not be calling the network scripts at all, but that¹s a
pretty minor issue.
-- Keir
[-- Attachment #1.2: Type: text/html, Size: 1567 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Network scripts start/stop
2008-04-05 9:13 ` Keir Fraser
@ 2008-04-05 16:00 ` Christopher Thunes
0 siblings, 0 replies; 4+ messages in thread
From: Christopher Thunes @ 2008-04-05 16:00 UTC (permalink / raw)
To: Keir Fraser; +Cc: xen-devel
Alright, thanks
- Chris Thunes
Keir Fraser wrote:
> On 5/4/08 00:28, "Christopher Thunes" <c2thunes@brewtab.com> wrote:
>
> I was poking around with some network scripts for Xen today
> (3.2-testing) and noticed that regardless of whether xend start,
> xend restart, or xend stop was called a 'start' argument was passed
> on to the network script (network-bridge, network-route, etc.). I
> can't imagine this is normal behavior and it seems that the only
> place that these scripts are called is from a global function call
> in xend/XendPIF.py around line 35 ("Vifctl.network('start')"). I
> commented this line out and added appropriate calls to
> Vifctl.network('start') and Vifctl.network('stop') in
> xend/server/SrvServer.py in the functions cleanup and start. If
> someone can let me know if this is standard behavior and if not, if
> there is a better way to fix the problem it would be much appreciated.
>
>
> The established behaviour is that networking is brought up with xend,
> and remains up even across xend stops and restarts. Possibly xend stop
> and restart should not be calling the network scripts at all, but that’s
> a pretty minor issue.
>
> -- Keir
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-04-05 16:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-04 23:28 Network scripts start/stop Christopher Thunes
2008-04-05 5:49 ` Christopher Thunes
2008-04-05 9:13 ` Keir Fraser
2008-04-05 16:00 ` Christopher Thunes
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.