From 7a185cc0a1ed5a150faec5b604d01b0f714688df Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Tue, 6 May 2014 11:01:32 -0700 Subject: [PATCH] Revert "maint(sys-apps/systemd): Replace reload patch with upstream version." This patch was not functionally equivalent to the original, roll back to the original until a corrected version is accepted upstream. This reverts commit 685a68db717dfaafe26340fd25aefde642a553aa. --- ...g-jobs-to-run-queue-in-unit_coldplug.patch | 35 ------------------- ...g-jobs-to-run-queue-in-unit_coldplug.patch | 32 +++++++++++++++++ ...md-212-r4.ebuild => systemd-212-r5.ebuild} | 2 +- 3 files changed, 33 insertions(+), 36 deletions(-) delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/212-0002-job-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/212-0002-unit-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch rename sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/{systemd-212-r4.ebuild => systemd-212-r5.ebuild} (99%) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/212-0002-job-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/212-0002-job-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch deleted file mode 100644 index 9c29f119a5..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/212-0002-job-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 20a83d7bf4542875f8033b68682a4da4993010e8 Mon Sep 17 00:00:00 2001 -From: Brandon Philips -Date: Fri, 25 Apr 2014 09:31:59 -0600 -Subject: [PATCH] job: add waiting jobs to run queue in unit_coldplug - -When we have job installed and added to run queue for service which is -still in dead state and systemd initiates reload then after reload we -never add deserialized job to the run queue again. This is caused by -check in service_coldplug() where we check if deserialized state is -something else than dead state, which is not the case thus we never call -service_set_state() and finally unit_notify() where we would have added -job to the run queue. - -Thanks to Michal Sekletar for the original patch. ---- - src/core/job.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/core/job.c b/src/core/job.c -index 35a9de6..835cfe1 100644 ---- a/src/core/job.c -+++ b/src/core/job.c -@@ -1066,6 +1066,9 @@ int job_coldplug(Job *j) { - if (j->timer_event_source) - j->timer_event_source = sd_event_source_unref(j->timer_event_source); - -+ if (j->state == JOB_WAITING) -+ job_add_to_run_queue(j); -+ - r = sd_event_add_time( - j->manager->event, - &j->timer_event_source, --- -1.8.3.2 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/212-0002-unit-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/212-0002-unit-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch new file mode 100644 index 0000000000..8e4c225cc8 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/212-0002-unit-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch @@ -0,0 +1,32 @@ +From 7b6a4f0380c0f95e0ce1beccddd82b6c4aecc8bc Mon Sep 17 00:00:00 2001 +From: Michal Sekletar +Date: Tue, 1 Apr 2014 18:45:54 +0200 +Subject: [PATCH] unit: add waiting jobs to run queue in unit_coldplug + +When we have job installed and added to run queue for service which is still in +dead state and systemd initiates reload then after reload we never add +deserialized job to the run queue again. This is caused by check in +service_coldplug() where we check if deserialized state is something else +than dead state, which is not the case thus we never call service_set_state() +and finally unit_notify() where we would have added job to the run queue. +--- + src/core/unit.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/core/unit.c b/src/core/unit.c +index 153b79b..bb7893b 100644 +--- a/src/core/unit.c ++++ b/src/core/unit.c +@@ -2558,6 +2558,9 @@ int unit_coldplug(Unit *u) { + r = job_coldplug(u->job); + if (r < 0) + return r; ++ ++ if (u->job->state == JOB_WAITING) ++ job_add_to_run_queue(u->job); + } else if (u->deserialized_job >= 0) { + /* legacy */ + r = manager_add_job(u->manager, u->deserialized_job, u, JOB_IGNORE_REQUIREMENTS, false, NULL, NULL); +-- +1.8.3.2 + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-212-r4.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-212-r5.ebuild similarity index 99% rename from sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-212-r4.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-212-r5.ebuild index 685fd2ed79..6fbca3c1c8 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-212-r4.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-212-r5.ebuild @@ -117,7 +117,7 @@ fi epatch "${FILESDIR}"/212-0001-sd-rtnl-fix-off-by-one.patch # fix stuck jobs after daemon-reload - epatch "${FILESDIR}"/212-0002-job-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch + epatch "${FILESDIR}"/212-0002-unit-add-waiting-jobs-to-run-queue-in-unit_coldplug.patch # CoreOs specific hacks^Wfeatures epatch "${FILESDIR}"/211-handle-empty-etc-os-release.patch