Failed to open some config files: /etc/ironic/ironic.conf

Bug #1613292 reported by Waldemar Znoinski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Fix Released
High
Waldemar Znoinski
Mitaka
Won't Fix
High
Waldemar Znoinski

Bug Description

 6. docker logs ironic_inspector
 …
 INFO:__main__:Kolla config strategy set to: COPY_ALWAYS
 INFO:__main__:Loading config file at /var/lib/kolla/config_files/config.json
 INFO:__main__:Validating config file
 INFO:__main__:Copying service configuration files
 INFO:__main__:Removing existing destination: /etc/ironic/ironic.conf
 INFO:__main__:Copying /var/lib/kolla/config_files/ironic.conf to /etc/ironic/ironic.conf
 INFO:__main__:Setting permissions for /etc/ironic/ironic.conf
 INFO:__main__:Writing out command to execute
 Running command: 'ironic-inspector --config-file /etc/ironic/ironic.conf'
 Traceback (most recent call last):
   File "/usr/bin/ironic-inspector", line 10, in <module>
     sys.exit(main())
   File "/usr/lib/python2.7/dist-packages/ironic_inspector/main.py", line 441, in main
     service.run(args, app)
   File "/usr/lib/python2.7/dist-packages/ironic_inspector/main.py", line 423, in run
     self.setup_logging(args)
   File "/usr/lib/python2.7/dist-packages/ironic_inspector/main.py", line 350, in setup_logging
     CONF(args, project='ironic-inspector')
   File "/usr/lib/python2.7/dist-packages/oslo_config/cfg.py", line 2167, in __call__
     self._namespace._files_permission_denied)
 oslo_config.cfg.ConfigFilesPermissionDeniedError: Failed to open some config files: /etc/ironic/ironic.conf

 7. (ironic-inspector)[root@os ironic]# ls -ld /etc/ironic*
 drwxr-xr-x 4 ironic ironic 4096 Aug 5 17:02 /etc/ironic
 drwxr-x--- 3 ironic-inspector ironic-inspector 4096 Aug 5 16:59 /etc/ironic-inspector

 8. ls -l /etc/ironic/
 total 80
 -rw------- 1 root root 1128 Aug 5 17:02 ironic.conf
 -rw-r--r-- 1 ironic ironic 65181 Aug 5 11:45 ironic.conf.sample
 -rw-r--r-- 1 ironic ironic 115 Aug 5 11:45 policy.json
 -rw-r--r-- 1 ironic ironic 995 Aug 5 11:45 rootwrap.conf
 drwxr-xr-x 2 ironic ironic 4096 Aug 5 11:45 rootwrap.d

 9. ironic_conductor for comparison:
 (ironic-conductor)[ironic@os /]$ ls -l /etc/ironic/
 total 80
 -rw------- 1 ironic ironic 963 Aug 5 15:45 ironic.conf
 -rw-r--r-- 1 ironic ironic 65181 Aug 5 11:45 ironic.conf.sample
 -rw-r--r-- 1 ironic ironic 115 Aug 5 11:45 policy.json
 -rw-r--r-- 1 ironic ironic 995 Aug 5 11:45 rootwrap.conf
 drwxr-xr-x 2 ironic ironic 4096 Aug 5 11:45 rootwrap.d

FIX (changing owner root->ironic):
root@os:/etc/kolla/ironic-inspector# cat config.json
{
    "command": "ironic-inspector --config-file /etc/ironic/ironic.conf",
    "config_files": [
        {
            "source": "/var/lib/kolla/config_files/ironic.conf",
            "dest": "/etc/ironic/ironic.conf",
            "owner": "ironic",
            "perm": "0600"
        }
    ]
}

Revision history for this message
Waldemar Znoinski (wznoinsk) wrote :

Host:
 cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"
NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial

Linux silpixa00385229 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

ansible 1.9.5
  configured module search path = None

kolla stable/mitaka
Kolla globals:
config_strategy: "COPY_ALWAYS"
kolla_base_distro: "ubuntu"
kolla_install_type: "source"
openstack_release: "mitaka"
enable_haproxy: "no"
enable_keepalived: "no"
kolla_internal_vip_address: "10.237.222.18"
docker_registry: "192.168.100.1:4000"
network_interface: "eno1"
neutron_external_interface: "enp130s0f0"
enable_ironic: "yes"

Container:
 cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
NAME="Ubuntu"
VERSION="14.04.5 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.5 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

python --version
Python 2.7.6

Ironic:
driver: pxe_ipmitool

Changed in kolla:
assignee: nobody → Waldemar Znoinski (wznoinsk)
Ryan Hallisey (rthall14)
Changed in kolla:
status: New → Confirmed
importance: Undecided → High
milestone: none → newton-3
Changed in kolla:
milestone: newton-3 → newton-rc1
Changed in kolla:
milestone: newton-rc1 → newton-rc2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (master)

Fix proposed to branch: master
Review: https://review.openstack.org/372084

Changed in kolla:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (master)

Reviewed: https://review.openstack.org/372084
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=734f881c75bda0045e6036d7be6f2ea22131b4ca
Submitter: Jenkins
Branch: master

commit 734f881c75bda0045e6036d7be6f2ea22131b4ca
Author: Waldemar Znoinski <email address hidden>
Date: Mon Sep 12 16:48:06 2016 +0000

    fix config file permission to ironic instead of root

    Change-Id: I1ce97d18e45de19f88874894bdac588874aa6320
    Closes-bug: #1613292

Changed in kolla:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 3.0.0.0rc2

This issue was fixed in the openstack/kolla 3.0.0.0rc2 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.