RE: Container cannot write to volume? path created as nagios user???

2019-02-12 Thread Marc Roos
 
Thanks Jie, for looking into this. I just looked at the 
docker-entrypoint.sh and saw the script is expecting usernames and chown 
dirs. When I created the postgres user and ran under postgres, it was 
also resolved here.




-Original Message-
From: Jie Yu [mailto:yujie@gmail.com] 
Sent: 12 February 2019 21:08
To: user
Subject: Re: Container cannot write to volume? path created as nagios 
user???

Marc, I cannot reproduce the issue using Mesos mini with 1.7.x head

docker run --rm --privileged -p 5050:5050 -p 5051:5051 -p 8080:8080 
mesos/mesos-mini:1.7.x


Go to browser http://localhost:8080/ and paste your marathon json there.

- Jie

On Tue, Feb 12, 2019 at 11:51 AM Marc Roos  
wrote:


 
Hi Jie,
I am using root for now, if I get it working correctly I will run 
it as 
a different user. Marathon is running under marathon user.

{
  "id": "postgres",
  "user": "root",
  "cmd": null,
  "cpus": 0.5,
  "mem": 512,
  "instances": 1,
  "acceptedResourceRoles": ["*"],
  "container": {
"type": "MESOS",
"volumes": [
  {
"containerPath": "data",
"persistent": {
  "type": "root",
  "size": 100
  },
"mode": "RW" 
  }
],
  "docker": {
  "image": "postgres",
  "credential": null,
  "forcePullImage": false
}
  },
  "env": {
"POSTGRES_PASSWORD": "example",
        "PGDATA": "/data"
      },
  "args": [

  ]
}



-Original Message-
From: Jie Yu [mailto:yujie@gmail.com] 
Sent: 12 February 2019 20:48
To: user
Subject: Re: Container cannot write to volume? path created as 
nagios 
user???

What user do you use to launch containers? We need more information 
to 
triage this.

- Jie

On Tue, Feb 12, 2019 at 11:44 AM Marc Roos 
 
wrote:




[@m03 foo]# ls -alrt
total 0
drwxr-xr-x 3 root   root 17 Dec 23  2017 ..
drwx-- 2 nagios root  6 Feb 12 20:32 
postgres#data#e703252b-2efc-11e9-b19a-5051143001a1
drwxr-xr-x 3 root   root 64 Feb 12 20:32 .

Preparing rootfs at 

/var/lib/mesos/provisioner/containers/1b105f51-f6c1-4aa2-b68f-5221b
21722

0d/backends/copy/rootfses/dd25199c-7ab3-4645-8bc9-b5e69a913b37
Changing root to 

/var/lib/mesos/provisioner/containers/1b105f51-f6c1-4aa2-b68f-5221b
21722

0d/backends/copy/rootfses/dd25199c-7ab3-4645-8bc9-b5e69a913b37
mkdir: cannot create directory data: Permission denied
I0212 20:32:32.791131  3593 executor.cpp:994] Command 
exited with 
status 
1 (pid: 3597)



mesos-1.7.0-2.0.3.x86_64














Re: Container cannot write to volume? path created as nagios user???

2019-02-12 Thread Jie Yu
Marc, I cannot reproduce the issue using Mesos mini with 1.7.x head

docker run --rm --privileged -p 5050:5050 -p 5051:5051 -p 8080:8080
mesos/mesos-mini:1.7.x

Go to browser http://localhost:8080/ and paste your marathon json there.

- Jie

On Tue, Feb 12, 2019 at 11:51 AM Marc Roos  wrote:

>
> Hi Jie,
> I am using root for now, if I get it working correctly I will run it as
> a different user. Marathon is running under marathon user.
>
> {
>   "id": "postgres",
>   "user": "root",
>   "cmd": null,
>   "cpus": 0.5,
>   "mem": 512,
>   "instances": 1,
>   "acceptedResourceRoles": ["*"],
>   "container": {
> "type": "MESOS",
> "volumes": [
>   {
> "containerPath": "data",
> "persistent": {
>   "type": "root",
>   "size": 100
>   },
> "mode": "RW"
>   }
> ],
>   "docker": {
>   "image": "postgres",
>   "credential": null,
>       "forcePullImage": false
> }
>   },
>   "env": {
> "POSTGRES_PASSWORD": "example",
> "PGDATA": "/data"
>   },
>   "args": [
>
>   ]
> }
>
>
>
> -Original Message-
> From: Jie Yu [mailto:yujie@gmail.com]
> Sent: 12 February 2019 20:48
> To: user
> Subject: Re: Container cannot write to volume? path created as nagios
> user???
>
> What user do you use to launch containers? We need more information to
> triage this.
>
> - Jie
>
> On Tue, Feb 12, 2019 at 11:44 AM Marc Roos 
> wrote:
>
>
>
>
> [@m03 foo]# ls -alrt
> total 0
> drwxr-xr-x 3 root   root 17 Dec 23  2017 ..
> drwx-- 2 nagios root  6 Feb 12 20:32
> postgres#data#e703252b-2efc-11e9-b19a-5051143001a1
> drwxr-xr-x 3 root   root 64 Feb 12 20:32 .
>
> Preparing rootfs at
> /var/lib/mesos/provisioner/containers/1b105f51-f6c1-4aa2-b68f-5221b
> 21722
> 0d/backends/copy/rootfses/dd25199c-7ab3-4645-8bc9-b5e69a913b37
> Changing root to
> /var/lib/mesos/provisioner/containers/1b105f51-f6c1-4aa2-b68f-5221b
> 21722
> 0d/backends/copy/rootfses/dd25199c-7ab3-4645-8bc9-b5e69a913b37
> mkdir: cannot create directory data: Permission denied
> I0212 20:32:32.791131  3593 executor.cpp:994] Command exited with
> status
> 1 (pid: 3597)
>
>
>
> mesos-1.7.0-2.0.3.x86_64
>
>
>
>
>
>
>
>
>
>


RE: Container cannot write to volume? path created as nagios user???

2019-02-12 Thread Marc Roos
 
Hi Jie,
I am using root for now, if I get it working correctly I will run it as 
a different user. Marathon is running under marathon user.

{
  "id": "postgres",
  "user": "root",
  "cmd": null,
  "cpus": 0.5,
  "mem": 512,
  "instances": 1,
  "acceptedResourceRoles": ["*"],
  "container": {
"type": "MESOS",
"volumes": [
  {
"containerPath": "data",
"persistent": {
  "type": "root",
  "size": 100
  },
"mode": "RW" 
  }
],
  "docker": {
  "image": "postgres",
  "credential": null,
  "forcePullImage": false
    }
  },
  "env": {
"POSTGRES_PASSWORD": "example",
"PGDATA": "/data"
  },
  "args": [
   
  ]
}



-Original Message-
From: Jie Yu [mailto:yujie@gmail.com] 
Sent: 12 February 2019 20:48
To: user
Subject: Re: Container cannot write to volume? path created as nagios 
user???

What user do you use to launch containers? We need more information to 
triage this.

- Jie

On Tue, Feb 12, 2019 at 11:44 AM Marc Roos  
wrote:




[@m03 foo]# ls -alrt
total 0
drwxr-xr-x 3 root   root 17 Dec 23  2017 ..
drwx-- 2 nagios root  6 Feb 12 20:32 
postgres#data#e703252b-2efc-11e9-b19a-5051143001a1
drwxr-xr-x 3 root   root 64 Feb 12 20:32 .

Preparing rootfs at 
/var/lib/mesos/provisioner/containers/1b105f51-f6c1-4aa2-b68f-5221b
21722
0d/backends/copy/rootfses/dd25199c-7ab3-4645-8bc9-b5e69a913b37
Changing root to 
/var/lib/mesos/provisioner/containers/1b105f51-f6c1-4aa2-b68f-5221b
21722
0d/backends/copy/rootfses/dd25199c-7ab3-4645-8bc9-b5e69a913b37
mkdir: cannot create directory data: Permission denied
I0212 20:32:32.791131  3593 executor.cpp:994] Command exited with 
status 
1 (pid: 3597)



mesos-1.7.0-2.0.3.x86_64











Re: Container cannot write to volume? path created as nagios user???

2019-02-12 Thread Jie Yu
What user do you use to launch containers? We need more information to
triage this.

- Jie

On Tue, Feb 12, 2019 at 11:44 AM Marc Roos  wrote:

>
>
> [@m03 foo]# ls -alrt
> total 0
> drwxr-xr-x 3 root   root 17 Dec 23  2017 ..
> drwx-- 2 nagios root  6 Feb 12 20:32
> postgres#data#e703252b-2efc-11e9-b19a-5051143001a1
> drwxr-xr-x 3 root   root 64 Feb 12 20:32 .
>
> Preparing rootfs at
> /var/lib/mesos/provisioner/containers/1b105f51-f6c1-4aa2-b68f-5221b21722
> 0d/backends/copy/rootfses/dd25199c-7ab3-4645-8bc9-b5e69a913b37
> Changing root to
> /var/lib/mesos/provisioner/containers/1b105f51-f6c1-4aa2-b68f-5221b21722
> 0d/backends/copy/rootfses/dd25199c-7ab3-4645-8bc9-b5e69a913b37
> mkdir: cannot create directory data: Permission denied
> I0212 20:32:32.791131  3593 executor.cpp:994] Command exited with status
> 1 (pid: 3597)
>
>
>
> mesos-1.7.0-2.0.3.x86_64
>
>
>
>
>
>
>


Container cannot write to volume? path created as nagios user???

2019-02-12 Thread Marc Roos



[@m03 foo]# ls -alrt
total 0
drwxr-xr-x 3 root   root 17 Dec 23  2017 ..
drwx-- 2 nagios root  6 Feb 12 20:32 
postgres#data#e703252b-2efc-11e9-b19a-5051143001a1
drwxr-xr-x 3 root   root 64 Feb 12 20:32 .

Preparing rootfs at 
/var/lib/mesos/provisioner/containers/1b105f51-f6c1-4aa2-b68f-5221b21722
0d/backends/copy/rootfses/dd25199c-7ab3-4645-8bc9-b5e69a913b37
Changing root to 
/var/lib/mesos/provisioner/containers/1b105f51-f6c1-4aa2-b68f-5221b21722
0d/backends/copy/rootfses/dd25199c-7ab3-4645-8bc9-b5e69a913b37
mkdir: cannot create directory data: Permission denied
I0212 20:32:32.791131  3593 executor.cpp:994] Command exited with status 
1 (pid: 3597)



mesos-1.7.0-2.0.3.x86_64