信息

信息

信息

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 --verboseubuntu 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

我尝试过的事情

  1. 更改目录var/lib/puppet/lib/facter并使用以下命令重新运行 puppet 代理:

    mv /var/lib/puppet/lib/facter /var/lib/puppet/lib/facter-bak
    puppet agent -t --debug --verbose
    

期待

  1. 如何知道哪段代码被卡住了
  2. 如何让傀儡特工可以运行

提前致谢

相关内容