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

settings-committer: INFO instead of error when no settings changed #559

Merged
merged 1 commit into from
Nov 22, 2019

Conversation

tjkirch
Copy link
Contributor

@tjkirch tjkirch commented Nov 22, 2019

On reboot, for example, we may not have had any settings change. We don't want
that to cause a service startup failure or log a confusing message. If other
services failed to PATCH settings changes, they'll fail themselves, so the
system will still reflect failure when it needs to.


Testing done:

Before, after a reboot, settings-committer would fail and show its error on console:

Nov 22 17:09:43 ip-192-168-111-223.us-west-2.compute.internal systemd[1]: Starting Commit pending settings...
Nov 22 17:09:43 ip-192-168-111-223.us-west-2.compute.internal settings-committer[3131]: Error sending POST to /settings/commit: Status 422 when requesting unix://2f72756e2f6170692e736f636b:0/settings/commit: Tried to commit with no pending changes
Nov 22 17:09:43 ip-192-168-111-223.us-west-2.compute.internal systemd[1]: settings-committer.service: Main process exited, code=exited, status=1/FAILURE
Nov 22 17:09:43 ip-192-168-111-223.us-west-2.compute.internal systemd[1]: settings-committer.service: Failed with result 'exit-code'.
Nov 22 17:09:43 ip-192-168-111-223.us-west-2.compute.internal systemd[1]: Failed to start Commit pending settings.
bash-5.0# systemctl status | head                                                                                                                                                  
● ip-192-168-111-223.us-west-2.compute.internal
    State: degraded

After, no error:

bash-5.0# journalctl -u settings-committer
-- Logs begin at Fri 2019-11-22 18:08:52 UTC, end at Fri 2019-11-22 18:10:46 UTC. --
Nov 22 18:09:27 ip-192-168-119-189.us-west-2.compute.internal systemd[1]: Starting Commit pending settings...
Nov 22 18:09:27 ip-192-168-119-189.us-west-2.compute.internal systemd[1]: Started Commit pending settings.
bash-5.0# systemctl status | head
● ip-192-168-119-189.us-west-2.compute.internal
    State: running

Failures still cause the system to... fail, as expected.

On reboot, for example, we may not have had any settings change.  We don't want
that to cause a service startup failure or log a confusing message.  If other
services failed to PATCH settings changes, they'll fail themselves, so the
system will still reflect failure when it needs to.
@iliana iliana added this to the v0.2.0 milestone Nov 22, 2019
@tjkirch tjkirch merged commit 0889bf5 into develop Nov 22, 2019
@tjkirch tjkirch deleted the friendly-422 branch November 22, 2019 18:18
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.

4 participants