-
Notifications
You must be signed in to change notification settings - Fork 949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enhance: add more field in 'pouch info' command #1238
Conversation
1ed8bab
to
3373790
Compare
daemon/mgr/system.go
Outdated
@@ -96,8 +99,13 @@ func (mgr *SystemManager) Info() (types.SystemInfo, error) { | |||
OSName = osName | |||
} | |||
|
|||
images, err := mgr.imageMgr.ListImages(context.Background(), "") | |||
if err != nil { | |||
logrus.Warnf("failed to get image info") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this error log seems improper. You did not describe the error correctly, and did not log the detailed error message, right?
How about logrus.Warnf("failed to list images: %v", err)
? @ZouRui89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filed 'image' corresponds to the number of images, in which case I think logrus.Warnf("failed to get image info: %v", err)
is better. WDYT? @allencloud
I like your work. LGTM if some update according to code comment. @ZouRui89 |
Signed-off-by: Zou Rui <[email protected]>
DefaultLogConfig types.HostConfigAO0LogConfig `json:"default-log-config, omitempty"` | ||
|
||
// RegistryService | ||
RegistryService types.RegistryServiceConfig `json:"registry-service, omitempty" ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We add this field in the code, however I am afraid we have not add this field's assignment in manager's code, right? Do we have a plan to add this field assignment? @ZouRui89
LGTM |
Signed-off-by: Zou Rui [email protected]
Ⅰ. Describe what this PR did
This pr adds the value assertion of 'Architecture/Images/LoggingDriver/RegistryConfig' on daemon side, in which case 'pouch info' command wil output more field value.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
[root@instance-1 zouruicloud]# pouch info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 1
ID:
Name: instance-1
Server Version: 0.4.0
Storage Driver: overlayfs
Driver Status: []
Logging Driver:
Cgroup Driver:
runc:
containerd:
Security Options: []
Kernel Version: 3.10.0-693.11.1.el7.x86_64
Operating System: "CentOS Linux 7 (Core)"
OSType: linux
Architecture: amd64
HTTP Proxy:
HTTPS Proxy:
Registry: https://index.docker.io/v1/
Experimental: false
Debug: false
Labels:
node_ip=10.142.0.2
SN=GoogleCloud-0F7AA324BDD10D51358D5410E1D02814
CPUs: 1
Total Memory: 3.456 GiB
Pouch Root Dir: /var/lib/pouch
LiveRestoreEnabled: true
LxcfsEnabled: false
Daemon Listen Addresses: [unix:///var/run/pouchd.sock]
Ⅴ. Special notes for reviews