情報
root@slx04c-8odu:/home/xiaojguan# which puppet
/usr/share/rvm/rubies/ruby-2.3.8/bin/puppet
root@slx04c-8odu:/home/xiaojguan# puppet -V
3.8.6
root@slx04c-8odu:/home/xiaojguan# facter -v
1.7.5
root@slx04c-8odu:/home/xiaojguan# ll /var/lib/puppet/lib/facter/
total 188
drwxr-xr-x 3 root root 4096 Feb 25 2021 ./
drwxr-xr-x 4 root root 4096 Nov 22 2020 ../
-rw-r--r-- 1 root root 430 Nov 22 2020 README.md
-rw-r--r-- 1 root root 916 Nov 22 2020 asset.rb
-rw-r--r-- 1 root root 3842 Nov 22 2020 bmc.rb
-rw-r--r-- 1 root root 620 Nov 22 2020 broadcast.rb
-rw-r--r-- 1 root root 66 Nov 22 2020 check_nsx_manager.rb
-rw-r--r-- 1 root root 627 Nov 22 2020 cidr.rb
-rw-r--r-- 1 root root 1683 Feb 25 2021 cloudnative.rb
-rw-r--r-- 1 root root 581 Nov 22 2020 core_count.rb
-rw-r--r-- 1 root root 1016 Nov 22 2020 default_gateway.rb
-rw-r--r-- 1 root root 294 Nov 22 2020 default_route.rb
-rw-r--r-- 1 root root 1250 Nov 22 2020 dhcp_server.rb
-rw-r--r-- 1 root root 4313 Nov 22 2020 disks.rb
-rw-r--r-- 1 root root 305 Nov 22 2020 efi.rb
-rw-r--r-- 1 root root 1116 Nov 22 2020 esx.rb
-rw-r--r-- 1 root root 4667 Nov 22 2020 facter_dot_d.rb
-rw-r--r-- 1 root root 236 Nov 22 2020 ip6tables_version.rb
-rw-r--r-- 1 root root 444 Nov 22 2020 iptables_persistent_version.rb
-rw-r--r-- 1 root root 234 Nov 22 2020 iptables_version.rb
-rw-r--r-- 1 root root 1792 Nov 22 2020 metadisks.rb
-rw-r--r-- 1 root root 374 Nov 22 2020 my-vars.rb
-rw-r--r-- 1 root root 183 Nov 22 2020 nameserver.rb
-rw-r--r-- 1 root root 6228 Nov 22 2020 nics.rb
-rw-r--r-- 1 root root 542 Nov 22 2020 nvidia_3d.rb
-rw-r--r-- 1 root root 114 Nov 22 2020 nvidia_product_id.rb
-rw-r--r-- 1 root root 564 Nov 22 2020 ovs_client_cert.rb
-rw-r--r-- 1 root root 1172 Nov 22 2020 pe_version.rb
-rw-r--r-- 1 root root 184 Nov 22 2020 proc_mounts.rb
-rw-r--r-- 1 root root 620 Nov 22 2020 processor_frequency.rb
-rw-r--r-- 1 root root 937 Nov 22 2020 puppet_vardir.rb
-rw-r--r-- 1 root root 20125 Nov 22 2020 raid.rb
-rw-r--r-- 1 root root 875 Nov 22 2020 root_home.rb
-rw-r--r-- 1 root root 213 Nov 22 2020 service_daemon_helper.rb
-rw-r--r-- 1 root root 618 Nov 22 2020 staging_http_get.rb
-rw-r--r-- 1 root root 251 Nov 22 2020 staging_windir.rb
-rw-r--r-- 1 root root 149 Nov 22 2020 swap_file_exists.rb
-rw-r--r-- 1 root root 790 Nov 22 2020 swapon_size.rb
drwxr-xr-x 2 root root 4096 Nov 22 2020 util/
-rw-r--r-- 1 root root 146 Nov 22 2020 var_mb.rb
問題の説明
私が実行すると、このステップで停止しますpuppet agent -t --debug --verbose
。ubuntu 20.04
Debug: Loading facts from /var/lib/puppet/lib/facter/puppet_vardir.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/esx.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/asset.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/nvidia_product_id.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/core_count.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/efi.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/nvidia_3d.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/disks.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/swapon_size.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/nics.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/service_daemon_helper.rb
Debug: Loading facts from /var/lib/puppet/lib/facter/cidr.rb
straceを使用してプロセスを追跡した結果、次の結果が得られました。
root@slx04c-7tgb:/var/lib/puppet/lib# strace -p $(ps aux | grep applying | grep -v grep | awk '{ print $2}')
strace: Process 13250 attached
select(10, [9], [], NULL, NULL
私が試したこと
ディレクトリを変更し
var/lib/puppet/lib/facter
、次のコマンドを使用してPuppetエージェントを再実行します。mv /var/lib/puppet/lib/facter /var/lib/puppet/lib/facter-bak puppet agent -t --debug --verbose
予想する
- どのコードスニペットが停止しているかを確認する方法
- Puppetエージェントを有効にする方法