4

Openstack で Fabric 経由でボックスを構築しようとしています。インストールの一部には、PostgreSQL のインストールと実行が含まれます。

このコマンドは正常に機能します。

$ sudo service postgresql initdb 

このコマンドは失敗します:

$ sudo service postgresql start

このコマンドを実行すると、失敗のログ出力に問題は表示されません。

$ cat /var/lib/pgsql/pgstartup.log  

このコマンドは、次のメッセージを表示します。

$ cat /var/lib/pgsql/data/pg_log/postgresql-Wed.log

ログ: 構成ファイル "/var/lib/pgsql/data/pg_hba.conf" を開けませんでした: アクセス許可が拒否されました 致命的です: pg_hba.conf を読み込めませんでした

これらのコマンドを実行しているユーザーには、次のグループがあります。

vagrant, wheel

私のユーザーは、これらの権限を持つ sudoersリストの下にあります:/etc/sudoers

vagrant  ALL=(ALL) NOPASSWD: ALL

パーマオンpgsql:

[root@integration ~]# ls -ltr /var/lib/pgsql/
total 12
drwx------.  2 postgres postgres 4096 Sep 13  2012 backups
-rw-------.  1 postgres postgres 1152 Jun 19 20:17 pgstartup.log
drwx------. 12 postgres postgres 4096 Jun 19 20:19 data

およびサブディレクトリdata:

[root@integration ~]# ls -ltr /var/lib/pgsql/data/
total 76
-rw-------. 1 postgres postgres     4 Jun 19 20:17 PG_VERSION
drwx------. 2 postgres postgres  4096 Jun 19 20:17 pg_twophase
drwx------. 2 postgres postgres  4096 Jun 19 20:17 pg_tblspc
drwx------. 2 postgres postgres  4096 Jun 19 20:17 pg_stat_tmp
drwx------. 4 postgres postgres  4096 Jun 19 20:17 pg_multixact
-rw-------. 1 postgres postgres 16886 Jun 19 20:17 postgresql.conf
-rw-------. 1 postgres postgres  1631 Jun 19 20:17 pg_ident.conf
drwx------. 3 postgres postgres  4096 Jun 19 20:17 pg_xlog
drwx------. 2 postgres postgres  4096 Jun 19 20:17 pg_subtrans
drwx------. 2 postgres postgres  4096 Jun 19 20:17 pg_clog
drwx------. 5 postgres postgres  4096 Jun 19 20:17 base
drwx------. 2 postgres postgres  4096 Jun 19 20:17 global
-rw-------. 1 postgres postgres   241 Jun 19 20:17 pg_hba.conf
drwx------. 2 postgres postgres  4096 Jun 19 20:17 pg_log
-rw-------. 1 postgres postgres    57 Jun 19 20:19 postmaster.opts
4

1 に答える 1