Open janskarvall opened 7 years ago
@janskarvall I had the recipe install nfs-kernel-server package, since nfs-idmapd unit file depends on nfs-server. Not sure if this is correct, because perhaps the nfs-idmapd unit file is for nfs4 server services, but then I would think it should depend nfs-kernel-server.service and not nfs-server.service?
If you, or someone else, discovers more information on this as far as providing nfs4 client services on Ubuntu 16.04 then please shoot me an update.
I think it is wrong to solve this issue by installing (and running) the nfs-kernel-server on the client. The nfs client should work without it, i.e. by only installing the nfs-common package. This is in line with the Ubuntu 16.04 NFS documentation.
As I wrote above, I do not think that the nfs-idmapd.service shall be started on an nfs client. (Maybe it is a bug that the nfs-common package installs the nfs-idmapd.service unit file.)
I am able to cook and run my nfs client machine after having changed the _idmap.rb file to not try to start the nfs-idmapd.service. I believe that /usr/sbin/rpc.idmapd, which is running, make id mapping work.
I have tried to find information that describes this, but failed to do so. I also do not know if this behaviour is common for all systemd based distributions.
I do not have a suggestion on how to fix the _idmap.rb recipe. I could not find a way that the recipe would know if it runs on a pure nfs client or if the machine (maybe also) runs as an nfs server.
Thank you for the quick reply. I am going to re-open this issue, and revert that change before releasing. Will alter the recipe to skip starting the nfs-idmapd.service on Ubuntu 16.04
OK. To clarify, I think nfs-idmapd.service needs to be started whenever the nfs-kernel-server is installed. Skipping is only for a "pure" client, i.e. a host that only has nfs-common installed.
B.t.w. I posted this question: Trying to start nfs-idmapd service on an nfs client fails. to the nfs-utils maintainers. (The Ubuntu 16.04 nfs-common package incorporates nfs-utils if I am right.) The single answer so far misses my point.
Understood
I'm getting the same also using only server recipe, using 'nfs', '~> 2.6.3'
include_recipe "nfs::server4"
Output is:
11:30:07 ubuntu1604: Recipe: nfs::_common
11:30:11 ubuntu1604: * apt_package[nfs-common] action install
11:30:11 ubuntu1604: - install version 1:1.2.8-9ubuntu12.2 of package nfs-common
11:30:11 ubuntu1604: * apt_package[rpcbind] action install (up to date)
11:30:11 ubuntu1604: * directory[/etc/default] action create (skipped due to only_if)
11:30:11 ubuntu1604: * template[/etc/default/nfs-common] action create
11:30:11 ubuntu1604: - update content in file /etc/default/nfs-common from 978a91 to 7f08ea
11:30:11 ubuntu1604: --- /etc/default/nfs-common 2019-04-29 12:36:46.000000000 +0000
11:30:11 ubuntu1604: +++ /etc/default/.chef-nfs-common20190905-1488-bm0xzd 2019-09-05 09:30:10.749923607 +0000
11:30:11 ubuntu1604: @@ -1,15 +1,3 @@
11:30:11 ubuntu1604: -# If you do not set values for the NEED_ options, they will be attempted
11:30:11 ubuntu1604: -# autodetected; this should be sufficient for most people. Valid alternatives
11:30:11 ubuntu1604: -# for the NEED_ options are "yes" and "no".
11:30:11 ubuntu1604: -
11:30:11 ubuntu1604: -
11:30:11 ubuntu1604: -# Options for rpc.statd.
11:30:11 ubuntu1604: -# Should rpc.statd listen on a specific port? This is especially useful
11:30:11 ubuntu1604: -# when you have a port-based firewall. To use a fixed port, set this
11:30:11 ubuntu1604: -# this variable to a statd argument like: "--port 4000 --outgoing-port 4001".
11:30:11 ubuntu1604: -# For more information, see rpc.statd(8) or http://wiki.debian.org/SecuringNFS
11:30:11 ubuntu1604: -STATDOPTS=
11:30:11 ubuntu1604: -
11:30:11 ubuntu1604: -# Do you want to start the gssd daemon? It is required for Kerberos mounts.
11:30:11 ubuntu1604: -NEED_GSSD=
11:30:11 ubuntu1604: +# Generated by Chef for ip-172-30-2-14.ec2.internal# Local modifications will be overwritten.
11:30:11 ubuntu1604: +STATDOPTS="--port 32765 --outgoing-port 32766"
11:30:11 ubuntu1604: * service[portmap] action restart
11:30:11 ubuntu1604: - restart service service[portmap]
11:30:11 ubuntu1604: * service[lock] action restart
11:30:11 ubuntu1604: - restart service service[lock]
11:30:11 ubuntu1604: * service[nfs-config.service] action restart
11:30:11 ubuntu1604: - restart service service[nfs-config.service]
11:30:11 ubuntu1604: * template[/etc/modprobe.d/lockd.conf] action create
11:30:11 ubuntu1604: - create new file /etc/modprobe.d/lockd.conf
11:30:11 ubuntu1604: - update content in file /etc/modprobe.d/lockd.conf from none to b06a17
11:30:11 ubuntu1604: --- /etc/modprobe.d/lockd.conf 2019-09-05 09:30:11.061923361 +0000
11:30:11 ubuntu1604: +++ /etc/modprobe.d/.chef-lockd20190905-1488-5oyutu.conf 2019-09-05 09:30:11.061923361 +0000
11:30:11 ubuntu1604: @@ -1 +1,4 @@
11:30:11 ubuntu1604: +# Generated by Chef for ip-172-30-2-14.ec2.internal
11:30:11 ubuntu1604: +# Local modifications will be overwritten.
11:30:11 ubuntu1604: +options lockd nlm_udpport=32768 nlm_tcpport=32768
11:30:11 ubuntu1604: - change mode from '' to '0644'
11:30:11 ubuntu1604: * service[portmap] action restart
11:30:11 ubuntu1604: - restart service service[portmap]
11:30:11 ubuntu1604: * service[lock] action restart
11:30:11 ubuntu1604: - restart service service[lock]
11:30:11 ubuntu1604: * service[nfs-config.service] action restart
11:30:11 ubuntu1604: - restart service service[nfs-config.service]
11:30:11 ubuntu1604: * service[portmap] action start (up to date)
11:30:11 ubuntu1604: * service[portmap] action enable (up to date)
11:30:11 ubuntu1604: * service[lock] action start (up to date)
11:30:11 ubuntu1604: * service[lock] action enable
11:30:11 ubuntu1604: - enable service service[lock]
11:30:11 ubuntu1604: * service[nfs-config.service] action start (up to date)
11:30:11 ubuntu1604: * service[nfs-config.service] action enable (up to date)
11:30:11 ubuntu1604: Recipe: nfs::_idmap
11:30:11 ubuntu1604: * template[/etc/idmapd.conf] action create
11:30:11 ubuntu1604: - update content in file /etc/idmapd.conf from 44726c to ca812b
11:30:11 ubuntu1604: --- /etc/idmapd.conf 2019-04-29 12:36:46.000000000 +0000
11:30:11 ubuntu1604: +++ /etc/.chef-idmapd20190905-1488-vswu0f.conf 2019-09-05 09:30:11.753922948 +0000
11:30:11 ubuntu1604: @@ -2,11 +2,35 @@
11:30:11 ubuntu1604:
11:30:11 ubuntu1604: Verbosity = 0
11:30:11 ubuntu1604: Pipefs-Directory = /run/rpc_pipefs
11:30:11 ubuntu1604: -# set your own domain here, if id differs from FQDN minus hostname
11:30:11 ubuntu1604: -# Domain = localdomain
11:30:11 ubuntu1604:
11:30:11 ubuntu1604: +# The following should be set to the local NFSv4 domain name
11:30:11 ubuntu1604: +# The default is the host's DNS domain name.
11:30:11 ubuntu1604: +Domain = ec2.internal
11:30:11 ubuntu1604: +
11:30:11 ubuntu1604: +# The following is a comma-separated list of Kerberos realm
11:30:11 ubuntu1604: +# names that should be considered to be equivalent to the
11:30:11 ubuntu1604: +# local realm, such that <user>@REALM.A can be assumed to
11:30:11 ubuntu1604: +# be the same user as <user>@REALM.B
11:30:11 ubuntu1604: +# If not specified, the default local realm is the domain name,
11:30:11 ubuntu1604: +# which defaults to the host's DNS domain name,
11:30:11 ubuntu1604: +# translated to upper-case.
11:30:11 ubuntu1604: +# Note that if this value is specified, the local realm name
11:30:11 ubuntu1604: +# must be included in the list!
11:30:11 ubuntu1604: +#Local-Realms =
11:30:11 ubuntu1604: +
11:30:11 ubuntu1604: [Mapping]
11:30:11 ubuntu1604:
11:30:11 ubuntu1604: Nobody-User = nobody
11:30:11 ubuntu1604: Nobody-Group = nogroup
11:30:11 ubuntu1604: +
11:30:11 ubuntu1604: +[Translation]
11:30:11 ubuntu1604: +
11:30:11 ubuntu1604: +# Translation Method is an comma-separated, ordered list of
11:30:11 ubuntu1604: +# translation methods that can be used. Distributed methods
11:30:11 ubuntu1604: +# include "nsswitch", "umich_ldap", and "static". Each method
11:30:11 ubuntu1604: +# is a dynamically loadable plugin library.
11:30:11 ubuntu1604: +# New methods may be defined and inserted in the list.
11:30:11 ubuntu1604: +# The default is "nsswitch".
11:30:11 ubuntu1604: +Method = nsswitch
11:30:11 ubuntu1604: +
11:30:11 ubuntu1604: * service[idmap] action restart
11:30:11 ubuntu1604:
11:30:11 ubuntu1604: ================================================================================
11:30:11 ubuntu1604: Error executing action `restart` on resource 'service[idmap]'
11:30:11 ubuntu1604: ================================================================================
11:30:11 ubuntu1604:
11:30:11 ubuntu1604: Mixlib::ShellOut::ShellCommandFailed
11:30:11 ubuntu1604: ------------------------------------
11:30:11 ubuntu1604: Expected process to exit with [0], but received '5'
11:30:11 ubuntu1604: ---- Begin output of /bin/systemctl --system restart nfs-idmapd ----
11:30:11 ubuntu1604: STDOUT:
11:30:11 ubuntu1604: STDERR: Failed to restart nfs-idmapd.service: Unit nfs-server.service not found.
11:30:11 ubuntu1604: ---- End output of /bin/systemctl --system restart nfs-idmapd ----
11:30:11 ubuntu1604: Ran /bin/systemctl --system restart nfs-idmapd returned 5
11:30:11 ubuntu1604:
11:30:11 ubuntu1604: Resource Declaration:
11:30:12 ubuntu1604: ---------------------
11:30:12 ubuntu1604: # In /tmp/packer-chef-solo/local-mode-cache/cache/cookbooks/nfs/recipes/_idmap.rb
11:30:12 ubuntu1604:
11:30:12 ubuntu1604: 29: service 'idmap' do
11:30:12 ubuntu1604: 30: service_name node['nfs']['service']['idmap']
11:30:12 ubuntu1604: 31: action [:start, :enable]
11:30:12 ubuntu1604: 32: supports status: true
11:30:12 ubuntu1604: 33: end
11:30:12 ubuntu1604:
11:30:12 ubuntu1604: Compiled Resource:
11:30:12 ubuntu1604: ------------------
11:30:12 ubuntu1604: # Declared in /tmp/packer-chef-solo/local-mode-cache/cache/cookbooks/nfs/recipes/_idmap.rb:29:in `from_file'
11:30:12 ubuntu1604:
11:30:12 ubuntu1604: service("idmap") do
11:30:12 ubuntu1604: action [:start, :enable]
11:30:12 ubuntu1604: default_guard_interpreter :default
11:30:12 ubuntu1604: service_name "nfs-idmapd"
11:30:12 ubuntu1604: enabled nil
11:30:12 ubuntu1604: running nil
11:30:12 ubuntu1604: masked nil
11:30:12 ubuntu1604: pattern "idmap"
11:30:12 ubuntu1604: declared_type :service
11:30:12 ubuntu1604: cookbook_name "nfs"
11:30:12 ubuntu1604: recipe_name "_idmap"
11:30:12 ubuntu1604: supports {:status=>true}
11:30:12 ubuntu1604: end
11:30:12 ubuntu1604:
11:30:12 ubuntu1604: System Info:
11:30:12 ubuntu1604: ------------
11:30:12 ubuntu1604: chef_version=14.2.0
11:30:12 ubuntu1604: platform=ubuntu
11:30:12 ubuntu1604: platform_version=16.04
11:30:12 ubuntu1604: ruby=ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
11:30:12 ubuntu1604: program_name=/usr/bin/chef-client
11:30:12 ubuntu1604: executable=/opt/chef/bin/chef-client
Same recipe works in ubuntu1404
11:29:18 ubuntu1404: Recipe: nfs::_common
11:29:20 ubuntu1404: * apt_package[nfs-common] action install
11:29:20 ubuntu1404: - install version 1:1.2.8-6ubuntu1.2 of package nfs-common
11:29:20 ubuntu1404: * apt_package[rpcbind] action install (up to date)
11:29:20 ubuntu1404: * directory[/etc/default] action create (skipped due to only_if)
11:29:20 ubuntu1404: * template[/etc/default/nfs-common] action create
11:29:20 ubuntu1404: - update content in file /etc/default/nfs-common from 887a49 to 105a1f
11:29:20 ubuntu1404: --- /etc/default/nfs-common 2012-10-10 16:15:43.000000000 +0000
11:29:20 ubuntu1404: +++ /etc/default/.chef-nfs-common20190905-1254-4yp9uq 2019-09-05 09:29:20.027838000 +0000
11:29:20 ubuntu1404: @@ -1,17 +1,3 @@
11:29:20 ubuntu1404: -# If you do not set values for the NEED_ options, they will be attempted
11:29:20 ubuntu1404: -# autodetected; this should be sufficient for most people. Valid alternatives
11:29:20 ubuntu1404: -# for the NEED_ options are "yes" and "no".
11:29:20 ubuntu1404: -
11:29:20 ubuntu1404: -# Do you want to start the statd daemon? It is not needed for NFSv4.
11:29:20 ubuntu1404: -NEED_STATD=
11:29:20 ubuntu1404: -
11:29:20 ubuntu1404: -# Options for rpc.statd.
11:29:20 ubuntu1404: -# Should rpc.statd listen on a specific port? This is especially useful
11:29:20 ubuntu1404: -# when you have a port-based firewall. To use a fixed port, set this
11:29:20 ubuntu1404: -# this variable to a statd argument like: "--port 4000 --outgoing-port 4001".
11:29:20 ubuntu1404: -# For more information, see rpc.statd(8) or http://wiki.debian.org/SecuringNFS
11:29:20 ubuntu1404: -STATDOPTS=
11:29:20 ubuntu1404: -
11:29:20 ubuntu1404: -# Do you want to start the gssd daemon? It is required for Kerberos mounts.
11:29:20 ubuntu1404: -NEED_GSSD=
11:29:20 ubuntu1404: +# Generated by Chef for ip-172-30-2-21.ec2.internal# Local modifications will be overwritten.
11:29:20 ubuntu1404: +STATDOPTS="--port 32765 --outgoing-port 32766"
11:29:21 ubuntu1404: * service[portmap] action restart
11:29:21 ubuntu1404: - restart service service[portmap]
11:29:22 ubuntu1404: * service[lock] action restart
11:29:22 ubuntu1404: - restart service service[lock]
11:29:22 ubuntu1404: * template[/etc/modprobe.d/lockd.conf] action create
11:29:22 ubuntu1404: - create new file /etc/modprobe.d/lockd.conf
11:29:22 ubuntu1404: - update content in file /etc/modprobe.d/lockd.conf from none to dda0ca
11:29:22 ubuntu1404: --- /etc/modprobe.d/lockd.conf 2019-09-05 09:29:22.164906059 +0000
11:29:22 ubuntu1404: +++ /etc/modprobe.d/.chef-lockd20190905-1254-1c2s5z1.conf 2019-09-05 09:29:22.160904095 +0000
11:29:22 ubuntu1404: @@ -1 +1,4 @@
11:29:22 ubuntu1404: +# Generated by Chef for ip-172-30-2-21.ec2.internal
11:29:22 ubuntu1404: +# Local modifications will be overwritten.
11:29:22 ubuntu1404: +options lockd nlm_udpport=32768 nlm_tcpport=32768
11:29:22 ubuntu1404: - change mode from '' to '0644'
11:29:23 ubuntu1404: * service[portmap] action restart
11:29:23 ubuntu1404: - restart service service[portmap]
11:29:24 ubuntu1404: * service[lock] action restart
11:29:24 ubuntu1404: - restart service service[lock]
11:29:24 ubuntu1404: * service[portmap] action start (up to date)
11:29:24 ubuntu1404: * service[portmap] action enable (up to date)
11:29:24 ubuntu1404: * service[lock] action start (up to date)
11:29:24 ubuntu1404: * service[lock] action enable (up to date)
11:29:24 ubuntu1404: Recipe: nfs::_idmap
11:29:24 ubuntu1404: * template[/etc/idmapd.conf] action create
11:29:24 ubuntu1404: - update content in file /etc/idmapd.conf from 44726c to ca812b
11:29:24 ubuntu1404: --- /etc/idmapd.conf 2012-10-10 16:15:43.000000000 +0000
11:29:24 ubuntu1404: +++ /etc/.chef-idmapd20190905-1254-18pee69.conf 2019-09-05 09:29:24.349998000 +0000
11:29:24 ubuntu1404: @@ -2,11 +2,35 @@
11:29:24 ubuntu1404:
11:29:24 ubuntu1404: Verbosity = 0
11:29:24 ubuntu1404: Pipefs-Directory = /run/rpc_pipefs
11:29:24 ubuntu1404: -# set your own domain here, if id differs from FQDN minus hostname
11:29:24 ubuntu1404: -# Domain = localdomain
11:29:24 ubuntu1404:
11:29:24 ubuntu1404: +# The following should be set to the local NFSv4 domain name
11:29:24 ubuntu1404: +# The default is the host's DNS domain name.
11:29:24 ubuntu1404: +Domain = ec2.internal
11:29:24 ubuntu1404: +
11:29:24 ubuntu1404: +# The following is a comma-separated list of Kerberos realm
11:29:24 ubuntu1404: +# names that should be considered to be equivalent to the
11:29:24 ubuntu1404: +# local realm, such that <user>@REALM.A can be assumed to
11:29:24 ubuntu1404: +# be the same user as <user>@REALM.B
11:29:24 ubuntu1404: +# If not specified, the default local realm is the domain name,
11:29:24 ubuntu1404: +# which defaults to the host's DNS domain name,
11:29:24 ubuntu1404: +# translated to upper-case.
11:29:24 ubuntu1404: +# Note that if this value is specified, the local realm name
11:29:24 ubuntu1404: +# must be included in the list!
11:29:24 ubuntu1404: +#Local-Realms =
11:29:24 ubuntu1404: +
11:29:24 ubuntu1404: [Mapping]
11:29:24 ubuntu1404:
11:29:24 ubuntu1404: Nobody-User = nobody
11:29:24 ubuntu1404: Nobody-Group = nogroup
11:29:24 ubuntu1404: +
11:29:24 ubuntu1404: +[Translation]
11:29:24 ubuntu1404: +
11:29:24 ubuntu1404: +# Translation Method is an comma-separated, ordered list of
11:29:24 ubuntu1404: +# translation methods that can be used. Distributed methods
11:29:24 ubuntu1404: +# include "nsswitch", "umich_ldap", and "static". Each method
11:29:24 ubuntu1404: +# is a dynamically loadable plugin library.
11:29:24 ubuntu1404: +# New methods may be defined and inserted in the list.
11:29:24 ubuntu1404: +# The default is "nsswitch".
11:29:24 ubuntu1404: +Method = nsswitch
11:29:24 ubuntu1404: +
11:29:25 ubuntu1404: * service[idmap] action restart
11:29:25 ubuntu1404: - restart service service[idmap]
11:29:25 ubuntu1404: * service[idmap] action start (up to date)
11:29:25 ubuntu1404: * service[idmap] action enable (up to date)
11:29:25 ubuntu1404: Recipe: nfs::server
11:29:27 ubuntu1404: * apt_package[nfs-kernel-server] action install
11:29:27 ubuntu1404: - install version 1:1.2.8-6ubuntu1.2 of package nfs-kernel-server
11:29:27 ubuntu1404: * template[/etc/default/nfs-kernel-server] action create
11:29:27 ubuntu1404: - update content in file /etc/default/nfs-kernel-server from a0dc37 to ecf3ce
11:29:27 ubuntu1404: --- /etc/default/nfs-kernel-server 2014-02-25 16:43:39.000000000 +0000
11:29:27 ubuntu1404: +++ /etc/default/.chef-nfs-kernel-server20190905-1254-ohpz9a 2019-09-05 09:29:26.871258000 +0000
11:29:27 ubuntu1404: @@ -1,23 +1,5 @@
11:29:27 ubuntu1404: -# Number of servers to start up
11:29:27 ubuntu1404: -RPCNFSDCOUNT=8
11:29:27 ubuntu1404: -
11:29:27 ubuntu1404: -# Runtime priority of server (see nice(1))
11:29:27 ubuntu1404: -RPCNFSDPRIORITY=0
11:29:27 ubuntu1404: -
11:29:27 ubuntu1404: -# Options for rpc.mountd.
11:29:27 ubuntu1404: -# If you have a port-based firewall, you might want to set up
11:29:27 ubuntu1404: -# a fixed port here using the --port option. For more information,
11:29:27 ubuntu1404: -# see rpc.mountd(8) or http://wiki.debian.org/SecuringNFS
11:29:27 ubuntu1404: -# To disable NFSv4 on the server, specify '--no-nfs-version 4' here
11:29:27 ubuntu1404: -RPCMOUNTDOPTS="--manage-gids"
11:29:27 ubuntu1404: -
11:29:27 ubuntu1404: -# Do you want to start the svcgssd daemon? It is only required for Kerberos
11:29:27 ubuntu1404: -# exports. Valid alternatives are "yes" and "no"; the default is "no".
11:29:27 ubuntu1404: -NEED_SVCGSSD=""
11:29:27 ubuntu1404: -
11:29:27 ubuntu1404: -# Options for rpc.svcgssd.
11:29:27 ubuntu1404: -RPCSVCGSSDOPTS=""
11:29:27 ubuntu1404: -
11:29:27 ubuntu1404: -# Options for rpc.nfsd.
11:29:27 ubuntu1404: -RPCNFSDOPTS=""
11:29:27 ubuntu1404: +# Generated by Chef for ip-172-30-2-21.ec2.internal# Local modifications will be overwritten.
11:29:27 ubuntu1404: +# Rendered Debian/Ubuntu template variant
11:29:27 ubuntu1404: +RPCMOUNTDOPTS="-p 32767"
11:29:27 ubuntu1404: +RPCNFSDCOUNT="8"
11:29:27 ubuntu1404: Recipe: nfs::_sysctl
11:29:27 ubuntu1404: * sysctl[fs.nfs.nlm_tcpport] action apply (skipped due to only_if)
11:29:27 ubuntu1404: * sysctl[fs.nfs.nlm_udpport] action apply (skipped due to only_if)
11:29:27 ubuntu1404: * service[rpcbind] action start (up to date)
11:29:27 ubuntu1404: * service[rpcbind] action enable (up to date)
11:29:27 ubuntu1404: Recipe: nfs::server
11:29:27 ubuntu1404: * service[nfs-kernel-server] action start
11:29:27 ubuntu1404: - start service service[nfs-kernel-server]
11:29:27 ubuntu1404: * service[nfs-kernel-server] action enable (up to date)
Hello, any update on this?
Issue is still present on 'nfs', '~> 5.0.0'
in both Ubuntu 1804 and Ubuntu 2004
include_recipe "nfs::server4"
Output is:
2022-09-22 07:39:15.030000 Stdout: * apt_package[nfs-common] action install[2022-09-22T07:39:09+00:00] INFO: Processing apt_package[nfs-common] action install (nfs::_common line 22)
2022-09-22 07:39:15.030000 Stdout: [2022-09-22T07:39:14+00:00] INFO: apt_package[nfs-common] installed nfs-common at 1:1.3.4-2.1ubuntu5.5
2022-09-22 07:39:15.030000 Stdout:
2022-09-22 07:39:15.030000 Stdout: - install version 1:1.3.4-2.1ubuntu5.5 of package nfs-common
2022-09-22 07:39:15.030000 Stdout: * apt_package[rpcbind] action install[2022-09-22T07:39:14+00:00] INFO: Processing apt_package[rpcbind] action install (nfs::_common line 22)
2022-09-22 07:39:15.030000 Stdout: (up to date)
2022-09-22 07:39:15.030000 Stdout: * directory[/etc/default] action create[2022-09-22T07:39:15+00:00] INFO: Processing directory[/etc/default] action create (nfs::_common line 26)
2022-09-22 07:39:15.030000 Stdout: (skipped due to only_if)
2022-09-22 07:39:15.030000 Stdout: * template[/etc/default/nfs-common] action create[2022-09-22T07:39:15+00:00] INFO: Processing template[/etc/default/nfs-common] action create (nfs::_common line 36)
2022-09-22 07:39:15.030000 Stdout: [2022-09-22T07:39:15+00:00] INFO: template[/etc/default/nfs-common] backed up to /etc/chef/local-mode-cache/backup/etc/default/nfs-common.chef-20220922073915.027862
2022-09-22 07:39:15.030000 Stdout: [2022-09-22T07:39:15+00:00] INFO: template[/etc/default/nfs-common] updated file contents /etc/default/nfs-common
2022-09-22 07:39:15.030000 Stdout:
2022-09-22 07:39:15.030000 Stdout: - update content in file /etc/default/nfs-common from 978a91 to 0e3769
2022-09-22 07:39:15.030000 Stdout: --- /etc/default/nfs-common 2021-05-13 13:27:22.000000000 +0000
2022-09-22 07:39:15.030000 Stdout: +++ /etc/default/.chef-nfs-common20220922-7963-ohsorx 2022-09-22 07:39:15.021003527 +0000
2022-09-22 07:39:15.030000 Stdout: @@ -1,15 +1,3 @@
2022-09-22 07:39:15.030000 Stdout: -# If you do not set values for the NEED_ options, they will be attempted
2022-09-22 07:39:15.030000 Stdout: -# autodetected; this should be sufficient for most people. Valid alternatives
2022-09-22 07:39:15.030000 Stdout: -# for the NEED_ options are "yes" and "no".
2022-09-22 07:39:15.030000 Stdout: -
2022-09-22 07:39:15.030000 Stdout: -
2022-09-22 07:39:15.030000 Stdout: -# Options for rpc.statd.
2022-09-22 07:39:15.030000 Stdout: -# Should rpc.statd listen on a specific port? This is especially useful
2022-09-22 07:39:15.030000 Stdout: -# when you have a port-based firewall. To use a fixed port, set this
2022-09-22 07:39:15.030000 Stdout: -# this variable to a statd argument like: "--port 4000 --outgoing-port 4001".
2022-09-22 07:39:15.030000 Stdout: -# For more information, see rpc.statd(8) or http://wiki.debian.org/SecuringNFS
2022-09-22 07:39:15.030000 Stdout: -STATDOPTS=
2022-09-22 07:39:15.030000 Stdout: -
2022-09-22 07:39:15.030000 Stdout: -# Do you want to start the gssd daemon? It is required for Kerberos mounts.
2022-09-22 07:39:15.845000 Stdout: -NEED_GSSD=
2022-09-22 07:39:15.845000 Stdout: +# Generated by Chef for ip-172-31-0-35.ec2.internal# Local modifications will be overwritten.
2022-09-22 07:39:15.845000 Stdout: +STATDOPTS="--port 32765 --outgoing-port 32766"
2022-09-22 07:39:15.845000 Stdout: * kernel_module[lockd] action install[2022-09-22T07:39:15+00:00] INFO: Processing kernel_module[lockd] action install (nfs::_common line 44)
2022-09-22 07:39:15.845000 Stdout:
2022-09-22 07:39:15.845000 Stdout: * file[/etc/modprobe.d/options_lockd.conf] action create[2022-09-22T07:39:15+00:00] INFO: Processing file[/etc/modprobe.d/options_lockd.conf] action create (/opt/cinc/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/resource/kernel_module.rb line 106)
2022-09-22 07:39:15.845000 Stdout: [2022-09-22T07:39:15+00:00] INFO: file[/etc/modprobe.d/options_lockd.conf] created file /etc/modprobe.d/options_lockd.conf
2022-09-22 07:39:15.845000 Stdout:
2022-09-22 07:39:15.845000 Stdout: - create new file /etc/modprobe.d/options_lockd.conf[2022-09-22T07:39:15+00:00] INFO: file[/etc/modprobe.d/options_lockd.conf] updated file contents /etc/modprobe.d/options_lockd.conf
2022-09-22 07:39:15.845000 Stdout:
2022-09-22 07:39:15.845000 Stdout: - update content in file /etc/modprobe.d/options_lockd.conf from none to 747b48
2022-09-22 07:39:15.845000 Stdout: --- /etc/modprobe.d/options_lockd.conf 2022-09-22 07:39:15.101003922 +0000
2022-09-22 07:39:15.845000 Stdout: +++ /etc/modprobe.d/.chef-options_lockd20220922-7963-2womad.conf 2022-09-22 07:39:15.101003922 +0000
2022-09-22 07:39:15.845000 Stdout: @@ -1 +1,2 @@
2022-09-22 07:39:15.845000 Stdout: +options lockd nlm_udpport=32768 nlm_tcpport=32768
2022-09-22 07:39:15.845000 Stdout: - load kernel module lockd
2022-09-22 07:39:15.845000 Stdout: * directory[/etc/modules-load.d] action create[2022-09-22T07:39:15+00:00] INFO: Processing directory[/etc/modules-load.d] action create (/opt/cinc/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/resource/kernel_module.rb line 114)
2022-09-22 07:39:15.845000 Stdout: (up to date)
2022-09-22 07:39:15.845000 Stdout: * file[/etc/modules-load.d/lockd.conf] action create[2022-09-22T07:39:15+00:00] INFO: Processing file[/etc/modules-load.d/lockd.conf] action create (/opt/cinc/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/resource/kernel_module.rb line 118)
2022-09-22 07:39:15.845000 Stdout: [2022-09-22T07:39:15+00:00] INFO: file[/etc/modules-load.d/lockd.conf] created file /etc/modules-load.d/lockd.conf
2022-09-22 07:39:15.845000 Stdout:
2022-09-22 07:39:15.845000 Stdout: - create new file /etc/modules-load.d/lockd.conf[2022-09-22T07:39:15+00:00] INFO: file[/etc/modules-load.d/lockd.conf] updated file contents /etc/modules-load.d/lockd.conf
2022-09-22 07:39:15.845000 Stdout:
2022-09-22 07:39:15.845000 Stdout: - update content in file /etc/modules-load.d/lockd.conf from none to 8bb64b
2022-09-22 07:39:15.845000 Stdout: --- /etc/modules-load.d/lockd.conf 2022-09-22 07:39:15.461005698 +0000
2022-09-22 07:39:15.845000 Stdout: +++ /etc/modules-load.d/.chef-lockd20220922-7963-qx23ae.conf 2022-09-22 07:39:15.461005698 +0000
2022-09-22 07:39:15.845000 Stdout: @@ -1 +1,2 @@
2022-09-22 07:39:15.845000 Stdout: +lockd
2022-09-22 07:39:15.845000 Stdout:
2022-09-22 07:39:15.845000 Stdout: [2022-09-22T07:39:15+00:00] INFO: kernel_module[lockd] not queuing delayed action restart on service[portmap] (delayed), as it's already been queued
2022-09-22 07:39:15.845000 Stdout: [2022-09-22T07:39:15+00:00] INFO: kernel_module[lockd] not queuing delayed action restart on service[statd] (delayed), as it's already been queued
2022-09-22 07:39:15.845000 Stdout: [2022-09-22T07:39:15+00:00] INFO: kernel_module[lockd] not queuing delayed action restart on service[lock] (delayed), as it's already been queued
2022-09-22 07:39:15.845000 Stdout: * execute[update initramfs] action nothing[2022-09-22T07:39:15+00:00] INFO: Processing execute[update initramfs] action nothing (/opt/cinc/embedded/lib/ruby/gems/3.0.0/gems/chef-17.2.29/lib/chef/dsl/declare_resource.rb line 233)
2022-09-22 07:39:15.845000 Stdout: (skipped due to action :nothing)
2022-09-22 07:39:15.845000 Stdout: * service[portmap] action start[2022-09-22T07:39:15+00:00] INFO: Processing service[portmap] action start (nfs::_common line 56)
2022-09-22 07:39:15.845000 Stdout: [2022-09-22T07:39:15+00:00] INFO: service[portmap] started
2022-09-22 07:39:15.845000 Stdout:
2022-09-22 07:39:15.845000 Stdout: - start service service[portmap]
2022-09-22 07:39:15.845000 Stdout: * service[portmap] action enable[2022-09-22T07:39:15+00:00] INFO: Processing service[portmap] action enable (nfs::_common line 56)
2022-09-22 07:39:15.845000 Stdout: (up to date)
2022-09-22 07:39:15.845000 Stdout: * service[statd] action start[2022-09-22T07:39:15+00:00] INFO: Processing service[statd] action start (nfs::_common line 56)
2022-09-22 07:39:15.845000 Stdout: [2022-09-22T07:39:15+00:00] INFO: service[statd] started
2022-09-22 07:39:15.845000 Stdout:
2022-09-22 07:39:15.845000 Stdout: - start service service[statd]
2022-09-22 07:39:15.845000 Stdout: * service[statd] action enable[2022-09-22T07:39:15+00:00] INFO: Processing service[statd] action enable (nfs::_common line 56)
2022-09-22 07:39:15.845000 Stdout: [2022-09-22T07:39:15+00:00] INFO: service[statd] enabled
2022-09-22 07:39:15.845000 Stdout:
2022-09-22 07:39:15.846000 Stdout: - enable service service[statd]
2022-09-22 07:39:15.846000 Stdout: * service[lock] action start[2022-09-22T07:39:15+00:00] INFO: Processing service[lock] action start (nfs::_common line 56)
2022-09-22 07:39:15.846000 Stdout: (up to date)
2022-09-22 07:39:15.846000 Stdout: * service[lock] action enable[2022-09-22T07:39:15+00:00] INFO: Processing service[lock] action enable (nfs::_common line 56)
2022-09-22 07:39:15.846000 Stdout: (up to date)
2022-09-22 07:39:15.846000 Stdout: Recipe: nfs::_idmap
2022-09-22 07:39:15.846000 Stdout: * template[/etc/idmapd.conf] action create[2022-09-22T07:39:15+00:00] INFO: Processing template[/etc/idmapd.conf] action create (nfs::_idmap line 23)
2022-09-22 07:39:15.846000 Stdout: [2022-09-22T07:39:15+00:00] INFO: template[/etc/idmapd.conf] backed up to /etc/chef/local-mode-cache/backup/etc/idmapd.conf.chef-20220922073915.802300
2022-09-22 07:39:15.846000 Stdout: [2022-09-22T07:39:15+00:00] INFO: template[/etc/idmapd.conf] updated file contents /etc/idmapd.conf
2022-09-22 07:39:15.846000 Stdout:
2022-09-22 07:39:15.846000 Stdout: - update content in file /etc/idmapd.conf from b0488e to ca812b
2022-09-22 07:39:15.846000 Stdout: --- /etc/idmapd.conf 2021-05-12 19:30:06.000000000 +0000
2022-09-22 07:39:15.846000 Stdout: +++ /etc/.chef-idmapd20220922-7963-vpilc.conf 2022-09-22 07:39:15.797007355 +0000
2022-09-22 07:39:15.846000 Stdout: @@ -2,11 +2,35 @@
2022-09-22 07:39:15.846000 Stdout:
2022-09-22 07:39:15.846000 Stdout: Verbosity = 0
2022-09-22 07:39:15.846000 Stdout: Pipefs-Directory = /run/rpc_pipefs
2022-09-22 07:39:15.846000 Stdout: -# set your own domain here, if it differs from FQDN minus hostname
2022-09-22 07:39:15.846000 Stdout: -# Domain = localdomain
2022-09-22 07:39:15.846000 Stdout:
2022-09-22 07:39:15.846000 Stdout: +# The following should be set to the local NFSv4 domain name
2022-09-22 07:39:15.846000 Stdout: +# The default is the host's DNS domain name.
2022-09-22 07:39:15.846000 Stdout: +Domain = ec2.internal
2022-09-22 07:39:15.846000 Stdout: +
2022-09-22 07:39:15.846000 Stdout: +# The following is a comma-separated list of Kerberos realm
2022-09-22 07:39:15.846000 Stdout: +# names that should be considered to be equivalent to the
2022-09-22 07:39:15.846000 Stdout: +# local realm, such that <user>@REALM.A can be assumed to
2022-09-22 07:39:15.846000 Stdout: +# be the same user as <user>@REALM.B
2022-09-22 07:39:15.846000 Stdout: +# If not specified, the default local realm is the domain name,
2022-09-22 07:39:15.846000 Stdout: +# which defaults to the host's DNS domain name,
2022-09-22 07:39:15.846000 Stdout: +# translated to upper-case.
2022-09-22 07:39:15.846000 Stdout: +# Note that if this value is specified, the local realm name
2022-09-22 07:39:15.846000 Stdout: +# must be included in the list!
2022-09-22 07:39:15.846000 Stdout: +#Local-Realms =
2022-09-22 07:39:15.846000 Stdout: +
2022-09-22 07:39:15.846000 Stdout: [Mapping]
2022-09-22 07:39:15.846000 Stdout:
2022-09-22 07:39:15.846000 Stdout: Nobody-User = nobody
2022-09-22 07:39:15.846000 Stdout: Nobody-Group = nogroup
2022-09-22 07:39:15.846000 Stdout: +
2022-09-22 07:39:15.846000 Stdout: +[Translation]
2022-09-22 07:39:15.846000 Stdout: +
2022-09-22 07:39:15.846000 Stdout: +# Translation Method is an comma-separated, ordered list of
2022-09-22 07:39:15.846000 Stdout: +# translation methods that can be used. Distributed methods
2022-09-22 07:39:15.846000 Stdout: +# include "nsswitch", "umich_ldap", and "static". Each method
2022-09-22 07:39:15.846000 Stdout: +# is a dynamically loadable plugin library.
2022-09-22 07:39:15.846000 Stdout: +# New methods may be defined and inserted in the list.
2022-09-22 07:39:15.846000 Stdout: +# The default is "nsswitch".
2022-09-22 07:39:15.846000 Stdout: +Method = nsswitch
2022-09-22 07:39:15.846000 Stdout: +
2022-09-22 07:39:15.846000 Stdout: [2022-09-22T07:39:15+00:00] INFO: template[/etc/idmapd.conf] sending restart action to service[idmap] (immediate)
2022-09-22 07:39:15.846000 Stdout: * service[idmap] action restart[2022-09-22T07:39:15+00:00] INFO: Processing service[idmap] action restart (nfs::_idmap line 29)
2022-09-22 07:39:15.846000 Stdout:
2022-09-22 07:39:15.846000 Stdout:
2022-09-22 07:39:15.846000 Stdout: ================================================================================
2022-09-22 07:39:15.846000 Stdout: Error executing action `restart` on resource 'service[idmap]'
2022-09-22 07:39:15.846000 Stdout: ================================================================================
2022-09-22 07:39:15.846000 Stdout:
2022-09-22 07:39:15.846000 Stdout: Mixlib::ShellOut::ShellCommandFailed
2022-09-22 07:39:15.846000 Stdout: ------------------------------------
2022-09-22 07:39:15.846000 Stdout: Expected process to exit with [0], but received '5'
2022-09-22 07:39:15.846000 Stdout: ---- Begin output of ["/bin/systemctl", "--system", "restart", "nfs-idmapd"] ----
2022-09-22 07:39:15.846000 Stdout: STDOUT:
2022-09-22 07:39:15.846000 Stdout: STDERR: Failed to restart nfs-idmapd.service: Unit nfs-server.service not found.
2022-09-22 07:39:15.846000 Stdout: ---- End output of ["/bin/systemctl", "--system", "restart", "nfs-idmapd"] ----
2022-09-22 07:39:15.846000 Stdout: Ran ["/bin/systemctl", "--system", "restart", "nfs-idmapd"] returned 5
2022-09-22 07:39:15.846000 Stdout:
2022-09-22 07:39:15.846000 Stdout: Resource Declaration:
2022-09-22 07:39:15.846000 Stdout: ---------------------
2022-09-22 07:39:15.846000 Stdout: # In /etc/chef/local-mode-cache/cache/cookbooks/nfs/recipes/_idmap.rb
2022-09-22 07:39:15.846000 Stdout:
2022-09-22 07:39:15.846000 Stdout: 29: service 'idmap' do
2022-09-22 07:39:15.846000 Stdout: 30: service_name node['nfs']['service']['idmap']
2022-09-22 07:39:15.846000 Stdout: 31: action [:start, :enable]
2022-09-22 07:39:15.846000 Stdout: 32: supports status: true
2022-09-22 07:39:15.846000 Stdout: 33: end
2022-09-22 07:39:15.846000 Stdout:
2022-09-22 07:39:15.846000 Stdout: Compiled Resource:
2022-09-22 07:39:15.846000 Stdout: ------------------
2022-09-22 07:39:15.846000 Stdout: # Declared in /etc/chef/local-mode-cache/cache/cookbooks/nfs/recipes/_idmap.rb:29:in `from_file'
2022-09-22 07:39:15.846000 Stdout:
2022-09-22 07:39:15.846000 Stdout: service("idmap") do
2022-09-22 07:39:15.846000 Stdout: action [:start, :enable]
2022-09-22 07:39:15.846000 Stdout: default_guard_interpreter :default
2022-09-22 07:39:15.846000 Stdout: declared_type :service
2022-09-22 07:39:15.846000 Stdout: cookbook_name "nfs"
2022-09-22 07:39:15.846000 Stdout: recipe_name "_idmap"
2022-09-22 07:39:15.846000 Stdout: service_name "nfs-idmapd"
2022-09-22 07:39:15.846000 Stdout: supports {:status=>true}
2022-09-22 07:39:15.846000 Stdout: end
2022-09-22 07:39:15.846000 Stdout:
2022-09-22 07:39:15.846000 Stdout: System Info:
2022-09-22 07:39:15.846000 Stdout: ------------
2022-09-22 07:39:15.846000 Stdout: chef_version=17.2.29
2022-09-22 07:39:15.846000 Stdout: platform=ubuntu
2022-09-22 07:39:15.846000 Stdout: platform_version=18.04
2022-09-22 07:39:15.846000 Stdout: ruby=ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-linux]
2022-09-22 07:39:15.846000 Stdout: program_name=/opt/cinc/bin/cinc-client
2022-09-22 07:39:15.846000 Stdout: executable=/opt/cinc/bin/cinc-client
I have a machine, which is running Ubuntu 16.04 Desktop, 64-bit version, that I want to set up as an NFS client.
The recipe doing this setup starts with:
When cooking the machine, I get the following output:
The nfs-idmap service is marked as being static. I don't know the exact meaning of static:
I think the name mapping works on the machine despite the failed cooking.
This make me believe that the mapping service should not be started by the nfs::_idmap recipe in this case, though I'm far from sure.