Skip to content
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

lxd_volume_container_attach resource #39

Merged
merged 3 commits into from
Apr 19, 2017

Conversation

jtopjian
Copy link
Collaborator

I can rebase when #38 is merged, if needed.

It's also possible to attach a volume to a profile, so I'll be working on lxd_volume_profile_attach next.

@jtopjian jtopjian requested a review from sl1pm4t April 17, 2017 18:04
@jtopjian jtopjian force-pushed the lxd-volume-container-attach branch from 3543795 to eb6f134 Compare April 17, 2017 19:26
@jtopjian jtopjian force-pushed the lxd-volume-container-attach branch from eb6f134 to 1264374 Compare April 17, 2017 20:09
@jtopjian
Copy link
Collaborator Author

There we go. We have too many tests 😄

@sl1pm4t
Copy link
Collaborator

sl1pm4t commented Apr 18, 2017

How does one set file permissions / ownership for attached volumes?
I've tried creating a volume from dir and zfs based pool, but root inside the container does not have write permissions.

Also the owner is:

drwxr-xr-x  2 nobody nogroup  2 Apr 18 20:36 attach-test

@jtopjian
Copy link
Collaborator Author

Yeah, this is unfortunately a whole other issue. There are quite a few open and closed issues about this on the LXD repo. I don't have links off-hand, but search for setfacl. I think the issue borders on what's under LXD's realm and not which is why there isn't a good solution yet. IMO, LXD should handle setting permissions on new volumes.

I've only tested this with the dir and btrfs backends and had to use setfacl for both. I'm sure ZFS has the same problems, but I'm not sure about LVM.

And this isn't specific to the volume/attach resources, either. Same thing happens when you define a device in a profile or container.

@sl1pm4t sl1pm4t merged commit 3a56b48 into terraform-lxd:master Apr 19, 2017
@jtopjian jtopjian deleted the lxd-volume-container-attach branch December 13, 2020 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants