Jim Fehlig
2008-Jan-23 23:12 UTC
[Xen-devel] [PATCH][RFC] problem with rename-restart behavior in xend
While fixing the /vm/<uuid> leak discussed in this thread
http://lists.xensource.com/archives/html/xen-devel/2008-01/msg00297.html
I found that ''rename-restart'' option in guest config file was
not
working properly. On a 3.2 system with
''on_crash=rename-restart'' in
guest config, after crashing the guest I observed
jfehlig4: # xm li
Name ID Mem VCPUs State
Time(s)
Domain-0 0 1233 4 r-----
962.6
Domain-8159ab1d-bb0d-6853-4264-5f129efdd4af 23 384 1
----c- 14.1
Notice the domain did not restart due to _stateGet returning
XEN_API_VM_POWER_STATE_RUNNING. From xend.log
[2008-01-23 15:07:10 27490] ERROR (XendDomainInfo:111) Domain
construction failed
Traceback (most recent call last):
File
"/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py",
line 109, in create_from_dict
vm.start()
File
"/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py",
line 444, in start
raise XendError(''VM already running'')
XendError: VM already running
Patch xend_crashed_ps.diff fixes that problem but I wanted to get some
comments on the approach. Essentially it introduces a power state of
crashed. At first I wasn''t too keen on the idea, but after some though
I think it is analogous the the paused power state, i.e. the domain has
some resources assigned to it but it is no longer executing
instructions. This patch is not complete but I wanted to see how folks
felt about it before proceeding. The patch needs to include
corresponding changes to XenAPI C bindings, documentation, etc. to be
complete.
Now, after getting past this problem I noticed that the crashed domain
was restarted but with same name :-(. E.g.
jfehlig4: # xm li
Name ID Mem VCPUs State
Time(s)
Domain-0 0 1233 4 r-----
937.9
Domain-e64b12a0-0493-44d7-afde-55c776513426 21 384 1
----c- 14.3
Domain-e64b12a0-0493-44d7-afde-55c776513426 22 384 1
r----- 7.3
Patch xend_rename-restart.diff fixes this problem and is rather
straight-forward I believe. With both patches the expected behavior is
observed:
jfehlig4: # xm li
Name ID Mem VCPUs State
Time(s)
Domain-0 0 1233 4 r-----
1002.4
Domain-84e3e790-83bc-d6de-6638-5321916adaee 24 384 1
----c- 13.9
sles10_64 25 384 1
-b---- 17.0
If there are no objections the the crashed power state notion I will
compete the patch and resubmit both.
BTW, I''m making progress on the xenstore leak but all of these other
bugs keep getting in the way :-).
Cheers,
Jim
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel