Swift container not started - sudo rights

Bug #1905279 reported by tux31
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Fix Released
Medium
Unassigned

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

**Environment**:
* 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"
# SWIFT
enable_swift: "yes"
swift_storage_interface: "{{ network_interface }}"
api_interface: "{{ network_interface }}"
# SWIFT
glance_default_store: cinder
container_vars:
    cinder_backends:
        nfs-volume1:
            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"
            shares:
                - { ip: "X.X.X.X", share: "/vol/vol_DATAs_netapp/qtree_safescale/cinder" }
memcached_dimensions:
  ulimits:
    nofile:
      soft: 98304
      hard: 98304

Revision history for this message
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
Revision history for this message
tux31 (tux31) wrote :

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

Revision history for this message
Mark Goddard (mgoddard) wrote :
affects: kolla-ansible → kolla
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 12.0.0.0rc1

This issue was fixed in the openstack/kolla 12.0.0.0rc1 release candidate.

Mark Goddard (mgoddard)
Changed in kolla:
status: Triaged → Fix Released
status: Fix Released → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/kolla/+/789741

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/kolla/+/789742

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/kolla/+/789742
Committed: https://opendev.org/openstack/kolla/commit/b8f23bf71c464d18868e4c456a8a45fd53cd74fa
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit b8f23bf71c464d18868e4c456a8a45fd53cd74fa
Author: Mark Goddard <email address hidden>
Date: Tue Nov 24 09:27:31 2020 +0000

    swift: fix group membership in debuntu/binary

    The UCA packages seem to be removing the swift user from the kolla
    group. Explicitly add it after installation.

    Closes-Bug: #1905279

    Change-Id: I51c7c6e2f520a582de0409025eb5d1a6da2952a2
    (cherry picked from commit aa3208ea0f10889469f864aaccdb593547412d76)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/kolla/+/789741
Committed: https://opendev.org/openstack/kolla/commit/bc97aa584689469eacdb3b80f3d2706f9c6bff96
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit bc97aa584689469eacdb3b80f3d2706f9c6bff96
Author: Mark Goddard <email address hidden>
Date: Tue Nov 24 09:27:31 2020 +0000

    swift: fix group membership in debuntu/binary

    The UCA packages seem to be removing the swift user from the kolla
    group. Explicitly add it after installation.

    Closes-Bug: #1905279

    Change-Id: I51c7c6e2f520a582de0409025eb5d1a6da2952a2
    (cherry picked from commit aa3208ea0f10889469f864aaccdb593547412d76)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 10.3.0

This issue was fixed in the openstack/kolla 10.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 11.1.0

This issue was fixed in the openstack/kolla 11.1.0 release.

Changed in kolla:
status: Fix Committed → Fix Released
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.