Remove postgresql testing and documentation
Ironic has maintained a CI job for years after postresql support was deprecated in order to prevent unintentional breakage of that support. Now, we have confirmed evidence that other openstack components, such as keystone, required for testing this postgresql support no longer function in this job. As a result, ironic can no longer test postgresql support. Operators utilizing postgresql who have not yet migrated must migrate now. Change-Id: If6e4432b000996789346a1f7449410cfc8497fe1
This commit is contained in:
parent
feb7740009
commit
466cd3902c
@ -53,12 +53,6 @@ libssl-dev [platform:dpkg test]
|
||||
libffi-dev [platform:dpkg test]
|
||||
libffi-devel [platform:rpm test]
|
||||
# these are needed by infra for python-* jobs
|
||||
libpq-dev [platform:dpkg test]
|
||||
libpq-devel [platform:rpm test]
|
||||
postgresql
|
||||
postgresql-client [platform:dpkg]
|
||||
# postgresql-devel [platform:rpm]
|
||||
postgresql-server [platform:rpm]
|
||||
mariadb [platform:rpm]
|
||||
mariadb-server [platform:rpm platform:debian-bookworm]
|
||||
# mariadb-devel [platform:rpm]
|
||||
|
@ -55,10 +55,6 @@ libffi-devel [platform:rpm test]
|
||||
# these are needed by infra for python-* jobs
|
||||
libpq-dev [platform:dpkg test]
|
||||
libpq-devel [platform:rpm test]
|
||||
postgresql
|
||||
postgresql-client [platform:dpkg]
|
||||
# postgresql-devel [platform:rpm]
|
||||
postgresql-server [platform:rpm]
|
||||
mariadb [platform:rpm]
|
||||
mariadb-server [platform:rpm]
|
||||
# mariadb-devel [platform:rpm]
|
||||
|
@ -95,15 +95,15 @@ environment on most current distributions.
|
||||
|
||||
- Ubuntu/Debian::
|
||||
|
||||
sudo apt-get install build-essential python3-dev libssl-dev python3-pip libmysqlclient-dev libxml2-dev libxslt-dev libpq-dev git git-review libffi-dev gettext ipmitool psmisc graphviz libjpeg-dev qemu-utils
|
||||
sudo apt-get install build-essential python3-dev libssl-dev python3-pip libmysqlclient-dev libxml2-dev libxslt-dev git git-review libffi-dev gettext ipmitool psmisc graphviz libjpeg-dev qemu-utils
|
||||
|
||||
- RHEL/CentOS/Fedora::
|
||||
|
||||
sudo dnf install python3-devel openssl-devel python3-pip mysql-devel libxml2-devel libxslt-devel postgresql-devel git git-review libffi-devel gettext ipmitool psmisc graphviz gcc libjpeg-turbo-devel qemu-img
|
||||
sudo dnf install python3-devel openssl-devel python3-pip mysql-devel libxml2-devel libxslt-devel git git-review libffi-devel gettext ipmitool psmisc graphviz gcc libjpeg-turbo-devel qemu-img
|
||||
|
||||
- openSUSE/SLE::
|
||||
|
||||
sudo zypper install git git-review libffi-devel libmysqlclient-devel libopenssl-devel libxml2-devel libxslt-devel postgresql-devel python3-devel python-nose python3-pip gettext-runtime psmisc qemu-img
|
||||
sudo zypper install git git-review libffi-devel libmysqlclient-devel libopenssl-devel libxml2-devel libxslt-devel python3-devel python-nose python3-pip gettext-runtime psmisc qemu-img
|
||||
|
||||
To run the tests locally, it is a requirement that your terminal emulator
|
||||
supports unicode with the ``en_US.UTF8`` locale. If you use locale-gen to
|
||||
|
@ -111,9 +111,3 @@ The description of each jobs that runs in the CI when you submit a patch for
|
||||
* - bifrost-integration-redfish-vmedia-uefi-centos-9
|
||||
- Tests the integration between Ironic and Bifrost using redfish vmedia and
|
||||
a dib image based on centos stream 9.
|
||||
* - ironic-tempest-pxe_ipmitool-postgres
|
||||
- Deploys Ironic in DevStack, configured to use tinyipa ramdisk partition
|
||||
image with ``pxe`` boot and ``ipmi`` driver and postgres instead of mysql.
|
||||
Runs tempest tests that match the regex
|
||||
``ironic_tempest_plugin.tests.scenario``, also deploys 1 virtual
|
||||
baremetal.
|
||||
|
@ -15,23 +15,14 @@
|
||||
# under the License.
|
||||
|
||||
"""
|
||||
Tests for database migrations. There are "opportunistic" tests for both mysql
|
||||
and postgresql in here, which allows testing against these databases in a
|
||||
properly configured unit test environment.
|
||||
Tests for database migrations. There are "opportunistic" tests for mysql in
|
||||
here, which allow testing against a database in a properly configured unit
|
||||
test environment.
|
||||
|
||||
For the opportunistic testing you need to set up a db named 'openstack_citest'
|
||||
with user 'openstack_citest' and password 'openstack_citest' on localhost.
|
||||
The test will then use that db and u/p combo to run the tests.
|
||||
|
||||
For postgres on Ubuntu this can be done with the following commands:
|
||||
|
||||
::
|
||||
|
||||
sudo -u postgres psql
|
||||
postgres=# create user openstack_citest with createdb login password
|
||||
'openstack_citest';
|
||||
postgres=# create database openstack_citest with owner openstack_citest;
|
||||
|
||||
The test will then use that db and u/p combo to run the tests. See
|
||||
tools/test-setup.sh in the root of the repo for a full setup example.
|
||||
"""
|
||||
|
||||
import collections
|
||||
@ -1631,10 +1622,3 @@ class ModelsMigrationsSyncMysql(ModelsMigrationSyncMixin,
|
||||
test_fixtures.OpportunisticDBTestMixin,
|
||||
test_base.BaseTestCase):
|
||||
FIXTURE = test_fixtures.MySQLOpportunisticFixture
|
||||
|
||||
|
||||
class ModelsMigrationsSyncPostgres(ModelsMigrationSyncMixin,
|
||||
test_migrations.ModelsMigrationsSync,
|
||||
test_fixtures.OpportunisticDBTestMixin,
|
||||
test_base.BaseTestCase):
|
||||
FIXTURE = test_fixtures.PostgresqlOpportunisticFixture
|
||||
|
13
releasenotes/notes/postgres-removal-88f8b02dbfc3303c.yaml
Normal file
13
releasenotes/notes/postgres-removal-88f8b02dbfc3303c.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
Deployers using PostgreSQL must migrate to a supported mysql-compatible
|
||||
database, such as MySQL or MariaDB.
|
||||
deprecations:
|
||||
- |
|
||||
Use of postgresql has been deprecated for all OpenStack projects,
|
||||
including ironic, for several years. However, in an effort to avoid
|
||||
breaking existing installs, we had tested database migrations and
|
||||
performed a basic functionality test against PostgreSQL. This test has
|
||||
now been removed, and operators deployed on PostgreSQL must migrate to
|
||||
a MySQL-compatible database, such as MySQL or MariaDB, before upgrade.
|
@ -6,7 +6,6 @@ iso8601>=0.1.11 # MIT
|
||||
oslo.reports>=1.18.0 # Apache-2.0
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
stestr>=2.0.0 # Apache-2.0
|
||||
psycopg2>=2.8.5 # LGPL/ZPL
|
||||
testtools>=2.5.0 # MIT
|
||||
WebTest>=2.0.27 # MIT
|
||||
pysnmp-lextudio>=5.0.0 # BSD
|
||||
|
@ -6,9 +6,6 @@
|
||||
|
||||
# Try starting mariadb
|
||||
sudo systemctl start mariadb || true
|
||||
# Try starting postgresql
|
||||
sudo postgresql-setup --initdb || true
|
||||
sudo systemctl start postgresql || true
|
||||
|
||||
# This setup needs to be run as a user that can run sudo.
|
||||
|
||||
@ -38,50 +35,3 @@ mysql -u $DB_USER -p$DB_PW -h 127.0.0.1 -e "
|
||||
DROP DATABASE IF EXISTS openstack_citest;
|
||||
CREATE DATABASE openstack_citest CHARACTER SET utf8;"
|
||||
|
||||
# Same for PostgreSQL
|
||||
# The root password for the PostgreSQL database; pass it in via
|
||||
# POSTGRES_ROOT_PW.
|
||||
DB_ROOT_PW=${POSTGRES_ROOT_PW:-insecure_slave}
|
||||
|
||||
# Change working directory to a folder all users can access
|
||||
# as psql on centos8 needs to be able to open the working directory
|
||||
# which it can't when executed as the postgres user, which is required
|
||||
# as same user as process for initial administrative authentication to
|
||||
# the postgres database
|
||||
cd /tmp
|
||||
|
||||
# Identify and update the postgres hba file which can be in
|
||||
# a version specific path.
|
||||
PG_HBA=$(sudo -H -u postgres psql -t -c "show hba_file")
|
||||
PG_CONF=$(sudo -H -u postgres psql -t -c "show config_file")
|
||||
|
||||
# setup postgres encryption algorithm and authentication
|
||||
sudo sed -i 's/ident$/scram-sha-256/g' $PG_HBA
|
||||
sudo sed -i 's/md5$/scram-sha-256/g' $PG_HBA
|
||||
sudo sed -i 's/^.*password_encryption =.*/password_encryption = scram-sha-256/' $PG_CONF
|
||||
|
||||
sudo cat $PG_HBA
|
||||
sudo cat $PG_CONF
|
||||
|
||||
# restart postgres with new HBA file is loaded
|
||||
sudo systemctl stop postgresql || true
|
||||
sudo systemctl start postgresql || true
|
||||
|
||||
# Setup user
|
||||
root_roles=$(sudo -H -u postgres psql -t -c "
|
||||
SELECT 'HERE' from pg_roles where rolname='$DB_USER'")
|
||||
if [[ ${root_roles} == *HERE ]];then
|
||||
sudo -H -u postgres psql -c "ALTER ROLE $DB_USER WITH SUPERUSER LOGIN PASSWORD '$DB_PW'"
|
||||
else
|
||||
sudo -H -u postgres psql -c "CREATE ROLE $DB_USER WITH SUPERUSER LOGIN PASSWORD '$DB_PW'"
|
||||
fi
|
||||
|
||||
# Store password for tests
|
||||
cat << EOF > $HOME/.pgpass
|
||||
*:*:*:$DB_USER:$DB_PW
|
||||
EOF
|
||||
chmod 0600 $HOME/.pgpass
|
||||
|
||||
# Now create our database
|
||||
psql -h 127.0.0.1 -U $DB_USER -d postgres -c "DROP DATABASE IF EXISTS openstack_citest"
|
||||
createdb -h 127.0.0.1 -U $DB_USER -l C -T template0 -E utf8 openstack_citest
|
||||
|
@ -421,19 +421,6 @@
|
||||
ironic-inspector: True
|
||||
ironic-inspector-dhcp: True
|
||||
|
||||
- job:
|
||||
name: ironic-tempest-pxe_ipmitool-postgres
|
||||
description: ironic-tempest-pxe_ipmitool-postgres
|
||||
parent: ironic-base
|
||||
vars:
|
||||
devstack_localrc:
|
||||
IRONIC_ENABLED_BOOT_INTERFACES: "fake,pxe"
|
||||
IRONIC_IPXE_ENABLED: False
|
||||
IRONIC_AUTOMATED_CLEAN_ENABLED: False
|
||||
devstack_services:
|
||||
mysql: False
|
||||
postgresql: True
|
||||
|
||||
# NOTE(rpittau): converted job but not running for now as there
|
||||
# could be an issue with the lookup in ironic-python-agent
|
||||
- job:
|
||||
|
@ -64,8 +64,6 @@
|
||||
voting: false
|
||||
- bifrost-integration-redfish-vmedia-uefi-centos-9:
|
||||
voting: false
|
||||
- ironic-tempest-pxe_ipmitool-postgres:
|
||||
voting: false
|
||||
gate:
|
||||
jobs:
|
||||
- ironic-tox-unit-mysql-migrations
|
||||
|
Loading…
Reference in New Issue
Block a user