openstack new compute node can’t migrate for

update /etc/hosts resolve

restart nova_compute, nova_libvirt container

error log:

Live migration Error : Failed to connect to remote libvirt URI qemu tcp://compute1-VirtualBox/system: Unable to resolve address service '16509': Name or service not known

resolve:

Hmm, that was not fixed because it is docker that manages /etc/hosts. It seems to be copying this on container restart indeed. Interesting. I run my deploy with DNS so never experienced this but this surely looks like an issue to be aware of when users report their problems. We might want to think about a possible workaround. Maybe start mounting /etc/hosts ro in all containers so it follows host's - we don't do docker networking so it does not matter that docker cannot add new entries this way.

link :

https://ask.openstack.org/en/question/79336/live-migration-error-failed-to-connect-to-remote-libvirt-uri-qemu-tcpcompute1-virtualboxsystem-unable-to-resolve-address-service-16509-name-or-service/

https://bugs.launchpad.net/kolla-ansible/+bug/1857245

#!/usr/bin/env python

#!/usr/bin/env python
"""
The first line in this file is the "shebang" line.  When you execute a file 
from the shell, the shell tries to run the file using the command specified 
on the shebang line.  The ! is called the "bang".  The # is not called the
"she", so sometimes the "shebang" line is also called the "hashbang".
The hash character is used because it defines a comment in most scripting
languages, so the shebang line will be ignored by the scripting language
by default.
The shebang line was invented because scripts are not compiled, so they are
not executable files, but people still want to "run" them.  The shebang
line specifies exactly how to run a script.  In other words, this shebang
line says that, when I type in ./basics.py, the shell will actuall run 
  /usr/bin/env python basics.py
We use 
  #!/usr/bin/env python
instead of 
  #!/usr/bin/python
because we must specify an absolute path to a program, and /usr/bin/env 
is a utility that uses the user's path to run an application (in this
case, python).  Thus, it's more portable.

More on shebang lines, including portability: 
http://en.wikipedia.org/wiki/Shebang_(Unix)

If you don't like this basic walk through python, check out 
http://docs.python.org/tutorial/
or
http://diveintopython.org/

In order to execute a python script without explicitly running python,
you need to add execute permissions to the file.  To do add execute permission
to basics.py, use
  chmod u+x basics.py

refer from http://stanford.edu/~jainr/basics.py

openstack instance err:”Exeeded maximum number of retries”

0, the error instance log show:

image.png

1, check the /var/log/nova/nova-compute.log, the log show:

image.png

maybe the device cannot support the kvm or not have the modue

reference from : 

"https://ask.openstack.org/en/question/99882/libvirterror-invalid-argument-could-not-find-capabilities-for-domaintypekvm/"

"https://github.com/minishift/minishift/issues/1630"

2, install the qemu-kvm

image.png

3, restart the nova-compute container 

and relaunch a new instance, it still show the same err:"Exeeded maximum number of retries", but the nova-compute.log show difference, there is no permission access kvm character device

image.png

reference from: "https://serverfault.com/questions/1002043/libvirt-has-no-kvm-capabilities-even-though-qemu-kvm-works"

4, and the change the permission to 666 /dev/kvm

image.png

5, relaunch the instance and it works