<feed xmlns="http://www.w3.org/2005/Atom"> <id>https://hxysayhi.github.io/</id><title>Hxysayhi</title><subtitle>试着去写点东西,关于技术、生活。包括一些日常碎片记录,一些专题内容,一些自由随笔。</subtitle> <updated>2023-06-30T14:36:23+08:00</updated> <author> <name>hxysayhi</name> <uri>https://hxysayhi.github.io/</uri> </author><link rel="self" type="application/atom+xml" href="https://hxysayhi.github.io/feed.xml"/><link rel="alternate" type="text/html" hreflang="en" href="https://hxysayhi.github.io/"/> <generator uri="https://jekyllrb.com/" version="4.2.1">Jekyll</generator> <rights> © 2023 hxysayhi </rights> <icon>/assets/img/favicons/favicon.ico</icon> <logo>/assets/img/favicons/favicon-96x96.png</logo> <entry><title>如何临时或永久修改route table</title><link href="https://hxysayhi.github.io/posts/b9ec2c19/" rel="alternate" type="text/html" title="如何临时或永久修改route table" /><published>2023-06-30T08:34:50+08:00</published> <updated>2023-06-30T09:20:25+08:00</updated> <id>https://hxysayhi.github.io/posts/b9ec2c19/</id> <content src="https://hxysayhi.github.io/posts/b9ec2c19/" /> <author> <name>hxysayhi</name> </author> <category term="Technology" /> <category term="notes" /> <summary> 内容摘要 如何修改route table，如何临时增加或删除路由条目，如何永久添加或删除路由条目。主要涉及route命令、nmcli命令、相关配置文件持久化位置等 临时修改，重启后丢失 直接使用 route 命令可以进行临时修改，但是在系统重启或者是执行interface的重启后会丢失。 命令使用方式： route {add | delete} {-host | -net} {des_ip} [netmask {net mask}] [gw {gw}] [dev {device}] route add：命令关键字，表示增加路由，若要删除路由，则为route del； -host | -net：表示路由目标是主机还是网段； netmask：表示路由目标为网段时才会使用到，表示路由目标网段的子网掩码； gw：命令关键字，后面跟下一跳网关； dev：命令关键字，后面跟具体... </summary> </entry> <entry><title>envoy proxy调研笔记</title><link href="https://hxysayhi.github.io/posts/4a1349e1/" rel="alternate" type="text/html" title="envoy proxy调研笔记" /><published>2022-07-25T20:27:32+08:00</published> <updated>2023-06-15T12:04:05+08:00</updated> <id>https://hxysayhi.github.io/posts/4a1349e1/</id> <content src="https://hxysayhi.github.io/posts/4a1349e1/" /> <author> <name>hxysayhi</name> </author> <category term="Technology" /> <category term="notes" /> <summary> 内容提要 我们主要想了解 envoy 如何提供 L4/L7的代理服务，envoy具体提供哪些功能，我们如何利用这些功能实现我们的业务场景。在envoy如何提供代理能力方面，主要有两点：1. envoy 如何从控制面获取配置； 2. envoy 如何根据配置信息进行路由。在如何利用envoy提供的功能实现我们的业务场景方面，主要是 如何将 k8s集群中的相关资源对象的描述信息，转换为envoy 的配置。 本文我们将围绕以上两个方面，进行介绍，主要有以下相关内容： envoy是什么？为了解决什么问题，具有什么特点，能力边界在哪里。 envoy的基本概念与框架。 明确envoy中的基本术语，以及envoy的基本工作框架，处理流程。 envoy的动态配置能力。控制面如何将k8s集群中的route资源描述信息动态实时地传达到envoy？ ... </summary> </entry> <entry><title>使用make进行golang编译中的小问题及解决方案</title><link href="https://hxysayhi.github.io/posts/61a056t8/" rel="alternate" type="text/html" title="使用make进行golang编译中的小问题及解决方案" /><published>2022-07-02T03:29:38+08:00</published> <updated>2022-07-02T12:42:59+08:00</updated> <id>https://hxysayhi.github.io/posts/61a056t8/</id> <content src="https://hxysayhi.github.io/posts/61a056t8/" /> <author> <name>hxysayhi</name> </author> <category term="Technology" /> <category term="notes" /> <summary> 报错信息：Clock skew detected. Your build may be incomplete. make: Warning: Clock skew detected. Your build may be incomplete. 表示检测到了时钟偏差，通常发生在将代码从开发主机拷贝到编译主机进行编译，而两个设备系统之间的时间上存在差距。 解决方案： find ./ -type f | xargs touch 将所有文件进行一次touch，刷新时间为本地时间，然后进行编译 报错信息： no required module provides package main.go; to add it: go get main.go 解决方案 修改 makefile中 bui... </summary> </entry> <entry><title>envoy 动态路由配置信息查看</title><link href="https://hxysayhi.github.io/posts/61a05b5d/" rel="alternate" type="text/html" title="envoy 动态路由配置信息查看" /><published>2022-05-09T22:13:26+08:00</published> <updated>2022-05-09T22:13:26+08:00</updated> <id>https://hxysayhi.github.io/posts/61a05b5d/</id> <content src="https://hxysayhi.github.io/posts/61a05b5d/" /> <author> <name>hxysayhi</name> </author> <category term="Technology" /> <category term="notes" /> <summary> envoy 通过静态配置和动态配置接口共同决定 路由配置信息。在contour + envoy 的部署使用模式下，envoy 的静态配置中主要定义了如何从contour 获取动态配置信息，而contour 作为 envoy 的控制面 xds server运行，将从k8s 集群 的ingress 资源描述中获取到的路由信息通过xds发送给 envoy。 因此，我们可以通过两种方式来获取 envoy路由配置的相关信息： 一种是通过contour 暴露的接口，去看 contour 给 envoy 发送的内容 一种是通过 envoy 暴露的接口去看envoy接收生效的内容 查看 contour发送的内容 contour 提供了命令行交互能力，可以执行命令 contour cli eds 等命令去获取endpoint等配置的信息。 相关命令： 获取 contour p... </summary> </entry> <entry><title>wait非子进程退出</title><link href="https://hxysayhi.github.io/posts/2c936b7c/" rel="alternate" type="text/html" title="wait非子进程退出" /><published>2022-03-12T22:35:18+08:00</published> <updated>2022-03-13T01:38:08+08:00</updated> <id>https://hxysayhi.github.io/posts/2c936b7c/</id> <content src="https://hxysayhi.github.io/posts/2c936b7c/" /> <author> <name>hxysayhi</name> </author> <category term="Technology" /> <category term="notes" /> <summary> 背景 有这样一个业务场景，需要主进程可以监测它创建的子进程是否还存活，通常来说使用 waitpid 来获取子进程的状态变化情况，就可以实现需求。但是我们希望在主进程异常退出重启后还能够监测之前创建的子进程的存活情况，但是waitpid 又只能针对子进程使用。于是就有了以下问题： 为什么waitpid只能针对子进程使用？ 有没有什么方法可以改变子进程的父进程？ 有没有什么方式可以监测非子进程的退出，或者是其他状态变化？ 为什么waitpid只能针对子进程使用？ wait, waitpid, waitid 这三个系统函数都是为了等待进程状态发生变化。 #include &amp;lt;sys/types.h&amp;gt; #include &amp;lt;sys/wait.h&amp;gt; pid_t wait(int *status); pid_t waitpid(pid_t pid... </summary> </entry> </feed>
