Ansible Warning: error in 'jsonfile' cache, configured path (/var/tmp/ansible_fact_cache) does not have necessary permissions

Bug #1850916 reported by Emilien Macchi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Luke Short

Bug Description

We configure the fact_caching_connection to /var/tmp/ansible_fact_cache but this directory doesn't have enough permissions so the plugin can be enabled:

"Ansible Warning: error in 'jsonfile' cache, configured path (/var/tmp/ansible_fact_cache) does not have necessary permissions"

Note: I tried to set 777 on /var/tmp/ansible_fact_cache and /var/tmp/ansible_fact_cache/undercloud (in my undercloud) and I didn't have the warning anymore.

Revision history for this message
Emilien Macchi (emilienm) wrote :
Changed in tripleo:
status: New → Triaged
importance: Undecided → Medium
milestone: none → ussuri-1
description: updated
tags: added: config-download low-hanging-fruit
Luke Short (ekultails)
Changed in tripleo:
assignee: nobody → Luke Short (ekultails)
Revision history for this message
Luke Short (ekultails) wrote :

This was introduced with this change: https://review.opendev.org/#/c/682855/

Perhaps we can consolidate these problems. We should devise a way to handle permissions to allow write access to a single Ansible cache folder for the stack, mistral, and validations users.

Revision history for this message
Luke Short (ekultails) wrote :

We already deal with permissions by recommending end-users use `setfacl` to give them access to the Mistral directory for accessing the Ansible content: https://docs.openstack.org/project-deploy-guide/tripleo-docs/latest/deployment/ansible_config_download.html#ansible-project-directory

We should move the cache to be under /var/lib/mistral/ to align with having all of the Ansible content there.

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

Fix proposed to branch: master
Review: https://review.opendev.org/693932

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

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

commit d504caff6cc7b002f779209b52ad03bbf0277cfb
Author: Luke Short <email address hidden>
Date: Tue Nov 12 15:44:36 2019 -0500

    Use the Mistral directory for storing the Ansible fact cache.

    This aligns with how TripleO currently stores all Ansible data
    in /var/lib/mistral/. Our documentation already recommends
    running setfacl on that directory if an end-user wants to
    access the files there.

    Change-Id: I29d0a353cd0a0d28f36460a8e81003378884a5bd
    Closes-Bug: #1850916
    Signed-off-by: Luke Short <email address hidden>

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

Fix proposed to branch: stable/train
Review: https://review.opendev.org/694589

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

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/694605

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

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/694607

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.opendev.org/694609

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

Reviewed: https://review.opendev.org/694589
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=066a7456f9e172b355d526bc187756c19a79b811
Submitter: Zuul
Branch: stable/train

commit 066a7456f9e172b355d526bc187756c19a79b811
Author: Luke Short <email address hidden>
Date: Tue Nov 12 15:44:36 2019 -0500

    Use the Mistral directory for storing the Ansible fact cache.

    This aligns with how TripleO currently stores all Ansible data
    in /var/lib/mistral/. Our documentation already recommends
    running setfacl on that directory if an end-user wants to
    access the files there.

    Change-Id: I29d0a353cd0a0d28f36460a8e81003378884a5bd
    Closes-Bug: #1850916
    Signed-off-by: Luke Short <email address hidden>
    (cherry picked from commit d504caff6cc7b002f779209b52ad03bbf0277cfb)

tags: added: in-stable-train
tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/stein)

Reviewed: https://review.opendev.org/694605
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=f0877d0ab90a92d7bc3f6416470bd75a8db02e03
Submitter: Zuul
Branch: stable/stein

commit f0877d0ab90a92d7bc3f6416470bd75a8db02e03
Author: Luke Short <email address hidden>
Date: Tue Nov 12 15:44:36 2019 -0500

    Use the Mistral directory for storing the Ansible fact cache.

    This aligns with how TripleO currently stores all Ansible data
    in /var/lib/mistral/. Our documentation already recommends
    running setfacl on that directory if an end-user wants to
    access the files there.

    Change-Id: I29d0a353cd0a0d28f36460a8e81003378884a5bd
    Closes-Bug: #1850916
    Resolves: rhbz#1772957
    Signed-off-by: Luke Short <email address hidden>
    (cherry picked from commit d504caff6cc7b002f779209b52ad03bbf0277cfb)

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

Reviewed: https://review.opendev.org/694607
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=d4bf2a6521cf59cbdb1fcf89878ba544bd5cc537
Submitter: Zuul
Branch: stable/rocky

commit d4bf2a6521cf59cbdb1fcf89878ba544bd5cc537
Author: Luke Short <email address hidden>
Date: Tue Nov 12 15:44:36 2019 -0500

    Use the Mistral directory for storing the Ansible fact cache.

    This aligns with how TripleO currently stores all Ansible data
    in /var/lib/mistral/. Our documentation already recommends
    running setfacl on that directory if an end-user wants to
    access the files there.

    Change-Id: I29d0a353cd0a0d28f36460a8e81003378884a5bd
    Closes-Bug: #1850916
    Resolves: rhbz#1772958
    Signed-off-by: Luke Short <email address hidden>
    (cherry picked from commit d504caff6cc7b002f779209b52ad03bbf0277cfb)

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

Reviewed: https://review.opendev.org/694609
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=253414309184911ec7e5c47d77165d5c2e3b6a33
Submitter: Zuul
Branch: stable/queens

commit 253414309184911ec7e5c47d77165d5c2e3b6a33
Author: Luke Short <email address hidden>
Date: Tue Nov 12 15:44:36 2019 -0500

    Use the Mistral directory for storing the Ansible fact cache.

    This aligns with how TripleO currently stores all Ansible data
    in /var/lib/mistral/. Our documentation already recommends
    running setfacl on that directory if an end-user wants to
    access the files there.

    Change-Id: I29d0a353cd0a0d28f36460a8e81003378884a5bd
    Closes-Bug: #1850916
    Resolves: rhbz#1772959
    Signed-off-by: Luke Short <email address hidden>
    (cherry picked from commit d504caff6cc7b002f779209b52ad03bbf0277cfb)

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

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

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

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

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

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

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

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

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

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

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.