<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Man_In_The_Night的博客]]></title><description><![CDATA[记录学习中的各种问题以及自己的理解，供以后温故以及分享一下，错误之处，希望批评指正，以免误导更多人。如有侵权，请联系删除。谢谢！]]></description><link>https://blog.youkuaiyun.com/Man_In_The_Night</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Man_In_The_Night]]></copyright><item><title><![CDATA[Ubuntu16 永久修改 DNS]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/120228882</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/120228882</guid><author>Man_In_The_Night</author><pubDate>Fri, 10 Sep 2021 20:02:45 +0800</pubDate><description><![CDATA[环境： ubuntu16.04
操作步骤：
1、修改 /etc/resolv.conf
nameserver 114.114.114.114
nameserver 114.114.114.114
options timeout:1
options attempts:3

2、安装 resolveconf
apt install resolveconf

3、修改配置文件 /etc/resolvconf/resolv.conf.d/head
# Dynamic resolv.conf(5) file for ]]></description><category></category></item><item><title><![CDATA[记一次 proxy 导致的端口访问失败]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/120228575</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/120228575</guid><author>Man_In_The_Night</author><pubDate>Fri, 10 Sep 2021 19:48:50 +0800</pubDate><description><![CDATA[背景：infra 交付了一批服务器，部署好服务后，发现所有服务器端口 curl 不可
环境： 服务器 IP 192.168.1.1， 内部网络
问题详情：
1、服务器部署了 node_exporter, 端口 9100.  lsof 和 netstat -nlp 均显示 9100 端口启用，防火墙未开启
访问 curl 192.168.1.1:9100/metrics 没有结果
访问 curl 127.0.0.1:9100 /metrics 没有结果
2、安装 apache2 apt install apa]]></description><category></category></item><item><title><![CDATA[使用 node-exporter textfile 收集文件中的 metrics]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/120228390</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/120228390</guid><author>Man_In_The_Night</author><pubDate>Fri, 10 Sep 2021 19:36:39 +0800</pubDate><description><![CDATA[背景 ： 本来打算使用 process-exporter 来监控 airflow celery worker 进程的，但是当 airflow worker 并发数量达到 2000 时，process-exporter metrics 延时会达到 5min 以上，prometheus 拉取 metrics 会 timeout。打算使用 ps 命令写 worker 进程数到文件中，然后使用 node-exporter 来 export 文件中的 metrics。
环境：ubuntu 16.04, node-ex]]></description><category></category></item><item><title><![CDATA[Ubuntu20 安装 python2 的 pip]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/120228243</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/120228243</guid><author>Man_In_The_Night</author><pubDate>Fri, 10 Sep 2021 19:20:45 +0800</pubDate><description><![CDATA[Ubuntu20 安装 pip2
环境：ubuntu20， python2.7.18
1、配置 pip.conf（如果网络 ok，这一步省略）
root@myserver:~# cat /etc/pip.conf 
# BEGIN ANSIBLE MANAGED BLOCK
[global]
# END ANSIBLE MANAGED BLOCK
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsi]]></description><category></category></item><item><title><![CDATA[Ubuntu20 普通用户使用 crontab]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/120228037</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/120228037</guid><author>Man_In_The_Night</author><pubDate>Fri, 10 Sep 2021 19:12:47 +0800</pubDate><description><![CDATA[环境：
Ubuntu20.04
问题：
ubuntu20 普通用户默认没有开启 crontab 权限，所以会报以下错误
hadoop@myserver:~$ crontab -e
/etc/cron.allow: Permission denied
You (hadoop) are not allowed to use this program (crontab)
See crontab(1) for more information

解决方法：
1、添加 allow 权限
root@myserver:~]]></description><category></category></item><item><title><![CDATA[win10 vscode 设置 Python 虚拟环境]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/118681320</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/118681320</guid><author>Man_In_The_Night</author><pubDate>Tue, 13 Jul 2021 00:21:57 +0800</pubDate><description><![CDATA[环境： win10， vscode 1.15.1，vscode python 插件， python 3.6.8
1、创建虚拟环境 test
python -m venv test

2、使用 ctrl + shift + p 打开搜索，输入 python interpreter，选择 python select interpreter


]]></description><category></category></item><item><title><![CDATA[win10 更新后指纹不能使用]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/118685193</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/118685193</guid><author>Man_In_The_Night</author><pubDate>Mon, 12 Jul 2021 22:13:46 +0800</pubDate><description><![CDATA[2021年7月12日更新windows后，指纹使用后报错“抱歉，出现问题，关闭windows hello，然后尝试再次运行安装程序”。
解决方法：使用官方推荐方法 https://answers.microsoft.com/zh-hans/windows/forum/all/%E6%9B%B4%E6%96%B0win10%E5%90%8E%E6%8C%87%E7%BA%B9/7fc55349-7234-4fd0-a3c1-04fcf20e2aaa
1、找到控制面板-管理工具-服务，并找到Windows Bi]]></description><category></category></item><item><title><![CDATA[linux 查看用户使用的进程或线程数量]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/116032581</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/116032581</guid><author>Man_In_The_Night</author><pubDate>Thu, 22 Apr 2021 21:13:05 +0800</pubDate><description><![CDATA[$ ps h -Led -o user | sort | uniq -c | sort -nr
   2155 cloudera-scm
   1949 root
   1037 hdfs
    786 hbase
    541 hive
    315 yarn
    269 hadoop
    233 oozie
    229 mysql
    147 mapred
    140 hue
    107 sentry
    105 zookeeper
    102 httpfs
   ]]></description><category></category></item><item><title><![CDATA[Megacli 常用命令]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/115771662</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/115771662</guid><author>Man_In_The_Night</author><pubDate>Fri, 16 Apr 2021 20:57:56 +0800</pubDate><description><![CDATA[环境： ubuntu 16.04，megalic 8.07.14，服务器 raid 卡 "LSI Logic / Symbios Logic MegaRAID SAS-3 3108“
1、查看 raid 卡命令
lspci -knn | grep "RAID bus controller"

2、常用 megacli 命令
megacli -LdPdInfo -aALL # 查看所有逻辑盘、物理盘信息
MegaCli -LDInfo -Lall -aALL # 查看所有逻辑盘信息
megacli -LDIn]]></description><category></category></item><item><title><![CDATA[Megacli 定位磁盘]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/115771633</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/115771633</guid><author>Man_In_The_Night</author><pubDate>Fri, 16 Apr 2021 20:55:45 +0800</pubDate><description><![CDATA[背景： 磁盘 /dev/sdb 重做 raid0，需要先定位 sdb 对应的物理盘，然后使用 raid 工具重做 raid。
环境：环境： ubuntu 16.04，megalic 8.07.14，服务器 raid 卡 “LSI Logic / Symbios Logic MegaRAID SAS-3 3108”
1、查看 raid 卡命令
lspci -knn | grep "RAID bus controller"

2、查看 /dev/sdb 对应的逻辑盘
# ll /dev/disk/by-path]]></description><category></category></item><item><title><![CDATA[os x 安装指定版本的 ansible]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/112794101</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/112794101</guid><author>Man_In_The_Night</author><pubDate>Mon, 18 Jan 2021 20:21:18 +0800</pubDate><description><![CDATA[环境：mac os x 10.15.7
默认 python2.7.16, 但是没有安装 pip2，只有 pip3。使用 pip3 安装的 ansibe 使用会报错（具体原因还不是很理解）
解决方法：先安装 pip2，再用 pip2 安装 ansible
1、安装 pip2
$sudo easy_install pip

2、安装 ansible
$pip install -y ansible==2.7.5

3、测试
$ansible localhost -m ping


...]]></description><category></category></item><item><title><![CDATA[ceph 笔记整理]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/112027212</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/112027212</guid><author>Man_In_The_Night</author><pubDate>Thu, 31 Dec 2020 16:49:41 +0800</pubDate><description><![CDATA[ceph 查看、修改 crushmap
直接通过 ceph 命令
1、创建对应的root
ceph osd crush add-bucket ssd root
ceph osd crush add-bucket sas root
2、创建对应的host
ceph osd crush add-bucket node-4-sata host
ceph osd crush add-bucket node-5-sata host
ceph osd crush add-bucket node-4-ssd host
c]]></description><category></category></item><item><title><![CDATA[ceph 查找 rbd image 存储位置]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/112028526</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/112028526</guid><author>Man_In_The_Night</author><pubDate>Thu, 31 Dec 2020 16:46:14 +0800</pubDate><description><![CDATA[环境：centos7.6， ceph luminious
ceph  同时提供对象存储、块存储、文件存储三种接口，但本质上都是对象存储，也就是说一个rbd image 实际上包含了多个对象（默认情况下是 iamge_size/4M）
查看 pg 对应的 osd
ceph pg dump
ceph pg map 3.5d

查看 pool 中的 image
[root@ansible002 ~]# rbd list k8s
kubernetes-dynamic-pvc-0f4455a2-f96a-11e9-9]]></description><category></category></item><item><title><![CDATA[openstack 删除一个 loadbalancer]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/112026762</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/112026762</guid><author>Man_In_The_Night</author><pubDate>Thu, 31 Dec 2020 16:36:47 +0800</pubDate><description><![CDATA[环境：centos7.6， openstack rocky
bashboard 直接删除会报错，需要依次删除  healthmonitor、listener、pool、loadbalancer
 neutron lbaas-healthmonitor-list
 neutron lbaas-healthmonitor-delete
 neutron lbaas-listener-list
 neutron lbaas-listener-delete
 neutron lbaas-pool-list
 neu]]></description><category></category></item><item><title><![CDATA[ceph osd 磁盘损坏处理]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/111993076</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/111993076</guid><author>Man_In_The_Night</author><pubDate>Wed, 30 Dec 2020 16:23:30 +0800</pubDate><description><![CDATA[（一） 从 ceph 删除该 osd
1、登陆 ceph mon 节点，查看坏掉的 osd
2、mon 上执行  out  osd.x
ceph osd out osd.x

3、从 crush map 中删除 osd.x，防止它再接受数据
ceph osd crush remove osd.x

ceph auth del osd.x

ceph osd rm osd.x

[root@bakmtr01 ~]# ceph -s
  cluster:
    id:     0e38e7c6-a704-41]]></description><category></category></item><item><title><![CDATA[ceph rgw 开启 usage 日志]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/111992980</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/111992980</guid><author>Man_In_The_Night</author><pubDate>Wed, 30 Dec 2020 16:18:00 +0800</pubDate><description><![CDATA[环境：centos7.6 、ceph luminious
1、修改配置文件 ceph.conf，增加 rgw enable usage log =true
[root@bakmtr01 ~]# cat /etc/ceph/ceph.conf 
[client.rgw.bakmtr01]
host = bakmtr01
keyring = /var/lib/ceph/radosgw/ceph-rgw.bakmtr01/keyring
log file = /var/log/ceph/ceph-rgw-bakm]]></description><category></category></item><item><title><![CDATA[openstack设置实例的帐号密码]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/111915141</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/111915141</guid><author>Man_In_The_Night</author><pubDate>Tue, 29 Dec 2020 15:01:35 +0800</pubDate><description><![CDATA[环境：openstack rocky，centos7.6 镜像
“项目”–“实例”–“创建实例”–“配置”–“选择文件”
文件内容如下:
#!/bin/bash
#change password
passwd root&lt;&lt;EOF
hao@123
hao@123
EOF
#allow ssh password login and no use dns
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh]]></description><category></category></item><item><title><![CDATA[python 多进程上传下载 ceph 对象存储]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/111911746</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/111911746</guid><author>Man_In_The_Night</author><pubDate>Tue, 29 Dec 2020 14:54:11 +0800</pubDate><description><![CDATA[centos7.6，python 2.7.5，ceph luminious
1、多线程上传脚本
# ！/bin/python
# -*- encoding:utf-8 -*-

endpoint_url = "http://192.168.1.10:6780";
access_key = "xxx"
secret_key = "xxx"
# bucket name in oss
default_bucketname = "lalala"

class S3Operate(object):
    def _]]></description><category></category></item><item><title><![CDATA[jenkins 使用 k8s 动态创建 jenkins slave pod]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/111830847</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/111830847</guid><author>Man_In_The_Night</author><pubDate>Mon, 28 Dec 2020 11:47:57 +0800</pubDate><description><![CDATA[环境：centos7.6 、Docker version 19.03.5、Jenkins 2.249.3（jackson = 2.11.2、docker plugin = 1.2.1）、 kubernetes cli plugin 1.9.0、kubernetes plugin 1.27.7	
主要思想： 使用 kubenetes cli plugin 配置一个动态的 pod jenkins jnlp slave，pod 中包含 mvn、docker、kubectl 等容器。创建多分支流水线，Jenkins]]></description><category></category></item><item><title><![CDATA[jenkins cicd k8s 多分支流水线构建]]></title><link>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/111742939</link><guid>https://blog.youkuaiyun.com/Man_In_The_Night/article/details/111742939</guid><author>Man_In_The_Night</author><pubDate>Sat, 26 Dec 2020 16:11:06 +0800</pubDate><description><![CDATA[环境：centos7.6 、Docker version 19.03.5、Jenkins 2.249.3（jackson = 2.11.2、docker plugin = 1.2.1）
主要思想： 使用 docker plugin 配置一个动态的docker jenkins jnlp slave，该镜像中包含 mvn、git、docker、kubectl 等命令。创建多分支流水线，Jenkinsfile 使用前面配置好的 jenkins slave。在该 jenkins slave 中执行 maven 构建]]></description><category></category></item></channel></rss>