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

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

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 but without any sort of resolution.

Thanks in advance.

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…

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.

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.

I’m the author of 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 :frowning:

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