Bug 8210 - Should be able to restart a crashed vnc server
Summary: Should be able to restart a crashed vnc server
Status: RESOLVED FIXED
Alias: None
Product: AutoBuilder
Classification: Infrastructure
Component: autobuilder (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.2 M3
Assignee: Bill Randle
QA Contact: Tracy Graydon
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-08-26 11:43 UTC by Ross Burton
Modified: 2016-09-04 15:58 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Burton 2015-08-26 11:43:56 UTC
If the VNC server segfaults the sanity test script can't start a new one because the lock file still exists:

Warning: ubuntu1204:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server ubuntu1204:1
A VNC server is already running as :1

I suggest that if the socket isn't open, the lock file should be deleted before starting the VNC server.

Also the netstat invocation can be improved as netstat -an|grep 5901 will match a unix socket open on /tmp/lolo5901lolol.   netstat -tnl | grep :5901 will have less false positives.
Comment 1 Richard Purdie 2015-09-03 15:46:04 UTC
I'd propose adding a script to the autobuilder somewhere in PATH which handles setting up VNC. The actual tasks can then just call the script to ensure its setup there rather than putting all this logic in the tasks.
Comment 2 Bill Randle 2016-08-17 00:11:07 UTC
Created a script to check for a running vnc server, and if not running cleanup dangling lock files and restart the server. Invoke the script from the various sanity test build steps.

Patch submitted to mailing list.
Comment 3 Bill Randle 2016-09-04 15:58:47 UTC
Patch merged to master by Joshua on 8/31.