-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(deadline) Repository construct fails to install with MountableFsxLustre #890
Labels
Comments
jericht
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Nov 26, 2022
A temporary workaround for this would be to subclass from aws_cdk.aws_fsx import LustreFileSystem
from aws_rfdk import (
IMountingInstance,
MountableFsxLustre as OriginalMountableFsxLustre,
MountPermissions,
)
from constructs import Construct
from typing import Optional, Sequence
class MountableFsxLustre(OriginalMountableFsxLustre):
def __init__(
self,
scope: Construct,
*,
filesystem: LustreFileSystem,
extra_mount_options: Optional[Sequence[str]] = None,
mount_owner_user: Optional[str] = None,
**kwargs,
):
super().__init__(
scope,
filesystem=filesystem,
extra_mount_options=extra_mount_options,
**kwargs
)
self.mount_owner_user = mount_owner_user
def mount_to_linux_instance(
self,
target: IMountingInstance,
*,
location: str,
permissions: Optional[MountPermissions] = None,
):
super().mount_to_linux_instance(target, location=location, permissions=permissions)
if self.mount_owner_user:
target.user_data.add_commands(f"sudo chown {self.mount_owner_user} {location}") Then, when creating the repository = Repository(
# other props...
file_system=MountableFsxLustre(
# other props...
mount_owner_user='1000:1000', # The hardcoded repository UID & GID
),
) |
jusiskin
changed the title
(deadline) Repository constructe fails to install with MountableFsxLustre
(deadline) Repository construct fails to install with MountableFsxLustre
Nov 28, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
The
Repository
construct fails to install Deadline Repository when theIMountableLinuxFilesystem
provided to it is aMountableFsxLustre
because theMountableFsxLustre
class uses POSIX permissions, which causes theRepository
construct to run the Deadline Repository installer as the Deadline repository user, which will fail because the FSx Lustre file system mount point is still owned and only writable to byroot
.Reproduction Steps
Use the
Repository
construct with theMountableFsxLustre
class.Error Log
Deadline Repository installer logs:
Environment
Other
One idea is to add a "mount owner user" for
IMountableLinuxFilesystem
, where, if a subclass.usesPosixPermissions()
, then they must ensure the path the filesystem is mounted at is also owned/writable by the "mount owner user" as part of their.mountToLinuxInstance()
implementation.This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: