ZhangZhihui's Blog  

2021年2月1日

摘要: I have an HA k8s cluster which has 3 control-plane nodes. When 2 of the 3 control-plane nodes are shut down, the cluster stops working. When shut down 阅读全文
posted @ 2021-02-01 09:40 ZhangZhihuiAAA 阅读(1507) 评论(0) 推荐(0)

2021年1月14日

摘要: 1. Remove a PPA from Software Sources via GUI 2. Remove a PPA using APT in terminal: zzh@ZZHPC:~$ sudo add-apt-repository --remove "deb [arch=amd64] h 阅读全文
posted @ 2021-01-14 11:42 ZhangZhihuiAAA 阅读(197) 评论(0) 推荐(0)

2020年12月31日

摘要: Enable forwarding from Docker containers to the outside world By default, traffic from containers connected to the default bridge network is not forwa 阅读全文
posted @ 2020-12-31 08:53 ZhangZhihuiAAA 阅读(202) 评论(0) 推荐(0)

2020年12月25日

摘要: The problem is with slashes: your variable contains them and the final command will be something like sed "s/string/path/to/something/g", containing w 阅读全文
posted @ 2020-12-25 12:32 ZhangZhihuiAAA 阅读(1143) 评论(0) 推荐(0)

2020年12月24日

摘要: The shebang must be the first line, because it is interpreted by the kernel, which looks at the two bytes at the start of an executable file. If these 阅读全文
posted @ 2020-12-24 11:54 ZhangZhihuiAAA 阅读(97) 评论(0) 推荐(0)

2020年12月1日

摘要: scnzzh@ZUBT:~$ ansible -i zzh-inventory all --list-hosts | grep WARNING | wc -l [WARNING]: * Failed to parse /home/scnzzh/zzh-inventory with yaml plug 阅读全文
posted @ 2020-12-01 16:57 ZhangZhihuiAAA 阅读(288) 评论(0) 推荐(0)

2020年11月28日

摘要: If you have a known octal or hexadecimal value (at script-writing time), you can just use printf: # POSIX printf '\047\n' # bash/ksh/zsh and a few oth 阅读全文
posted @ 2020-11-28 15:05 ZhangZhihuiAAA 阅读(58) 评论(0) 推荐(0)

2020年11月24日

摘要: Search and print matched lines: scnzzh@ZUBT1:~/zzh$ sed -n '/ExecStart/p' docker.service ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/contain 阅读全文
posted @ 2020-11-24 11:35 ZhangZhihuiAAA 阅读(111) 评论(0) 推荐(0)

2020年11月23日

摘要: scnzzh@ZUBT:~$ re='^[0-9]+$' scnzzh@ZUBT:~$ a=001 scnzzh@ZUBT:~$ b=a12 scnzzh@ZUBT:~$ if [ $a =~ $re ]; then echo 'yyy'; fi bash: [: =~: binary operat 阅读全文
posted @ 2020-11-23 16:33 ZhangZhihuiAAA 阅读(1157) 评论(0) 推荐(0)

2020年11月13日

摘要: zzh@ZZHPC:~$ a=" aaa aaa " zzh@ZZHPC:~$ echo "$a" aaa aaa zzh@ZZHPC:~$ echo $a aaa aaa zzh@ZZHPC:~$ b="bbb${a}bbb" zzh@ZZHPC:~$ echo "$b" bbb aaa aaa 阅读全文
posted @ 2020-11-13 09:15 ZhangZhihuiAAA 阅读(92) 评论(0) 推荐(0)