Some permissions for the configmap directory are wrong

Bug #1737508 reported by Yushiro FURUKAWA
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-kubernetes
New
Undecided
Yushiro FURUKAWA

Bug Description

I followed deployment-guide(https://docs.openstack.org/kolla-kubernetes/latest/deployment-guide.html) and executed following command:

    $ sudo kolla-ansible genconfig

When creating configmap definition with 'kollakube', following error occurred. Because, there is a difference for directory permissions.

$ sudo ls -la /etc/kolla
--
drwxr-xr-x 2 root root 4096 12月 11 23:53 cinder-api/
..(snip)..
drwxrwx--- 2 root root 4096 12月 11 23:53 mariadb/

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial

$ kollakube --version
kollakube 0.6.1.dev158

$ kollakube res create configmap mariadb keystone horizon rabbitmq memcached nova-api nova-conductor nova-scheduler glance-api-haproxy glance-registry-haproxy glance-api glance-registry neutron-server neutron-dhcp-agent neutron-l3-agent neutron-metadata-agent neutron-openvswitch-agent openvswitch-db-server openvswitch-vswitchd nova-libvirt nova-compute nova-consoleauth nova-novncproxy nova-novncproxy-haproxy neutron-server-haproxy nova-api-haproxy cinder-api cinder-api-haproxy cinder-backup cinder-scheduler cinder-volume iscsid tgtd keepalived placement-api placement-api-haproxy

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/local/lib/python2.7/dist-packages/kolla_kubernetes/commands/cmd_resource.py", line 332, in take_action
    tmpl = super(Resource, self).take_action(args, skip_and_return=True)
  File "/usr/local/lib/python2.7/dist-packages/kolla_kubernetes/commands/cmd_resource.py", line 170, in take_action
    resource_name):
  File "/usr/local/lib/python2.7/dist-packages/kolla_kubernetes/pathfinder.py", line 58, in find_config_files
    return PathFinder._list_dir_files(path)
  File "/usr/local/lib/python2.7/dist-packages/kolla_kubernetes/pathfinder.py", line 87, in _list_dir_files
    paths = [os.path.join(path, fn) for fn in next(os.walk(path))[2]]
StopIteration
Traceback (most recent call last):
  File "/usr/local/bin/kollakube", line 10, in <module>
    sys.exit(main_kube())
  File "/usr/local/lib/python2.7/dist-packages/kolla_kubernetes/app.py", line 123, in main_kube
    return kks.run(argv)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/usr/local/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/local/lib/python2.7/dist-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/local/lib/python2.7/dist-packages/kolla_kubernetes/commands/cmd_resource.py", line 332, in take_action
    tmpl = super(Resource, self).take_action(args, skip_and_return=True)
  File "/usr/local/lib/python2.7/dist-packages/kolla_kubernetes/commands/cmd_resource.py", line 170, in take_action
    resource_name):
  File "/usr/local/lib/python2.7/dist-packages/kolla_kubernetes/pathfinder.py", line 58, in find_config_files
    return PathFinder._list_dir_files(path)
  File "/usr/local/lib/python2.7/dist-packages/kolla_kubernetes/pathfinder.py", line 87, in _list_dir_files
    paths = [os.path.join(path, fn) for fn in next(os.walk(path))[2]]
StopIteration

I aligned with 755 for all directory permissions in /etc/kolla. After that, command finished successfully.

$ kollakube --debug res create configmap \
> mariadb keystone horizon rabbitmq memcached nova-api nova-conductor \
> nova-scheduler glance-api-haproxy glance-registry-haproxy glance-api \
> glance-registry neutron-server neutron-dhcp-agent neutron-l3-agent \
> neutron-metadata-agent neutron-openvswitch-agent openvswitch-db-server \
> openvswitch-vswitchd nova-libvirt nova-compute nova-consoleauth \
> nova-novncproxy nova-novncproxy-haproxy neutron-server-haproxy \
> nova-api-haproxy cinder-api cinder-api-haproxy cinder-backup \
> cinder-scheduler cinder-volume iscsid tgtd keepalived \
> placement-api placement-api-haproxy --log-file res_configmap2.log
configmap "mariadb" created
configmap "keystone" created
configmap "horizon" created
configmap "rabbitmq" created
configmap "memcached" created
configmap "nova-api" created
configmap "nova-conductor" created
configmap "nova-scheduler" created
configmap "glance-api-haproxy" created
configmap "glance-registry-haproxy" created
configmap "glance-api" created
configmap "glance-registry" created
configmap "neutron-server" created
configmap "neutron-dhcp-agent" created
configmap "neutron-l3-agent" created
configmap "neutron-metadata-agent" created
configmap "neutron-openvswitch-agent" created
configmap "openvswitch-db-server" created
configmap "openvswitch-vswitchd" created
configmap "nova-libvirt" created
configmap "nova-compute" created
configmap "nova-consoleauth" created
configmap "nova-novncproxy" created
configmap "nova-novncproxy-haproxy" created
configmap "neutron-server-haproxy" created
configmap "nova-api-haproxy" created
configmap "cinder-api" created
configmap "cinder-api-haproxy" created
configmap "cinder-backup" created
configmap "cinder-scheduler" created
configmap "cinder-volume" created
configmap "iscsid" created
configmap "tgtd" created
configmap "keepalived" created
configmap "placement-api" created
configmap "placement-api-haproxy" created

Tags: kollakube
summary: - An error occurred when deleting configmap with 'kollakube'
+ Some permissions for the configmap directory are wrong
description: updated
Changed in kolla-kubernetes:
assignee: nobody → Yushiro FURUKAWA (y-furukawa-2)
description: updated
Revision history for this message
Hanbae Seo (agtion) wrote :

"kolla-ansible genconfig" don't be used to generating confimaps anymore,
use a below command.
ansible-playbook -e ansible_python_interpreter=/usr/bin/python -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml -e CONFIG_DIR=/etc/kolla ansible/site.yml

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.