public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nfsdcld: prevent from accessing /var/lib/nfs/nfsdcld in read-only file system during boot
@ 2024-10-04  9:04 Seiichi Ikarashi (Fujitsu)
  2024-10-04 14:43 ` Jeff Layton
  0 siblings, 1 reply; 4+ messages in thread
From: Seiichi Ikarashi (Fujitsu) @ 2024-10-04  9:04 UTC (permalink / raw)
  To: 'linux-nfs@vger.kernel.org'; +Cc: 'smayhew@redhat.com'

I saw a VMWare guest that hit a rare condition during boot;
nfsdcld started too early to check access on /var/lib/nfs/nfsdcld which were
still in read-only file system as follows:

  nfsdcld[...]: Unexpected error when checking access on /var/lib/nfs/nfsdcld: Read-only file system
  systemd[1]: nfsdcld.service: Main process exited, code=exited, status=226/NAMESPACE
  systemd[1]: nfsdcld.service: Failed with result 'exit-code'.

nfsdcld.service needs to wait the root file system to be remounted at least.

Signed-off-by: Seiichi Ikarashi <s.ikarashi@fujitsu.com>
---
 systemd/nfsdcld.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/systemd/nfsdcld.service b/systemd/nfsdcld.service
index 3ced565..188123d 100644
--- a/systemd/nfsdcld.service
+++ b/systemd/nfsdcld.service
@@ -4,7 +4,7 @@ Documentation=man:nfsdcld(8)
 DefaultDependencies=no
 Conflicts=umount.target
 Requires=rpc_pipefs.target proc-fs-nfsd.mount
-After=rpc_pipefs.target proc-fs-nfsd.mount
+After=rpc_pipefs.target proc-fs-nfsd.mount systemd-remount-fs.service
 
 [Service]
 Type=forking

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] nfsdcld: prevent from accessing /var/lib/nfs/nfsdcld in read-only file system during boot
  2024-10-04  9:04 [PATCH] nfsdcld: prevent from accessing /var/lib/nfs/nfsdcld in read-only file system during boot Seiichi Ikarashi (Fujitsu)
@ 2024-10-04 14:43 ` Jeff Layton
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Layton @ 2024-10-04 14:43 UTC (permalink / raw)
  To: Seiichi Ikarashi (Fujitsu), 'linux-nfs@vger.kernel.org'
  Cc: 'smayhew@redhat.com'

On Fri, 2024-10-04 at 09:04 +0000, Seiichi Ikarashi (Fujitsu) wrote:
> I saw a VMWare guest that hit a rare condition during boot;
> nfsdcld started too early to check access on /var/lib/nfs/nfsdcld which were
> still in read-only file system as follows:
> 
>   nfsdcld[...]: Unexpected error when checking access on /var/lib/nfs/nfsdcld: Read-only file system
>   systemd[1]: nfsdcld.service: Main process exited, code=exited, status=226/NAMESPACE
>   systemd[1]: nfsdcld.service: Failed with result 'exit-code'.
> 
> nfsdcld.service needs to wait the root file system to be remounted at least.
> 
> Signed-off-by: Seiichi Ikarashi <s.ikarashi@fujitsu.com>
> ---
>  systemd/nfsdcld.service | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/systemd/nfsdcld.service b/systemd/nfsdcld.service
> index 3ced565..188123d 100644
> --- a/systemd/nfsdcld.service
> +++ b/systemd/nfsdcld.service
> @@ -4,7 +4,7 @@ Documentation=man:nfsdcld(8)
>  DefaultDependencies=no
>  Conflicts=umount.target
>  Requires=rpc_pipefs.target proc-fs-nfsd.mount
> -After=rpc_pipefs.target proc-fs-nfsd.mount
> +After=rpc_pipefs.target proc-fs-nfsd.mount systemd-remount-fs.service
>  
>  [Service]
>  Type=forking
> 

Good catch! Seems like a reasonable fix.

Reviewed-by: Jeff Layton <jlayton@kernel.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] nfsdcld: prevent from accessing /var/lib/nfs/nfsdcld in read-only file system during boot
@ 2024-10-18 10:47 Seiichi Ikarashi (Fujitsu)
  2024-10-18 12:53 ` Steve Dickson
  0 siblings, 1 reply; 4+ messages in thread
From: Seiichi Ikarashi (Fujitsu) @ 2024-10-18 10:47 UTC (permalink / raw)
  To: 'steved@redhat.com'; +Cc: 'linux-nfs@vger.kernel.org'

I saw a VMWare guest that hit a rare condition during boot;
nfsdcld started too early to check access on /var/lib/nfs/nfsdcld which were
still in read-only file system as follows:

  nfsdcld[...]: Unexpected error when checking access on /var/lib/nfs/nfsdcld: Read-only file system
  systemd[1]: nfsdcld.service: Main process exited, code=exited, status=226/NAMESPACE
  systemd[1]: nfsdcld.service: Failed with result 'exit-code'.

nfsdcld.service needs to wait the root file system to be remounted at least.

Signed-off-by: Seiichi Ikarashi <s.ikarashi@fujitsu.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
---
 systemd/nfsdcld.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/systemd/nfsdcld.service b/systemd/nfsdcld.service
index 3ced565..188123d 100644
--- a/systemd/nfsdcld.service
+++ b/systemd/nfsdcld.service
@@ -4,7 +4,7 @@ Documentation=man:nfsdcld(8)
 DefaultDependencies=no
 Conflicts=umount.target
 Requires=rpc_pipefs.target proc-fs-nfsd.mount
-After=rpc_pipefs.target proc-fs-nfsd.mount
+After=rpc_pipefs.target proc-fs-nfsd.mount systemd-remount-fs.service
 
 [Service]
 Type=forking

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] nfsdcld: prevent from accessing /var/lib/nfs/nfsdcld in read-only file system during boot
  2024-10-18 10:47 Seiichi Ikarashi (Fujitsu)
@ 2024-10-18 12:53 ` Steve Dickson
  0 siblings, 0 replies; 4+ messages in thread
From: Steve Dickson @ 2024-10-18 12:53 UTC (permalink / raw)
  To: Seiichi Ikarashi (Fujitsu); +Cc: 'linux-nfs@vger.kernel.org'



On 10/18/24 6:47 AM, Seiichi Ikarashi (Fujitsu) wrote:
> I saw a VMWare guest that hit a rare condition during boot;
> nfsdcld started too early to check access on /var/lib/nfs/nfsdcld which were
> still in read-only file system as follows:
> 
>    nfsdcld[...]: Unexpected error when checking access on /var/lib/nfs/nfsdcld: Read-only file system
>    systemd[1]: nfsdcld.service: Main process exited, code=exited, status=226/NAMESPACE
>    systemd[1]: nfsdcld.service: Failed with result 'exit-code'.
> 
> nfsdcld.service needs to wait the root file system to be remounted at least.
> 
> Signed-off-by: Seiichi Ikarashi <s.ikarashi@fujitsu.com>
> Reviewed-by: Jeff Layton <jlayton@kernel.org>
Committed...

steved.
> ---
>   systemd/nfsdcld.service | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/systemd/nfsdcld.service b/systemd/nfsdcld.service
> index 3ced565..188123d 100644
> --- a/systemd/nfsdcld.service
> +++ b/systemd/nfsdcld.service
> @@ -4,7 +4,7 @@ Documentation=man:nfsdcld(8)
>   DefaultDependencies=no
>   Conflicts=umount.target
>   Requires=rpc_pipefs.target proc-fs-nfsd.mount
> -After=rpc_pipefs.target proc-fs-nfsd.mount
> +After=rpc_pipefs.target proc-fs-nfsd.mount systemd-remount-fs.service
>   
>   [Service]
>   Type=forking
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-18 12:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-04  9:04 [PATCH] nfsdcld: prevent from accessing /var/lib/nfs/nfsdcld in read-only file system during boot Seiichi Ikarashi (Fujitsu)
2024-10-04 14:43 ` Jeff Layton
  -- strict thread matches above, loose matches on Subject: below --
2024-10-18 10:47 Seiichi Ikarashi (Fujitsu)
2024-10-18 12:53 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox