You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/09/16 06:31:05 UTC

[GitHub] [apisix-python-plugin-runner] SkyeYoung opened a new pull request, #55: fix: socket file permission

SkyeYoung opened a new pull request, #55:
URL: https://github.com/apache/apisix-python-plugin-runner/pull/55

   fix: #53 
   
   changes:
   * chmod socket file permission to 766
   
   cc @spacewander 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-python-plugin-runner] SkyeYoung commented on pull request #55: fix: socket file permission

Posted by GitBox <gi...@apache.org>.
SkyeYoung commented on PR #55:
URL: https://github.com/apache/apisix-python-plugin-runner/pull/55#issuecomment-1250256803

   OK, I'll finish it soon.
   
   获取 Outlook for iOS<https://aka.ms/o0ukef>
   ________________________________
   发件人: 罗泽轩 ***@***.***>
   发送时间: Sunday, September 18, 2022 8:08:27 PM
   收件人: apache/apisix-python-plugin-runner ***@***.***>
   抄送: Young ***@***.***>; Author ***@***.***>
   主题: Re: [apache/apisix-python-plugin-runner] fix: socket file permission (PR #55)
   
   
   @spacewander commented on this pull request.
   
   ________________________________
   
   In apisix/runner/server/server.py<https://github.com/apache/apisix-python-plugin-runner/pull/55#discussion_r973710599>:
   
   > @@ -84,6 +84,12 @@ def __init__(self, config: NewServerConfig):
            self.sock.bind(self.fd)
            self.sock.listen(1024)
   
   +        # the default socket permission is 0755, which prevents the 'nobody' worker process
   +        # from writing to it if the APISIX is run under root.
   +        os.chmod(self.fd, 0o766)
   +        if os.stat(self.fd).st_mode & 0xfff != 0o766:
   +            raise Exception("can't change mode for unix socket permission to 766")
   
   
   Could you update the CI configuration so the e2e test can pass?
   We need to adjust the port of Admin API.
   
   ―
   Reply to this email directly, view it on GitHub<https://github.com/apache/apisix-python-plugin-runner/pull/55#pullrequestreview-1111533464>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALRIROF4QP6MSOGRG3XS3ALV64A3XANCNFSM6AAAAAAQOA3XPE>.
   You are receiving this because you authored the thread.Message ID: ***@***.***>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-python-plugin-runner] spacewander commented on pull request #55: fix: socket file permission

Posted by GitBox <gi...@apache.org>.
spacewander commented on PR #55:
URL: https://github.com/apache/apisix-python-plugin-runner/pull/55#issuecomment-1250598957

   Maybe we can deal with codecov in the next PR?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-python-plugin-runner] bzp2010 merged pull request #55: fix: socket file permission

Posted by GitBox <gi...@apache.org>.
bzp2010 merged PR #55:
URL: https://github.com/apache/apisix-python-plugin-runner/pull/55


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-python-plugin-runner] spacewander commented on a diff in pull request #55: fix: socket file permission

Posted by GitBox <gi...@apache.org>.
spacewander commented on code in PR #55:
URL: https://github.com/apache/apisix-python-plugin-runner/pull/55#discussion_r973710599


##########
apisix/runner/server/server.py:
##########
@@ -84,6 +84,12 @@ def __init__(self, config: NewServerConfig):
         self.sock.bind(self.fd)
         self.sock.listen(1024)
 
+        # the default socket permission is 0755, which prevents the 'nobody' worker process
+        # from writing to it if the APISIX is run under root.
+        os.chmod(self.fd, 0o766)
+        if os.stat(self.fd).st_mode & 0xfff != 0o766:
+            raise Exception("can't change mode for unix socket permission to 766")

Review Comment:
   Could you update the CI configuration so the e2e test can pass?
   We need to adjust the port of Admin API.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-python-plugin-runner] codecov[bot] commented on pull request #55: fix: socket file permission

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #55:
URL: https://github.com/apache/apisix-python-plugin-runner/pull/55#issuecomment-1249015870

   # [Codecov](https://codecov.io/gh/apache/apisix-python-plugin-runner/pull/55?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#55](https://codecov.io/gh/apache/apisix-python-plugin-runner/pull/55?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (34110c6) into [master](https://codecov.io/gh/apache/apisix-python-plugin-runner/commit/3de14f8295c5d06fd56651184667b020d06d0017?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3de14f8) will **decrease** coverage by `0.09%`.
   > The diff coverage is `66.66%`.
   
   > :exclamation: Current head 34110c6 differs from pull request most recent head fc6b5dc. Consider uploading reports for the commit fc6b5dc to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master      #55      +/-   ##
   ==========================================
   - Coverage   91.72%   91.62%   -0.10%     
   ==========================================
     Files          11       11              
     Lines         749      752       +3     
   ==========================================
   + Hits          687      689       +2     
   - Misses         62       63       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/apisix-python-plugin-runner/pull/55?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [apisix/runner/server/server.py](https://codecov.io/gh/apache/apisix-python-plugin-runner/pull/55/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-YXBpc2l4L3J1bm5lci9zZXJ2ZXIvc2VydmVyLnB5) | `51.42% <66.66%> (+0.68%)` | :arrow_up: |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org