# Error: failed to create subPath directory for volumeMount "awx-secret-key" on minishift

**URL:** <https://forum.ansible.com/t/error-failed-to-create-subpath-directory-for-volumemount-awx-secret-key-on-minishift/33244>\
**Category:** AWX Project\
**Tags:** awx, kubernetes\
**Created:** [June 24, 2020, 8:13am UTC](https://forum.ansible.com/t/error-failed-to-create-subpath-directory-for-volumemount-awx-secret-key-on-minishift/33244 "2020-06-24T08:13:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eikichi\_Onizuka](https://avatars.discourse-cdn.com/v4/letter/e/c89c15/32.png) [@Eikichi\_Onizuka](https://forum.ansible.com/u/Eikichi_Onizuka)\
**Post date:** [June 24, 2020, 8:13am UTC](https://forum.ansible.com/t/error-failed-to-create-subpath-directory-for-volumemount-awx-secret-key-on-minishift/33244/1 "2020-06-24T08:13:47Z")

</div>

Hi,

Have tried following the AWX install guide for a super quick and simple setup with minishift:  
[https://github.com/ansible/awx/blob/devel/INSTALL.md](https://github.com/ansible/awx/blob/devel/INSTALL.md)

All I want to do is set up a quick and dirty demo environment for my own learning that I can throw away/reinstall easily.

My setup is: MacOS Catalina with ansible 2.9.10 and minishift 1.34.2 (virtualbox driver) and oc 1.11.0.

The only change I have made is in the installer inventory file:

openshift\_host=192.168.99.123:8443

openshift\_project=awx

openshift\_user=developer

openshift\_skip\_tls\_verify=True

openshift\_pg\_emptydir=True

The installer playbook runs up to this point and then times out:

TASK [kubernetes : Wait for management pod to start]

When I check the status of the pods in openshift, the postgreSQL one is fine but the other’s are in “Create Container Config Error” state (specifically the awx-task, awx-web and ansible-tower-management containers seem to get a **Error: failed to create subPath directory for volumeMount “awx-secret-key”** error). I have no idea what that means or what I’m supposed to do to try and resolve.

Anyone have any clue as to what I did wrong?

I have tried following the install guide and several different versions of AWX on minishift (11.3.0, 12.0.0 and 13.0.0) with the same results. Looks like the same issue was also raised here [https://github.com/ansible/awx/issues/6131](https://github.com/ansible/awx/issues/6131) but without any sort of resolution.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Eikichi\_Onizuka](https://avatars.discourse-cdn.com/v4/letter/e/c89c15/32.png) [@Eikichi\_Onizuka](https://forum.ansible.com/u/Eikichi_Onizuka)\
**Post date:** [June 25, 2020, 6:38am UTC](https://forum.ansible.com/t/error-failed-to-create-subpath-directory-for-volumemount-awx-secret-key-on-minishift/33244/2 "2020-06-25T06:38:18Z")

</div>

After a bit of googling about the error and looking through a bunch of similar issues, it looks like there is some incompatibility between the version of kubernetes used in the latest minishift and the installer scripts. I have given up trying to work out what the problem is. I’d be interested to know if _anyone_ has actually managed to get a recent AWX release working using minishift and if so, what those steps are.

In the end I opted to switch to using the docker-compose install method locally on my macOS machine. This btw, also seems to have some issues with the latest version using postgreSQL 10 on my macOS machine that require some work-arounds before it actually starts up. Since that isn’t quite working either, now I’m going to give the kubernetes installer a go…

---

<div class="post-metadata">

**Author:** ![Eikichi\_Onizuka](https://avatars.discourse-cdn.com/v4/letter/e/c89c15/32.png) [@Eikichi\_Onizuka](https://forum.ansible.com/u/Eikichi_Onizuka)\
**Post date:** [June 25, 2020, 7:21am UTC](https://forum.ansible.com/t/error-failed-to-create-subpath-directory-for-volumemount-awx-secret-key-on-minishift/33244/3 "2020-06-25T07:21:56Z")

</div>

Just following up again to confirm I was able to get the kubernetes install method working fine on my macOS (using minikube) with the latest 13.0.0 release.

---

<div class="post-metadata">

**Author:** ![Sami\_Marjokorpi](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@Sami\_Marjokorpi](https://forum.ansible.com/u/Sami_Marjokorpi)\
**Post date:** [July 17, 2020, 6:49am UTC](https://forum.ansible.com/t/error-failed-to-create-subpath-directory-for-volumemount-awx-secret-key-on-minishift/33244/4 "2020-07-17T06:49:58Z")

</div>

Hi,

I’m having exactly same issue. Checked from pods & containers that some of secrets are mapped correctly but this particular awx-secret-key does not map as expected. Would be nice to get this working with minishift, but propably need to change minishift to minikube as Eikichi did.

---

<div class="post-metadata">

**Author:** ![ffirg](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ffirg/32/10029_2.png) [@ffirg](https://forum.ansible.com/u/ffirg)\
**Post date:** [July 24, 2020, 5:14pm UTC](https://forum.ansible.com/t/error-failed-to-create-subpath-directory-for-volumemount-awx-secret-key-on-minishift/33244/5 "2020-07-24T17:14:42Z")

</div>

I’m the author of [https://opensource.com/article/18/10/how-run-awx-minishift](https://opensource.com/article/18/10/how-run-awx-minishift) so thought I’d give it a try with the latest as well.  
I concur and get the same issue.

It appears to be related to using subPath in the management pod template.  
I can see that if I ssh into minishift that:

E0724 15:33:43.239246 3441 kubelet\_pods.go:198] failed to create subPath directory for volumeMount “awx-secret-key” of container “awx-task”: mkdir /var/lib/minishift/base/openshift.local.volumes/pods/27156e76-cdc1-11ea-b15c-080027da51ef/volumes/kubernetes.io~secret/awx-secret-key/…2020\_07\_24\_15\_20\_48.370297489/SECRET\_KEY: not a directory

That’s because its a file at that destination not a directory.

I tried hacking out the subPATH definitions in the install templates which got it further then all hell breaks lose later on ☹

So definitely looks like an AWX issue rather than minishift. Has anyone raised this problem on the AWX github? That is the way to get things fixed.

Phil
