Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-14 Thread David Favor
Tony P wrote: Hi David. Those are excellent points. Actually, I regret not mentioning my purpose in the original e-mail. To clarify, I don't intend to run a host mariadb and a container mariadb simultaneously. Also, this is definitely not for production. This is primarily for my development en

Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-14 Thread David Favor
Tony P wrote: Hi Andrey. Actually, I should have mentioned this first but I don't mean "share" in the sense of sharing a data-dir with two database instances. Rather, I mean "share" in the context of Host to Container. I will only be running mysql in the container, not the host. So my objective

Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-14 Thread Andrey Repin
Greetings, Tony P! > Oh I see. However, changes need to be made to the database (on the host) No. Just have a maintenance container. Once you have started using containers, especially clustered systems like LXD, you should really use it, not workaround it. -- With best regards, Andrey Repin Sa

Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-14 Thread Tony P
Oh I see. However, changes need to be made to the database (on the host) before being tested on the containers. Also, after being tested on the contained it needs to be used/accessed on the host again. So snapshots won't work right? On Sat, Jul 14, 2018, 9:35 AM Andrey Repin wrote: > Greetings,

Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-14 Thread Andrey Repin
Greetings, Tony P! > Oh, that sounds interesting. How will that help/work? Mount a snapshot of original (clean) database for each test run. And destroy snapshot if all tests passed. -- With best regards, Andrey Repin Saturday, July 14, 2018 16:25:32 Sorry for my terrible english... _

Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-13 Thread Tony P
Oh, that sounds interesting. How will that help/work? On Fri, Jul 13, 2018, 8:50 PM Andrey Repin wrote: > Greetings, Tony P! > > > Hello Andrey. > > >> No. Normal testing setup includes all steps to prepare testing > environment. > >> And normally, when you test database interaction, you use moc

Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-13 Thread Andrey Repin
Greetings, Tony P! > Hello Andrey. >> No. Normal testing setup includes all steps to prepare testing environment. >> And normally, when you test database interaction, you use mocked database >> driver, so no actual database is necessary. > Sounds like you have an interesting setup. I'm glad it w

Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-12 Thread Tony P
Hello Andrey. > No. Normal testing setup includes all steps to prepare testing environment. > And normally, when you test database interaction, you use mocked database > driver, so no actual database is necessary. Sounds like you have an interesting setup. I'm glad it works for you. However, that

Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-10 Thread Andrey Repin
Greetings, Tony P! >> Then run a dedicated database container. Don't create problems for yourself, >> and you won't have to solve them. > Creating problems for myself -- story of my life haha. XD You are > absolutely right though. > However, about using a dedicated database container, I didn't wa

Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-10 Thread Tony P
Hi David. > 2) Unsure what you're attempting to accomplish modifying idmaps + restarting > LXD. Maybe you're attempting to defeat container security. > A better way to do this is... > lxc config set cname security.privileged true > lxc restart cname I didn't understand this suggestion e

Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-10 Thread Tony P
Hello Andrey > Then run a dedicated database container. Don't create problems for yourself, > and you won't have to solve them. Creating problems for myself -- story of my life haha. XD You are absolutely right though. However, about using a dedicated database container, I didn't want to do it th

Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-10 Thread Tony P
Hi Andrey, I appreciate the help, thank you. > It is no different than any other bind mount. > What's your actual problem? Well basically, the host dir belongs to mysql:mysql user/group. When its added to the container as a shared dir, the ownership changes to nobody:nogroup. The mysql/mariadb da

Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-10 Thread Andrey Repin
Greetings, Tony P! > Hi David. Those are excellent points. Actually, I regret not mentioning my > purpose in the original e-mail. To clarify, I don't intend to run a host > mariadb and a container mariadb simultaneously. Also, this is definitely not > for production. This is primarily for my devel

Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-10 Thread Andrey Repin
Greetings, Tony P! > Hi Andrey. Actually, I should have mentioned this first but I don't mean > "share" in the sense of sharing a data-dir with two database instances. > Rather, I mean "share" in the context of Host to Container. I will only be > running mysql in the container, not the host. So my

Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-09 Thread Tony P
Hi David. Those are excellent points. Actually, I regret not mentioning my purpose in the original e-mail. To clarify, I don't intend to run a host mariadb and a container mariadb simultaneously. Also, this is definitely not for production. This is primarily for my development environment. I intend

Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-09 Thread Tony P
Hi Andrey. Actually, I should have mentioned this first but I don't mean "share" in the sense of sharing a data-dir with two database instances. Rather, I mean "share" in the context of Host to Container. I will only be running mysql in the container, not the host. So my objective is basically to o

Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-09 Thread David Favor
Tony P wrote: What's the correct way to share the mysql/mariadb data dir of the host system to a container and map the permissions correctly? I have been struggling with this for a couple of days. I'm sorry if this question has been asked before, but I have searched thoroughly and not been able

Re: [lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-09 Thread Andrey Repin
Greetings, Tony P! > What's the correct way to share the mysql/mariadb data dir of the host > system to a container and map the permissions correctly? There's no correct way to *share* the database directory. Database engine simply do not expect the shared locks in the slightest. > I have been >

[lxc-users] LXD share /var/lib/mysql from host to container and map user/group

2018-07-09 Thread Tony P
What's the correct way to share the mysql/mariadb data dir of the host system to a container and map the permissions correctly? I have been struggling with this for a couple of days. I'm sorry if this question has been asked before, but I have searched thoroughly and not been able to find the solut