mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-25 06:52:13 +00:00
agent: fix wrong regular exp to fetch guest-cid
Fix the incorrect regular expression to fetch the guest context ID. In " [^,][^,]* ", [^,]* will match to the next ",", which is after "socket", so finally got incorrect result. Use egrep -o "guest-cid=[0-9]*" instead. Fixes: #2124 Signed-off-by: Liang Zhou <zhoul110@chinatelecom.cn>
This commit is contained in:
parent
015b3baf06
commit
2c9430123e
@ -80,7 +80,7 @@ $ sudo docker export $(sudo docker create "$image") | tar -C "$rootfs_dir" -xvf
|
|||||||
value:
|
value:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ guest_cid=$(ps -ef | grep qemu-system-x86_64 | egrep -o "guest-cid=[^,][^,]*" | cut -d= -f2)
|
$ guest_cid=$(ps -ef | grep qemu-system-x86_64 | egrep -o "guest-cid=[0-9]*" | cut -d= -f2)
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Run the tool to connect to the agent:
|
1. Run the tool to connect to the agent:
|
||||||
|
Loading…
Reference in New Issue
Block a user