Skip to content

feat(ops): check process running with posix.signal insteadof lsof#7006

Merged
spacewander merged 15 commits into
apache:masterfrom
kwanhur:cli-check-pid
May 20, 2022
Merged

feat(ops): check process running with posix.signal insteadof lsof#7006
spacewander merged 15 commits into
apache:masterfrom
kwanhur:cli-check-pid

Conversation

@kwanhur

@kwanhur kwanhur commented May 8, 2022

Copy link
Copy Markdown
Contributor

Description

Partial OS no lsof tool, so if use lsof to check APISIX running or not will fail.

Now send signal none(0) to check via luaposix.

  • remove shell command lsof dependency
  • use signal SIGNONE(0) check process running or not

Fixes #6977

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)

@kwanhur
kwanhur dismissed a stale review via e897939 May 8, 2022 13:04
* remove shell command lsof dependency resolve apache#6977
* use signal SIGNONE(0) check process running or not

Signed-off-by: kwanhur <[email protected]>
@kwanhur
kwanhur marked this pull request as ready for review May 8, 2022 14:20
Comment thread apisix/cli/ops.lua
Comment thread apisix/cli/ops.lua Outdated
Comment thread apisix/cli/ops.lua Outdated
tokers
tokers previously approved these changes May 10, 2022
Comment thread apisix/cli/ops.lua Outdated
Comment thread t/cli/test_ops.sh Outdated
Comment thread apisix/cli/ops.lua
Comment thread apisix/cli/ops.lua Outdated
Comment thread apisix/cli/ops.lua
tzssangglass
tzssangglass previously approved these changes May 14, 2022
@kwanhur

kwanhur commented May 14, 2022

Copy link
Copy Markdown
Contributor Author

Any test case need to cover no such process? It seems no similar in test_cli_main.sh.

@spacewander

Copy link
Copy Markdown
Member

Please make the CI pass, thanks!

@kwanhur

kwanhur commented May 15, 2022

Copy link
Copy Markdown
Contributor Author

CI action run failed on t/plugin/traffic-split.t 6441580676 and t/plugin/api-breaker.t 6441580676 6441580789

Plz trigger to rerun them :-)

@spacewander

Copy link
Copy Markdown
Member

Let's merge master to make CI pass.

@kwanhur

kwanhur commented May 16, 2022

Copy link
Copy Markdown
Contributor Author

Had merged. Plz rerun this action.

cc @spacewander @tokers @tzssangglass

@tokers

tokers commented May 17, 2022

Copy link
Copy Markdown
Contributor

@kwanhur Please make the CI pass, thanks!

@tzssangglass

Copy link
Copy Markdown
Member

Had merged. Plz rerun this action.

done

Comment thread t/cli/test_main.sh
Comment thread t/cli/test_main.sh Outdated
echo "pass: ignore stale nginx.pid"

# check operation not permitted
sudo make run

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we replace this test with a test that checks no such process? It seems we don't have test to cover it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added.

@kwanhur

kwanhur commented May 19, 2022

Copy link
Copy Markdown
Contributor Author

These failed workflows take error on compilation, plz trigger to re-run them, thanks very much. @tzssangglass

../ngx_lua-0.10.20/src/ngx_http_lua_common.h:26:10: fatal error: ngx_meta_lua_api.h: No such file or directory
 #include "ngx_meta_lua_api.h"
          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.

spacewander
spacewander previously approved these changes May 20, 2022
Comment thread t/cli/test_main.sh Outdated
@spacewander
spacewander merged commit 1a6f1b8 into apache:master May 20, 2022
Liu-Junlin pushed a commit to Liu-Junlin/apisix that referenced this pull request May 20, 2022
hongbinhsu pushed a commit to fitphp/apix that referenced this pull request May 24, 2022
* upsgrteam/master: (351 commits)
  fix(proxy-cache): bypass when method mismatch cache_method (apache#7111)
  chore(script): support to install dependencies under arm64 (apache#7091)
  chore(ci): use the latest build script for apisix-base (apache#7090)
  fix(batch-requests): ignore "unix:" in the configuration (apache#7106)
  fix: install dependencies issues (apache#7092)
  feat(ops): use lua libs to backup config file insteadof shell command (apache#7048)
  test: reduce CI failure caused by flaky tests (apache#7085)
  chore(ci): move set_dns.sh to ci dir (apache#7089)
  feat: release 2.14.0 (apache#7057)
  docs: update "Tracers" Plugins (apache#7086)
  docs: update "Traffic" Plugin docs 3 (apache#7064)
  docs: update "Serverless" Plugins (apache#7076)
  feat(ops): check process running with posix.signal insteadof lsof (apache#7006)
  docs: modify how-to-build filename (apache#7087)
  docs: fix link of hot-reload in docs (apache#7081)
  chore(ci): apt update before install (apache#7080)
  docs: add pubsub develop example for kafka (apache#7059)
  ci: enable rebase in some situation (apache#7074)
  fix: redirect http to https but port not change (apache#7065)
  ci: make it pass under OpenResty 1.21 (apache#7067)
  ...
spacewander added a commit that referenced this pull request Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

help request: lsof command not found while launching

4 participants