Swift container not started - sudo rights

Bug #1905279 reported by tux31 on 2020-11-23
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Hello, i'm trying to install OpenStack with Swift.

Global.xml options for swift :
enable_swift: "yes"
swift_storage_interface: "{{ network_interface }}"
api_interface: "{{ network_interface }}"

But after the end of the playbook where all are sucess.

I check on my openstack server and i see all swift containers not started (restarting loop)

When i check the docker logs of swift container i see:
+ sudo -E kolla_set_configs
sudo: no tty present and no askpass program specified

All others containers are ok.

If i create a Dockerfile with custom sudoers file to add user swift to allow sudo command, all my containers work !

Can you help me ?

If i juste test this command :
# docker rmi -f $(docker images -aq)
# docker run kolla/ubuntu-binary-swift-rsyncd:ussuri

Unable to find image 'kolla/ubuntu-binary-swift-rsyncd:ussuri' locally
ussuri: Pulling from kolla/ubuntu-binary-swift-rsyncd
171857c49d0f: Already exists
419640447d26: Already exists
61e52f862619: Already exists
ad98b3861eaa: Pull complete
6e72c5443360: Pull complete
baf0cac1b6f6: Pull complete
c0115399c36c: Pull complete
d6027d96e882: Pull complete
86bc48754f04: Pull complete
acbcfe59c244: Pull complete
787ec8f47cd9: Pull complete
090f7f9e07c3: Pull complete
742af266c5d4: Pull complete
6bd785da660b: Pull complete
073f8054ca23: Pull complete
fe0fe4408483: Pull complete
56fe5ef112d8: Pull complete
ea1207a7e222: Pull complete
60aaad00615c: Pull complete
3800341c0896: Pull complete
1d95b9ade045: Pull complete
82c81535afda: Pull complete
dff90da95ce8: Pull complete
90a421ffa4e7: Pull complete
a9b86c22e45e: Pull complete
a64f8c7c0424: Pull complete
5158ed2115d0: Pull complete
0b9e9b77b9cd: Pull complete
4cf6f2e4485b: Pull complete
a4c3114a91ae: Pull complete
c0f77a89b687: Pull complete
bdbeee658e79: Pull complete
d13848399a33: Pull complete
84b958958488: Pull complete
1cd711a13b2c: Pull complete
ba2adf9a71c8: Pull complete
b920975e5c8b: Pull complete
2df46fbb5401: Pull complete
1aa84eda60f8: Pull complete
fc1bcf1eb290: Pull complete
106fbb72d71e: Pull complete
Digest: sha256:13453acd9d65ce9d4ffecd0d239f8cb90f62237e4315a3c417e9c07903adec6b
Status: Downloaded newer image for kolla/ubuntu-binary-swift-rsyncd:ussuri
+ sudo -E kolla_set_configs
sudo: no tty present and no askpass program specified

* OS (e.g. from /etc/os-release): buster/sid
* Kernel (e.g. `uname -a`): Linux safescale-openstack-1 4.15.0-123-generic #126-Ubuntu SMP Wed Oct 21 09:40:11 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
* Docker version if applicable (e.g. `docker version`): 19.03.8
* Kolla-Ansible version (e.g. `git head or tag or stable branch` or pip package version if using release): 10.1.0
* Docker image Install type (source/binary): binary
* Docker image distribution: ubuntu
* Are you using official images from Docker Hub or self built? yes
* Share your inventory file, globals.yml and other configuration files if relevant :

global.xml :
kolla_base_distro: "ubuntu"
kolla_install_type: "binary"
kolla_internal_vip_address: "X.X.X.X"
kolla_external_vip_address: "X.X.X.X"
network_interface: "ens160"
neutron_external_interface: "ens192"
neutron_plugin_agent: "openvswitch"
kolla_enable_tls_internal: "no"
kolla_enable_tls_external: "no"
enable_haproxy: "no"
enable_mariadb: "yes"
enable_memcached: "yes"
enable_cinder: "yes"
enable_cinder_backend_nfs: "yes"
enable_neutron_provider_networks: "yes"
enable_swift: "yes"
swift_storage_interface: "{{ network_interface }}"
api_interface: "{{ network_interface }}"
glance_default_store: cinder
            volume_backend_name: NFS_VOLUME1
            volume_driver: cinder.volume.drivers.nfs.NfsDriver
            nfs_shares_config: /etc/cinder/nfs_shares_volume1
            nfs_mount_options: "rsize=32768,wsize=32768,timeo=1200,actimeo=120"
                - { ip: "X.X.X.X", share: "/vol/vol_DATAs_netapp/qtree_safescale/cinder" }
      soft: 98304
      hard: 98304

Mark Goddard (mgoddard) wrote :

I did a bit of digging and found that the swift user is not a member of the kolla group. Instead it is a member of the adm group.

I expect this is due to the UCA packaging. I ran 'usermod --append --groups kolla swift', and the kolla_set_configs command worked.

Changed in kolla-ansible:
importance: Undecided → Medium
status: New → Triaged
tux31 (tux31) wrote :

Hi, Yes but it's possible to patch all swift images into the public repo with this patch ?

Mark Goddard (mgoddard) wrote :
affects: kolla-ansible → kolla
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers