go-ceph
go-ceph copied to clipboard
MonCommand How to send command : ceph tell osd.* injectargs '--osd-max-backfills 1
Find:
"cmd483": {
"sig": [
"tell",
{
"name": "target",
"type": "CephName"
},
{
"n": "N",
"name": "args",
"type": "CephString"
}
],
"help": "send a command to a specific daemon",
"module": "mon",
"perm": "rw",
"flags": 0
},
my code
map[string]interface{"prefix":"tell","target":"osd.*","args":"injectargs '--osd-max-backfills 1'"})
got error
rados: ret=-22, Invalid argument
thank you for you answer~
I have not tried this at all, but I think the "n": "N" flag indicates that there are multiple arguments - an array in json parlance. Try breaking your "args" into multiple arguments (in a slice) like "args": []string{"foo", "bar", "baz"}. Unfortunately, I am not sure where the breaks should be for injectargs, you may want to try a few different ways.
If that doesn't work please let us know and I can look a little deeper into how the ceph command formats arguments when tell is used.
thank you for your replay ~
map[string]interface{}{"prefix": "tell","target":"osd.*", "args": []string{"injectargs","--osd-max-backfills 1"}}
map[string]interface{}{"prefix": "tell","target":"osd.*", "args": []string{"injectargs","--osd-max-backfills", "1"}})
map[string]interface{}{"prefix": "tell","target":"osd.*", "args": []string{"injectargs","osd-max-backfills", "1"}})
map[string]interface{}{"prefix": "tell","target":"osd.*", "args": []string{"injectargs","osd-max-backfills 1"}})
........
They all failed, really need your help~~~
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contribution.
MonCommand How to send command : ceph tell osd.* injectargs '--osd-max-backfills 1
Hi, I'd like to help more but unfortunately I'm not quite sure what the issue is. I have little direct experience with injectargs command. What I suggest is to try and instrument the python code of the ceph command such that you can see exactly what structure the ceph command is constructing when it issues the command to the ceph server.
In addition to the above, try looking at the mon logs to see if there are any hints about what the mon(s) expect for the formatting of the args property.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contribution.