All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yu, Mingli" <mingli.yu@windriver.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] kea: create /var/lib/kea and /var/run/kea folder
Date: Fri, 18 Sep 2020 17:22:18 +0800	[thread overview]
Message-ID: <6ad76c69-1e27-7255-2be0-ea25fff4cdea@windriver.com> (raw)
In-Reply-To: <1635D653F943269C.24495@lists.openembedded.org>

A typo in the commit message, please ignore this patch and check the V2.

Thanks,

On 9/18/20 5:21 PM, Yu, Mingli wrote:
> From: Mingli Yu <mingli.yu@windriver.com>
> 
> Create /var/lib/kea and /var/run/kea folder if they doesn't
> exist to fix below error:
>   # keactrl start
>   INFO/keactrl: Starting /usr/sbin/kea-dhcp4 -c /etc/kea/kea-dhcp4.conf
>   INFO/keactrl: Starting /usr/sbin/kea-dhcp6 -c /etc/kea/kea-dhcp6.conf
>   INFO/keactrl: Starting /usr/sbin/kea-ctrl-agent -c /etc/kea/kea-ctrl-agent.conf
>   Unable to use interprocess sync lockfile (No such file or directory): /var/run/kea/logger_lockfile
>   Service failed: Launch failed: Unable to open PID file '/var/run/kea/kea-ctrl-agent.kea-ctrl-agent.pid' for write
>   [snip]
>   ERROR [kea-dhcp4.dhcp4/615.140641792751488] DHCP4_CONFIG_LOAD_FAIL configuration error using file: /etc/kea/kea-dhcp4.conf, reason: Unable to open database: unable to open '/var/lib/kea/kea-leases4.csv'
>   [snip]
> 
> Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> ---
>   ...e-var-lib-kea-and-var-run-kea-folder.patch | 39 +++++++++++++++++++
>   meta/recipes-connectivity/kea/kea_1.7.10.bb   |  3 +-
>   2 files changed, 41 insertions(+), 1 deletion(-)
>   create mode 100644 meta/recipes-connectivity/kea/files/0001-keactrl.in-create-var-lib-kea-and-var-run-kea-folder.patch
> 
> diff --git a/meta/recipes-connectivity/kea/files/0001-keactrl.in-create-var-lib-kea-and-var-run-kea-folder.patch b/meta/recipes-connectivity/kea/files/0001-keactrl.in-create-var-lib-kea-and-var-run-kea-folder.patch
> new file mode 100644
> index 0000000000..ab3fd83946
> --- /dev/null
> +++ b/meta/recipes-connectivity/kea/files/0001-keactrl.in-create-var-lib-kea-and-var-run-kea-folder.patch
> @@ -0,0 +1,39 @@
> +From 639dc25cdabc9d1846000a542c8cc19158b69994 Mon Sep 17 00:00:00 2001
> +From: Mingli Yu <mingli.yu@windriver.com>
> +Date: Fri, 18 Sep 2020 08:18:08 +0000
> +Subject: [PATCH] keactrl.in: create /var/lib/kea and /var/run/kea folder
> +
> +Create /var/lib/kea and /var/run/kea folder to fix below error:
> + # keactrl start
> + INFO/keactrl: Starting /usr/sbin/kea-dhcp4 -c /etc/kea/kea-dhcp4.conf
> + INFO/keactrl: Starting /usr/sbin/kea-dhcp6 -c /etc/kea/kea-dhcp6.conf
> + INFO/keactrl: Starting /usr/sbin/kea-ctrl-agent -c /etc/kea/kea-ctrl-agent.conf
> + Unable to use interprocess sync lockfile (No such file or directory): /var/run/kea/logger_lockfile
> + Service failed: Launch failed: Unable to open PID file '/var/run/kea/kea-ctrl-agent.kea-ctrl-agent.pid' for write
> + [snip]
> + ERROR [kea-dhcp4.dhcp4/615.140641792751488] DHCP4_CONFIG_LOAD_FAIL configuration error using file: /etc/kea/kea-dhcp4.conf, reason: Unable to open database: unable to open '/var/lib/kea/kea-leases4.csv'
> + [snip]
> +
> +Upstream-Status: Inappropriate [config specific]
> +
> +Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> +---
> + src/bin/keactrl/keactrl.in | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/src/bin/keactrl/keactrl.in b/src/bin/keactrl/keactrl.in
> +index 12b2b3f..47cf6f9 100644
> +--- a/src/bin/keactrl/keactrl.in
> ++++ b/src/bin/keactrl/keactrl.in
> +@@ -482,6 +482,8 @@ case ${command} in
> +         # The variables (dhcp4_srv, dhcp6_serv, dhcp_ddns_srv etc) are set in the
> +         # keactrl.conf file that shellcheck is unable to read.
> +         # shellcheck disable=SC2154
> ++        [ -d @LOCALSTATEDIR@/run/kea ] || mkdir -p @LOCALSTATEDIR@/run/kea
> ++        [ -d @LOCALSTATEDIR@/lib/kea ] || mkdir -p @LOCALSTATEDIR@/lib/kea
> +         run_conditional "dhcp4" "start_server ${dhcp4_srv} -c ${kea_dhcp4_config_file} ${args}" 1
> +         run_conditional "dhcp6" "start_server ${dhcp6_srv} -c ${kea_dhcp6_config_file} ${args}" 1
> +         # shellcheck disable=SC2154
> +--
> +2.26.2
> +
> diff --git a/meta/recipes-connectivity/kea/kea_1.7.10.bb b/meta/recipes-connectivity/kea/kea_1.7.10.bb
> index e2560b2399..d3c8834b46 100644
> --- a/meta/recipes-connectivity/kea/kea_1.7.10.bb
> +++ b/meta/recipes-connectivity/kea/kea_1.7.10.bb
> @@ -9,6 +9,7 @@ DEPENDS = "boost log4cplus openssl"
>   
>   SRC_URI = "\
>       http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \
> +    file://0001-keactrl.in-create-var-lib-kea-and-var-run-kea-folder.patch \
>       file://kea-dhcp4.service \
>       file://kea-dhcp6.service \
>       file://kea-dhcp-ddns.service \
> @@ -46,7 +47,7 @@ do_install_append() {
>       install -m 0644 ${WORKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir}
>       sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@BASE_BINDIR@,${base_bindir},g' \
>              -e 's,@LOCALSTATEDIR@,${localstatedir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' \
> -           ${D}${systemd_system_unitdir}/kea-dhcp*service
> +           ${D}${systemd_system_unitdir}/kea-dhcp*service ${D}${sbindir}/keactrl
>   }
>   
>   do_install_append() {
> 
> 
> 
> 
> 

           reply	other threads:[~2020-09-18  9:26 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1635D653F943269C.24495@lists.openembedded.org>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6ad76c69-1e27-7255-2be0-ea25fff4cdea@windriver.com \
    --to=mingli.yu@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.