X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=trusty%2Fdebian%2Fcinder-common.postinst;h=fbea5f39020a0a8a2e9db78862b77d051c0846cf;hb=refs%2Fchanges%2F20%2F10220%2F3;hp=0c89129eb6d47a5ad2df61cd25eda6a97d15dd4d;hpb=0f30a3e029e928b2bd9fa2dc0efbec74a449b611;p=openstack-build%2Fcinder-build.git diff --git a/trusty/debian/cinder-common.postinst b/trusty/debian/cinder-common.postinst index 0c89129eb..fbea5f390 100644 --- a/trusty/debian/cinder-common.postinst +++ b/trusty/debian/cinder-common.postinst @@ -7,18 +7,85 @@ if [ "$1" = "configure" ]; then if ! getent passwd cinder > /dev/null 2>&1; then adduser --system --home /var/lib/cinder --ingroup cinder --no-create-home \ - --shell /bin/false cinder + --shell /usr/sbin/nologin cinder fi chown -R cinder:adm /var/log/cinder chmod 0750 /var/log/cinder chown -R cinder:cinder /var/lib/cinder /etc/cinder chmod 0750 /etc/cinder - chmod 0440 /etc/sudoers.d/cinder_sudoers chown -R root:root /etc/cinder/rootwrap.d chmod 0755 /etc/cinder/rootwrap.d chown root:root /etc/cinder/rootwrap.conf + # generating cinder.conf.sample + python -m cinder.openstack.common.config.generator cinder/api/common.py cinder/api/middleware/auth.py \ + cinder/api/middleware/sizelimit.py cinder/api/views/versions.py \ + cinder/backup/chunkeddriver.py cinder/backup/driver.py \ + cinder/backup/drivers/ceph.py cinder/backup/drivers/nfs.py \ + cinder/backup/drivers/swift.py cinder/backup/drivers/tsm.py \ + cinder/backup/manager.py cinder/cmd/manage.py cinder/cmd/volume.py \ + cinder/cmd/volume_usage_audit.py cinder/common/config.py \ + cinder/compute/__init__.py cinder/compute/nova.py cinder/db/api.py \ + cinder/db/base.py cinder/exception.py cinder/image/glance.py \ + cinder/image/image_utils.py cinder/keymgr/conf_key_mgr.py \ + cinder/keymgr/__init__.py cinder/keymgr/key_mgr.py \ + cinder/openstack/common/eventlet_backdoor.py \ + cinder/openstack/common/periodic_task.py \ + cinder/openstack/common/policy.py \ + cinder/openstack/common/versionutils.py cinder/quota.py \ + cinder/scheduler/driver.py cinder/scheduler/host_manager.py \ + cinder/scheduler/manager.py cinder/scheduler/scheduler_options.py \ + cinder/scheduler/simple.py cinder/scheduler/weights/capacity.py \ + cinder/scheduler/weights/volume_number.py cinder/service.py \ + cinder/ssh_utils.py cinder/transfer/api.py cinder/volume/api.py \ + cinder/volume/driver.py cinder/volume/drivers/block_device.py \ + cinder/volume/drivers/cloudbyte/options.py \ + cinder/volume/drivers/datera.py \ + cinder/volume/drivers/dell/dell_storagecenter_common.py \ + cinder/volume/drivers/emc/emc_vmax_common.py \ + cinder/volume/drivers/emc/emc_vnx_cli.py \ + cinder/volume/drivers/emc/xtremio.py cinder/volume/drivers/eqlx.py \ + cinder/volume/drivers/glusterfs.py cinder/volume/drivers/hds/hds.py \ + cinder/volume/drivers/hds/iscsi.py cinder/volume/drivers/hds/nfs.py \ + cinder/volume/drivers/hitachi/hbsd_common.py \ + cinder/volume/drivers/hitachi/hbsd_fc.py \ + cinder/volume/drivers/hitachi/hbsd_horcm.py \ + cinder/volume/drivers/hitachi/hbsd_iscsi.py \ + cinder/volume/drivers/huawei/__init__.py \ + cinder/volume/drivers/ibm/flashsystem.py cinder/volume/drivers/ibm/gpfs.py \ + cinder/volume/drivers/ibm/ibmnas.py \ + cinder/volume/drivers/ibm/storwize_svc/__init__.py \ + cinder/volume/drivers/ibm/xiv_ds8k.py cinder/volume/drivers/lvm.py \ + cinder/volume/drivers/netapp/options.py cinder/volume/drivers/nfs.py \ + cinder/volume/drivers/nimble.py cinder/volume/drivers/openvstorage.py \ + cinder/volume/drivers/prophetstor/options.py cinder/volume/drivers/pure.py \ + cinder/volume/drivers/quobyte.py cinder/volume/drivers/rbd.py \ + cinder/volume/drivers/remotefs.py \ + cinder/volume/drivers/san/hp/hp_3par_common.py \ + cinder/volume/drivers/san/hp/hp_lefthand_rest_proxy.py \ + cinder/volume/drivers/san/san.py cinder/volume/drivers/scality.py \ + cinder/volume/drivers/smbfs.py cinder/volume/drivers/solidfire.py \ + cinder/volume/drivers/srb.py cinder/volume/drivers/violin/v6000_common.py \ + cinder/volume/drivers/vmware/vmdk.py cinder/volume/drivers/windows/windows.py \ + cinder/volume/drivers/xio.py cinder/volume/drivers/zfssa/zfssanfs.py \ + cinder/volume/manager.py cinder/wsgi.py \ + cinder/zonemanager/drivers/brocade/brcd_fabric_opts.py \ + cinder/zonemanager/drivers/brocade/brcd_fc_zone_driver.py \ + cinder/zonemanager/drivers/cisco/cisco_fabric_opts.py \ + cinder/zonemanager/drivers/cisco/cisco_fc_zone_driver.py cinder/zonemanager/fc_zone_manager.py \ + > /etc/cinder/cinder.conf.sample && \ + + oslo-config-generator \ + --namespace oslo_concurrency --namespace oslo_db \ + --namespace oslo_messaging --namespace policy \ + --namespace keystonemiddleware.auth_token \ + | sed '/^\[DEFAULT/d' >> /etc/cinder/cinder.conf.sample + + if [ "$?" -ne 0 ]; then + echo "cinder sample configuration file generation fails!" + fi + if [ -e /var/lib/cinder/cinder.sqlite ]; then chown cinder:cinder /var/lib/cinder/cinder.sqlite chmod 0600 /var/lib/cinder/cinder.sqlite