conntrack相关字段

参考连接conntrack OVS supports following match fields related to conntrack: ct_state: The state of a connection matching the packet. 可能的值有: 1 2 3 4 5 6 7 8 new est rel rpl inv trk snat dnat 上述字段 如果前面有+号, 则说明是必须设置的标记; 如果前面有-号, 则说明必须取消的标记. 同样也支持多个字段同时设置, 例如 ct_state=+trk+new 参考ovs-fields了解更多 ct_zone:16bi……

阅读全文

docker容器cmd执行多条命令

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 mysql: build: context: ./mariadb dockerfile: ./Dockerfile container_name: mariadb_yoga restart: on-failure command: - /bin/bash - -c - | mysqld --user=root mysql -u root -p 123456 < /db/init_db.sql volumes: - /var/lib/openstack/yoga/mysql:/var/lib/mysql - /etc/localtime:/etc/localtime ports: - "23306:3306" # host物理直接映射端口为13306 environment: MYSQL_ROOT_PASSWORD: '123456' # root管理员用户密码 networks: network: ipv4_address: 177.177.0.13……

阅读全文

docker容器重启策略

可选策略 在docker run通过 –restart 设置守护机制: no: 不自动重新启动容器(默认) on-failure: 容器发生error而退出(容器退出状态不为0)重启容器 unless-stopped: 在容器已经stop掉或Docker stoped/restarted的时候才重启容器 always: 如果容器停止,总是重新启动容器。如果手动kill容器,则无法自……

阅读全文

docker联合文件系统

参考:https://www.jianshu.com/p/5c1f152ac4a6 1. 前言 (Union filesystem)联合文件系统允许我们把多个文件系统逻辑上合并成一个文件系统,组成Union filesystem的文件系统不必相同(它们可以是ext2/3/4,vfat,ntfs,jff……

阅读全文

go_自旋锁

CAS算法(compare and swap) CAS算法是一种有名的无锁算法。无锁编程,即不使用锁的情况下实现多线程之间的变量同步,也就是在没有线程被阻塞的情况下实现变量的同步,所以也叫非阻塞同步(Non-blocking Synchronization)。CAS算法涉及到三个操作数: 需要……

阅读全文

hypervisor

Hypervisor:一种运行在物理服务器和操作系统之间的中间层软件,可以允许多个操作系统和应用共享一套基础物理硬件. 可以将Hypervisor看做是虚拟环境中的"元"操作系统,可以协调访问服务器上的所有物理设备的虚拟机,所以又称为虚拟机监视器(virtual……

阅读全文

ifconfig配置命令

配置IPv6地址: 1 2 ifconfig enp9s0f1 inet6 add 81::d/64 配置IPv4地址: 1 2 ifconfig enp9s0f1 add 10.0.0.6/64 ifconfig enp9s0f1 delete 10.0.0.6/64……

阅读全文

Internet和internet

internet意思是用一个共同的协议族把多个网络连接在一起. 而Internet指的是世界范围内通过TCP/IP互相通信的所有主机集合 Internet是一个internet,但internet不等于Internet……

阅读全文

ip link

ip link命令格式 命令实例 ip link add link eth0 name eth0.10 type vlan id 10 命令实例 解释 ip link add link eth0 name eth0.10 type vlan id 10 在设备eth0上创建新的vlan设备eth0.10 ip link set eth0 up 或:ifconfig eth0 up 开启eth0网卡 ip link set eth0 down或:ifconfig eth0 down 关闭eth0网卡 ip link set eth0 promisc on 开启网卡的混合模式 ip link set eth0 promisc off……

阅读全文