On Thu, 8 Sep 2011, Henry C Chang wrote: > Hi, > > Finally got some time to play around ceph. > I found that: when I dumped osd status by: ceph osd dump -o > /tmp/dump.json --format=json, I got some garbage data in the end of > file. > Thus, I checked the code. I noticed that the output file was not > truncated in ceph_tool_cli_input: > > // Write to a file. Don't truncate the file. > int fd = TEMP_FAILURE_RETRY(::open(outfile, O_WRONLY|O_CREAT|O_TRUNC, 0644)); > > Since it seems intended, I was wondering why. After all, in my case, I > found it causing problems. There was a recent change that lets you stack up commands, separated by ';': $ ceph pg stat \; osd stat Basically we were lazy and reopened the output file inside the loop. Just pushed a patch cleaning it up some! sage -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html