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

"mode" setting on config.core.v3.Pipe has no apparent effect #11809

Closed
gvwirth opened this issue Jun 29, 2020 · 4 comments · Fixed by #13493
Closed

"mode" setting on config.core.v3.Pipe has no apparent effect #11809

gvwirth opened this issue Jun 29, 2020 · 4 comments · Fixed by #13493
Labels
area/configuration area/listener stale stalebot believes this issue/PR has not been touched recently

Comments

@gvwirth
Copy link

gvwirth commented Jun 29, 2020

Hello,

We're setting up a Listener to use a unix socket, and are attempting to set the mode of the pipes to (octal) 666. We've set this config on the listener (this is copy/pasted from a config dump via the admin web interface):

  "listener": {
   "@type": "type.googleapis.com/envoy.config.listener.v3.Listener",
   "name": "listener_http",
   "address": {
    "pipe": {
     "path": "/run/copilot-http",
     "mode": 438
    }
   }, ...

However the resulting socket at /run/copilot-http has a mode of 755 (which is umask default):

gwirth@Garets-MacBook-Pro copilot-v2 % docker exec -it 76f00264e1b3 ls -la /run
total 32
drwxr-xr-x 1 root root 4096 Jun 29 22:07 .
drwxr-xr-x 1 root root 4096 Jun 29 22:07 ..
srwxr-xr-x 1 root root    0 Jun 29 22:07 copilot-http

We are running this inside of the official Envoy container, version 1.14.1. Is there extra config we're missing, or another setting that's overriding the mode of the socket perhaps?

Thank you!

@yanavlasov
Copy link
Contributor

This is potentially a bug. I think in some cases the mode specified by configuration is ignored. However I'm unsure if this covers your case.
Would you be able to provide smallest configuration that recreates the problem, please?

@gvwirth
Copy link
Author

gvwirth commented Jun 30, 2020

Archive.zip
Here is a config that reproduces the issue. Thank you for looking into this and please let us know if there is more information we can provide.

@stale
Copy link

stale bot commented Aug 1, 2020

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Aug 1, 2020
@stale
Copy link

stale bot commented Aug 8, 2020

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.

@stale stale bot closed this as completed Aug 8, 2020
sorah added a commit to sorah/envoy that referenced this issue Oct 11, 2020
It seems listener[].address.pipe.mode configuration wasn't working under v3 api.

Fixes envoyproxy#11809

Signed-off-by: Sorah Fukumori <her@sorah.jp>
lizan pushed a commit that referenced this issue Oct 13, 2020
This patch fixes the following configuration working as expected. 

```yaml
static_resources:
  listeners:
    - name: http
      address:
        pipe:
          path: '/tmp/envoy.sock'
          mode: 438 # 0666
      # ...
```

Risk Level: Low
Testing: added integration test
Docs Changes: N/A
Release Notes: N/A
Fixes: #11809

Signed-off-by: Sorah Fukumori <her@sorah.jp>
rexengineering pushed a commit to rexengineering/istio-envoy that referenced this issue Oct 15, 2021
This patch fixes the following configuration working as expected. 

```yaml
static_resources:
  listeners:
    - name: http
      address:
        pipe:
          path: '/tmp/envoy.sock'
          mode: 438 # 0666
      # ...
```

Risk Level: Low
Testing: added integration test
Docs Changes: N/A
Release Notes: N/A
Fixes: envoyproxy/envoy#11809

Signed-off-by: Sorah Fukumori <her@sorah.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration area/listener stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants