这是我用来帮助调试 OSX Mojave 10.14.5 上的 openssl 和/或 ssh 问题的测试脚本,其中安装了 brew 版本的 openssl 和 openssh
> brew info openssh | head -1
stable 8.0p1 (bottled)
> brew info openssl | head -1
stable 1.0.2r (bottled) [keg-only]
> ssh -V
OpenSSH_7.9p1, LibreSSL 2.7.3
> openssl version
LibreSSL 2.6.5
> ! test -f /tmp/foo || rm /tmp/foo &&
ssh-keygen -f /tmp/foo -t rsa -P "" -N "" &&
openssl rsa -in /tmp/foo
Generating public/private rsa key pair.
Your identification has been saved in …Run Code Online (Sandbox Code Playgroud) 我正在尝试发现当前正在执行的 AWS Lambda 的 VPC IP 地址或 AWS ENI,以便我可以使用该 IP 地址来过滤 VPC 日志以查找匹配的记录。Lambda 在 VPC 中运行,没有公共 IP 地址。
我尝试过这里建议的各种技术:
但这些对我不起作用,因为我认为它们是从容器的角度而不是 VPC 的角度显示容器的 IP 地址。
我正在尝试在运行 Debian 8.7 的 BeagleBone 上调试串行连接。为此,我用 go 编写了一个测试程序。我没有得到预期的结果,所以我启动了测试程序 strace。
果然,我期望看到的写入系统调用不存在。我检查了我的源代码,它们肯定应该在那里。测试程序基本上是这样的:
loop:
write a log message to stderr
write a buffer of binary 0x00 to the serial port
write a different log message to stderr
write a buffer of binary 0xff to the serial port
Run Code Online (Sandbox Code Playgroud)
该程序在 stderr 上生成如下所示的输出:
2015/11/12 21:28:45 111...
2015/11/12 21:28:46 000...
2015/11/12 21:28:48 111...
2015/11/12 21:28:49 000...
2015/11/12 21:28:51 111...
2015/11/12 21:28:52 000...
2015/11/12 21:28:54 111...
2015/11/12 21:28:55 000...
2015/11/12 21:28:57 111...
2015/11/12 21:28:58 000...
2015/11/12 21:29:00 111... …Run Code Online (Sandbox Code Playgroud) 我正在将我的 terraform 0.11 配置迁移到 terraform 0.12.5。
迁移(使用0.12upgrade)进行的比较顺利,但是后来我在下一个计划的时候遇到了这个错误
Error: Invalid value for module argument
on main.tf line 72, in module "foo":
72: subnet_ids = module.vpc.subnet_ids
The given value is not suitable for child module variable "subnet_ids"
defined at ../../modules/foo/main.tf:10,1-30: element 0: string
required.
Run Code Online (Sandbox Code Playgroud)
该模块foo有一个(迁移的)变量声明子网_ids,如下所示:
variable "subnet_ids" {
type = list(string)
}
Run Code Online (Sandbox Code Playgroud)
而vpc模块有一个输出声明,声明如下:
output "subnet_ids" {
value = [aws_subnet.private.*.id]
}
Run Code Online (Sandbox Code Playgroud)
似乎如果我放松对foo模块的类型约束,错误就会消失。
然而,这是正确的做法。毕竟,vpc 模块的输出实际上不是一个字符串列表吗?如何检查 vpc 输出变量的类型?
更新:放宽类型约束允许验证的第一部分成功,但仅在根据此输出应用变量时对消费模块造成问题
Error: Incorrect attribute value type
on ../../modules/foo/main.tf line 350, …Run Code Online (Sandbox Code Playgroud) aws-lambda ×1
debian ×1
decode ×1
discovery ×1
ip-address ×1
linux ×1
module ×1
openssh ×1
openssl ×1
private-key ×1
python ×1
strace ×1
terraform ×1