Syncing database with Keystone - openstack

I'm learning about OpenStack. I'm at the point where I'm initializing database for Keystone.
I'm asked to run keystone-manage db_sync keystone but for some reason
I'm getting this error:
if int(version) < current_ver:
2019-07-03 13:53:37.688 4262 ERROR keystone ValueError: invalid literal for int() with base 10: 'keystone'
I understand the error I just don't know how to go about fixing it. During initialization of the database the variable version is holding wrong type. It perhaps expects a float for a version but it holds an integer or a string.
What should I try ?
I'm on Ubuntu 18.04

Related

default_time_zone not recognised by MariaDB

I'm trying to set the GLOBAL time of my MariaDB database to UTC. I've followed the recommendations of their official documentation and default_time_zone="+00:00" in the my.cnf file, however it does NOT work and I get the following error when I start it in the shell: mysql: unknown variable 'default_time_zone=+00:00'.
Does anyone have an idea?
Thanks
Remove the quotes
As the error message states command line client (mysql) complains about unknown variable, since default_time_zone is a server but not a client variable. So you added it in wrong section. Move the entry to the server section:
[server]
default_time_zone=+00:00

Flyway 7.7.3 seems to ignore my "callback"

I am upgrading from Flyway 5.4 to 7.7.3 and ran into some issue.
flyway -teams -url=jdbc:oracle:thin:#localhost:1521/XE "-user=xxx as SYSDBA" -password=xxx -table=flyway_schema_history_app -encoding=utf-8 -baselineOnMigrate=true migrate
(I have the teams edition license)
Flyway gives me the following error message:
**
ERROR: Unable to parse statement in /flyway/sql/incremental/Build_302_Baseline/V302_106__fosprd_INSERT_Master_eg_pocqueue.sql at line 117 col 1. See https://flywaydb.org/documentation/knownparserlimitations for more information: No value provided for variable substitution: &R. Check your configuration. If this is not a SQLPLus variable intended to be substituted (eg. in a string literal), then you will need to add SET DEFINE OFF in the script beforehand.
Caused by: No value provided for variable substitution: &R. Check your configuration. If this is not a SQLPLus variable intended to be substituted (eg. in a string literal), then you will need to add SET DEFINE OFF in the script beforehand.
**
This is caused by a special character "&" in the SQL statement, however, I have made sure the SQL file is using UTF-8 encoding as well as Unix return (LF).
Also, I keep my callbacks under:
bash-5.0$ pwd
/flyway/sql/callbacks
bash-5.0$ ls
afterBaseline.sql afterEachUndo.sql afterMigrateError.sql afterUndo.sql beforeEachUndo.sql
afterBaselineError.sql afterEachUndoError.sql afterRepair.sql afterUndoError.sql beforeMigrate.sql
afterEachMigrate.sql afterMigrate.sql afterRepairError.sql beforeEachMigrate.sql beforeUndo.sql
This used to be able to run on 5.4 with no issue. But it's giving me this error on 7.7.3, anyone can point me to the right direction?
Thanks
This is due to the changes between versions of flyway's SQLPlus support and the fat you have a teams license.
As indicated in the message, this is related to SQLPlus's variable substitution:
https://flywaydb.org/documentation/database/oracle#variable-substitution
If you are not using SQLPlus features, you could try disabling them:
https://flywaydb.org/documentation/configuration/parameters/oracleSqlPlus
but the recommended solution is to place SET DEFINE OFF in the SQL script before the offending ampersand (with the option of reverting that afterwards)

Error when launching Kibana : cannot execute binary file - undefined error 0

I'm very new to the ELK stack and was trying to add some security settings (username and password) to access Kibana following the instructions from the link below:
https://www.elastic.co/blog/getting-started-with-elasticsearch-security
At Step 4: Security in Kibana, once the yml file modified, I try to launch Kibana from the terminal with the command ./bin/kibana but it displays the following errors :
./bin/kibana: line 24: /usr/local/var/homebrew/linked/kibana-7.6.2-linux-x86_64/bin/../node/bin/node: cannot execute binary file
./bin/kibana: line 24: /usr/local/var/homebrew/linked/kibana-7.6.2-linux-x86_64/bin/../node/bin/node: Undefined error: 0
I think I've followed all the previous steps carefully and everything else worked so far.
I'm using a Mac and the error seems to be very basic. Any clue?
Thanks for the help.
Looks like you've downloaded the wrong architecture (Linux) of Kibana on your Mac.
This generally happens when the architecture is not compatible with system architecture or running a 64 bits on 32 bits machine.
Simple solution:
Download the mac version of Kibana from here - https://www.elastic.co/downloads/kibana
Once downloaded, run ./bin/kibana in Kibana directory.
This will successfully start local server of Kibana on localhost:5601

Setting up TPM2 in Ubuntu: tpm2-abrmd error "insufficient buffer to get handle"

I am trying to setup an encrypted drive using the TPM2.0 module on a NUC7i5 on a new installation of Ubuntu server 18.04.
I compiled from sources and installed tpm2-tss (1.3.0), tpm2-abrmd (1.2.0) and tpm2-tools (3.0.2), and I tested some of the tpm2_* utilities and they seem to work. I also installed clevis v10.
I generated a secret using tpm2_getrandom 32 -o secret.key, and then tried to encrypt the secret using the TPM using the following command:
cat secret.key | sudo clevis encrypt tpm2 '{"pcr_ids":"7","pcr_bank":"sha256"}' > secret.jwe
When I do that however, I get the following error:
ERROR:
CreatePrimary Failed ! ErrorCode: 0x9a2
ERROR: Unable to run tpm2_createprimary
Creating TPM2 primary key failed!
When checking the status of the tpm2-abrmd service (systemctl status tpm2-abrmd.service), I get this error:
tpm2-abrmd[1308]: tpm2_response_get_handle: insufficient buffer to get handle
I tried different options for the clevis encryption, tried different ways to generate the secret, but I still can't figure out what the issue is.
The TPM module is a SLB9665 from Infineon Technologies.
I tried with and without taking ownership of the TPM, and always with a clear TPM every time.
Has anyone ran into that issue?
So, apparently the issue was that I shouldn't have taken ownership of the TPM.
After resetting the TPM, the clevis command works.

pgpool-II connection pooling - ERROR: "MD5" authentication with pgpool failed

Using the following for just connection pooling no master_slave or replication: rhel 6, postgresql 9.1.9, & pgpool-II 3.1.3 (also tried 3.2.5)
Followed solution suggested in http://www.pgpool.net/pipermail/pgpool-general/2013-May/001773.html
After following the instructions for MD5 I also tried setting both pg_hba.conf and pool_hba.conf to trust for local and subnet, but still get the following error when attempting to connect to the pool locally:
ERROR: "MD5" authentication with pgpool failed for user foo
Tried locally on Fedora 18 with pg9.2 and pgpool from Fedora repo and worked right out of the box.
At the end of all routes suggested everywhere I could find.
Help would be greatly appreciated.
After having hit the same problem the solution was to change ownership of the pool_passwd file to postgres.
Even though this file has a 644 permission, if owner isn't postgres you'll always get the aforementioned error. I guess this file's owner and the user running pgpool must match.
I'm running PosgreSQL 9.2 and pgpool-II 3.3.2, BTW.

Resources