Mariadb recovery not working when kolla-ansible run in container

Bug #2073370 reported by Michal Arbet
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Status tracked in Dalmatian
Antelope
In Progress
Medium
Unassigned
Bobcat
In Progress
Medium
Unassigned
Caracal
In Progress
Medium
Unassigned
Dalmatian
Fix Released
Medium
Michal Arbet

Bug Description

Hi,

When kolla-ansible is running in container, it's not working
Problem is that tmp files are created on host where container is running...

LOG and ls >>

TASK [mariadb : Writing hostname of host with the largest seqno to temp file] *************************************************************************************************************************************
skipping: [controller0]
ok: [controller1 -> localhost]
ok: [controller2 -> localhost]

TASK [mariadb : Registering mariadb_recover_inventory_name from temp file] ****************************************************************************************************************************************
fatal: [controller0]: FAILED! => {"msg": "The 'file' lookup had an issue accessing the file '/tmp/kolla_mariadb_recover_inventory_name_shard_1'. file not found, use -vvvvv to see paths searched"}
fatal: [controller1]: FAILED! => {"msg": "The 'file' lookup had an issue accessing the file '/tmp/kolla_mariadb_recover_inventory_name_shard_1'. file not found, use -vvvvv to see paths searched"}
fatal: [controller2]: FAILED! => {"msg": "The 'file' lookup had an issue accessing the file '/tmp/kolla_mariadb_recover_inventory_name_shard_1'. file not found, use -vvvvv to see paths searched"}

PLAY RECAP ********************************************************************************************************************************************************************************************************
controller0 : ok=18 changed=4 unreachable=0 failed=1 skipped=14 rescued=0 ignored=0
controller1 : ok=18 changed=4 unreachable=0 failed=1 skipped=12 rescued=0 ignored=0
controller2 : ok=18 changed=4 unreachable=0 failed=1 skipped=12 rescued=0 ignored=0

(kolla-ansible)[root]# ls -la /tmp/ | grep recover
(kolla-ansible)[root]# ^C
(kolla-ansible)[root]#
exit
root@deploy:~# ls -la /tmp/ | grep recov
-rw-r--r-- 1 kolla kolla 12 Jul 17 10:03 kolla_mariadb_recover_inventory_name_shard_1

Changed in kolla-ansible:
assignee: nobody → Michal Arbet (michalarbet)
Changed in kolla-ansible:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla-ansible (master)

Reviewed: https://review.opendev.org/c/openstack/kolla-ansible/+/920304
Committed: https://opendev.org/openstack/kolla-ansible/commit/84e95d25a0d8a0c5e0fb68e877744ac26549c0b4
Submitter: "Zuul (22348)"
Branch: master

commit 84e95d25a0d8a0c5e0fb68e877744ac26549c0b4
Author: Michal Arbet <email address hidden>
Date: Thu May 23 18:24:10 2024 +0200

    Fix mariadb recovery

    This patch modifies tasks that are delegated to
    localhost to use local connection.
    Firstly, this is correct since SSH connection is not used,
    and secondly, it fixes the issue when kolla-ansible is
    packaged in a docker container. If the local connection
    is not used, the tasks will fail because temporary data are
    stored outside the container, whereas we need it to be
    stored inside the container so we can read them and set_facts.

    Closes-Bug: #2073370
    Change-Id: I9547d5da78da30bfeea8e97056cfa9308c977098

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

Fix proposed to branch: stable/2024.1
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/924410

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

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/924411

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

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/kolla-ansible/+/924412

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.