Nova-manage can't sync DB
I am trying to set up an two node openstack, on fresh ubuntu 12.04 installations.
As beginner following strictly the guide at http://
only replacing the ip's from the both nodes.
The controller/
the compute-node (cn01, 192.168.80.152) throws some errors during setup of nova....
After configuration holding tight to the guide (see at the bottom),
first errors (my fix-intentions and following error further down the page) appeared,
while trying to "nova-manage db sync":
"""""" error #1 """""""""
root@cn01:~# nova-manage db sync
2013-06-18 15:30:31 DEBUG nova.utils [-] backend <module 'nova.db.
Command failed, please check log for more info
2013-06-18 15:30:31 CRITICAL nova [-] <VerNum(161)>
2013-06-18 15:30:31 TRACE nova Traceback (most recent call last):
2013-06-18 15:30:31 TRACE nova File "/usr/bin/
2013-06-18 15:30:31 TRACE nova main()
2013-06-18 15:30:31 TRACE nova File "/usr/bin/
2013-06-18 15:30:31 TRACE nova fn(*fn_args, **fn_kwargs)
2013-06-18 15:30:31 TRACE nova File "/usr/bin/
2013-06-18 15:30:31 TRACE nova return migration.
2013-06-18 15:30:31 TRACE nova File "/usr/lib/
2013-06-18 15:30:31 TRACE nova return IMPL.db_
2013-06-18 15:30:31 TRACE nova File "/usr/lib/
2013-06-18 15:30:31 TRACE nova versioning_
2013-06-18 15:30:31 TRACE nova File "/usr/lib/
2013-06-18 15:30:31 TRACE nova return _migrate(url, repository, version, upgrade=True, err=err, **opts)
2013-06-18 15:30:31 TRACE nova File "<string>", line 2, in _migrate
2013-06-18 15:30:31 TRACE nova File "/usr/lib/
2013-06-18 15:30:31 TRACE nova return f(*a, **kw)
2013-06-18 15:30:31 TRACE nova File "/usr/lib/
2013-06-18 15:30:31 TRACE nova changeset = schema.
2013-06-18 15:30:31 TRACE nova File "/usr/lib/
2013-06-18 15:30:31 TRACE nova changeset = self.repository
2013-06-18 15:30:31 TRACE nova File "/usr/lib/
2013-06-18 15:30:31 TRACE nova changes = [self.version(
2013-06-18 15:30:31 TRACE nova File "/usr/lib/
2013-06-18 15:30:31 TRACE nova return self.versions.
2013-06-18 15:30:31 TRACE nova File "/usr/lib/
2013-06-18 15:30:31 TRACE nova return self.versions[
2013-06-18 15:30:31 TRACE nova KeyError: <VerNum(161)>
2013-06-18 15:30:31 TRACE nova
"""""
I searched all support platforms for my error lines, tried some other configurations, without succes, setting them back. After some further browsing here (particularly here: /nova/+
"""""""
# apt-get install python-pip
root@cn01:~# pip install sqlalchemy-migrate
Requirement already satisfied (use --upgrade to upgrade): sqlalchemy-migrate in /usr/local/
Requirement already satisfied (use --upgrade to upgrade): SQLAlchemy>=0.6 in /usr/local/
Requirement already satisfied (use --upgrade to upgrade): decorator in /usr/local/
Requirement already satisfied (use --upgrade to upgrade): Tempita>=0.4 in /usr/local/
Requirement already satisfied (use --upgrade to upgrade): distribute in /usr/local/
Cleaning up...
root@cn01:~# pip install sqlalchemy-migrate --upgrade
Downloading/
Downloading sqlalchemy-
Running setup.py egg_info for package sqlalchemy-migrate
warning: no files found matching '*' under directory 'tests'
warning: no previously-included files matching '*pyc' found anywhere in distribution
warning: no previously-included files found matching '.hgtags'
warning: no previously-included files matching '*' found under directory 'docs/_build'
Downloading/
Downloading SQLAlchemy-
Running setup.py egg_info for package SQLAlchemy
warning: no files found matching '*.jpg' under directory 'doc'
no previously-included directories found matching 'doc/build/output'
Downloading/
Downloading decorator-
Running setup.py egg_info for package decorator
warning: no previously-included files found matching 'Makefile'
Downloading/
Downloading Tempita-
Running setup.py egg_info for package Tempita
Downloading/
Downloading distribute-
Running setup.py egg_info for package distribute
Installing collected packages: sqlalchemy-migrate, SQLAlchemy, decorator, Tempita, distribute
Found existing installation: sqlalchemy-migrate 0.7.2
Uninstalling sqlalchemy-migrate:
Successfully uninstalled sqlalchemy-migrate
Running setup.py install for sqlalchemy-migrate
warning: no files found matching '*' under directory 'tests'
warning: no previously-included files matching '*pyc' found anywhere in distribution
warning: no previously-included files found matching '.hgtags'
warning: no previously-included files matching '*' found under directory 'docs/_build'
Installing migrate script to /usr/local/bin
Installing migrate-repository script to /usr/local/bin
Found existing installation: SQLAlchemy 0.8.1
Uninstalling SQLAlchemy:
Successfully uninstalled SQLAlchemy
Running setup.py install for SQLAlchemy
building 'sqlalchemy.
gcc -pthread -fno-strict-
lib/
Kompilierung beendet.
***
command 'gcc' failed with exit status 1
WARNING: The C extension could not be compiled, speedups are not enabled.
Failure information, if any, is above.
Retrying the build without the C extension now.
***
warning: no files found matching '*.jpg' under directory 'doc'
no previously-included directories found matching 'doc/build/output'
***
WARNING: The C extension could not be compiled, speedups are not enabled.
Plain-Python build succeeded.
***
Found existing installation: decorator 3.4.0
Uninstalling decorator:
Successfully uninstalled decorator
Running setup.py install for decorator
warning: no previously-included files found matching 'Makefile'
Found existing installation: Tempita 0.5.1
Uninstalling Tempita:
Successfully uninstalled Tempita
Running setup.py install for Tempita
Found existing installation: distribute 0.6.45
Uninstalling distribute:
Successfully uninstalled distribute
Running setup.py install for distribute
Before install bootstrap.
Scanning installed packages
Setuptools installation detected at /usr/local/
Non-egg installation
Moving elements out of the way...
Already patched.
/usr/
Installing easy_install script to /usr/local/bin
Installing easy_install-2.7 script to /usr/local/bin
After install bootstrap.
/usr/
Successfully installed sqlalchemy-migrate SQLAlchemy decorator Tempita distribute
Cleaning up...
"""""""
So there were some error while compiling (PYthon.h not found), now I am not sure, what's up with sqlalchemy-
Trying another db sync give's a new error:
"""""""""error 2""""""
root@cn01:
Command failed, please check log for more info
2013-06-18 16:28:42 CRITICAL nova [-] cannot import name exceptions
2013-06-18 16:28:42 TRACE nova Traceback (most recent call last):
2013-06-18 16:28:42 TRACE nova File "/usr/bin/
2013-06-18 16:28:42 TRACE nova main()
2013-06-18 16:28:42 TRACE nova File "/usr/bin/
2013-06-18 16:28:42 TRACE nova fn(*fn_args, **fn_kwargs)
2013-06-18 16:28:42 TRACE nova File "/usr/bin/
2013-06-18 16:28:42 TRACE nova return migration.
2013-06-18 16:28:42 TRACE nova File "/usr/lib/
2013-06-18 16:28:42 TRACE nova return IMPL.db_
2013-06-18 16:28:42 TRACE nova File "/usr/lib/
2013-06-18 16:28:42 TRACE nova backend = self.__
2013-06-18 16:28:42 TRACE nova File "/usr/lib/
2013-06-18 16:28:42 TRACE nova self.__backend = __import__(name, None, None, fromlist)
2013-06-18 16:28:42 TRACE nova File "/usr/lib/
2013-06-18 16:28:42 TRACE nova from migrate.versioning import api as versioning_api
2013-06-18 16:28:42 TRACE nova File "/usr/local/
2013-06-18 16:28:42 TRACE nova from migrate.versioning import (repository, schema, version,
2013-06-18 16:28:42 TRACE nova File "/usr/local/
2013-06-18 16:28:42 TRACE nova from sqlalchemy import exceptions as sa_exceptions
2013-06-18 16:28:42 TRACE nova ImportError: cannot import name exceptions
2013-06-18 16:28:42 TRACE nova
"""""""
I read some older posts about issues about different migrate versions... but I am not sure if it's still a problem.
So, right now, I don't know what to do anymore, maybe some kind & wise men is crazy enough to read all this and may help me along in any little way?
At the bottom I added some further information related to my problem. If I can give you more detailed infos/logs, please give me me a hint :)
Thank you thousand times in advance,
Daniel
---
Post scriptum:
#This is what I did on a fresh Ubuntu:
apt-get install vlan bridge-utils
echo "net.ipv4.
service procps start
sysctl -p
apt-get install -y kvm libvirt-bin pm-utils
vi /etc/libvirt/
cgroup_
"/dev/null", "/dev/full", "/dev/zero",
"/dev/random", "/dev/urandom",
"/dev/ptmx", "/dev/kvm", "/dev/kqemu",
"/dev/rtc", "/dev/hpet", "/dev/net/tun"
]
virsh net-destroy default
virsh net-undefine default
vi /etc/libvirt/
listen_tls = 0
listen_tcp = 1
auth_tcp = "none"
vi /etc/init/
env libvirtd_opts="-d -l"
vi /etc/default/
libvirtd_
service libvirt-bin restart
apt-get install nova-network bridge-utils
vi /etc/network/
auto lo
iface lo inet loopback
# The primary network interface
auto br100
iface br100 inet static
address 192.168.80.152
netmask 255.255.255.0
network 192.168.80.0
broadcast 192.168.80.255
gateway 192.168.80.254
# dns-* options are implemented by the resolvconf package, if installed
dns-
dns-search mtv.nimbula.org
bridge_ports eth0
bridge_stp off
bridge_maxwait 0
bridge_fd 0
brctl addbr br100; /etc/init.
""""
root@cn01:~# ifconfig
br100 Link encap:Ethernet Hardware Adresse b8:ac:6f:14:ff:aa
inet Adresse:
inet6-
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
RX packets:93 errors:0 dropped:0 overruns:0 frame:0
TX packets:67 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschla
RX-Bytes:6046 (6.0 KB) TX-Bytes:6302 (6.3 KB)
eth0 Link encap:Ethernet Hardware Adresse b8:ac:6f:14:ff:aa
UP BROADCAST RUNNING MULTICAST MTU:1500 Metrik:1
RX packets:90 errors:0 dropped:0 overruns:0 frame:0
TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:2 Sendewarteschla
RX-Bytes:7268 (7.2 KB) TX-Bytes:5914 (5.9 KB)
Interrupt:36 Speicher:
eth1 Link encap:Ethernet Hardware Adresse b8:ac:6f:14:ff:ac
inet Adresse:10.10.20.1 Bcast:10.10.20.255 Maske:255.255.255.0
"""""
apt-get install nova-api-metadata nova-compute-kvm
vi /etc/nova/
[filter:
paste.
auth_host = 192.168.80.151
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = nova
admin_password = service_pass
signing_dirname = /tmp/keystone-
vi /etc/nova/
[DEFAULT]
libvirt_type=kvm
vi /etc/nova/nova.conf
[DEFAULT]
logdir=
state_
lock_
verbose=True
api_paste_
scheduler_
s3_host=
ec2_host=
ec2_dmz_
rabbit_
cc_host=
metadata_
metadata_
nova_url=http://
sql_connectio
ec2_url=http://
root_helper=sudo nova-rootwrap /etc/nova/
# Auth
use_deprecate
auth_
keystone_ec2_url=http://
# Imaging service
glance_
image_
# Vnc configuration
novnc_
novncproxy_
novncproxy_
vncserver_
vncserver_
# NETWORK
network_
force_
dhcpbridge=
dhcpbridge_
firewall_
# Change my_ip to match each host
my_ip=
public_
vlan_
flat_
flat_
#Note the different pool, this will be used for instance range
fixed_
# Compute #
compute_
# Cinder #
volume_
osapi_
nova-manage db sync
>> and here started my problems, the first pasted error.
PS:
i tried alread "nova-manage --flagfile=
PPS:
apt-get install -y ubuntu-
echo deb http://
apt-get update -y
apt-get upgrade -y
apt-get dist-upgrade -y
apt-get install -y ntp
sed -i 's/server ntp.ubuntu.
service ntp restart
apt-get install -y vlan bridge-utils
sed -i 's/#net.
sysctl net.ipv4.
# i first followed an multiple-
apt-get install -y openvswitch-switch openvswitch-
#br-int will be used for VM integration
ovs-vsctl add-br br-int
apt-get -y install quantum-
""" shell log:
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut
Statusinformat
quantum-
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
2 nicht vollständig installiert oder entfernt.
Nach dieser Operation werden 0 B Plattenplatz zusätzlich benutzt.
quantum-common (2012.1-0ubuntu4) wird eingerichtet ...
chown: Zugriff auf »/etc/quantum/“ nicht möglich: Datei oder Verzeichnis nicht gefunden
dpkg: Fehler beim Bearbeiten von quantum-common (--configure):
Unterprozess installiertes post-installati
dpkg: Abhängigkeitspr
quantum-
Paket quantum-common ist noch nicht konfiguriert.
dpkg: Fehler beim Bearbeiten von quantum-
Abhängigkeits
Es wurde kein Apport-Bericht verfasst, da die Fehlermeldung darauf hindeutet, dass dies lediglich ein Folgefehler eines vorherigen Problems ist.
Fehler traten auf beim Bearbeiten von:
quantum-common
quantum-
E: Sub-process /usr/bin/dpkg returned an error code (1)
"""""
# so the installation failed by quantum-common cause missing access, and i stopped this way... source of error?:-/ and I switched to: http://
###
PPPS: other "nova-manage"
"""""""
root@cn01:
2013-06-18 16:56:45 DEBUG nova.utils [req-d7595500-
Command failed, please check log for more info
2013-06-18 16:56:45 CRITICAL nova [req-d7595500-
2013-06-18 16:56:45 TRACE nova Traceback (most recent call last):
2013-06-18 16:56:45 TRACE nova File "/usr/bin/
2013-06-18 16:56:45 TRACE nova main()
2013-06-18 16:56:45 TRACE nova File "/usr/bin/
2013-06-18 16:56:45 TRACE nova fn(*fn_args, **fn_kwargs)
2013-06-18 16:56:45 TRACE nova File "/usr/bin/
2013-06-18 16:56:45 TRACE nova services = db.service_
2013-06-18 16:56:45 TRACE nova File "/usr/lib/
2013-06-18 16:56:45 TRACE nova return IMPL.service_
2013-06-18 16:56:45 TRACE nova File "/usr/lib/
2013-06-18 16:56:45 TRACE nova return f(*args, **kwargs)
2013-06-18 16:56:45 TRACE nova File "/usr/lib/
2013-06-18 16:56:45 TRACE nova return query.all()
2013-06-18 16:56:45 TRACE nova File "/usr/local/
2013-06-18 16:56:45 TRACE nova return list(self)
2013-06-18 16:56:45 TRACE nova File "/usr/local/
2013-06-18 16:56:45 TRACE nova return self._execute_
2013-06-18 16:56:45 TRACE nova File "/usr/local/
2013-06-18 16:56:45 TRACE nova result = conn.execute(
2013-06-18 16:56:45 TRACE nova File "/usr/local/
2013-06-18 16:56:45 TRACE nova params)
2013-06-18 16:56:45 TRACE nova File "/usr/local/
2013-06-18 16:56:45 TRACE nova compiled_sql, distilled_params
2013-06-18 16:56:45 TRACE nova File "/usr/local/
2013-06-18 16:56:45 TRACE nova context)
2013-06-18 16:56:45 TRACE nova File "/usr/local/
2013-06-18 16:56:45 TRACE nova exc_info
2013-06-18 16:56:45 TRACE nova File "/usr/local/
2013-06-18 16:56:45 TRACE nova reraise(
2013-06-18 16:56:45 TRACE nova File "/usr/local/
2013-06-18 16:56:45 TRACE nova context)
2013-06-18 16:56:45 TRACE nova File "/usr/local/
2013-06-18 16:56:45 TRACE nova cursor.
2013-06-18 16:56:45 TRACE nova File "/usr/lib/
2013-06-18 16:56:45 TRACE nova self.errorhandl
2013-06-18 16:56:45 TRACE nova File "/usr/lib/
2013-06-18 16:56:45 TRACE nova raise errorclass, errorvalue
2013-06-18 16:56:45 TRACE nova OperationalError: (OperationalError) (1054, "Unknown column 'services.
2013-06-18 16:56:45 TRACE nova
"""""""
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Liyingjun
- Solved:
- Last query:
- Last reply: