CentOS 部分安装 debuginfo 包
当磁盘空间不足时,我们可能无法安装完整版本的 debuginfo 包,此时可以提取必须的部分进行安装。 注意:仅针对 CentOS 系统。 可以直接在已安装的
2019-01-19   schedule 1 min 44 s  
SELinux 宏与接口
在定义 SELinux 访问规则时,可以手写 allow 规则,也可以使用 SELinux 预定义的宏(policy/support)或 SELinux 模块(policy/mod
2019-01-19   schedule 2 min 16 s  
编写 librados SELinux 规则
需求比较简单,就是编写独立的规则允许 OpenStack 的 qemu 进程能够访问(完全控制) ceph 的客户端 admin socket,之所以需要独立的规则(或者说
2019-01-19   schedule 7 min 27 s  
SELinux 工具使用
setatus 查看 SELinux 状态 ~# sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: enforcing Mode from config file: enforcing Policy MLS status: enabled Policy deny_unknown status: allowed Max kernel policy version: 28 或者使用 selinuxenable
2019-01-18   schedule 9 min 33 s  
rbd map failed to add secret
故障现象 故障分析 现场所使用的 Ceph 为 Jewel 版本,定位到出错代码所在的位置如下: src/krbd.cc#L158 static int build_map_buf(CephContext *cct, const char *pool, const char *image, const char *snap, const char *options, string *pbuf) { ... if (keyring.get_secret(cct->_conf->name, secret)) {
2019-01-17   schedule 3 min 6 s  
SELinux 基础
SELinux 的目的是最小化进程的权限,即让进程在受限环境下运行,限制进程可以访问的资源。在 RHEL/CentOS 系统中默认使用的 targeted 策略为所有进程开放所
2019-01-17   schedule 5 min 2 s  
ceph-mds/ceph-mgr shutdown abort
故障现象 ceph-mds 日志如下: 2018-11-27 13:56:19.900056 7fd4066581c0 -1 auth: unable to find a keyring on /var/lib/ceph/mds/ceph-xxx/keyring: (2) No such file or directory 2018-11-27 13:56:19.900107 7fd4066581c0 -1 monclient: ERROR: missing keyring, cannot use cephx for authentication 2018-11-27 13:56:19.900123 7fd4066581c0 -1 mds.192.168.9.6 ERROR: failed to get monmap: (2) No such file or directory 2018-11-27 13:56:19.900135 7fd4066581c0
2019-01-16   schedule 10 min 33 s  
SubsystemMap::should_gather 断言导致 salt-minion coredump
故障现象 磁盘空间不够导致 MON 主动退出,同时系统日志中存在大量如下信息: ~# grep 'segfault at' /var/log/messages salt-minion[3478758]: segfault at 8 ip 00007faf203a74e2 sp 00007faf017f8bf0 error 4 in librbd.so.1.12.0[7faf202d6000+30f000] salt-minion[3494202]: segfault at 104 ip 00007faf2032c051 sp 00007faf03ffdb68 error
2019-01-15   schedule 9 min 44 s  
warning line abc 'xxx' in section 'global' redefined
故障现象 ~$ rbd ls warning: line 23: 'debug_asok_assert_abort' in section 'global' redefined ~$ ceph daemon osd.0 help Can't get admin socket path: unable to get conf option admin_socket for osd.0: warning: line 23: 'debug_asok_assert_abort' in section 'global' redefined 代码分析 参考如下代码,由于 conf->parse_config_files 传入的是 s
2019-01-15   schedule 2 min 52 s  
ceph-selinux policydb module version 19 does not match my version range 4-17
最近发现在安装 ceph 时 ceph-selinux 包会报如下的错误(不影响安装过程,安装的错误码仍然返回 0),但 google 找不到任何有意义的信息: libsemanage.semanage_pipe_data: Child process /usr/libexec/selinux/hll/pp failed with
2019-01-14   schedule 3 min 15 s