[duplicate] Swift Install Failing with Sudo Error

Bug #1853708 reported by Ryan Phillips
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Invalid
Medium
Radosław Piliszek
Train
Invalid
Medium
Radosław Piliszek
Ussuri
Invalid
Medium
Radosław Piliszek

Bug Description

I've been trying to install Kolla (train) as an all-in-one install. The base install works great: I can get to the dashboard and create a nova instance. I am attempting to add swift support and followed the directions to configure swift.

Swift containers are starting but immediately exiting with the following errors:

```
+ sudo -E kolla_set_configs
sudo: no tty present and no askpass program specified
+ sudo -E kolla_set_configs
sudo: no tty present and no askpass program specified
+ sudo -E kolla_set_configs
sudo: no tty present and no askpass program specified
+ sudo -E kolla_set_configs
sudo: no tty present and no askpass program specified
```

All the other containers are functioning correctly:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cea6edf16348 kolla/ubuntu-binary-horizon:train "dumb-init --single-…" 7 minutes ago Up 7 minutes horizon
6c88d426a07d kolla/ubuntu-binary-heat-engine:train "dumb-init --single-…" 7 minutes ago Up 7 minutes heat_engine
c28e5ce612dc kolla/ubuntu-binary-heat-api-cfn:train "dumb-init --single-…" 7 minutes ago Up 7 minutes heat_api_cfn
bfc6cdd6b969 kolla/ubuntu-binary-heat-api:train "dumb-init --single-…" 7 minutes ago Up 7 minutes heat_api
aa5c37b09733 kolla/ubuntu-binary-neutron-metadata-agent:train "dumb-init --single-…" 8 minutes ago Up 8 minutes neutron_metadata_agent
07154a5af33b kolla/ubuntu-binary-neutron-l3-agent:train "dumb-init --single-…" 8 minutes ago Up 8 minutes neutron_l3_agent
17e2265f8d34 kolla/ubuntu-binary-neutron-dhcp-agent:train "dumb-init --single-…" 8 minutes ago Up 8 minutes neutron_dhcp_agent
1fdb7bea5434 kolla/ubuntu-binary-neutron-openvswitch-agent:train "dumb-init --single-…" 8 minutes ago Up 8 minutes neutron_openvswitch_agent
e1fe4fffe34d kolla/ubuntu-binary-neutron-server:train "dumb-init --single-…" 8 minutes ago Up 8 minutes neutron_server
cc20097e0787 kolla/ubuntu-binary-openvswitch-vswitchd:train "dumb-init --single-…" 9 minutes ago Up 9 minutes openvswitch_vswitchd
3cd5b3ac32a9 kolla/ubuntu-binary-openvswitch-db-server:train "dumb-init --single-…" 9 minutes ago Up 9 minutes openvswitch_db
22684295751d kolla/ubuntu-binary-nova-compute:train "dumb-init --single-…" 10 minutes ago Up 10 minutes nova_compute
535e6c81e8f5 kolla/ubuntu-binary-nova-libvirt:train "dumb-init --single-…" 10 minutes ago Up 10 minutes nova_libvirt
59e06d362509 kolla/ubuntu-binary-nova-ssh:train "dumb-init --single-…" 10 minutes ago Up 10 minutes nova_ssh
575ea9e95e33 kolla/ubuntu-binary-nova-novncproxy:train "dumb-init --single-…" 10 minutes ago Up 10 minutes nova_novncproxy
150d2d5723e6 kolla/ubuntu-binary-nova-conductor:train "dumb-init --single-…" 10 minutes ago Up 10 minutes nova_conductor
e6cd7b383972 kolla/ubuntu-binary-nova-api:train "dumb-init --single-…" 10 minutes ago Up 10 minutes nova_api
af9df9d41b0f kolla/ubuntu-binary-nova-scheduler:train "dumb-init --single-…" 10 minutes ago Up 10 minutes nova_scheduler
1892ab9d3d19 kolla/ubuntu-binary-placement-api:train "dumb-init --single-…" 12 minutes ago Up 12 minutes placement_api
eed26f6ed1b2 kolla/ubuntu-binary-glance-api:train "dumb-init --single-…" 13 minutes ago Up 13 minutes glance_api
983b379c9d52 kolla/ubuntu-binary-swift-proxy-server:train "dumb-init --single-…" 13 minutes ago Restarting (1) 55 seconds ago swift_proxy_server
0a7e6a59b493 kolla/ubuntu-binary-swift-object-expirer:train "dumb-init --single-…" 13 minutes ago Restarting (1) Less than a second ago swift_object_expirer
d426ebe62e71 kolla/ubuntu-binary-swift-object:train "dumb-init --single-…" 13 minutes ago Restarting (1) 3 seconds ago swift_object_updater
8aa837f99b40 kolla/ubuntu-binary-swift-object:train "dumb-init --single-…" 13 minutes ago Restarting (1) 4 seconds ago swift_object_replicator
06e5000f82ce kolla/ubuntu-binary-swift-object:train "dumb-init --single-…" 13 minutes ago Restarting (1) 4 seconds ago swift_object_auditor
ac17c224738b kolla/ubuntu-binary-swift-object:train "dumb-init --single-…" 14 minutes ago Restarting (1) 4 seconds ago swift_object_server
fca502a360fb kolla/ubuntu-binary-swift-container:train "dumb-init --single-…" 14 minutes ago Restarting (1) 8 seconds ago swift_container_updater
8def0c6efde9 kolla/ubuntu-binary-swift-container:train "dumb-init --single-…" 14 minutes ago Restarting (1) 8 seconds ago swift_container_replicator
e2aa84ebed7d kolla/ubuntu-binary-swift-container:train "dumb-init --single-…" 14 minutes ago Restarting (1) 8 seconds ago swift_container_auditor
e7aabf20c11a kolla/ubuntu-binary-swift-container:train "dumb-init --single-…" 14 minutes ago Restarting (1) 11 seconds ago swift_container_server
cc754157a930 kolla/ubuntu-binary-swift-account:train "dumb-init --single-…" 14 minutes ago Restarting (1) 14 seconds ago swift_account_reaper
b3ef7952d2d3 kolla/ubuntu-binary-swift-account:train "dumb-init --single-…" 14 minutes ago Restarting (1) 14 seconds ago swift_account_replicator
7b984325b708 kolla/ubuntu-binary-swift-account:train "dumb-init --single-…" 14 minutes ago Restarting (1) 14 seconds ago swift_account_auditor
06454711e2f9 kolla/ubuntu-binary-swift-account:train "dumb-init --single-…" 14 minutes ago Restarting (1) 14 seconds ago swift_account_server
226002e50961 kolla/ubuntu-binary-swift-rsyncd:train "dumb-init --single-…" 14 minutes ago Restarting (1) 19 seconds ago swift_rsyncd
06ede7f32329 kolla/ubuntu-binary-keystone-fernet:train "dumb-init --single-…" 18 minutes ago Up 18 minutes keystone_fernet
b6f258bfee93 kolla/ubuntu-binary-keystone-ssh:train "dumb-init --single-…" 18 minutes ago Up 18 minutes keystone_ssh
c237390ab2d3 kolla/ubuntu-binary-keystone:train "dumb-init --single-…" 18 minutes ago Up 18 minutes keystone
9d55b6233854 kolla/ubuntu-binary-rabbitmq:train "dumb-init --single-…" 18 minutes ago Up 18 minutes rabbitmq
037db9b550d9 kolla/ubuntu-binary-memcached:train "dumb-init --single-…" 19 minutes ago Up 19 minutes memcached
747026ed2053 kolla/ubuntu-binary-mariadb:train "dumb-init -- kolla_…" 19 minutes ago Up 19 minutes mariadb
07148ecdfbd9 kolla/ubuntu-binary-chrony:train "dumb-init --single-…" 19 minutes ago Up 19 minutes chrony
cc6883333991 kolla/ubuntu-binary-cron:train "dumb-init --single-…" 19 minutes ago Up 19 minutes cron
2eb7cb285418 kolla/ubuntu-binary-kolla-toolbox:train "dumb-init --single-…" 20 minutes ago Up 19 minutes kolla_toolbox
b21c793b31d3 kolla/ubuntu-binary-fluentd:train "dumb-init --single-…" 20 minutes ago Up 20 minutes fluentd

Revision history for this message
Ryan Phillips (ryan-trolocsis) wrote :

Looks like the image is using a sudo wrapper requiring a tty on the docker start.

Revision history for this message
Ryan Phillips (ryan-trolocsis) wrote :

Adding `tty: true` to the ansible scripts allows the container to start, but the actual binary within the container is not running correctly.

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Hey, Ryan! Can you confirm whether Stein works? And Rocky if Stein also not?

Changed in kolla-ansible:
assignee: nobody → Radosław Piliszek (yoctozepto)
Revision history for this message
Radosław Piliszek (yoctozepto) wrote :
Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Deployment in CI works normally, no sudo issues here.

Swift role is using an old format so it might be that: if you tried to add it later, it did not apply all configs properly. Please retry by running from scratch or run the 'upgrade' command as a workaround and let us know the results.

Revision history for this message
Ryan Phillips (ryan-trolocsis) wrote :

This fixed it for me. Thank you!

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Thanks for confirming, Ryan! I mark this as a duplicate then.

Duplicate of https://bugs.launchpad.net/kolla-ansible/+bug/1842637

summary: - Swift Install Failing with Sudo Error
+ [duplicate] Swift Install Failing with Sudo Error
Revision history for this message
Rowan Potgieter (rowan-potgieter) wrote :

We've hit the same issue in our Stein deployment.

Adding `tty: true` removed the sudo error/warning but swift still does not seem to be active or functional. After performing an upgrade all the containers are up but we are getting a 503 internal server error when running the smoke tests from the rocky swift-guide (https://docs.openstack.org/kolla-ansible/rocky/reference/swift-guide.html)

There are no logs for any of the swift containers which I find a bit odd:

# docker logs swift_proxy_server
+ sudo -E kolla_set_configs

If I exec into the container as root and run the same command then I do see some configuration debug from kolla_set_configs

Are we missing a step somewhere perhaps? It seems like the kolla_set_configs command is stuck waiting for a password (I assume thats what you mean by "Swift role is using an old format so it might be that: if you tried to add it later, it did not apply all configs properly")

To prove this I ran docker exec on a container and looked at the contents of /etc/swift - the ring configs are missing. I can manually run `sudo -E kolla_set_configs` as root and it will populate this folder.

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Logs are in /var/logs/kolla/swift* on the host.

I meant that ansible playbooks are using old format so 'reconfigure' does not work properly and one must use 'deploy' to fix that.

Revision history for this message
Rowan Potgieter (rowan-potgieter) wrote :

We have no swift logs in /var/logs/kolla/swift* on any of hosts.

Will try the deploy again but we have tried a complete redeploy already to try fix this issue.

I also tried running `dumb-init --single-child -- kolla-start` in the container and it asks for the 'swift' sudo password.

Revision history for this message
Rowan Potgieter (rowan-potgieter) wrote :

Have attempted a destroy and deploy. All my swift container are still stuck waiting for a password

   # docker logs swift_account_reaper
   + sudo -E kolla_set_configs

Any ideas how we can get past this?

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Please let me know exact version of kolla (or date of images if from public registry) and kolla-ansible. This might be a different issue then.

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Please create a separate issue also.

Revision history for this message
Rowan Potgieter (rowan-potgieter) wrote :

Ok sure no problem - I have created a separate issue here: https://bugs.launchpad.net/kolla-ansible/+bug/1859567

The issue is due to the swift user being missing from the kolla group. I have added all the detail in the new case

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.