fusionauth-containers icon indicating copy to clipboard operation
fusionauth-containers copied to clipboard

Can't use read-only file system anymore

Open GlebKuzmich opened this issue 1 year ago • 7 comments

Hey,

We've been using FusionAuth for quite a while, but starting with recent updates started to have the following error:

sed: couldn't open temporary file /opt/openjdk/conf/security/sedxxx: Read-only file system

Indeed, setting the container's read-only option to false does not seem to be a great idea.

Any advice or workaround would be much appreciated.

Best

GlebKuzmich avatar Sep 23 '22 14:09 GlebKuzmich

@mooreds I've been advised to tag you as a person that might help to find some solution to the above issue :)

GlebKuzmich avatar Oct 10 '22 11:10 GlebKuzmich

@GlebKuzmich 👋 .

Can you tell me a bit more about what you are doing where you are seeing this error? Are you creating a child image? Or are you seeing this with the default Dockerfile?

mooreds avatar Oct 12 '22 17:10 mooreds

@mooreds Hey, sorry about the delay, I need to turn on notifications :D

We use the default Dockerfile in EKS, we start to see the error mentioned above as soon we set

          securityContext:
            readOnlyRootFilesystem: true 

As far as I remember, that did not happen until FusionAuth version 1.37.x. (maybe 1.38.x). Ideally, we'd like to have the readOnlyRootFilesystem option on, so need your advice on how to get it back.

Best regards,

Gleb

GlebKuzmich avatar Oct 17 '22 12:10 GlebKuzmich

@GlebKuzmich does FusionAuth start up and when you set the readonly attribute to true? Or does it fail to start?

I looked at the startup script and the reason it does this is because of this issue: https://github.com/FusionAuth/fusionauth-site/issues/1202 and this issue: https://github.com/FusionAuth/fusionauth-issues/issues/1814 (which reverted 1202, essentially).

mooreds avatar Oct 17 '22 14:10 mooreds

@mooreds Nah, the EKS pod can't start properly with read-only being set to true, it just throws that temporary file error as soon as it spins up.

GlebKuzmich avatar Oct 17 '22 15:10 GlebKuzmich

@GlebKuzmich thanks. I will file a tracking issue in our issues repository.

No easy workaround right now, sorry.

mooreds avatar Oct 17 '22 15:10 mooreds

Feel free to add any additional info or commentary, @GlebKuzmich : https://github.com/FusionAuth/fusionauth-issues/issues/1924

Also upvote it by giving it a thumbs up emoji, as that helps us determine the roadmap.

mooreds avatar Oct 17 '22 15:10 mooreds