Skip to content

Improve and clean up supervised process support.#8036

Merged
yossigo merged 2 commits intoredis:unstablefrom
yossigo:improve-supervision
Nov 17, 2020
Merged

Improve and clean up supervised process support.#8036
yossigo merged 2 commits intoredis:unstablefrom
yossigo:improve-supervision

Conversation

@yossigo
Copy link
Collaborator

@yossigo yossigo commented Nov 9, 2020

  • Expose "process_supervised" as an info field.
  • Log messages improvements (clarify required systemd config, report
    auto-detected supervision mode, etc.)
  • Set server.supervised properly, so it can take precedence of
    daemonize configuration. In the past daemonize settings had to be compatible with supervised (e.g. no for systemd) which could lead to misconfiguration.
  • Produce clear warning if systemd is detected/requested but executable
    is compiled without support for it, instead of silently ignoring.
  • Handle systemd notification error on startup, and turn off supervised
    mode if it failed.

Resolved #8024

* Configuration file default should now be "auto".
* Expose "process_supervised" as an info field.
* Log messages improvements (clarify required systemd config, report
  auto-detected supervision mode, etc.)
* Set server.supervised properly, so it can take precedence of
  "daemonize" configuration.
* Produce clear warning if systemd is detected/requested but executable
  is compiled without support for it, instead of silently ignoring.
* Handle systemd notification error on startup, and turn off supervised
  mode if it failed.
Copy link
Member

@oranagra oranagra left a comment

Choose a reason for hiding this comment

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

i suppose consensus is needed due to the change of default behavior and also the new info field.

redis.conf Outdated
# Note: these supervision methods only signal "process is ready."
# They do not enable continuous pings back to your supervisor.
supervised no
supervised auto
Copy link
Member

Choose a reason for hiding this comment

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

that makes the default of redis different than the default of the redis.conf.
the convention used to be that they're the same.
so, let's consider making it the default in redis, and if not, the comment here should probably be improved.
either way, this change the default behavior (of someone using this conf file), so it should maybe be shipped in a major minor version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm OK with keeping the default no for now but just include a commented out supervised auto to make it more obvious it's needed running under systemd.

Copy link
Member

Choose a reason for hiding this comment

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

ok, so make that change, and remove the major-decision label and we can merge it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Still a major-decision due to INFO field.

@oranagra oranagra added release-notes indication that this issue needs to be mentioned in the release notes state:major-decision Requires core team consensus labels Nov 9, 2020
@madolson
Copy link
Contributor

Are we keeping the default or not?

@yossigo
Copy link
Collaborator Author

yossigo commented Nov 10, 2020

@madolson Yes default is the same (no) but we hint users that auto is a good choice if they're running supervised.

@yossigo yossigo merged commit d638b05 into redis:unstable Nov 17, 2020
@yossigo yossigo deleted the improve-supervision branch November 17, 2020 10:53
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Nov 19, 2020
* Configuration file default should now be "auto".
* Expose "process_supervised" as an info field.
* Log messages improvements (clarify required systemd config, report
  auto-detected supervision mode, etc.)
* Set server.supervised properly, so it can take precedence of
  "daemonize" configuration.
* Produce clear warning if systemd is detected/requested but executable
  is compiled without support for it, instead of silently ignoring.
* Handle systemd notification error on startup, and turn off supervised
  mode if it failed.
@oranagra oranagra mentioned this pull request Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-notes indication that this issue needs to be mentioned in the release notes state:major-decision Requires core team consensus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] TimeoutStartSec and TimeoutStopSec values are valid, but redis still warns [BUG] No error when systemd configured but not compiled

4 participants