我有 1 个盒子似乎不想运行 chef,而我还有另外 5 个使用相同 rhel 和 chef 版本的相同盒子,它们运行正常。在非工作盒子上,当运行手册为空时,Chef 可以正确运行,但当我向运行手册添加一些内容并重试时,Chef 会失败。
以下是返回的一些错误
/opt/chef/embedded/lib/ruby/2.6.0/fileutils.rb:529: [BUG] rb_sys_fail_path_in(rb_file_s_rename, (/tmp/chef-rest20230427-6900-1ip3kea, /var/chef/cache/cookbooks/selinux_policy/resources/fcontext.rb)) - errno == 0
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0014 p:---- s:0081 e:000080 CFUNC :rename
c:0013 p:0062 s:0075 e:000074 BLOCK /opt/chef/embedded/lib/ruby/2.6.0/fileutils.rb:529
c:0012 p:0061 s:0069 e:000068 BLOCK /opt/chef/embedded/lib/ruby/2.6.0/fileutils.rb:1557
c:0011 p:0098 s:0064 e:000063 METHOD /opt/chef/embedded/lib/ruby/2.6.0/fileutils.rb:1573
c:0010 p:0009 s:0057 e:000056 METHOD /opt/chef/embedded/lib/ruby/2.6.0/fileutils.rb:1555
c:0009 p:0066 s:0051 e:000050 METHOD /opt/chef/embedded/lib/ruby/2.6.0/fileutils.rb:520
c:0008 p:0128 s:0040 e:000039 METHOD /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.12.22/lib/chef/file_cache.rb:83
c:0007 p:0056 s:0032 e:000031 METHOD /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.12.22/lib/chef/cookbook/synchronizer.rb:318
c:0006 p:0073 s:0025 e:000024 METHOD /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.12.22/lib/chef/cookbook/synchronizer.rb:290
c:0005 p:0007 s:0019 e:000018 BLOCK /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.12.22/lib/chef/cookbook/synchronizer.rb:177
c:0004 p:0028 s:0014 e:000013 BLOCK /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.12.22/lib/chef/util/threaded_job_queue.rb:52 [FINISH]
c:0003 p:---- s:0010 e:000009 CFUNC :loop
c:0002 p:0006 s:0006 e:000005 BLOCK /opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.12.22/lib/chef/util/threaded_job_queue.rb:50 [FINISH]
c:0001 p:---- s:0003 e:000002 (none) [FINISH]
-- Ruby level backtrace information ----------------------------------------
/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.12.22/lib/chef/util/threaded_job_queue.rb:50:in `block (2 levels) in process'
/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.12.22/lib/chef/util/threaded_job_queue.rb:50:in `loop'
/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.12.22/lib/chef/util/threaded_job_queue.rb:52:in `block (3 levels) in process'
/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.12.22/lib/chef/cookbook/synchronizer.rb:177:in `block (2 levels) in sync_cookbooks'
/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.12.22/lib/chef/cookbook/synchronizer.rb:290:in `sync_file'
/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.12.22/lib/chef/cookbook/synchronizer.rb:318:in `download_file'
/opt/chef/embedded/lib/ruby/gems/2.6.0/gems/chef-15.12.22/lib/chef/file_cache.rb:83:in `move_to'
/opt/chef/embedded/lib/ruby/2.6.0/fileutils.rb:520:in `mv'
/opt/chef/embedded/lib/ruby/2.6.0/fileutils.rb:1555:in `fu_each_src_dest'
/opt/chef/embedded/lib/ruby/2.6.0/fileutils.rb:1573:in `fu_each_src_dest0'
/opt/chef/embedded/lib/ruby/2.6.0/fileutils.rb:1557:in `block in fu_each_src_dest'
/opt/chef/embedded/lib/ruby/2.6.0/fileutils.rb:529:in `block in mv'
/opt/chef/embedded/lib/ruby/2.6.0/fileutils.rb:529:in `rename'
-- Other runtime information -----------------------------------------------
* Loaded script: /bin/chef-client
* Loaded features:
0 enumerator.so
1 thread.rb
2 rational.so
3 complex.so
4 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/enc/encdb.so
5 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/enc/trans/transdb.so
6 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/rbconfig.rb
7 /opt/chef/embedded/lib/ruby/2.6.0/rubygems/compatibility.rb
8 /opt/chef/embedded/lib/ruby/2.6.0/rubygems/defaults.rb
9 /opt/chef/embedded/lib/ruby/2.6.0/rubygems/deprecate.rb
10 /opt/chef/embedded/lib/ruby/2.6.0/rubygems/errors.rb
11 /opt/chef/embedded/lib/ruby/2.6.0/rubygems/version.rb
12 /opt/chef/embedded/lib/ruby/2.6.0/rubygems/requirement.rb
13 /opt/chef/embedded/lib/ruby/2.6.0/rubygems/platform.rb
14 /opt/chef/embedded/lib/ruby/2.6.0/rubygems/basic_specification.rb
15 /opt/chef/embedded/lib/ruby/2.6.0/rubygems/stub_specification.rb
16 /opt/chef/embedded/lib/ruby/2.6.0/delegate.rb
17 /opt/chef/embedded/lib/ruby/2.6.0/uri/rfc2396_parser.rb
18 /opt/chef/embedded/lib/ruby/2.6.0/uri/rfc3986_parser.rb
19 /opt/chef/embedded/lib/ruby/2.6.0/uri/common.rb
20 /opt/chef/embedded/lib/ruby/2.6.0/uri/generic.rb
21 /opt/chef/embedded/lib/ruby/2.6.0/uri/file.rb
22 /opt/chef/embedded/lib/ruby/2.6.0/uri/ftp.rb
23 /opt/chef/embedded/lib/ruby/2.6.0/uri/http.rb
24 /opt/chef/embedded/lib/ruby/2.6.0/uri/https.rb
25 /opt/chef/embedded/lib/ruby/2.6.0/uri/ldap.rb
26 /opt/chef/embedded/lib/ruby/2.6.0/uri/ldaps.rb
27 /opt/chef/embedded/lib/ruby/2.6.0/uri/mailto.rb
28 /opt/chef/embedded/lib/ruby/2.6.0/uri.rb
29 /opt/chef/embedded/lib/ruby/2.6.0/rubygems/specification_policy.rb
30 /opt/chef/embedded/lib/ruby/2.6.0/rubygems/util/list.rb
31 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/stringio.so
32 /opt/chef/embedded/lib/ruby/2.6.0/rubygems/specification.rb
33 /opt/chef/embedded/lib/ruby/2.6.0/rubygems/exceptions.rb
34 /opt/chef/embedded/lib/ruby/2.6.0/rubygems/util.rb
...
7f8d2f10a000-7f8d2f309000 ---p 00001000 fd:05 8640350 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/fcntl.so
7f8d2f309000-7f8d2f30a000 r--p 00000000 fd:05 8640350 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/fcntl.so
7f8d2f30a000-7f8d2f30b000 rw-p 00001000 fd:05 8640350 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/fcntl.so
7f8d2f30b000-7f8d2f311000 r-xp 00000000 fd:05 8640349 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/etc.so
7f8d2f311000-7f8d2f510000 ---p 00006000 fd:05 8640349 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/etc.so
7f8d2f510000-7f8d2f511000 r--p 00005000 fd:05 8640349 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/etc.so
7f8d2f511000-7f8d2f512000 rw-p 00006000 fd:05 8640349 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/etc.so
7f8d2f512000-7f8d2f519000 r-xp 00000000 fd:05 8640359 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/pathname.so
7f8d2f519000-7f8d2f718000 ---p 00007000 fd:05 8640359 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/pathname.so
7f8d2f718000-7f8d2f719000 r--p 00006000 fd:05 8640359 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/pathname.so
7f8d2f719000-7f8d2f71a000 rw-p 00007000 fd:05 8640359 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/pathname.so
7f8d2f71a000-7f8d2f722000 r-xp 00000000 fd:05 8640366 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/stringio.so
7f8d2f722000-7f8d2f921000 ---p 00008000 fd:05 8640366 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/stringio.so
7f8d2f921000-7f8d2f922000 r--p 00007000 fd:05 8640366 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/stringio.so
7f8d2f922000-7f8d2f923000 rw-p 00008000 fd:05 8640366 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/stringio.so
7f8d2f923000-7f8d2f925000 r-xp 00000000 fd:05 12613225 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/enc/trans/transdb.so
7f8d2f925000-7f8d2fb25000 ---p 00002000 fd:05 12613225 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/enc/trans/transdb.so
7f8d2fb25000-7f8d2fb26000 r--p 00002000 fd:05 12613225 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/enc/trans/transdb.so
7f8d2fb26000-7f8d2fb27000 rw-p 00003000 fd:05 12613225 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/enc/trans/transdb.so
7f8d2fb27000-7f8d2fb29000 r-xp 00000000 fd:05 8640313 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/enc/encdb.so
7f8d2fb29000-7f8d2fd28000 ---p 00002000 fd:05 8640313 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/enc/encdb.so
7f8d2fd28000-7f8d2fd29000 r--p 00001000 fd:05 8640313 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/enc/encdb.so
7f8d2fd29000-7f8d2fd2a000 rw-p 00002000 fd:05 8640313 /opt/chef/embedded/lib/ruby/2.6.0/x86_64-linux/enc/encdb.so
7f8d2fd2a000-7f8d31d33000 rw-p 00000000 00:00 0
7f8d31d33000-7f8d31eef000 r-xp 00000000 fd:02 4195575 /usr/lib64/libc-2.28.so
7f8d31eef000-7f8d320ee000 ---p 001bc000 fd:02 4195575 /usr/lib64/libc-2.28.so
7f8d320ee000-7f8d320f2000 r--p 001bb000 fd:02 4195575 /usr/lib64/libc-2.28.so
7f8d320f2000-7f8d320f4000 rw-p 001bf000 fd:02 4195575 /usr/lib64/libc-2.28.so
7f8d320f4000-7f8d320f8000 rw-p 00000000 00:00 0
7f8d320f8000-7f8d32279000 r-xp 00000000 fd:02 4636839 /usr/lib64/libm-2.28.so
7f8d32279000-7f8d32478000 ---p 00181000 fd:02 4636839 /usr/lib64/libm-2.28.so
7f8d32478000-7f8d32479000 r--p 00180000 fd:02 4636839 /usr/lib64/libm-2.28.so
7f8d32479000-7f8d3247a000 rw-p 00181000 fd:02 4636839 /usr/lib64/libm-2.28.so
7f8d3247a000-7f8d3249a000 r-xp 00000000 fd:02 4196587 /usr/lib64/libcrypt.so.1.1.0
7f8d3249a000-7f8d32699000 ---p 00020000 fd:02 4196587 /usr/lib64/libcrypt.so.1.1.0
7f8d32699000-7f8d3269a000 r--p 0001f000 fd:02 4196587 /usr/lib64/libcrypt.so.1.1.0
7f8d3269a000-7f8d326a3000 rw-p 00000000 00:00 0
7f8d326a3000-7f8d326a6000 r-xp 00000000 fd:02 4636838 /usr/lib64/libdl-2.28.so
7f8d326a6000-7f8d328a5000 ---p 00003000 fd:02 4636838 /usr/lib64/libdl-2.28.so
7f8d328a5000-7f8d328a6000 r--p 00002000 fd:02 4636838 /usr/lib64/libdl-2.28.so
7f8d328a6000-7f8d328a7000 rw-p 00003000 fd:02 4636838 /usr/lib64/libdl-2.28.so
7f8d328a7000-7f8d328ae000 r-xp 00000000 fd:02 4636844 /usr/lib64/librt-2.28.so
7f8d328ae000-7f8d32aad000 ---p 00007000 fd:02 4636844 /usr/lib64/librt-2.28.so
7f8d32aad000-7f8d32aae000 r--p 00006000 fd:02 4636844 /usr/lib64/librt-2.28.so
7f8d32aae000-7f8d32aaf000 rw-p 00007000 fd:02 4636844 /usr/lib64/librt-2.28.so
7f8d32aaf000-7f8d32aca000 r-xp 00000000 fd:02 4636842 /usr/lib64/libpthread-2.28.so
7f8d32aca000-7f8d32cc9000 ---p 0001b000 fd:02 4636842 /usr/lib64/libpthread-2.28.so
7f8d32cc9000-7f8d32cca000 r--p 0001a000 fd:02 4636842 /usr/lib64/libpthread-2.28.so
7f8d32cca000-7f8d32ccb000 rw-p 0001b000 fd:02 4636842 /usr/lib64/libpthread-2.28.so
7f8d32ccb000-7f8d32ccf000 rw-p 00000000 00:00 0
7f8d32ccf000-7f8d32ce5000 r-xp 00000000 fd:05 4194641 /opt/chef/embedded/lib/libz.so.1.2.11
7f8d32ce5000-7f8d32ee4000 ---p 00016000 fd:05 4194641 /opt/chef/embedded/lib/libz.so.1.2.11
7f8d32ee4000-7f8d32ee5000 r--p 00015000 fd:05 4194641 /opt/chef/embedded/lib/libz.so.1.2.11
7f8d32ee5000-7f8d32ee6000 rw-p 00016000 fd:05 4194641 /opt/chef/embedded/lib/libz.so.1.2.11
7f8d32ee6000-7f8d3322c000 r-xp 00000000 fd:05 4194555 /opt/chef/embedded/lib/libruby.so.2.6.6
7f8d3322c000-7f8d3342b000 ---p 00346000 fd:05 4194555 /opt/chef/embedded/lib/libruby.so.2.6.6
7f8d3342b000-7f8d33431000 r--p 00345000 fd:05 4194555 /opt/chef/embedded/lib/libruby.so.2.6.6
7f8d33431000-7f8d33434000 rw-p 0034b000 fd:05 4194555 /opt/chef/embedded/lib/libruby.so.2.6.6
7f8d33434000-7f8d33445000 rw-p 00000000 00:00 0
7f8d33445000-7f8d33472000 r-xp 00000000 fd:02 5173330 /usr/lib64/ld-2.28.so
7f8d3348e000-7f8d33610000 rw-p 00000000 00:00 0
7f8d33610000-7f8d33663000 r--p 00000000 fd:02 8409611 /usr/lib/locale/en_US.utf8/LC_CTYPE
7f8d33663000-7f8d33668000 rw-p 00000000 00:00 0
7f8d33669000-7f8d33670000 r--s 00000000 fd:02 8427126 /usr/lib64/gconv/gconv-modules.cache
7f8d33670000-7f8d33672000 rw-p 00000000 00:00 0
7f8d33672000-7f8d33673000 r--p 0002d000 fd:02 5173330 /usr/lib64/ld-2.28.so
7f8d33673000-7f8d33675000 rw-p 0002e000 fd:02 5173330 /usr/lib64/ld-2.28.so
7fffbe4c0000-7fffbecbf000 rw-p 00000000 00:00 0 [stack]
7fffbede4000-7fffbede8000 r--p 00000000 00:00 0 [vvar]
7fffbede8000-7fffbedea000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: https://www.ruby-lang.org/bugreport.html
我追踪到错误是由于 chef 尝试将文件从临时目录移动到其缓存目录:
例如:
从:/tmp/chef-rest20230427-6900-1ip3kea
到:/var/chef/cache/cookbooks/selinux_policy/resources/fcontext.rb
我可以以 root 身份通过终端/命令行移动文件,但是当我尝试使用 ruby 执行相同的更改时,出现相同的错误:
[root@myserver myuser]# /opt/chef/embedded/bin/irb
irb(main):001:0> require 'fileutils'
=> true
irb(main):002:0> FileUtils.mv('/tmp/chef-rest20230427-6900-1ip3kea', '/var/chef/cache/cookbooks/selinux_policy/resources/fcontext.rb')
/opt/chef/embedded/lib/ruby/2.6.0/fileutils.rb:529: [BUG] rb_sys_fail_path_in(rb_file_s_rename, (/tmp/chef-rest20230427-6900-1ip3kea, /var/chef/cache/cookbooks/selinux_policy/resources/fcontext.rb)) - errno == 0
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0014 p:---- s:0081 e:000080 CFUNC :rename
c:0013 p:0062 s:0075 e:000074 BLOCK /opt/chef/embedded/lib/ruby/2.6.0/fileutils.rb:529
c:0012 p:0061 s:0069 e:000068 BLOCK /opt/chef/embedded/lib/ruby/2.6.0/fileutils.rb:1557
c:0011 p:0098 s:0064 e:000063 METHOD /opt/chef/embedded/lib/ruby/2.6.0/fileutils.rb:1573
当我使用 ruby 将文件移动到 /var/ 和 /var/chef/cache/cookbooks/s 目录时也会遇到错误。
话虽如此,当我在主目录中移动文件时,相同的 ruby 命令仍然有效
[root@mycomputer myuser]# /opt/chef/embedded/bin/irb
irb(main):001:0> require 'fileutils'
=> true
irb(main):002:0> FileUtils.mv('/home/myuser/fileIcreated.txt', '/home/myuser/chef-fileIcreated2.txt')
=> 0
我检查了我的工作服务器和非工作服务器之间的权限,它们看起来相同:notWorking:
[root@notWorkingComputer cookbooks]# ls -lah /tmp
total 12K
drwxrwxrwt. 12 root root 4.0K Apr 28 14:18 .
dr-xr-xr-x. 18 root root 255 Apr 27 14:14 ..
drwx------ 3 root root 22 Apr 27 16:32 BES
-rw------- 1 root root 0 Apr 27 17:01 chef-rest20230427-9210-17z2ovo
-rw------- 1 root root 0 Apr 27 17:01 chef-rest20230427-9210-19d788s
-rw------- 1 root root 0 Apr 27 17:01 chef-rest20230427-9210-1jxgrj2
-rw------- 1 root root 0 Apr 27 17:01 chef-rest20230427-9210-1p8iyjg
-rw------- 1 root root 0 Apr 27 17:01 chef-rest20230427-9210-nzj3gb
-rw------- 1 root root 395 Apr 27 17:01 chef-rest20230427-9210-p2zib8
-rw------- 1 root root 0 Apr 28 13:23 chef-rest20230428-63218-go0u2k
-rw------- 1 root root 0 Apr 28 13:23 chef-rest20230428-63218-kem2pc
-rw------- 1 root root 1.9K Apr 28 13:23 chef-rest20230428-63218-w7bx67
-rw------- 1 root root 0 Apr 28 13:23 chef-rest20230428-63218-wmjcd7
drwxrwxrwt 2 root root 6 Apr 27 14:14 .font-unix
drwxrwxrwt 2 root root 6 Apr 27 14:14 .ICE-unix
drwxr-xr-x 4 root root 33 Oct 7 2022 kheaders-4.18.0-372.32.1.el8_6.x86_64
drwx------ 3 root root 17 Apr 27 16:32 systemd-private-4cc96e5e60104fb1a9ab1726725d7a78-chronyd.service-bYOmR8
drwxrwxrwt 2 root root 6 Apr 27 14:14 .Test-unix
drwx------ 2 root root 6 Apr 27 14:14 vmware-root_1201-3979774027
drwx------ 2 root root 6 Apr 27 16:32 vmware-root_1206-2730693522
drwxrwxrwt. 2 root root 6 Mar 14 09:09 .X11-unix
drwxrwxrwt 2 root root 6 Apr 27 14:14 .XIM-unix
在职的
[root@workingComputer tmp]# ls -lah
total 0
drwxrwxrwt. 8 root root 284 Apr 28 14:16 .
dr-xr-xr-x. 18 root root 235 Dec 16 11:29 ..
drwx------. 2 myUser domain users 77 Apr 25 15:24 install.sh.504060
drwx------. 2 myUser domain users 78 Apr 25 15:27 install.sh.504563
srwxr-xr-x. 1 redis redis 0 Apr 27 12:44 redis.sock
drwx------. 3 root root 17 Mar 30 23:35 systemd-private-88977748067140c78f032c795561768f-chronyd.service-Z9CLKA
drwx------. 3 root root 17 Apr 26 10:00 systemd-private-88977748067140c78f032c795561768f-postfix.service-Qzco75
drwx------. 2 root root 6 Apr 22 03:53 vmware-root_1195-3988621783
drwxrwxrwt. 2 root root 6 Dec 16 05:36 .X11-unix
我们在两个盒子上都安装了炭黑,但我在非工作盒子上禁用了它,但这并没有帮助,所以我不认为问题与炭黑有关。
此刻我已经没有主意了,有什么东西可以帮助我弄清楚这里发生了什么事?
谢谢,亚历克斯
答案1
我在澳大利亚一家大型组织工作,该组织也使用 Carbon Black,但我们的自动化套件使用的是 Puppet,而不是 Chef。我们看到的堆栈跟踪几乎与您在 Puppet 代理调用 FileUtils.mv() 时看到的相同。
调查显示,该问题实际上与 Carbon Black 有关,但并非由 b9daemon 进程引起。而是代理创建的内部内核挂钩。我们的测试显示,最新的 Carbon Black Linux 代理(截至撰写本文时为 8.7.14)的内核挂钩似乎存在故障,导致 Ruby 解释器崩溃。
我们通过完全关闭 carbon black(可以通过ps -ef | grep b9
除 grep 命令之外没有任何输出来验证)、禁用 b9daemon 的 systemd 服务,然后重新启动服务器并尝试再次运行 puppet 来验证这一点。没有观察到进程崩溃。
此外,我们还将炭黑代理从 8.7.14 回滚到 8.7.8-16,发现问题不再发生。因此,您的其他机器可能安装了不同的炭黑版本,这可以解释为什么它们不受影响,而只有一台机器受到影响。
我们已经向 vmware 支持部门提交了一张票,vmware 工程师报告说,他们认为这个问题与他们已知的故障有关,他们正在尝试修复。一旦收到进一步的信息,我会更新此答案。
还应注意,该问题可能影响所有版本的 Linux,但我们只使用 RHEL 7 和 RHEL 8,因此我无法确认其他发行版是否受到影响。
TLDR:该问题是由于 Carbon Black 代理的特定版本 (8.7.14) 在内核挂钩中存在错误,导致 Ruby 解释器调用的底层 C 代码崩溃。回滚到代理版本 8.7.8-16 并重新启动是确认的修复方法,完全禁用代理 (不是只需将代理置于禁用策略中),然后重新启动系统。
更新:我们最近测试了 vmware 的测试版,并确认 Carbon Black 应用控制代理的测试版不再存在此问题。VMWare 表示修复将在下一个版本 (8.7.16) 中发布,该版本还将包括对 RHEL 8.8 的内核支持。此版本的发布日期暂定为 2-3 周后。
答案2
尝试在文件中将TMPDIR
环境变量设置为/var/tmp
/etc/chef/client.rb
例如将以下 ruby 代码添加到/etc/chef/client.rb
ENV['TMPDIR'] = '/var/tmp'