kimchi-project / kimchi

An HTML5 management interface for KVM guests
https://github.com/kimchi-project/kimchi/releases/latest
Other
3.12k stars 364 forks source link

Kimchi Failed to import after patching templates.py #1240

Open randomperson4474 opened 6 years ago

randomperson4474 commented 6 years ago

I have Kimchi installed on Ubuntu 18.04 and was having problem creating templates, found issue #1157 and patched the templates.py file. after a restart Kimchi will not load, it appears in woks plugins page but no virtualization tab is available. I checked the logs and this is what i found

Failed to import plugin plugins.kimchi.Kimchi, error: Class plugins.kimchi.Kimchi can not be imported, error: cannot import name config [23/Jun/2018:19:03:04] ENGINE Caught signal SIGTERM. [23/Jun/2018:19:03:04] ENGINE Bus STOPPING [23/Jun/2018:19:03:04] ENGINE Caught signal SIGTERM. [23/Jun/2018:19:03:04] ENGINE Bus STOPPING [23/Jun/2018:19:03:04] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('127.0.0.1', 8010)) already shut down [23/Jun/2018:19:03:04] ENGINE Stopped thread 'Session cleanup'. [23/Jun/2018:19:03:04] ENGINE Bus STOPPED [23/Jun/2018:19:03:04] ENGINE Bus EXITING [23/Jun/2018:19:03:04] ENGINE Bus EXITED [23/Jun/2018:19:03:04] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('127.0.0.1', 8010)) shut down [23/Jun/2018:19:03:04] ENGINE No thread running for Session cleanup. [23/Jun/2018:19:03:04] ENGINE Bus STOPPED [23/Jun/2018:19:03:04] ENGINE Bus EXITING [23/Jun/2018:19:03:04] ENGINE Bus EXITED [23/Jun/2018:19:03:04] ENGINE Waiting for child threads to terminate... Push server created on address /run/user/0/woknotifications Failed to import plugin plugins.kimchi.Kimchi, error: [23/Jun/2018:19:04:44] ENGINE Listening for SIGHUP. [23/Jun/2018:19:04:44] ENGINE Listening for SIGTERM. [23/Jun/2018:19:04:44] ENGINE Listening for SIGUSR1. [23/Jun/2018:19:04:44] ENGINE Bus STARTING [23/Jun/2018:19:04:44] ENGINE Serving on http://127.0.0.1:8010 [23/Jun/2018:19:04:44] ENGINE Bus STARTED [23/Jun/2018:19:04:47] ENGINE Started monitor thread 'Session cleanup'. [23/Jun/2018:19:17:13] ENGINE Caught signal SIGTERM. [23/Jun/2018:19:17:13] ENGINE Bus STOPPING [23/Jun/2018:19:17:13] ENGINE Caught signal SIGTERM. [23/Jun/2018:19:17:13] ENGINE Bus STOPPING [23/Jun/2018:19:17:13] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('127.0.0.1', 8010)) already shut down [23/Jun/2018:19:17:13] ENGINE Stopped thread 'Session cleanup'. [23/Jun/2018:19:17:13] ENGINE Bus STOPPED [23/Jun/2018:19:17:13] ENGINE Bus EXITING [23/Jun/2018:19:17:13] ENGINE Bus EXITED [23/Jun/2018:19:17:13] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('127.0.0.1', 8010)) shut down [23/Jun/2018:19:17:13] ENGINE No thread running for Session cleanup. [23/Jun/2018:19:17:13] ENGINE Bus STOPPED [23/Jun/2018:19:17:13] ENGINE Bus EXITING [23/Jun/2018:19:17:13] ENGINE Bus EXITED [23/Jun/2018:19:17:13] ENGINE Waiting for child threads to terminate... Push server created on address /run/user/0/woknotifications Failed to import plugin plugins.kimchi.Kimchi, error: [23/Jun/2018:19:17:14] ENGINE Listening for SIGHUP. [23/Jun/2018:19:17:14] ENGINE Listening for SIGTERM. [23/Jun/2018:19:17:14] ENGINE Listening for SIGUSR1. [23/Jun/2018:19:17:14] ENGINE Bus STARTING [23/Jun/2018:19:17:14] ENGINE Serving on http://127.0.0.1:8010 [23/Jun/2018:19:17:14] ENGINE Bus STARTED

maikgreubel commented 6 years ago

I have got the same issue and tried to narrow down the source of problem. strace of process using follow-forks and log output shows me that the path of the config.py is searched in some strange place:

access("/usr/lib/python2.6/site-packages/wok/../../src/wok/config.py", F_OK) = -1 ENOENT (No such file or directory)

Could this be the problem?

qwick745 commented 5 years ago

I had this exact situation happen to me. I rechecked the edited file and it took me a while to realize I'd left off the final ] bracket on line 102, so the file wasn't parsing correctly. I'd suggest trying to go back and be sure you're 3 edited lines are correct, or just copy each one in to be sure.