Set openstack_citest owner to openstack_citest.
Set the owner on the postgres openstack_citest DB to the openstack_citest user. Also, remove openstack_citest's superuser privs. Change-Id: I98e448ef59b6a27cad0d9732a87ee87f5c4abd5f Reviewed-on: https://review.openstack.org/21016 Approved: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Tested-by: Jenkins
This commit is contained in:
@@ -201,9 +201,10 @@ class jenkins::slave(
|
||||
require => Class['postgresql::params'],
|
||||
}
|
||||
|
||||
# Create DB user and explicitly make it non superuser.
|
||||
postgresql::database_user { 'openstack_citest':
|
||||
password_hash => 'openstack_citest',
|
||||
superuser => true,
|
||||
superuser => false,
|
||||
}
|
||||
|
||||
postgresql::db { 'openstack_citest':
|
||||
@@ -215,6 +216,14 @@ class jenkins::slave(
|
||||
Postgresql::Database_user['openstack_citest'],
|
||||
],
|
||||
}
|
||||
|
||||
# Alter the new database giving the test DB user ownership of the DB.
|
||||
# This is necessary to make the nova unittests run properly.
|
||||
postgresql_psql { 'ALTER DATABASE openstack_citest OWNER TO openstack_citest':
|
||||
db => 'postgres',
|
||||
refreshonly => true,
|
||||
subscribe => Postgresql::Db['openstack_citest'],
|
||||
}
|
||||
}
|
||||
|
||||
file { '/usr/local/jenkins':
|
||||
|
||||
Reference in New Issue
Block a user