Skip to content
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

etcdctl: add hex option for endpoint status #12110

Closed

Conversation

@xiang90
Copy link
Contributor

xiang90 commented Jul 20, 2020

have you tested it out? example output?

@DenisRazinkin
Copy link
Author

have you tested it out? example output?

-bash-4.4# etcdctl endpoint status -w json --hex | jq
[
{
"Endpoint": "127.0.0.1:2379",
"Status": {
"header": {
"cluster_id": "c0e07f467bfefc23",
"member_id": "3c2df0409ca25018",
"revision": "19",
"raft_term": "c4d"
},
"version": "3.4.9",
"dbSize": "8000",
"leader": "3c2df0409ca25018",
"raftIndex": "33",
"raftTerm": "c4d",
"raftAppliedIndex": "33",
"dbSizeInUse": "5000"
}
}
]

Without hex:
-bash-4.4# etcdctl endpoint status -w json | jq
[
{
"Endpoint": "127.0.0.1:2379",
"Status": {
"header": {
"cluster_id": 13898248390770098000,
"member_id": 4336386176524112000,
"revision": 25,
"raft_term": 3149
},
"version": "3.4.9",
"dbSize": 32768,
"leader": 4336386176524112000,
"raftIndex": 51,
"raftTerm": 3149,
"raftAppliedIndex": 51,
"dbSizeInUse": 20480
}
}

@stale
Copy link

stale bot commented Oct 19, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 19, 2020
@xiang90
Copy link
Contributor

xiang90 commented Oct 19, 2020

@DenisRazinkin

LGTM.

Can you change commit message to "etcdctl: add hex option for endpoint status"?

@stale stale bot removed the stale label Oct 19, 2020
@DenisRazinkin DenisRazinkin changed the title add hex option for endpoint status etcdctl: add hex option for endpoint status Oct 22, 2020
@DenisRazinkin
Copy link
Author

@xiang90 a29f4ee

@xiang90
Copy link
Contributor

xiang90 commented Oct 22, 2020

@DenisRazinkin

CI still failing. You need to merge the 3 commits into one.

@stale
Copy link

stale bot commented Jan 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 21, 2021
@spzala spzala removed the stale label Jan 21, 2021
Copy link
Contributor

@ptabor ptabor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution.

var buffer bytes.Buffer
var b []byte

buffer.WriteString("[")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid "hand-crafting" of JSON format as it might have subtle escaping consequences.

Please see discussion in:
#12595 (comment)

proc, err := spawnCmd(cmdArgs)
if err != nil {
cx.t.Fatalf("endpointStatusHexTest error (%v)", err)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please verify the test output (printed format).

@ptabor ptabor assigned ptabor and unassigned ptabor Feb 5, 2021
@stale
Copy link

stale bot commented May 8, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 8, 2021
@stale stale bot closed this Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants