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

Fixes issue where service stop does not work in linux systems. Closes #653 #654

Merged
merged 6 commits into from
Jul 21, 2021

Conversation

binaek
Copy link
Contributor

@binaek binaek commented Jul 20, 2021

No description provided.

@binaek binaek added the bug Something isn't working label Jul 20, 2021
@binaek binaek requested a review from kaidaguerre July 20, 2021 11:33
@binaek binaek self-assigned this Jul 20, 2021

if !exitSuccessful {
log.Printf("[ERROR] ** > Failed to stop service\n")
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want all this logging in production code?

Copy link
Contributor

Choose a reason for hiding this comment

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

should it be at TRACE instead? so we can enable it as required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This code should never be executed . If it comes here, then we will get this as a BIG RED FLAG!!!

Copy link
Contributor

Choose a reason for hiding this comment

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

all the same, I don't think we want a wall of ERROR lines - we could print a single error line, and then format the remaining information in to an error report which is printed underneath

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@binaek
Copy link
Contributor Author

binaek commented Jul 21, 2021

When the service fails to stop, the following log is printed out:

[ERROR] Failed to stop service
[ERROR] Service Details:
> Name: postgres
> CmdLine: /Users/binaeksarkar/.steampipe/db/12.1.0/postgres/bin/postgres -p 9193 -c listen_addresses="*" -c application_name=steampipe -c cluster_name=steampipe -c autovacuum=off -c bgwriter_lru_maxpages=0 -c effective-cache-size=64kB -c fsync=off -c full_page_writes=off -c maintenance-work-mem=1024kB -c password_encryption=scram-sha-256 -c random-page-cost=0.01 -c seq-page-cost=0.01 -c temp-buffers=800kB -c timezone=UTC -c track_activities=off -c track_counts=off -c wal-buffers=32kB -c work-mem=64kB -c jit=off -c log_statement=all -c log_min_duration_statement=2000 -c logging_collector=on -c log_min_error_statement=error -c log_directory=/Users/binaeksarkar/.steampipe/logs -c log_filename=database-%Y-%m-%d.log -c ssl=on -c ssl_cert_file=/Users/binaeksarkar/.steampipe/db/12.1.0/data/server.crt -c ssl_key_file=/Users/binaeksarkar/.steampipe/db/12.1.0/data/server.key -D /Users/binaeksarkar/.steampipe/db/12.1.0/data
> Status: S
> Executable: /Users/binaeksarkar/.steampipe/db/12.1.0/postgres/bin/postgres
> Username: binaeksarkar

> Parent Details
  > Name: launchd
  > CmdLine: /sbin/launchd
  > Status: S
  > Executable: /sbin/launchd
  > Username: root

> Children Details
  > Name: postgres
  > CmdLine: postgres: steampipe: logger
  > Status: S
  > Executable: /Users/binaeksarkar/.steampipe/db/12.1.0/postgres/bin/postgres
  > Username: binaeksarkar

  > Name: postgres
  > CmdLine: postgres: steampipe: checkpointer
  > Status: S
  > Executable: /Users/binaeksarkar/.steampipe/db/12.1.0/postgres/bin/postgres
  > Username: binaeksarkar

  > Name: postgres
  > CmdLine: postgres: steampipe: background writer
  > Status: S
  > Executable: /Users/binaeksarkar/.steampipe/db/12.1.0/postgres/bin/postgres
  > Username: binaeksarkar

  > Name: postgres
  > CmdLine: postgres: steampipe: walwriter
  > Status: S
  > Executable: /Users/binaeksarkar/.steampipe/db/12.1.0/postgres/bin/postgres
  > Username: binaeksarkar

  > Name: postgres
  > CmdLine: postgres: steampipe: stats collector
  > Status: S
  > Executable: /Users/binaeksarkar/.steampipe/db/12.1.0/postgres/bin/postgres
  > Username: binaeksarkar

  > Name: postgres
  > CmdLine: postgres: steampipe: logical replication launcher
  > Status: S
  > Executable: /Users/binaeksarkar/.steampipe/db/12.1.0/postgres/bin/postgres
  > Username: binaeksarkar


Screenshot

@binaek binaek linked an issue Jul 21, 2021 that may be closed by this pull request
@kaidaguerre kaidaguerre merged commit 61fa0b7 into main Jul 21, 2021
@kaidaguerre kaidaguerre deleted the stop_timeout_653 branch July 21, 2021 11:14
ahirreddy pushed a commit to ahirreddy/steampipe that referenced this pull request Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

implicit service stop times out in linux
2 participants