)]}'
{"id":"openstack%2Fopenstack-helm-infra~759360","triplet_id":"openstack%2Fopenstack-helm-infra~master~Ib5f3d2a49e55332604c91f9a011e87d78947dbef","project":"openstack/openstack-helm-infra","branch":"master","hashtags":[],"change_id":"Ib5f3d2a49e55332604c91f9a011e87d78947dbef","subject":"postgresql: Optimize restart behavior","status":"MERGED","created":"2020-10-23 07:41:35.000000000","updated":"2020-10-23 16:43:38.000000000","submitted":"2020-10-23 16:40:49.000000000","submitter":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"submission_id":"759360-1603471249381-4b5c2f42","meta_rev_id":"82e080be193292829e6c078f416b7553d82b6469","_number":759360,"virtual_id_number":759360,"owner":{"_account_id":28719,"name":"Phil Sphicas","email":"phil.sphicas@att.com","username":"ps3910"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"all":[{"value":0,"_account_id":24816,"name":"Anthony Bellino","email":"ab2434@att.com","username":"anthony.bellino"},{"value":0,"_account_id":18256,"name":"Hemachandra Reddy","email":"hemachandra.reddy@att.com","username":"hr858f"},{"value":0,"_account_id":8898,"name":"Chris Wedgwood","email":"cw@f00f.org","username":"anticw"},{"value":0,"_account_id":29144,"name":"PRATEEK REDDY DODDA","email":"prateek.reddy.dodda@att.com","username":"pd2839"},{"value":0,"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},{"value":0,"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},{"tag":"autogenerated:zuul:gate","value":2,"date":"2020-10-23 16:40:49.000000000","post_submit":true,"permitted_voting_range":{"min":2,"max":2},"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":0,"_account_id":18511,"name":"Brian Wickersham","email":"bkw86@bellsouth.net","username":"bw6938"},{"value":0,"date":"2020-10-23 15:09:29.000000000","_account_id":28719,"name":"Phil Sphicas","email":"phil.sphicas@att.com","username":"ps3910"}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","default_value":0,"optional":true},"Code-Review":{"approved":{"_account_id":8898,"name":"Chris Wedgwood","email":"cw@f00f.org","username":"anticw"},"recommended":{"_account_id":18256,"name":"Hemachandra Reddy","email":"hemachandra.reddy@att.com","username":"hr858f"},"all":[{"value":1,"date":"2020-10-23 13:44:49.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":24816,"name":"Anthony Bellino","email":"ab2434@att.com","username":"anthony.bellino"},{"value":1,"date":"2020-10-23 16:19:50.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":18256,"name":"Hemachandra Reddy","email":"hemachandra.reddy@att.com","username":"hr858f"},{"value":2,"date":"2020-10-23 15:05:51.000000000","_account_id":8898,"name":"Chris Wedgwood","email":"cw@f00f.org","username":"anticw"},{"value":1,"date":"2020-10-23 14:54:17.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":29144,"name":"PRATEEK REDDY DODDA","email":"prateek.reddy.dodda@att.com","username":"pd2839"},{"value":1,"date":"2020-10-23 12:55:20.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},{"value":2,"date":"2020-10-23 15:38:11.000000000","_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":1,"date":"2020-10-23 13:11:15.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":18511,"name":"Brian Wickersham","email":"bkw86@bellsouth.net","username":"bw6938"},{"value":0,"_account_id":28719,"name":"Phil Sphicas","email":"phil.sphicas@att.com","username":"ps3910"}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","value":1,"default_value":0,"optional":true},"Workflow":{"approved":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"all":[{"value":0,"_account_id":24816,"name":"Anthony Bellino","email":"ab2434@att.com","username":"anthony.bellino"},{"value":0,"_account_id":18256,"name":"Hemachandra Reddy","email":"hemachandra.reddy@att.com","username":"hr858f"},{"value":0,"_account_id":8898,"name":"Chris Wedgwood","email":"cw@f00f.org","username":"anticw"},{"value":0,"_account_id":29144,"name":"PRATEEK REDDY DODDA","email":"prateek.reddy.dodda@att.com","username":"pd2839"},{"value":0,"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},{"value":1,"date":"2020-10-23 15:38:11.000000000","_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},{"value":0,"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"value":0,"_account_id":18511,"name":"Brian Wickersham","email":"bkw86@bellsouth.net","username":"bw6938"},{"value":0,"_account_id":28719,"name":"Phil Sphicas","email":"phil.sphicas@att.com","username":"ps3910"}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":8898,"name":"Chris Wedgwood","email":"cw@f00f.org","username":"anticw"},{"_account_id":18256,"name":"Hemachandra Reddy","email":"hemachandra.reddy@att.com","username":"hr858f"},{"_account_id":18511,"name":"Brian Wickersham","email":"bkw86@bellsouth.net","username":"bw6938"},{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},{"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},{"_account_id":24816,"name":"Anthony Bellino","email":"ab2434@att.com","username":"anthony.bellino"},{"_account_id":28719,"name":"Phil Sphicas","email":"phil.sphicas@att.com","username":"ps3910"},{"_account_id":29144,"name":"PRATEEK REDDY DODDA","email":"prateek.reddy.dodda@att.com","username":"pd2839"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2020-10-23 12:55:20.000000000","updated_by":{"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},"reviewer":{"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},"state":"REVIEWER"},{"updated":"2020-10-23 13:11:15.000000000","updated_by":{"_account_id":18511,"name":"Brian Wickersham","email":"bkw86@bellsouth.net","username":"bw6938"},"reviewer":{"_account_id":18511,"name":"Brian Wickersham","email":"bkw86@bellsouth.net","username":"bw6938"},"state":"REVIEWER"},{"updated":"2020-10-23 13:44:49.000000000","updated_by":{"_account_id":24816,"name":"Anthony Bellino","email":"ab2434@att.com","username":"anthony.bellino"},"reviewer":{"_account_id":24816,"name":"Anthony Bellino","email":"ab2434@att.com","username":"anthony.bellino"},"state":"REVIEWER"},{"updated":"2020-10-23 14:54:17.000000000","updated_by":{"_account_id":29144,"name":"PRATEEK REDDY DODDA","email":"prateek.reddy.dodda@att.com","username":"pd2839"},"reviewer":{"_account_id":29144,"name":"PRATEEK REDDY DODDA","email":"prateek.reddy.dodda@att.com","username":"pd2839"},"state":"REVIEWER"},{"updated":"2020-10-23 15:05:51.000000000","updated_by":{"_account_id":8898,"name":"Chris Wedgwood","email":"cw@f00f.org","username":"anticw"},"reviewer":{"_account_id":8898,"name":"Chris Wedgwood","email":"cw@f00f.org","username":"anticw"},"state":"REVIEWER"},{"updated":"2020-10-23 15:38:11.000000000","updated_by":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"reviewer":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"state":"REVIEWER"},{"updated":"2020-10-23 16:19:50.000000000","updated_by":{"_account_id":18256,"name":"Hemachandra Reddy","email":"hemachandra.reddy@att.com","username":"hr858f"},"reviewer":{"_account_id":18256,"name":"Hemachandra Reddy","email":"hemachandra.reddy@att.com","username":"hr858f"},"state":"REVIEWER"},{"updated":"2020-10-23 16:40:49.000000000","updated_by":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"reviewer":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"state":"REVIEWER"}],"messages":[{"id":"0884d39021c3937583818fe06d3d42e301569bfa","author":{"_account_id":28719,"name":"Phil Sphicas","email":"phil.sphicas@att.com","username":"ps3910"},"date":"2020-10-23 07:41:35.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"355baf75dc70bb288a73675a9c138b3ed901d76e","author":{"_account_id":28719,"name":"Phil Sphicas","email":"phil.sphicas@att.com","username":"ps3910"},"date":"2020-10-23 07:42:00.000000000","message":"Uploaded patch set 2.","accounts_in_message":[],"_revision_number":2},{"id":"a1da211e5d24607d781e9a239e75c47097a95bfd","tag":"autogenerated:zuul:check","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2020-10-23 08:37:59.000000000","message":"Patch Set 2: Verified+1\n\nBuild succeeded (check pipeline).\n\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/1e371ac406774624a2272d36983bd103 : SUCCESS in 5m 14s\n- openstack-helm-lint https://zuul.opendev.org/t/openstack/build/2f89d099596749259ded374e8e6b2541 : SUCCESS in 5m 08s\n- openstack-helm-infra-aio-logging https://zuul.opendev.org/t/openstack/build/e1135238948d44a191d238bf10cc6293 : SUCCESS in 35m 23s\n- openstack-helm-infra-aio-monitoring https://zuul.opendev.org/t/openstack/build/3cc51c19c1a648c79912e97307384073 : SUCCESS in 34m 53s\n- openstack-helm-infra-openstack-support https://zuul.opendev.org/t/openstack/build/2631a914f869425a80116685eca7066d : SUCCESS in 43m 38s\n- openstack-helm-infra-openstack-support-ssl https://zuul.opendev.org/t/openstack/build/514b153a7c5e47f8a6c96a4d4fa6719a : SUCCESS in 47m 45s\n- openstack-helm-infra-airship-divingbell https://zuul.opendev.org/t/openstack/build/ebd921bf088d46389ff5831c4fabe7cf : SUCCESS in 13m 46s (non-voting)\n- openstack-helm-infra-metacontroller https://zuul.opendev.org/t/openstack/build/fcdc2b10be814bda8894bbe906ba75a3 : SUCCESS in 14m 40s","accounts_in_message":[],"_revision_number":2},{"id":"56aeba3a1cd571ac7354c7d291dd572d4223507f","author":{"_account_id":24780,"name":"Sangeet Gupta","email":"sg774j@att.com","username":"sgupta"},"date":"2020-10-23 12:55:20.000000000","message":"Patch Set 2: Code-Review+1\n\nIf we turn off the readiness probe, the pod is going to come into ready state immediately, even though it may still be coming up. When upgrading postgresql in a live site, if the pods get ready before it is actually ready, may lead to some message failure. Is it acceptable?","accounts_in_message":[],"_revision_number":2},{"id":"7060b2aa80f504bc90b4ac8cff336587a812f66f","author":{"_account_id":18511,"name":"Brian Wickersham","email":"bkw86@bellsouth.net","username":"bw6938"},"date":"2020-10-23 13:11:15.000000000","message":"Patch Set 2: Code-Review+1","accounts_in_message":[],"_revision_number":2},{"id":"e21c3f044b1cef3a79796a1c70355e82f6051a84","author":{"_account_id":24816,"name":"Anthony Bellino","email":"ab2434@att.com","username":"anthony.bellino"},"date":"2020-10-23 13:44:49.000000000","message":"Patch Set 2: Code-Review+1","accounts_in_message":[],"_revision_number":2},{"id":"1cdd28e6d77286f8ebc982e9f0ad8faeb6027c47","author":{"_account_id":29144,"name":"PRATEEK REDDY DODDA","email":"prateek.reddy.dodda@att.com","username":"pd2839"},"date":"2020-10-23 14:54:17.000000000","message":"Patch Set 2: Code-Review+1","accounts_in_message":[],"_revision_number":2},{"id":"f5b007732a77c3fca60b4d023ee98e7179595b2b","author":{"_account_id":8898,"name":"Chris Wedgwood","email":"cw@f00f.org","username":"anticw"},"date":"2020-10-23 15:05:51.000000000","message":"Patch Set 2: Code-Review+2","accounts_in_message":[],"_revision_number":2},{"id":"60bf4555d4d35a64b3e60db4e5af43c8f4d6ed80","author":{"_account_id":28719,"name":"Phil Sphicas","email":"phil.sphicas@att.com","username":"ps3910"},"date":"2020-10-23 15:09:29.000000000","message":"Patch Set 2:\n\n\u003e If we turn off the readiness probe, the pod is going to come into\n \u003e ready state immediately, even though it may still be coming up.\n \u003e When upgrading postgresql in a live site, if the pods get ready\n \u003e before it is actually ready, may lead to some message failure. Is\n \u003e it acceptable?\n\nIf you mean errors in the client pods logs, they will already be experiencing failures.\n\nIf you mean in the postgresql pod, I\u0027ve observed that the pod is up, but because of the long initialDelay on the readinessProbe, no new requests will come in.\n\nGenerally speaking, with only a single replica, I just don\u0027t see the point of the readiness probe, since there is no other pod that the service can redirect the traffic to, so I think disabled is a better default. However, since it is override-able, I don\u0027t feel strongly about it. Let me know if you want me to remove that part of the change.","accounts_in_message":[],"_revision_number":2},{"id":"abefe2bd54af97234e0851e21e0caf0c8b24c1a4","author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"date":"2020-10-23 15:38:11.000000000","message":"Patch Set 2: Code-Review+2 Workflow+1","accounts_in_message":[],"_revision_number":2},{"id":"dd4fbef154a5359eed1d2ce7dfd05a8bbcdc609f","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2020-10-23 15:42:10.000000000","message":"Patch Set 2: -Verified\n\nStarting gate jobs.","accounts_in_message":[],"_revision_number":2},{"id":"9a7dd79765dc6c74081c1fedc6ed18d1c16b4b9b","author":{"_account_id":18256,"name":"Hemachandra Reddy","email":"hemachandra.reddy@att.com","username":"hr858f"},"date":"2020-10-23 16:19:50.000000000","message":"Patch Set 2: Code-Review+1","accounts_in_message":[],"_revision_number":2},{"id":"e16f4d24cd1bf3b1074d4bd954b3cbe30f2c9998","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2020-10-23 16:40:49.000000000","message":"Change has been successfully merged by Zuul","accounts_in_message":[],"_revision_number":2},{"id":"e9f11b6cecfbdec152ae4b6e470a91c2f669e583","tag":"autogenerated:zuul:gate","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2020-10-23 16:40:49.000000000","message":"Patch Set 2: Verified+2\n\nBuild succeeded (gate pipeline).\n\n- openstack-tox-docs https://zuul.opendev.org/t/openstack/build/df33614309f942d1bd75fa113a63fb5d : SUCCESS in 6m 08s\n- openstack-helm-lint https://zuul.opendev.org/t/openstack/build/99f83276fd9242f4a315d3f9bb44314b : SUCCESS in 6m 35s\n- openstack-helm-infra-aio-logging https://zuul.opendev.org/t/openstack/build/3a6498fc17ea4722beeb4a236071580a : SUCCESS in 41m 57s\n- openstack-helm-infra-aio-monitoring https://zuul.opendev.org/t/openstack/build/151234eec51c47fdad3432df08d0299a : SUCCESS in 36m 58s\n- openstack-helm-infra-openstack-support https://zuul.opendev.org/t/openstack/build/6d47503a628d4080b3bf712ecde602af : SUCCESS in 50m 59s\n- openstack-helm-infra-openstack-support-ssl https://zuul.opendev.org/t/openstack/build/e53a01d9940a4e629d4fd8a94da6237d : SUCCESS in 46m 16s","accounts_in_message":[],"_revision_number":2},{"id":"82e080be193292829e6c078f416b7553d82b6469","tag":"autogenerated:zuul:promote","author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"date":"2020-10-23 16:43:38.000000000","message":"Patch Set 2:\n\nBuild succeeded (promote pipeline).\n\n- promote-openstack-tox-docs https://zuul.opendev.org/t/openstack/build/669306c10efb47cc82d16ca56a94d65e : SUCCESS in 57s","accounts_in_message":[],"_revision_number":2}],"current_revision_number":2,"current_revision":"c43331d67acc03087e40dc31763e97ad6f08cc7b","revisions":{"19e50cae0c618b3818aa633d31e9fa41fe8bca71":{"kind":"REWORK","_number":1,"created":"2020-10-23 07:41:35.000000000","uploader":{"_account_id":28719,"name":"Phil Sphicas","email":"phil.sphicas@att.com","username":"ps3910"},"ref":"refs/changes/60/759360/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/openstack-helm-infra","ref":"refs/changes/60/759360/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/openstack-helm-infra refs/changes/60/759360/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/openstack-helm-infra refs/changes/60/759360/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/openstack-helm-infra refs/changes/60/759360/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/openstack-helm-infra refs/changes/60/759360/1"}}},"commit":{"parents":[{"commit":"a10699c4e087b7498cb8a7f76db88428d001e3dc","subject":"postgresql: Allow probe tweaking","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/openstack-helm-infra/commit/a10699c4e087b7498cb8a7f76db88428d001e3dc"}]}],"author":{"name":"Phil Sphicas","email":"phil.sphicas@att.com","date":"2020-10-23 07:16:39.000000000","tz":0},"committer":{"name":"Phil Sphicas","email":"phil.sphicas@att.com","date":"2020-10-23 07:41:11.000000000","tz":0},"subject":"postgresql: Optimize restart behavior","message":"postgresql: Optimize restart behavior\n\n* add preStop hook to trigger Fast Shutdown\n* disable readiness probe by default\n\nWhen Kubernetes terminates a pod, the container runtime typically sends\na SIGTERM signal to pid 1 in each container [0]. PostgreSQL interprets\nSIGTERM as a request to do a \"Smart Shutdown\" [1]. This can take minutes\n(often exhausting the termination grace period), and during this time,\nnew connections are not being serviced.\n\nNow that postgresql has a single replica, this behavior is undesirable.\nIf we kill the pod (e.g. in an upgrade), we probably want it to come\nback as soon as possible.\n\nThis change adds a preStop hook that sends a SIGINT to postgresql in\norder to trigger a \"Fast Shutdown\". In addition, the readiness probe is\ndisabled by default, since it adds no value in a single-replica\nscenario.\n\n0: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination\n1: https://www.postgresql.org/docs/9.6/server-shutdown.html\n\nChange-Id: Ib5f3d2a49e55332604c91f9a011e87d78947dbef\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/openstack-helm-infra/commit/19e50cae0c618b3818aa633d31e9fa41fe8bca71"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/openstack-helm-infra/commit/19e50cae0c618b3818aa633d31e9fa41fe8bca71"}]},"branch":"refs/heads/master"},"c43331d67acc03087e40dc31763e97ad6f08cc7b":{"kind":"REWORK","_number":2,"created":"2020-10-23 07:42:00.000000000","uploader":{"_account_id":28719,"name":"Phil Sphicas","email":"phil.sphicas@att.com","username":"ps3910"},"ref":"refs/changes/60/759360/2","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/openstack-helm-infra","ref":"refs/changes/60/759360/2","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/openstack-helm-infra refs/changes/60/759360/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/openstack-helm-infra refs/changes/60/759360/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/openstack-helm-infra refs/changes/60/759360/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/openstack-helm-infra refs/changes/60/759360/2"}}},"commit":{"parents":[{"commit":"a10699c4e087b7498cb8a7f76db88428d001e3dc","subject":"postgresql: Allow probe tweaking","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/openstack-helm-infra/commit/a10699c4e087b7498cb8a7f76db88428d001e3dc"}]}],"author":{"name":"Phil Sphicas","email":"phil.sphicas@att.com","date":"2020-10-23 07:16:39.000000000","tz":0},"committer":{"name":"Phil Sphicas","email":"phil.sphicas@att.com","date":"2020-10-23 07:41:57.000000000","tz":0},"subject":"postgresql: Optimize restart behavior","message":"postgresql: Optimize restart behavior\n\n* add preStop hook to trigger Fast Shutdown\n* disable readiness probe by default\n\nWhen Kubernetes terminates a pod, the container runtime typically sends\na SIGTERM signal to pid 1 in each container [0]. PostgreSQL interprets\nSIGTERM as a request to do a \"Smart Shutdown\" [1]. This can take minutes\n(often exhausting the termination grace period), and during this time,\nnew connections are not being serviced.\n\nNow that postgresql has a single replica, this behavior is undesirable.\nIf we kill the pod (e.g. in an upgrade), we probably want it to come\nback as soon as possible.\n\nThis change adds a preStop hook that sends a SIGINT to postgresql in\norder to trigger a \"Fast Shutdown\". In addition, the readiness probe is\ndisabled by default, since it adds no value in a single-replica\nscenario.\n\n0: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination\n1: https://www.postgresql.org/docs/9.6/server-shutdown.html\n\nChange-Id: Ib5f3d2a49e55332604c91f9a011e87d78947dbef\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/openstack-helm-infra/commit/c43331d67acc03087e40dc31763e97ad6f08cc7b"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/openstack-helm-infra/commit/c43331d67acc03087e40dc31763e97ad6f08cc7b"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[],"submit_requirements":[]}
