Openstack Newton Glance Error during db_sync - openstack

During the initial configuration of Glance, while running:
su -s /bin/sh -c "glance-manage db_sync" glance`
I get the following error:
2017-07-18 12:14:04.381 14001 INFO glance.db.sqlalchemy.migrate_repo.schema [-] creating table image_members
2017-07-18 12:14:05.095 14001 INFO migrate.versioning.api [-] done
2017-07-18 12:14:05.095 14001 INFO migrate.versioning.api [-] 8 -> 9...
2017-07-18 12:14:05.819 14001 INFO migrate.versioning.api [-] done
2017-07-18 12:14:05.820 14001 INFO migrate.versioning.api [-] 9 -> 10...
2017-07-18 12:14:05.861 14001 INFO migrate.versioning.api [-] done
2017-07-18 12:14:05.861 14001 INFO migrate.versioning.api [-] 10 -> 11...
2017-07-18 12:14:06.494 14001 INFO migrate.versioning.api [-] done
2017-07-18 12:14:06.494 14001 INFO migrate.versioning.api [-] 11 -> 12...
2017-07-18 12:14:06.604 14001 CRITICAL glance [-] ArgumentError: Column type VARCHAR(36) on column 'images.id' is not compatible with autoincrement=True
Is anyone able to help me out with this?

Edit: please upgrade sqlalchemy-migrate to 0.11.0 to resolve this issue.
Credit goes to Mike Bayer.
====
I just met exactly the same bug.
It turns out downgrading SQLAlchemy from 1.1 to 1.0 solves the issue.
After you do sudo pip uninstall sqlalchemy && sudo pip install sqlalchemy==1.0
Just run sudo dpkg-reconfigure glance-common
to reconfigure the glance upgrading script.
I submitted a bug on glance bug tracker here:
https://bugs.launchpad.net/glance/+bug/1723097
And an email in SQLAlchemy mailing list:
https://groups.google.com/forum/#!topic/sqlalchemy/xoBcc6UnpWo

Related

Errors when checking status of just installed MariaDB 10.3 database

I have just installed MariaDB 10.3 database server in Centos 7.
All went well, but when executing "systemctl status mariadb" command. This is the full output:
root#vps [/etc/init.d]# systemctl status mariadb
● mariadb.service - MariaDB 10.3.13 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: active (running) since Sun 2019-02-24 22:34:04 -03; 40min ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Main PID: 12247 (mysqld)
Status: "Taking your SQL requests now..."
CGroup: /system.slice/mariadb.service
└─12247 /usr/sbin/mysqld
Feb 24 22:46:39 vps.desytec.com mysqld[12247]: 2019-02-24 22:46:39 32 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch..._upgrade
Feb 24 22:46:39 vps.desytec.com mysqld[12247]: 2019-02-24 22:46:39 32 [ERROR] InnoDB: Column last_update in table `mysql`.`innodb_table_st...smatch).
Feb 24 22:46:39 vps.desytec.com mysqld[12247]: 2019-02-24 22:46:39 32 [ERROR] InnoDB: Fetch of persistent statistics requested for table `...instead.
Feb 24 22:46:40 vps.desytec.com mysqld[12247]: 2019-02-24 22:46:40 37 [ERROR] Column count of mysql.proc is wrong. Expected 21, found 20. ...is error
Feb 24 22:46:40 vps.desytec.com mysqld[12247]: 2019-02-24 22:46:40 37 [ERROR] Incorrect definition of table mysql.event: expected column '...TE','POS
Feb 24 22:46:41 vps.desytec.com mysqld[12247]: 2019-02-24 22:46:41 45 [ERROR] Incorrect definition of table mysql.event: expected column '...TE','POS
Feb 24 22:49:43 vps.desytec.com mysqld[12247]: 2019-02-24 22:49:43 47 [Warning] Access denied for user 'admin'#'localhost' (using password: YES)
Feb 24 22:49:43 vps.desytec.com mysqld[12247]: 2019-02-24 22:49:43 48 [Warning] Access denied for user 'admin'#'localhost' (using password: YES)
Feb 24 22:49:57 vps.desytec.com mysqld[12247]: 2019-02-24 22:49:57 55 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch..._upgrade
Feb 24 22:49:57 vps.desytec.com mysqld[12247]: 2019-02-24 22:49:57 55 [ERROR] InnoDB: Column last_update in table `mysql`.`innodb_table_st...smatch).
Hint: Some lines were ellipsized, use -l to show in full.
Database is up, however, I want to solve the errors there. For example, problems with missing columns in tables or the access to admin#localhost user.
To try to solve the admin user problem, I have created that user and grant all privileges, but it is still showing that error.
Any help will be appreciated.
Looks as if there was a previous install already, running the mysql_upgrade tool should fix the system tables and bring them to the right structure for the version you have installed now.
https://mariadb.com/kb/en/library/mysql_upgrade/

Could not find a version that satisfies the requirement pbr!=2.1.0,>=2.0.0 (from tempest==16.0.1.dev178)

I just followed the openstack rally quick start guide to create a tempest verifier with Rally v0.9.1 in an Openstack Ocata/stable deployment. The command failed:
(rally-15.1.2) root#infra1-utility-container-f31faeb0:~/.rally/verification# rally verify create-verifier --type tempest --name tempest-verifier
2017-05-21 07:53:13.410 11422 INFO rally.api [-] Creating verifier 'tempest-verifier'.
2017-05-21 07:53:13.528 11422 INFO rally.verification.manager [-] Cloning verifier repo from https://git.openstack.org/openstack/tempest.
2017-05-21 07:53:37.174 11422 INFO rally.verification.manager [-] Creating virtual environment. It may take a few minutes.
2017-05-21 07:53:42.323 11422 ERROR rally.verification.utils [-] Failed cmd: '['pip', 'install', '-e', './']'
2017-05-21 07:53:42.324 11422 ERROR rally.verification.utils [-] Error output: 'Obtaining file:///root/.rally/verification/verifier-091a49ab-1241-40a3-bc9b-531d7f091e37/repo
Collecting pbr!=2.1.0,>=2.0.0 (from tempest==16.0.1.dev178)
Could not find a version that satisfies the requirement pbr!=2.1.0,>=2.0.0 (from tempest==16.0.1.dev178) (from versions: 1.10.0)
No matching distribution found for pbr!=2.1.0,>=2.0.0 (from tempest==16.0.1.dev178)
'
Command failed, please check log for more info
As the current version of pbr is 2.0.0, I'm not sure why pbr installation failed.
(rally-15.1.2) root#infra1-utility-container-f31faeb0:~/.rally/verification# pip freeze|grep pbr
pbr==2.0.0
The question is how to adjust the requirement checking for pbr? or is it possible to choose an older version of tempest?
Thanks.
It solved.
After uploading the two missing python packages: os_testr-0.8.2-py2-none-any.whl and testrepository-0.0.19.tar.gz into local repo, which is a lxc container had been created by openstack-ansible, the Tempest plugin was finally installed.

Creating glance image 403 forbidden access

I am trying to create an image on my openstack installation with this commande :glance image-create --name "cirros-0.3.3-x86_64" --disk-format qcow2 --container-format bare -is-public true --progress <cirros-0.3.3-x86_64-disk.img
but I am getting an error message in html :
<html><head><title>403 forbidden access</title>...
I have check my log file registry log file i have found this :
2015-01-20 17:52:08.794 2579 INFO glance.wsgi.server [-] Removing dead child 2585
2015-01-20 17:52:08.796 2579 INFO glance.wsgi.server [-] Started child 2671
2015-01-20 17:52:08.797 2579 DEBUG glance.wsgi.server [-] Exited wait_on_children /usr/lib/python2.7/dist-packages/glance/common/wsgi.py:300
2015-01-20 17:52:08.802 2671 INFO glance.wsgi.server [-] (2671) wsgi starting up on http://0.0.0.0:9292/
2015-01-20 17:52:08.803 2671 INFO glance.wsgi.server [-] Child 2671 exiting normally
2015-01-20 17:52:09.149 2673 ERROR glance_store._drivers.filesystem [-] Specify either 'filesystem_store_datadir' or 'filesystem_store_datadirs' option
2015-01-20 17:52:09.150 2673 WARNING glance_store.driver [-] Failed to configure store correctly: None Disabling add method.
2015-01-20 17:52:09.150 2673 ERROR glance_store._drivers.filesystem [-] Specify either 'filesystem_store_datadir' or 'filesystem_store_datadirs' option
2015-01-20 17:52:09.151 2673 WARNING glance_store.driver [-] Failed to configure store correctly: None Disabling add method.
2015-01-20 18:07:52.719 2931 ERROR glance_store._drivers.filesystem [-] Specify either 'filesystem_store_datadir' or 'filesystem_store_datadirs' option
2015-01-20 18:07:52.720 2931 WARNING glance_store.driver [-] Failed to configure store correctly: None Disabling add method.
2015-01-20 18:07:52.720 2931 ERROR glance_store._drivers.filesystem [-] Specify either 'filesystem_store_datadir' or 'filesystem_store_datadirs' option
2015-01-20 18:07:52.721 2931 WARNING glance_store.driver [-] Failed to configure store correctly: None Disabling add method.
I have already set the filesystem_store_datadir in the config files but I don't understand why it keep showing me this error ?
And sorry for my bad english :)
I suggest you should remove "-is-public true" from your command line for check your account policy.
check file: /etc/glance/glance-registry.conf
and make sure you have set:
[paste_deploy]
flavor = keystone

Maria DB not starting. Job for mariadb.service failed. See 'systemctl status mariadb.service' and 'journalctl -xn' for details

I am trying to install maria db and getting the following issue.
[root#localhost ~]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
Job for mariadb.service failed. See 'systemctl status mariadb.service' and 'journalctl -xn' for details.
I tried 'systemctl status mariadb.service' and 'journalctl -xn' and follows the details.
[root#localhost ~]# systemctl status mariadb.service
mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
Active: failed (Result: exit-code) since Sun 2014-09-21 17:19:44 IST; 23s ago
Process: 2712 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)
Process: 2711 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
Process: 2683 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 2711 (code=exited, status=0/SUCCESS)
Sep 21 17:19:42 localhost.localdomain mysqld_safe[2711]: 140921 17:19:42 mysqld_safe Logging to '/var/lib/mysql/localhost.localdomain.err'.
Sep 21 17:19:42 localhost.localdomain mysqld_safe[2711]: 140921 17:19:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Sep 21 17:19:43 localhost.localdomain mysqld_safe[2711]: 140921 17:19:43 mysqld_safe mysqld from pid file /var/lib/mysql/localhost.localdoma...d ended
Sep 21 17:19:44 localhost.localdomain systemd[1]: mariadb.service: control process exited, code=exited status=1
Sep 21 17:19:44 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
Sep 21 17:19:44 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state.
[root#localhost ~]# journalctl -xn
-- Logs begin at Sun 2014-09-21 02:33:29 IST, end at Sun 2014-09-21 17:20:11 IST. --
Sep 21 17:16:26 localhost.localdomain systemd[1]: Started dnf makecache.
-- Subject: Unit dnf-makecache.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit dnf-makecache.service has finished starting up.
--
-- The start-up result is done.
Sep 21 17:18:11 localhost.localdomain NetworkManager[683]: <warn> nl_recvmsgs() error: (-33) Dump inconsistency detected, interrupted
Sep 21 17:19:42 localhost.localdomain systemd[1]: Starting MariaDB database server...
-- Subject: Unit mariadb.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mariadb.service has begun starting up.
Sep 21 17:19:42 localhost.localdomain mysqld_safe[2711]: 140921 17:19:42 mysqld_safe Logging to '/var/lib/mysql/localhost.localdomain.err'.
Sep 21 17:19:42 localhost.localdomain mysqld_safe[2711]: 140921 17:19:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Sep 21 17:19:43 localhost.localdomain mysqld_safe[2711]: 140921 17:19:43 mysqld_safe mysqld from pid file /var/lib/mysql/localhost.localdomain.pid end
Sep 21 17:19:44 localhost.localdomain systemd[1]: mariadb.service: control process exited, code=exited status=1
Sep 21 17:19:44 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mariadb.service has failed.
--
-- The result is failed.
Sep 21 17:19:44 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state.
Sep 21 17:20:11 localhost.localdomain NetworkManager[683]: <warn> nl_recvmsgs() error: (-33) Dump inconsistency detected, interrupted
Can any one please help?
I have tried uninstalling and installing many a times but received the same error.
Thanks in advance.
Most of the time if the system journal (journalctl) doesn't show what the problem was, the MariaDB error log (located in /var/lib/mysql/localhost.localdomain.err) does. Looking into that file you usually see what the problem is.
Most commonly errors that do not disappear after a reinstallation mean that your data directory (by default /var/lib/mysql/) is corrupted and the database needs to be reinstalled with mysql_install_db. To make sure you do a clean installation, remove all files located in the data directory and then run sudo mysql_install_db --user=mysql.
I solved as follows:
After installing
Run: > mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/
Then: > mysql_secure_installation
And then: systemctl start mariadb
with this this, I can resolved.
A quick update for anyone coming here through a Web search.
I had a "failed to start" message following a Debian 9 -> Debian 10 (Buster) in-place server upgrade, and after a bit of digging I found that the following line in /etc/mysql/my.cnf needed updating:
From:
[mysqld]
: (other stuff)
:
innodb_large_prefix
To:
[mysqld]
: (other stuff)
:
innodb_large_prefix = "ON"
The clue was the following lines in /var/log/mysql/error.log
2020-06-06 16:41:24 0 [ERROR] /usr/sbin/mysqld: option '--innodb-large-prefix' requires an argument
2020-06-06 16:41:24 0 [ERROR] Parsing options for plugin 'InnoDB' failed.
Not sure about your case, But u can check if mariadb/mysql client is deleted accidentally,
Since in my case, I had deleted the mariadb client repo from shared file,So reinstalled the client as,
sudo apt-get install libmariadb-dev
Note: But before installing client do one thing, for rails app just change the mysql version in gemfile and try to install as bundle install mysql2, If its mariadb client issue then it will throw error mentioning that need to install mariadb client or mysql2 client as,
sudo apt-get install libmariadb-dev
OR
sudo apt-get install libmysqlclient-dev
Please refer other answers in case its not mariadb client issue 😊 😜
This is the optimal solution for this problem:
netstat -tulpn | grep LISTEN
Now we need to look for mysqld service.
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 32029/mysqld
now kill the process in my case it is (32029).
kill 32029
Now use systemctl start mariadb.service

Openstack nova list create problems

I am using Ubuntu 13.10 Saucy server and installed All openstack components, I succesfully did glance image-list, But when i tried to do nova list i got following error:
Error: HTTPConnectionPool(host='192.168.0.2',port=8774): Max retries exceeded with url: /v2/2344gh34gh234g34hj34g3j4gh34jgh34jgh34jg/servers/detail (caused by <class 'socket.error'>: [Errno 111] Connection refused)
Here is my /var/nova/nova-api.log
2014-01-20 10:43:20.867 19646 INFO nova.wsgi [-] Stopping WSGI server
2014-01-20 10:43:20.867 20051 INFO nova.openstack.common.service [-] Caught SIGHERM stopping children
2014-01-20 10:43:20.867 19275 INFO nova.openstack.common.service [-] Child 20052 exited with status 1
You have to make sure the nova services are running, that could be the problem.
You should have running these services:
sergio#cachiovm:/opt/stack/nova$ ps -ef | grep nova
root 4217 3217 0 10:44 pts/10 00:00:00 sg libvirtd /usr/local/bin/nova-compute --config-file /etc/nova/nova.conf
sergio 4223 3236 0 10:44 pts/12 00:00:13 /usr/bin/python /usr/local/bin/nova-cert --config-file /etc/nova/nova.conf
sergio 4227 3273 0 10:44 pts/16 00:00:00 /usr/bin/python /usr/local/bin/nova-xvpvncproxy --config-file /etc/nova/nova.conf
sergio 4231 3266 0 10:44 pts/15 00:00:07 /usr/bin/python /usr/local/bin/nova-novncproxy --config-file /etc/nova/nova.conf --web /opt/stack/noVNC
sergio 4236 3238 0 10:44 pts/13 00:00:15 /usr/bin/python /usr/local/bin/nova-network --config-file /etc/nova/nova.conf
sergio 4239 3264 0 10:44 pts/14 00:00:15 /usr/bin/python /usr/local/bin/nova-scheduler --config-file /etc/nova/nova.conf
sergio 4241 3307 0 10:44 pts/18 00:00:00 /usr/bin/python /usr/local/bin/nova-objectstore --config-file /etc/nova/nova.conf
sergio 4242 4217 0 10:44 pts/10 00:00:59 /usr/bin/python /usr/local/bin/nova-compute --config-file /etc/nova/nova.conf
sergio 4245 3301 0 10:44 pts/17 00:00:13 /usr/bin/python /usr/local/bin/nova-consoleauth --config-file /etc/nova/nova.conf
sergio 4246 3219 0 10:44 pts/11 00:01:26 /usr/bin/python /usr/local/bin/nova-conductor --config-file /etc/nova/nova.conf
Make sure you have the "nova-api" package installed.
I was following the install instructions and somehow I ended up with an /etc/init/nova-api.conf file but somewhere along the line nova-api was removed and it led to this useless error.
The bottom line: UPSTART SUCKS -- it really should report this kind of problem. But error handling was never its strong suit.
Start nova API in debug mode and you can see the actual error.
nova-api --debug
In my case the error was
CRITICAL nova [-] RequiredOptError: value required for option: lock_path
I have checked lock_path param in /etc/nova/nova.conf . it was not configured under [DEFAULT]. I have moved lock_path to [DEFAULT] . Then I started nova-api and worked for me.
Ok, in my case, while I am trying this on Ubuntu 14.04 and Juno on the below command I would get the status as below and the logs were frozen.
service nova-api start
nova-api stop/waiting
For some strange reason nova-api had gone missing, reinstalling it fixed the problem.

Resources