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

ci: fix a bug that open nginx.pid failed #10061

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

xuruidong
Copy link
Contributor

Description

There are some failed "CLI Test (master)" workflow runs, such as https://github.com/apache/apisix/actions/runs/5886312117/job/15963999013 .

We can get the following error message in the "Linux Script" job:

Error: 2023/08/17 03:14:30 [error] 32685#32685: open() "/usr/local/apisix/logs/nginx.pid" failed (2: No such file or directory)
Error: Process completed with exit code 1.

The problem code is in ci/linux_apisix_master_luarocks_runner.sh

sudo PATH=$PATH apisix init
    sudo PATH=$PATH apisix start          # step 1
    sudo PATH=$PATH apisix quit           # step 2
    sudo PATH=$PATH apisix start          # step 3
    sudo PATH=$PATH apisix stop

After run apisix quit, if the process does not exit totaly before apisix start (step 3), the apisix start will not create a new process. Then the process created in "step 1" exit and nginx.pid is removed, so apisix stop will cause an error "open nginx.pid failed"
So it is necessary to wait for the process to exit after apisix quit.

Fixes # (issue)

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@shreemaan-abhishek shreemaan-abhishek merged commit 1fd2613 into apache:master Aug 21, 2023
31 checks passed
@xuruidong xuruidong deleted the xuruidong-ci-fix branch August 21, 2023 07:37
hongbinhsu pushed a commit to fitphp/apix that referenced this pull request Aug 22, 2023
* upstream/master: (77 commits)
  docs: Update admin-api.md (apache#10056)
  ci: fix a bug that can not open nginx.pid (apache#10061)
  feat: remove rust dependency by rollback lua-resty-ldap on master (apache#9936)
  docs: fix grpc-transcode.md error (apache#10059)
  feat: upgrade lua dependencies (apache#10051)
  fix: rollback lua-resty-session to 3.10 (apache#10046)
  feat: upgrade resty-redis-cluster from  1.02-4->1.05-1 (apache#10041)
  feat: update lua library (apache#10037)
  fix: worker not exited when executing quit or reload command (apache#9909)
  fix: traffic split plugin not validating upstream_id (apache#10008)
  ci: update the timeout value in cli.yml (apache#10026)
  fix(tencent-cloud-cls): DNS parsing failure (apache#9843)
  chore(deps): bump actions/setup-node from 3.7.0 to 3.8.0 (apache#10025)
  feat(openid-connect): add proxy_opts attribute (apache#9948)
  perf(log-rotate): replace string.sub with string.byte (apache#9984)
  fix(ci): replace github action in update-labels.yml (apache#9987)
  fix: can't sync etcd data if key has special character (apache#9967)
  perf(aws-lambda): cache the index of the array (apache#9944)
  fix: add support for dependency installation on endeavouros (apache#9985)
  chore(ci): automate management of unresponded issues (apache#9927)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants