Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

Conversation

@iaguis
Copy link
Member

@iaguis iaguis commented Dec 15, 2015

Mimicking my host's /var/log/journal permissions, set pod's
/var/log/journal to:

    # file: journal
    # owner: root
    # group: root
    # flags: -s
    user::rwx
    group::r-x
    group:rkt:r-x
    mask::r-x
    other::r-x
    default:user::rwx
    default:group::r-x
    default:group:rkt:r-x
    default:mask::r-x
    default:other::r-x

Fixes #1755

stage0/run.go Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no clue about Posix ACL, but this line looks like you are duplicating the chmod call above.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it seems "g:%d:r-x,m:r-x" is enough

@iaguis iaguis force-pushed the iaguis/rkt-journal branch 2 times, most recently from 81bbacd to 2349d6a Compare December 15, 2015 16:57
stage0/run.go Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we care about /run/log/journal?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think so, if systemd sees /var/log/journal it uses that.

@iaguis iaguis force-pushed the iaguis/rkt-journal branch from 2349d6a to ac16b1e Compare December 16, 2015 09:49
stage0/run.go Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we only try this if the previous one does not error?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right

@iaguis
Copy link
Member Author

iaguis commented Dec 16, 2015

I'm trying https://github.com/joshlf/go-acl which looks a bit better and is statically linked by default.

@jonboulle
Copy link
Contributor

Approach seems good to me!

@iaguis iaguis force-pushed the iaguis/rkt-journal branch from ac16b1e to d7ddae9 Compare December 16, 2015 14:55
@iaguis
Copy link
Member Author

iaguis commented Dec 16, 2015

Variable expansion for cgo was not added until go 1.5, hence the build error.

@iaguis iaguis force-pushed the iaguis/rkt-journal branch from d7ddae9 to cd771fc Compare December 16, 2015 15:37
@jonboulle
Copy link
Contributor

Hmm it would be nice if we can get godep sorted and just drop 1.4 support
soon.

On Wed, Dec 16, 2015 at 4:18 PM, Iago López Galeiras <
[email protected]> wrote:

Variable expansion for cgo was not added until go 1.5
golang/go@1317581,
hence the build error.


Reply to this email directly or view it on GitHub
#1877 (comment).

@iaguis iaguis force-pushed the iaguis/rkt-journal branch 3 times, most recently from 0d81b2e to b788a66 Compare December 17, 2015 12:48
@alban alban modified the milestones: v0.15.0, v0.14.0 Dec 18, 2015
@iaguis iaguis force-pushed the iaguis/rkt-journal branch from b788a66 to de0ef4c Compare January 5, 2016 12:08
@iaguis iaguis changed the title [WIP] stage0: set journal permissions/ACLs to allow access to rkt group stage0: set journal permissions/ACLs to allow access to rkt group Jan 5, 2016
@iaguis
Copy link
Member Author

iaguis commented Jan 5, 2016

Ready for review.

@krnowak
Copy link
Collaborator

krnowak commented Jan 6, 2016

This requires updating the docs about new build dependency (development headers for libacl) and probably a configure check.

Also, how do I test it? What I did is:

  • in first tab
    • sudo ./build-rkt-0.14.0+git/bin/rkt run coreos.com/etcd:v2.0.10
  • in second tab
    • machinectl
      • got the rkt-c9129371-0c48-4f12-a67a-a0ac8e8f32cd id
    • journalctl -M rkt-c9129371-0c48-4f12-a67a-a0ac8e8f32cd
      • No journal files were opened due to insufficient permissions.

@iaguis
Copy link
Member Author

iaguis commented Jan 6, 2016

Are you in the rkt group?

On Wed, Jan 6, 2016, 14:09 Krzesimir Nowak [email protected] wrote:

This requires updating the docs about new build dependency (development
headers for libacl) and probably a configure check.

Also, how do I test it? What I did is:

  • in first tab
    • sudo ./build-rkt-0.14.0+git/bin/rkt run coreos.com/etcd:v2.0.10
  • in second tab
    • machinectl
      • got the rkt-c9129371-0c48-4f12-a67a-a0ac8e8f32cd id
    • journalctl -M rkt-c9129371-0c48-4f12-a67a-a0ac8e8f32cd
      • No journal files were opened due to insufficient permissions.


Reply to this email directly or view it on GitHub
#1877 (comment).

@krnowak
Copy link
Collaborator

krnowak commented Jan 7, 2016

It worked after adding myself to rkt group and running rkt install. Does it need some documentation update?

@krnowak
Copy link
Collaborator

krnowak commented Jan 7, 2016

Otherwise LFAD. I take it back, docs update and configure check are still TODO>

@iaguis
Copy link
Member Author

iaguis commented Jan 7, 2016

docs update and configure check are still TODO>

added those

@iaguis
Copy link
Member Author

iaguis commented Jan 7, 2016

Travis fails on go1.4 because some go tools were migrated from golang.org/x/ to the standard package and golang.org/x/tools/cmd is not versioned:

https://groups.google.com/forum/#!topic/golang-nuts/nZLhcbaa3wQ
https://groups.google.com/forum/#!topic/golang-nuts/wpUlkRdyomo

@krnowak
Copy link
Collaborator

krnowak commented Jan 7, 2016

Ok, so go 1.4 is becoming problematic (or annoying) to support - https://groups.google.com/forum/#!topic/golang-nuts/wpUlkRdyomo

Otherwise LFAD.

@iaguis
Copy link
Member Author

iaguis commented Jan 7, 2016

I'll rebase when #1941 gets merged.

iaguis added 5 commits January 7, 2016 12:02
Mimicking my host's `/var/log/journal` permissions, set pod's
`/var/log/journal` to:

```
user::rwx
group::r-x
group:rkt:r-x
mask::r-x
other::r-x
default:user::rwx
default:group::r-x
default:group:rkt:r-x
default:mask::r-x
default:other::r-x
```
@iaguis iaguis force-pushed the iaguis/rkt-journal branch from db7d01f to 807f614 Compare January 7, 2016 11:02
@iaguis
Copy link
Member Author

iaguis commented Jan 7, 2016

Updated.

iaguis added a commit that referenced this pull request Jan 7, 2016
stage0: set journal permissions/ACLs to allow access to rkt group
@iaguis iaguis merged commit 8dae5a0 into rkt:master Jan 7, 2016
@alban
Copy link
Member

alban commented Jan 7, 2016

Does it work fine with user namespaces?

@iaguis
Copy link
Member Author

iaguis commented Jan 7, 2016

Yes.

On Thu, 7 Jan 2016 at 13:22 Alban Crequy [email protected] wrote:

Does it work fine with user namespaces?


Reply to this email directly or view it on GitHub
#1877 (comment).

@jonboulle
Copy link
Contributor

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants