Closed jarpat closed 1 year ago
This is fine and I know we recently did this for one of the other providers, we now have to ensure that if this directory exists that we document that on its initial run the permissions need to be set to 777 and the owner/group needs to be modified as nobody:nogroup as we now cannot guarantee this. So doc will be needed here and in the other provider or providers we've updated with this code check.
Hey @thpang, on this line in the cloud-init https://github.com/sassoftware/viya4-iac-gcp/blob/IAC-1091/files/cloud-init/jump/cloud-config#L34 we document the new functionality. Would making this section a bit more verbose to describe the updated behavior more clearly be what you are looking for?
Changes:
When a new jump server vm is created, it sets file ownership and permissions for the mounted NFS location which allows Viya services to initialize successfully. Importantly, the file system settings should only be applied once and not repeatedly in the event that the jump vm is destroyed and recreated in the same cluster. This change checks if the
${jump_rwx_filestore_path}/pvs
folder already exists and skips creating the folder and recursively setting ownerships and permissions if it does. If the jump vm is being created for the first time when the pvs folder is absent, creating the folder and setting permissions and ownership will occur an initial time and not thereafter.Tests:
Executed the following workflow to verify that file permissions and ownership was not modified on Jump VM recreation
Steps: