# AWX - Project persistent storage claim - ReadWriteOnce or ReadWriteMany

**URL:** <https://forum.ansible.com/t/awx-project-persistent-storage-claim-readwriteonce-or-readwritemany/1633>\
**Category:** Get Help\
**Tags:** awx, kubernetes\
**Created:** [October 11, 2023, 1:09pm UTC](https://forum.ansible.com/t/awx-project-persistent-storage-claim-readwriteonce-or-readwritemany/1633 "2023-10-11T13:09:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![disi](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/disi/32/1138_2.png) [@disi](https://forum.ansible.com/u/disi)\
**Post date:** [October 11, 2023, 1:09pm UTC](https://forum.ansible.com/t/awx-project-persistent-storage-claim-readwriteonce-or-readwritemany/1633/1 "2023-10-11T13:09:46Z")

</div>

Can the project volume claim for AWX be ReadWriteMany in Azure Kubernetes?

Today I upgraded from 22.4.0 to 23.3.0, our project is stored in a git repository and the database in an external sql instance.

The upgrade failed, because it could not release the claim and rebond the new pods with the project storage claim.

My test to make future upgrades more smooth.

I patched the storage to “Retain” from default “Delete” in Azure Kubernetes.  
I deleted the deployment of awx-web and awx-task manually to release the storage claim.  
Then I changed the yaml in the pvc to ReadWriteMany for this volume and let awx-operator re-reploy awx-web and awx-task.  
It failed to claim the volume.

After changing the volume claim back to ReadWriteOnce, AWX was up and running in seconds and the new pods deployed.

---

<div class="post-metadata">

**Author:** ![TheRealHaoLiu](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/therealhaoliu/32/100_2.png) [@TheRealHaoLiu](https://forum.ansible.com/u/TheRealHaoLiu)\
**Post date:** [October 11, 2023, 6:54pm UTC](https://forum.ansible.com/t/awx-project-persistent-storage-claim-readwriteonce-or-readwritemany/1633/2 "2023-10-11T18:54:17Z")

</div>

AFAIR (I could be wrong) default storage class for AKS does not support RWM that’s why we failed to claim the volume when using RWM

There should be a way to setup a different storage class that support RWM.

---

<div class="post-metadata">

**Author:** ![disi](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/disi/32/1138_2.png) [@disi](https://forum.ansible.com/u/disi)\
**Post date:** [October 11, 2023, 8:41pm UTC](https://forum.ansible.com/t/awx-project-persistent-storage-claim-readwriteonce-or-readwritemany/1633/3 "2023-10-11T20:41:36Z")

</div>

Thank you for the hint. I did not think about the storage class, it is indeed “default”.

So AWX should work if I create a project claim with RWM?  
I’ll look into it tomorrow 🙂

---

<div class="post-metadata">

**Author:** ![TheRealHaoLiu](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/therealhaoliu/32/100_2.png) [@TheRealHaoLiu](https://forum.ansible.com/u/TheRealHaoLiu)\
**Post date:** [October 12, 2023, 12:36am UTC](https://forum.ansible.com/t/awx-project-persistent-storage-claim-readwriteonce-or-readwritemany/1633/4 "2023-10-12T00:36:16Z")

</div>

If you get it to work would u mind providing the information back here so other people who might have the same question can benefit ❤ thanks!

---

<div class="post-metadata">

**Author:** ![disi](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/disi/32/1138_2.png) [@disi](https://forum.ansible.com/u/disi)\
**Post date:** [October 13, 2023, 1:25pm UTC](https://forum.ansible.com/t/awx-project-persistent-storage-claim-readwriteonce-or-readwritemany/1633/5 "2023-10-13T13:25:53Z")

</div>

Hello, so today I tested RedWriteMany with azurefile storageclass.  
AWX deploys, then I tried to do a project sync.  
The project sync fails, because it cannot put a lock on the filesystem.  
This answers my question 🙂

```auto
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /runner/.ansible/tmp/ansible-tmp-1697202893.022734-115-235855685788987/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
    "changed": false,
    "cmd": "/usr/bin/git clone --origin origin 'https://$encrypted$:$encrypted$@gitlab.XXX.com/ladoga/ansible/roles.git' /var/lib/awx/projects/_8__XXX_ansible_gitlab",
    "invocation": {
        "module_args": {
            "accept_hostkey": false,
            "accept_newhostkey": false,
            "archive": null,
            "archive_prefix": null,
            "bare": false,
            "clone": true,
            "depth": null,
            "dest": "/var/lib/awx/projects/_8__XXX_ansible_gitlab",
            "executable": null,
            "force": true,
            "gpg_whitelist": [],
            "key_file": null,
            "recursive": true,
            "reference": null,
            "refspec": null,
            "remote": "origin",
            "repo": "https://$encrypted$:$encrypted$@gitlab.XXX.com/ladoga/ansible/roles.git",
            "separate_git_dir": null,
            "single_branch": false,
            "ssh_opts": null,
            "track_submodules": false,
            "umask": null,
            "update": true,
            "verify_commit": false,
            "version": "main"
        }
    },
    "msg": "Cloning into '/var/lib/awx/projects/_8 __XXX_ansible_gitlab'...\\nerror: chmod on /var/lib/awx/projects/_8__ XXX_ansible_gitlab/.git/config.lock failed: Operation not permitted\\nfatal: could not set 'core.filemode' to 'false'",
    "rc": 128,
    "stderr": "Cloning into '/var/lib/awx/projects/_8 __XXX_ansible_gitlab'...\\nerror: chmod on /var/lib/awx/projects/_8__ XXX_ansible_gitlab/.git/config.lock failed: Operation not permitted\\nfatal: could not set 'core.filemode' to 'false'\\n",
    "stderr_lines": [
        "Cloning into '/var/lib/awx/projects/_8__XXX_ansible_gitlab'...",
        "error: chmod on /var/lib/awx/projects/_8__XXX_ansible_gitlab/.git/config.lock failed: Operation not permitted",
        "fatal: could not set 'core.filemode' to 'false'"
    ],
    "stdout": "",
    "stdout_lines": []
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [November 12, 2023, 1:26pm UTC](https://forum.ansible.com/t/awx-project-persistent-storage-claim-readwriteonce-or-readwritemany/1633/6 "2023-11-12T13:26:35Z")

</div>

Closed on November 12, 2023, 1:26pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
