swift_ring_rebalance playbook fails due to missing permissions

Bug #1759311 reported by Christian Schwede
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Christian Schwede

Bug Description

The Ansible commands are executed as user heat-admin on the nodes, and some tasks need to read and/or write to directories that are owned by the containers (ie with a numeric id on the host itself).

Example failures:

TASK [Get recon data] **************************************************************************************************
fatal: [192.168.24.6]: FAILED! => {"changed": true, "cmd": ["cat", "/var/cache/swift/object.recon"], "delta": "0:00:00.008567", "end": "2018-03-26 09:23:03.873263", "msg": "non-zero return code", "rc": 1, "start": "2018-03-26 09:23:03.864696", "stderr": "cat: /var/cache/swift/object.recon: Permission denied", "stderr_lines": ["cat: /var/cache/swift/object.recon: Permission denied"], "stdout": "", "stdout_lines": []}

TASK [Extract Swift rings] **************************************************************************************************************************************************
fatal: [192.168.24.14]: FAILED! => {"changed": false, "dest": "//var/lib/config-data/puppet-generated/swift/", "extract_results": {"cmd": ["/usr/bin/gtar", "--extract", "-C", "//var/lib/config-data/puppet-generated/swift/", "-z", "-f", "/tmp/swift-rings.tar.gz"], "err": "/usr/bin/gtar: etc/swift/backups: Cannot utime: Operation not permitted\n/usr/bin/gtar: etc/swift/account.builder: Cannot open: File exists\n/usr/bin/gtar: etc/swift/container.builder: Cannot open: File exists\n/usr/bin/gtar: etc/swift/object.builder: Cannot open: File exists\n/usr/bin/gtar: etc/swift/account.ring.gz: Cannot open: File exists\n/usr/bin/gtar: etc/swift/container.ring.gz: Cannot open: File exists\n/usr/bin/gtar: etc/swift/object.ring.gz: Cannot open: File exists\n/usr/bin/gtar: etc/swift/backups/1522047496.object.builder: Cannot open: File exists\n/usr/bin/gtar: etc/swift/backups/1522047496.account.builder: Cannot open: File exists\n/usr/bin/gtar: etc/swift/backups/1522047497.container.builder: Cannot open: File exists\n/usr/bin/gtar: etc/swift/backups/1522047508.object.ring.gz: Cannot open: File exists\n/usr/bin/gtar: etc/swift/backups/1522047508.object.builder: Cannot open: File exists\n/usr/bin/gtar: etc/swift/backups/1522047509.account.ring.gz: Cannot open: File exists\n/usr/bin/gtar: etc/swift/backups/1522047509.account.builder: Cannot open: File exists\n/usr/bin/gtar: etc/swift/backups/1522047509.container.ring.gz: Cannot open: File exists\n/usr/bin/gtar: etc/swift/backups/1522047509.container.builder: Cannot open: File exists\n/usr/bin/gtar: etc/swift: Cannot utime: Operation not permitted\n/usr/bin/gtar: etc/swift: Cannot change mode to rwxrwxr-x: Operation not permitted\n/usr/bin/gtar: Exiting with failure status due to previous errors\n", "out": "", "rc": 2}, "gid": 0, "group": "root", "handler": "TgzArchive", "mode": "0755", "msg": "failed to unpack /tmp/swift-rings.tar.gz to //var/lib/config-data/puppet-generated/swift/", "owner": "root", "secontext": "system_u:object_r:container_var_lib_t:s0", "size": 17, "src": "/tmp/swift-rings.tar.gz", "state": "directory", "uid": 0}

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)

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

Changed in tripleo:
status: New → In Progress
Changed in tripleo:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.openstack.org/556928
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=b78aeab4fd821aea3f5655a96e85fd67ca46fcee
Submitter: Zuul
Branch: master

commit b78aeab4fd821aea3f5655a96e85fd67ca46fcee
Author: Christian Schwede <email address hidden>
Date: Tue Mar 27 17:51:05 2018 +0200

    Fix missing permissions on Swift rebalance playbook

    The playbook is executed as user heat-admin on the nodes, and some tasks
    need to read and/or write to directories that are owned by the
    containers (ie with a numeric id on the host itself).

    Closes-Bug: 1759311
    Change-Id: Ia766bc44a647fec15ff662f1ef9ffb67860b155b

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/557372

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-common (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/557425

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/queens)

Reviewed: https://review.openstack.org/557372
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=3f8fd210e02714facaef7494b9bd4ff9946f7070
Submitter: Zuul
Branch: stable/queens

commit 3f8fd210e02714facaef7494b9bd4ff9946f7070
Author: Christian Schwede <email address hidden>
Date: Tue Mar 27 17:51:05 2018 +0200

    Fix missing permissions on Swift rebalance playbook

    The playbook is executed as user heat-admin on the nodes, and some tasks
    need to read and/or write to directories that are owned by the
    containers (ie with a numeric id on the host itself).

    Closes-Bug: 1759311
    Change-Id: Ia766bc44a647fec15ff662f1ef9ffb67860b155b
    (cherry picked from commit b78aeab4fd821aea3f5655a96e85fd67ca46fcee)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-common (master)

Reviewed: https://review.openstack.org/557425
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=1787014691a97e9937977ba373fe0e1e4e2ab3fb
Submitter: Zuul
Branch: master

commit 1787014691a97e9937977ba373fe0e1e4e2ab3fb
Author: Christian Schwede <email address hidden>
Date: Wed Mar 28 18:16:24 2018 +0200

    Fix parameter indentation on Swift rebalance playbook

    Unfortunately I messed up the indentation during a rebase.

    Related-Bug: 1759311
    Change-Id: I31db903787feded6acecd67dc98ef10b6bf26ea8

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-common (stable/queens)

Related fix proposed to branch: stable/queens
Review: https://review.openstack.org/560337

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 9.0.0

This issue was fixed in the openstack/tripleo-common 9.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 8.6.1

This issue was fixed in the openstack/tripleo-common 8.6.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-common (stable/queens)

Reviewed: https://review.openstack.org/560337
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=c7d57df3bcb3b6e1277f2a3f6eb96f8acc1ea312
Submitter: Zuul
Branch: stable/queens

commit c7d57df3bcb3b6e1277f2a3f6eb96f8acc1ea312
Author: Christian Schwede <email address hidden>
Date: Wed Mar 28 18:16:24 2018 +0200

    Fix parameter indentation on Swift rebalance playbook

    Unfortunately I messed up the indentation during a rebase.

    Related-Bug: 1759311
    Change-Id: I31db903787feded6acecd67dc98ef10b6bf26ea8
    (cherry picked from commit 1787014691a97e9937977ba373fe0e1e4e2ab3fb)

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.